--- a/AbstractSourceCodeManager.st Mon Jun 06 12:32:59 2016 +0100
+++ b/AbstractSourceCodeManager.st Tue Jun 14 08:59:01 2016 +0100
@@ -17,8 +17,8 @@
Object subclass:#AbstractSourceCodeManager
instanceVariableNames:''
- classVariableNames:'DefaultManager CachingSources CacheDirectoryName UseWorkTree
- WorkTreeDirectoryName ManagerPerModule Verbose
+ classVariableNames:'CacheDirectoryName CachingSources DefaultManager ManagerPerModule
+ UseWorkTree Verbose WorkTreeDirectoryName
ManagerForPackageCache'
poolDictionaries:''
category:'System-SourceCodeManagement'
@@ -1592,10 +1592,16 @@
"/ however, it only contains partial information (module:directory:libName).
"/ (but is available even without a source)
"/
- packageInfo := cls packageSourceCodeInfo.
- packageInfo notNil ifTrue:[
- packageInfo keysAndValuesDo:[:key :value |
- newInfo at:key put:value
+ cls name = cls package ifTrue:[
+ "/ very special - the top-modules FolderInfo
+ newInfo at:#module put:cls package.
+ newInfo at:#directory put:''.
+ ] ifFalse:[
+ packageInfo := cls packageSourceCodeInfo.
+ packageInfo notNil ifTrue:[
+ packageInfo keysAndValuesDo:[:key :value |
+ newInfo at:key put:value
+ ]
]
].
@@ -1676,20 +1682,17 @@
"/ guess on the container
((newInfo includesKey:#directory) and:[newInfo includesKey:#module]) ifTrue:[
- |pathInRepository|
-
+ |moduleDirectory pathInRepository|
+
+ (newInfo at:#directory) isEmpty ifTrue:[
+ moduleDirectory := (newInfo at:#module).
+ ] ifFalse:[
+ moduleDirectory := (newInfo at:#module) , '/' , (newInfo at:#directory).
+ ].
container isNil ifTrue:[
- container := (newInfo at:#module)
- , '/'
- , (newInfo at:#directory)
- , '/'
- , classFileNameBase , ',v'.
+ container := moduleDirectory , '/' , classFileNameBase , ',v'.
].
- pathInRepository := (newInfo at:#module)
- , '/'
- , (newInfo at:#directory)
- , '/'
- , classFileNameBase.
+ pathInRepository := moduleDirectory , '/' , classFileNameBase.
newInfo at:#pathInRepository put:pathInRepository.
].
--- a/CVSSourceCodeManager.st Mon Jun 06 12:32:59 2016 +0100
+++ b/CVSSourceCodeManager.st Tue Jun 14 08:59:01 2016 +0100
@@ -17,10 +17,10 @@
AbstractSourceCodeManager subclass:#CVSSourceCodeManager
instanceVariableNames:''
- classVariableNames:'CVSRoot RemoteCVS CVSModuleRoots CMD_checkout CVSTempDir
- DisabledModules CVSCommandSemaphore CVSExecutable
- CVSCommitOptions CVSUpdateOptions CVSCommandTimeout
- RecentlyCheckedModulesAndPackages RecentTags AuthorMap'
+ classVariableNames:'AuthorMap CMD_checkout CVSCommandSemaphore CVSCommandTimeout
+ CVSCommitOptions CVSExecutable CVSModuleRoots CVSRoot CVSTempDir
+ CVSUpdateOptions DisabledModules RecentTags
+ RecentlyCheckedModulesAndPackages RemoteCVS'
poolDictionaries:''
category:'System-SourceCodeManagement'
!
@@ -1674,7 +1674,11 @@
logMsg := 'checkin from browser'.
].
- modulePath := moduleDir , '/' , packageDir.
+ packageDir isEmptyOrNil ifTrue:[
+ modulePath := moduleDir
+ ] ifFalse:[
+ modulePath := moduleDir , '/' , packageDir.
+ ].
checkoutName := modulePath , '/' , containerFilename.
revision isNil ifTrue:[
@@ -2218,7 +2222,11 @@
"/
"/ next, create CVS/Entries and CVS/Repository with version information of current version
"/
- modulePath := moduleDir , '/' , packageDir.
+ packageDir isEmptyOrNil ifTrue:[
+ modulePath := moduleDir
+ ] ifFalse:[
+ modulePath := moduleDir , '/' , packageDir.
+ ].
checkoutName := modulePath , '/' , classFileName.
"/
@@ -2948,7 +2956,11 @@
classFileName := classFileName copyButLast:3.
]
].
- fullName := moduleDir , '/' , packageDir , '/' , classFileName.
+ packageDir isEmptyOrNil ifTrue:[
+ fullName := moduleDir , '/' , classFileName.
+ ] ifFalse:[
+ fullName := moduleDir , '/' , packageDir , '/' , classFileName.
+ ].
cls notNil ifTrue:[
fullName := fullName , '.st'.
].
@@ -3237,8 +3249,12 @@
cvsRoot := cvsRoot withoutPrefix:':local:'.
].
- fullName := moduleDir , '/' , packageDir , '/' , fileName.
-
+ packageDir isEmptyOrNil ifTrue:[
+ fullName := moduleDir , '/' , fileName.
+ ] ifFalse:[
+ fullName := moduleDir , '/' , packageDir , '/' , fileName.
+ ].
+
(RemoteCVS not or:[isLocalCVSRoot]) ifTrue:[
cvsRoot asFilename exists ifTrue:[
"/
@@ -3470,7 +3486,11 @@
cmdOut remove.
].
- fullName := moduleDir , '/' , packageDir , '/' , fileName.
+ packageDir isEmptyOrNil ifTrue:[
+ fullName := moduleDir , '/' , fileName
+ ] ifFalse:[
+ fullName := moduleDir , '/' , packageDir , '/' , fileName.
+ ].
checkoutName := moduleDir , '/' , packageDir.
"/
@@ -3677,7 +3697,11 @@
cmdOut remove.
].
- fullName := moduleDir , '/' , packageDir , '/' , fileName.
+ packageDir isEmptyOrNil ifTrue:[
+ fullName := moduleDir , '/' , fileName
+ ] ifFalse:[
+ fullName := moduleDir , '/' , packageDir , '/' , fileName.
+ ].
checkoutName := moduleDir , '/' , packageDir.
"/
@@ -4123,13 +4147,18 @@
initialRevisionStringFor:aClass inModule:moduleDir directory:packageDir container:fileName
"return a string usable as initial revision string"
- |cvsRoot|
+ |cvsRoot fullName|
cvsRoot := self getCVSROOTForModule:moduleDir.
cvsRoot := self repositoryTopDirectoryFromCVSRoot:cvsRoot.
+ packageDir isEmptyOrNil ifTrue:[
+ fullName := (cvsRoot , '/' , moduleDir)
+ ] ifFalse:[
+ fullName := (cvsRoot , '/' , moduleDir , '/' , packageDir)
+ ].
^ self
initialRCSRevisionStringFor:aClass
- in:(cvsRoot , '/' , moduleDir , '/' , packageDir)
+ in:fullName
container:fileName
"Modified: / 16-01-1998 / 17:34:13 / stefan"
@@ -4258,7 +4287,11 @@
^ info at:#newestRevision ifAbsent:nil
].
- modulePath := moduleDir , '/' , packageDir.
+ packageDir isEmptyOrNil ifTrue:[
+ modulePath := moduleDir
+ ] ifFalse:[
+ modulePath := moduleDir , '/' , packageDir.
+ ].
fullName := modulePath , '/' , classFileName.
[
@@ -4351,7 +4384,11 @@
|fullName tempdir checkoutName cmdOut cmd tempFile whatHappened|
- fullName := moduleDir , '/' , packageDir , '/' , fileName.
+ packageDir isEmptyOrNil ifTrue:[
+ fullName := moduleDir , '/' , fileName.
+ ] ifFalse:[
+ fullName := moduleDir , '/' , packageDir , '/' , fileName.
+ ].
checkoutName := moduleDir , '/' , packageDir.
(tempdir := self createLocalDirectory:packageDir inModule:moduleDir with:fileName) isNil ifTrue:[
@@ -4826,7 +4863,11 @@
[
|cmd revArg|
- modulePath := moduleDir , '/' , packageDir.
+ packageDir isEmptyOrNil ifTrue:[
+ modulePath := moduleDir
+ ] ifFalse:[
+ modulePath := moduleDir , '/' , packageDir.
+ ].
fullName := modulePath , '/' , classFileName.
self use_rlog ifFalse:[
@@ -5047,8 +5088,11 @@
[
|cmd revArg|
- modulePath := moduleDir , '/' , packageDir.
-
+ packageDir isEmptyOrNil ifTrue:[
+ modulePath := moduleDir
+ ] ifFalse:[
+ modulePath := moduleDir , '/' , packageDir.
+ ].
self use_rlog ifFalse:[
self halt:'non-rlog no longer supported'.
^ self.
@@ -5209,8 +5253,11 @@
^ nil.
].
- modulePath := module , '/' , packageDir.
-
+ packageDir isEmptyOrNil ifTrue:[
+ modulePath := module
+ ] ifFalse:[
+ modulePath := module , '/' , packageDir.
+ ].
[
|revisionUsed dateSelector searchFor|
@@ -5271,8 +5318,11 @@
^ nil.
].
- modulePath := module , '/' , packageDir.
-
+ packageDir isEmptyOrNil ifTrue:[
+ modulePath := module
+ ] ifFalse:[
+ modulePath := module , '/' , packageDir.
+ ].
self activityNotification:('CVS: Fetching revision infos for %1%2'
bindWith:modulePath
with:(' tagged as "',symbolicName,'"')).
@@ -5569,7 +5619,11 @@
|tempDir fullName modulePath inStream line
info s msg|
- modulePath := moduleDir , '/' , packageDir.
+ packageDir isEmptyOrNil ifTrue:[
+ modulePath := moduleDir.
+ ] ifFalse:[
+ modulePath := moduleDir , '/' , packageDir.
+ ].
fullName := modulePath , '/' , classFileName.
tempDir := self createTempDirectory:nil forModule:nil.
tempDir isNil ifTrue:[