*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Fri, 18 Nov 2016 16:17:18 +0100
changeset 4155 28d26fd538cf
parent 4154 3c343bb35a2e
child 4156 84650c654caf
*** empty log message ***
CVSVersionInfo.st
SVNVersionInfo.st
--- a/CVSVersionInfo.st	Fri Nov 18 16:16:06 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,189 +0,0 @@
-"
- COPYRIGHT (c) 2009 by eXept Software AG
-              All Rights Reserved
-
- This software is furnished under a license and may be used
- only in accordance with the terms of that license and with the
- inclusion of the above copyright notice.   This software may not
- be provided or otherwise made available to, or used by, any
- other person.  No title to or ownership of the software is
- hereby transferred.
-"
-"{ Package: 'stx:libbasic3' }"
-
-"{ NameSpace: Smalltalk }"
-
-VersionInfo subclass:#CVSVersionInfo
-	instanceVariableNames:'repositoryPathName timeZone'
-	classVariableNames:''
-	poolDictionaries:''
-	category:'System-SourceCodeManagement'
-!
-
-!CVSVersionInfo class methodsFor:'documentation'!
-
-copyright
-"
- COPYRIGHT (c) 2009 by eXept Software AG
-              All Rights Reserved
-
- This software is furnished under a license and may be used
- only in accordance with the terms of that license and with the
- inclusion of the above copyright notice.   This software may not
- be provided or otherwise made available to, or used by, any
- other person.  No title to or ownership of the software is
- hereby transferred.
-"
-!
-
-documentation
-"
-    In ancient times, Class used to return a Dictionary when asked for versionInfo.
-    This has been replaced by instances of VersionInfo and subclasses.
-
-    CVSVersionInfo adds some CVS specific data.
-
-    [author:]
-        cg (cg@AQUA-DUO)
-"
-! !
-
-!CVSVersionInfo class methodsFor:'instance creation'!
-
-fromRCSString:aString
-    "{ Pragma: +optSpace }"
-
-    "I know how to parse RCS/CVS version id strings.
-     Return an instance filled with revision info which is
-     extracted from aString. This must be in RCS/CVS format."
-
-    |words firstWord nextWord info nm s fn revString d |
-
-    s := aString readStream.
-    s skipSeparators.
-    firstWord := s upToSeparator.
-
-    info := self new.
-
-    "/
-    "/ supported formats:
-    "/
-    "/ $-Header:   pathName rev date time user state $
-    "/ $-Revision: rev $
-    "/ $-Id:       fileName rev date time user state $
-    "/
-    (firstWord = '$Header:' or:[firstWord = '§Header:']) ifTrue:[
-        d := firstWord first.
-        s skipSeparators.
-        nm := s throughAll:',v '.
-        nm := nm withoutSeparators.
-        info repositoryPathName:nm.
-        info fileName:(nm asFilename baseName copyButLast:2).
-        words := s upToEnd asCollectionOfWords readStream.
-
-        words atEnd ifFalse:[
-            nextWord := words next.
-            nextWord first ~= d ifTrue:[
-                info revision:nextWord.
-                nextWord := words next.
-                (nextWord notNil and:[nextWord first ~= d]) ifTrue:[
-                    info date:nextWord.
-                    info time:words next.
-                    nextWord := words next.
-                    (nextWord notNil and:[nextWord startsWithAnyOf:'+-']) ifTrue:[
-                        info timezone:nextWord.
-                        nextWord := words next.
-                    ].
-                    info user:nextWord.
-                    info state:words next.
-                ]
-            ].
-        ].
-        ^ info
-    ].
-
-    (firstWord = '$Revision:' or:[firstWord = '§Revision:']) ifTrue:[
-        info revision:(s upToEnd asCollectionOfWords first).
-        ^ info
-    ].
-
-    (firstWord = '$Id:' or:[firstWord = '§Id:']) ifTrue:[
-        "/commented out by Jan Vrany, 2009/10/20
-        "/according to http://svnbook.red-bean.com/en/1.5/svn.advanced.props.special.keywords.html
-        "/svn has no support for $ Header $ expansion. Therefore
-        "/libsvn uses $Id$ instead.
-        "/self halt:'no longer supported'.        
-        words := s upToEnd asCollectionOfWords readStream.
-        info fileName:(fn := words next).
-        (fn endsWith:',v') ifFalse:[
-            "/ not a CVS version
-            ^ nil
-        ].
-        info revision:(revString := words next).
-
-        "/ do not use matchesRegex:'[0-9]+\.[0-9]+.*') here: regex is an optional package
-        ((revString conform:[:c | c isDigit or:[c == $.]])
-        and:[revString includes:$.]) ifFalse:[
-            "/ not a CVS version
-            ^ nil
-        ].
-        info date:(words next).
-        info time:(words next).
-        info user:(words next).
-        info state:(words next).
-        ^ info
-    ].
-
-    ^ nil
-
-    "
-     CVSVersionInfo fromRCSString:('$' , 'Revision: 1.122 $')
-     CVSVersionInfo fromRCSString:(CVSSourceCodeManager version)
-     CVSVersionInfo fromRCSString:(SVNSourceCodeManager version_CVS)
-    "
-
-    "Modified (comment): / 11-10-2011 / 23:41:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 22-11-2011 / 16:15:49 / cg"
-    "Modified (format): / 24-11-2011 / 10:56:51 / cg"
-! !
-
-!CVSVersionInfo methodsFor:'accessing'!
-
-repositoryPathName
-    ^ repositoryPathName
-!
-
-repositoryPathName:something
-    repositoryPathName := something.
-!
-
-timeZone
-    ^ timeZone
-!
-
-timeZone:something
-    timeZone := something.
-!
-
-timezone
-    ^ timeZone
-
-    "Created: / 22-10-2008 / 20:50:39 / cg"
-!
-
-timezone:something
-    timeZone := something.
-
-    "Created: / 22-10-2008 / 20:50:32 / cg"
-! !
-
-!CVSVersionInfo class methodsFor:'documentation'!
-
-version
-    ^ '$Header$'
-!
-
-version_CVS
-    ^ '$Header$'
-! !
-
--- a/SVNVersionInfo.st	Fri Nov 18 16:16:06 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,165 +0,0 @@
-"
- COPYRIGHT (c) 2011 by eXept Software AG
-              All Rights Reserved
-
- This software is furnished under a license and may be used
- only in accordance with the terms of that license and with the
- inclusion of the above copyright notice.   This software may not
- be provided or otherwise made available to, or used by, any
- other person.  No title to or ownership of the software is
- hereby transferred.
-"
-"{ Package: 'stx:libbasic3' }"
-
-"{ NameSpace: Smalltalk }"
-
-VersionInfo subclass:#SVNVersionInfo
-	instanceVariableNames:''
-	classVariableNames:''
-	poolDictionaries:''
-	category:'System-SourceCodeManagement'
-!
-
-!SVNVersionInfo class methodsFor:'documentation'!
-
-copyright
-"
- COPYRIGHT (c) 2011 by eXept Software AG
-              All Rights Reserved
-
- This software is furnished under a license and may be used
- only in accordance with the terms of that license and with the
- inclusion of the above copyright notice.   This software may not
- be provided or otherwise made available to, or used by, any
- other person.  No title to or ownership of the software is
- hereby transferred.
-"
-!
-
-documentation
-"
-    In ancient times, Class used to return a Dictionary when asked for versionInfo.
-    This has been replaced by instances of VersionInfo and subclasses.
-
-    SVNVersionInfo adds some SVN specific data.
-
-    [author:]
-        cg (cg@AQUA-DUO)
-"
-! !
-
-!SVNVersionInfo class methodsFor:'instance creation'!
-
-fromSVNString:aString
-    "{ Pragma: +optSpace }"
-
-    "I know how to parse SVN version id strings.
-     Return an instance filled with revision info which is
-     extracted from aString. This must be in SVN format.
-     Return nil for non-SVN strings"
-
-    |words firstWord info s fn revString user |
-
-    s := aString readStream.
-    s skipSeparators.
-    firstWord := s through:$:.
-
-    info := self new.
-
-    "/
-    "/ supported formats:
-    "/
-    "/ $ Id:       baseFileName rev-int date time user $
-    "/
-    ((firstWord = '$Id:') 
-        or:[ (firstWord = '$ Id:') 
-        or:[ (firstWord = '§Id:')
-        or:[ (firstWord = '§ Id:')]]]
-    ) ifTrue:[
-        "/Skip next : it might be SVN's fixed-width keyword"
-        s peek == $: ifTrue:[s next].
-
-        words := s upToEnd asCollectionOfWords readStream.
-        (words peek = '$') ifTrue:[
-            "/ empty fixed-width version method - '$Id: SVNVersionInfo.st,v 1.10 2015-03-02 12:01:06 cg Exp $'
-            ^nil
-        ].
-        info fileName:(fn := words next).
-        (fn endsWith:',v') ifTrue:[
-            "/ not an SVN version
-            ^ nil
-        ].
-        info revision:(revString := words next).
-        "/ do not use matchesRegex: here (regex is an optional package)
-        (revString conform:[:c | c isDigit]) ifFalse:[
-            "/ not an SVN version
-            ^ nil
-        ].
-        info date:(words next).
-        info time:(words next).
-        user := words next.
-        (user includesAny:'$§') ifTrue:[
-            info user: (user copyTo: (user indexOfAny:'$§') - 1)
-        ] ifFalse:[
-            info user: user.
-            ( '$§' includes:words next first) ifFalse:[
-                "/ not an SVN version
-                ^ nil
-            ]
-        ].
-        words atEnd ifFalse:[
-            ^ nil
-        ].
-        ^ info
-    ].
-
-    ^ nil
-
-    "
-     SVNVersionInfo fromSVNString:('$' , 'Revision: 1.122 $')   
-     SVNVersionInfo fromSVNString:(SourceCodeManager version)   
-     SVNVersionInfo fromSVNString:(ApplicationDefinition version_SVN)
-     SVNVersionInfo fromSVNString:(ApplicationDefinition version_CVS)
-     CVSVersionInfo fromRCSString:(ApplicationDefinition version_SVN)   
-     CVSVersionInfo fromRCSString:(ApplicationDefinition version_CVS)   
-    "
-
-    "Created: / 29-09-2011 / 17:14:56 / cg"
-    "Modified: / 31-03-2012 / 01:12:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!SVNVersionInfo methodsFor:'accessing'!
-
-keysAndValuesDo:aBlock
-
-    super keysAndValuesDo:aBlock.
-    "JV@2011-11-25: Fake repositoryPathName, as other tools
-     requires this. Returning nil should be fine, but then,
-     SourceCodeManagerUtilities constructs names as they are
-     in CVS, sigh"
-    aBlock value: #repositoryPathName value: self repositoryPathName
-
-    "Created: / 25-11-2011 / 18:58:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-repositoryPathName
-
-    ^fileName
-
-    "Created: / 25-11-2011 / 18:57:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!SVNVersionInfo class methodsFor:'documentation'!
-
-version
-    ^ '$Header: /cvs/stx/stx/libbasic3/SVNVersionInfo.st,v 1.10 2015-03-02 12:01:06 cg Exp $'
-!
-
-version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic3/SVNVersionInfo.st,v 1.10 2015-03-02 12:01:06 cg Exp $'
-!
-
-version_SVN
-    ^ '$Id: SVNVersionInfo.st,v 1.10 2015-03-02 12:01:06 cg Exp $'
-! !
-