Merge jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Tue, 14 Jun 2016 08:59:01 +0100
branchjv
changeset 4061 8d6d7c54f8a6
parent 4054 e1d270d3c382 (current diff)
parent 4060 d3b6eaa04271 (diff)
child 4063 261c11fca389
Merge
AbstractSourceCodeManager.st
CVSSourceCodeManager.st
PerforceSourceCodeManager.st
SourceCodeManagerUtilities.st
bc.mak
--- a/.hgtags	Mon Jun 06 12:32:59 2016 +0100
+++ b/.hgtags	Tue Jun 14 08:59:01 2016 +0100
@@ -1,5 +1,7 @@
 0512a94958359ab46d70b98c33ce60194f13111d expecco_2_9_0
 0512a94958359ab46d70b98c33ce60194f13111d expecco_2_9_0_a
+0512a94958359ab46d70b98c33ce60194f13111d expecco_2_9_0_win75_lx36
+0512a94958359ab46d70b98c33ce60194f13111d expecco_2_9_1
 175391e950e95ff4b4ee8e5a266932142bcdfa8f rel3_4_3_1
 191e0970f4057c201caecd1b577f706087b3599c rel2_10_8_6_last2
 197192cec3c79b0522e9ed3353edebbf1c15505f expecco_2_1_0
--- 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:[
--- a/PerforceSourceCodeManager.st	Mon Jun 06 12:32:59 2016 +0100
+++ b/PerforceSourceCodeManager.st	Tue Jun 14 08:59:01 2016 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 2006 by eXept Software AG
               All Rights Reserved
@@ -494,14 +496,15 @@
      into the source repository. If the force argument is true, no merge is done;
      instead, the code is checked in as given (Dangerous).
      Return true if ok, false if not."
-    ^self basicCheckinClass:cls 
-    fileName:classFileName 
-    directory:packageDir 
-    module:moduleName 
-    logMessage:logMessage 
-    force:forceArg 
-    submit:doSubmit
-    fileContents:nil.
+    ^ self 
+        basicCheckinClass:cls 
+        fileName:classFileName 
+        directory:packageDir 
+        module:moduleName 
+        logMessage:logMessage 
+        force:forceArg 
+        submit:doSubmit
+        fileContents:nil.
 !
 
 basicCheckinClass:cls 
--- a/SourceCodeManagerUtilities.st	Mon Jun 06 12:32:59 2016 +0100
+++ b/SourceCodeManagerUtilities.st	Tue Jun 14 08:59:01 2016 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 2000 eXept Software AG
               All Rights Reserved
@@ -2646,7 +2648,8 @@
 "/            ]
 "/        ]
     ].
-    directory isEmptyOrNil ifTrue:[
+    directory isNil ifTrue:[
+        Dialog information:('Using %1 as last package-folder' bindWith:LastPackage).
         directory := LastPackage.
     ].
 
@@ -2714,9 +2717,13 @@
                 module := rslt at:#module.
                 directory := rslt at:#package.
                 fileName := rslt at:#fileName.
-                (module isEmptyOrNil or:[directory isEmptyOrNil or:[fileName isEmptyOrNil]]) ifTrue:[
+                (module isEmptyOrNil or:[fileName isEmptyOrNil]) ifTrue:[
                     ^ false
                 ].
+                (directory isEmptyOrNil) ifTrue:[
+                    "/ only one special case allowed - the module-folder description itself.
+                    aClass name = module ifFalse:[^ false].
+                ]
             ]
         ].
         (fileName endsWith:',v') ifTrue:[
--- a/bc.mak	Mon Jun 06 12:32:59 2016 +0100
+++ b/bc.mak	Tue Jun 14 08:59:01 2016 +0100
@@ -72,9 +72,9 @@
 test: $(TOP)\goodies\builder\reports\NUL
 	pushd $(TOP)\goodies\builder\reports & $(MAKE_BAT)
 	$(TOP)\goodies\builder\reports\report-runner.bat -D . -r Builder::TestReport -p $(PACKAGE)
-        
+
 clean::
-	del *.$(CSUFFIX)
+	-del *.$(CSUFFIX)
 
 
 # BEGINMAKEDEPEND --- do not remove this line; make depend needs it