CVSSourceCodeManager.st
branchjv
changeset 4081 5a9726876c20
parent 4065 a3da1e8be872
parent 4075 8087475e8249
child 4086 aafed7101969
--- a/CVSSourceCodeManager.st	Wed Aug 10 18:11:27 2016 +0100
+++ b/CVSSourceCodeManager.st	Tue Aug 16 06:52:00 2016 +0200
@@ -1658,11 +1658,11 @@
      instead, the code is checked in as given (Dangerous).
      Return true if ok, false if not."
 
-    |tempdir cmd checkoutName logMsg revision logTmp 
-     cmdOut whatHappened idx changeLog changesAsLogged l 
+    |tempdir cmd checkoutName logMsg revision logTmp
+     cmdOut whatHappened idx changeLog changesAsLogged l
      newRevision  msg answer didMerge
-     modulePath time 
-     editor checkInRepaired didAccept emphasizedText repairedText out 
+     modulePath time
+     editor checkInRepaired didAccept emphasizedText repairedText out
      emSep comment|
 
     revision := self newestRevisionInFile:containerFilename directory:packageDir module:moduleDir.
@@ -1674,14 +1674,14 @@
 
     packageDir isEmptyOrNil ifTrue:[
         modulePath := moduleDir
-    ] ifFalse:[        
-        modulePath :=  moduleDir , '/' , packageDir. 
-    ].        
+    ] ifFalse:[
+        modulePath :=  moduleDir , '/' , packageDir.
+    ].
     checkoutName :=  modulePath , '/' , containerFilename.
 
     revision isNil ifTrue:[
         "/ a new file ...
-        ^ self 
+        ^ self
             createContainerForText:someText inModule:moduleDir package:packageDir container:containerFilename
     ].
 
@@ -1713,9 +1713,9 @@
         "/ correct our current time, so that converting it will give us UTC
         time := Timestamp now asUtcTimestamp subtractSeconds:1.
 
-        self createEntryFor:checkoutName 
+        self createEntryFor:checkoutName
              module:moduleDir
-             in:(tempdir construct:modulePath) 
+             in:(tempdir construct:modulePath)
              revision:revision
              date:(self cvsTimeString:time)
              special:''
@@ -1741,8 +1741,8 @@
         self activityNotification:'CVS: Merging ' , containerFilename , ' with repository version...'.
 
         cmd := 'update ', CVSUpdateOptions, ' ', containerFilename, ' >', '"' , cmdOut name , '"'.
-        (self 
-            executeCVSCommand:cmd 
+        (self
+            executeCVSCommand:cmd
             module:moduleDir
             inDirectory:((tempdir construct:moduleDir) constructString:packageDir)
         ) ifFalse:[
@@ -1755,7 +1755,7 @@
             "/ check what happened - the contents of the cmdOut file may be:
             "/   empty   -> nothing changed
             "/   M xxx   -> merged-in changes from other users
-            "/   C xxx   -> a conflict occured and the differences have been merged into the source
+            "/   C xxx   -> a conflict occurred and the differences have been merged into the source
             "/              needs special action
             "/
             (cmdOut exists and:[cmdOut fileSize > 0]) ifTrue:[
@@ -1815,8 +1815,8 @@
             "/
             "/ merged in changes
             "/
-            (force 
-            or:[changeLog isNil 
+            (force
+            or:[changeLog isNil
             or:[(changeLog at:#revisions ifAbsent:[#()]) isEmpty]]) ifTrue:[
                 "/
                 "/ pretty good - nothing has changed in the meanwhile
@@ -1838,14 +1838,14 @@
                 mySource = mergedSource ifTrue:[
                     msg := 'The source of ' , containerFilename , ' has been changed in the meanwhile as listed below.
 
-I have merged your version with the newest repository version, 
+I have merged your version with the newest repository version,
 and found no differences between the result and your current version
 (i.e. your version seemed up-to-date).'.
 
                     self checkinTroubleDialog:'Merging versions'
-                                   message:msg 
+                                   message:msg
                                    log:changesAsLogged
-                                   abortable:false 
+                                   abortable:false
                                    option:nil.
                     didMerge := false.
                 ] ifFalse:[
@@ -1853,19 +1853,19 @@
 
 If you continue, your new changes (based upon rev. ' , revision printString , ') will be MERGED
 into the newest revision. This will combine the other version with your changes
-into a new common revision which may be different from both. 
-Although this is a nice feature, it may fail to create the expected result in certain situations. 
+into a new common revision which may be different from both.
+Although this is a nice feature, it may fail to create the expected result in certain situations.
 
 You should carefully check the result - by comparing the current version with the
 most recent version in the repository. If that does not contain an acceptable version,
-change methods as required and check in again. 
+change methods as required and check in again.
 Be aware, that after that, the actual repository version is different from your current classes,
 and you should update your class from the repository.
 
 Continue ?'.
 
                     answer := self checkinTroubleDialog:'Merging versions'
-                                   message:msg 
+                                   message:msg
                                    log:changesAsLogged
                                    abortable:true
                                    option:'Stop - see first'.
@@ -1876,7 +1876,7 @@
                                 label:'current version'
                                 and:mergedSource
                                 label:'merged version'.
-                                
+
                         ].
                         Transcript showCR:'checkin aborted - (no merge; repository unchanged)'.
                         ^ false.
@@ -1889,8 +1889,8 @@
 "/
 "/If you continue, your new changes (based upon rev. ' , revision , ') will be MERGED
 "/into the newest revision. This will combine the other version with your changes
-"/into a new common revision which is different from both. 
-"/Although convenient, it may fail to create the expected result in certain situations. 
+"/into a new common revision which is different from both.
+"/Although convenient, it may fail to create the expected result in certain situations.
 "/
 "/You should carefully check the result - by comparing the current version with the
 "/most recent version in the repository. If that does not contain an acceptable version,
@@ -1922,7 +1922,7 @@
 '.
 
                 answer := self checkinTroubleDialog:'Version conflict'
-                     message:msg 
+                     message:msg
                      log:changesAsLogged
                      abortable:false
                      option:'show conflicts'
@@ -1933,10 +1933,10 @@
                     "/ show conflicts in a 3-way DiffTextView ...
                     "/
                     Diff3TextView
-                        openOnMergedText:(tempdir construct:checkoutName) readStream contents 
-                        label:'your version (checkin attempt)' 
-                        label:'original (base version)' 
-                        label:'newest repository version'. 
+                        openOnMergedText:(tempdir construct:checkoutName) readStream contents
+                        label:'your version (checkin attempt)'
+                        label:'original (base version)'
+                        label:'newest repository version'.
                 ].
 
                 checkInRepaired := false.
@@ -1952,21 +1952,21 @@
                     emphasizedText := (tempdir construct:checkoutName) readStream contents.
                     emSep := (Array with:(#color->Color black)
                                  with:(#backgroundColor->Color green)).
-                    emphasizedText := Diff3TextView 
-                                emphasizeMergedDiff3Text:emphasizedText 
+                    emphasizedText := Diff3TextView
+                                emphasizeMergedDiff3Text:emphasizedText
                                 emphasize1:(Array with:(#color->Color white)
                                                   with:(#backgroundColor->Color blue))
                                 emphasize2:(Array with:(#color->Color white)
                                                   with:(#backgroundColor->Color red))
                                 emphasizeSep:emSep.
 
-                    comment := 
+                    comment :=
 '"/ ***************************************************************
 "/ This text contains your current versions code (blue)
 "/ merged with the conflicting code as found in the repository (red) which resulted
 "/ from some other checkin.
 "/ Each such conflict is surrounded by green text (like this paragraph).
-"/ 
+"/
 "/ Please have a look at ALL the conflicts and fix things as appropriate.
 "/ Delete the green lines as a confirmation - I will not checkin the changed text,
 "/ unless no more green parts are present. This includes this comment at the top.
@@ -1977,9 +1977,9 @@
 
                     didAccept := false. checkInRepaired := true.
                     [didAccept not and:[checkInRepaired]] whileTrue:[
-                        editor := RCSConflictEditTextView 
+                        editor := RCSConflictEditTextView
                                     setupWith:emphasizedText
-                                    title:'Resolve conflicts in ' , containerFilename , ', then accept & close to checkin'.    
+                                    title:'Resolve conflicts in ' , containerFilename , ', then accept & close to checkin'.
 
                         editor acceptAction:[:dummy |
                             repairedText := editor list.
@@ -2081,8 +2081,8 @@
                     with:cmdOut name
         ].
 
-        (self 
-            executeCVSCommand:cmd 
+        (self
+            executeCVSCommand:cmd
             module:moduleDir
             inDirectory:tempdir name
         ) ifFalse:[
@@ -2141,11 +2141,11 @@
      instead, the code is checked in as given (Dangerous).
      Return true if ok, false if not."
 
-    |tempdir cmd checkoutName logMsg revision newestRevision logTmp 
-     cmdOut whatHappened s entry idx changeLog changesAsLogged l 
+    |tempdir cmd checkoutName logMsg revision newestRevision logTmp
+     cmdOut whatHappened s entry idx changeLog changesAsLogged l
      newRevision newString binRevision className msg answer didMerge
-     modulePath time 
-     editor checkInRepaired checkInNew didAccept emphasizedText repairedText out 
+     modulePath time
+     editor checkInRepaired checkInNew didAccept emphasizedText repairedText out
      emSep comment force conflictResolvedManually revisionOption|
 
     force := forceArg.
@@ -2155,8 +2155,8 @@
         self reportError:'refuse to check in private classes.'.
         ^ false.
     ].
-    revision := "cls revision" cls revisionOfManager:self.        
-    (revision notNil and:[revision endsWith:$m]) 
+    revision := "cls revision" cls revisionOfManager:self.
+    (revision notNil and:[revision endsWith:$m])
     ifTrue:[
         "/ this class has already been checked in with a merge,
         "/ but not reloaded from the repository.
@@ -2194,7 +2194,7 @@
         logMsg isWideString ifTrue:[
             self reportError:'cvs cannot handle unicode in logMessage'.
             ^ false.
-        ].    
+        ].
     ].
 
     cmdOut := Filename newTemporary.
@@ -2223,8 +2223,8 @@
         packageDir isEmptyOrNil ifTrue:[
             modulePath := moduleDir
         ] ifFalse:[
-            modulePath :=  moduleDir , '/' , packageDir. 
-        ].        
+            modulePath :=  moduleDir , '/' , packageDir.
+        ].
         checkoutName :=  modulePath , '/' , classFileName.
 
         "/
@@ -2232,9 +2232,9 @@
         "/
         time := Timestamp now asUtcTimestamp subtractSeconds:1.
 
-        self createEntryFor:checkoutName 
+        self createEntryFor:checkoutName
              module:moduleDir
-             in:(tempdir construct:modulePath) 
+             in:(tempdir construct:modulePath)
              revision:revision
              date:(self cvsTimeString:time)
              special:''
@@ -2267,8 +2267,8 @@
             with:cmdOut name
             with:revisionOption.
 
-        (self 
-            executeCVSCommand:cmd 
+        (self
+            executeCVSCommand:cmd
             module:moduleDir
             inDirectory:((tempdir construct:moduleDir) constructString:packageDir)
         ) ifFalse:[
@@ -2296,8 +2296,8 @@
                         (Dialog confirm:('The source container for ',cls name allBold,' seems corrupted. Proceed?' withCRs)) ifFalse:[
                             ^ false
                         ].
-                        ^ self 
-                            checkinClass:cls fileName:classFileName directory:packageDir module:moduleDir 
+                        ^ self
+                            checkinClass:cls fileName:classFileName directory:packageDir module:moduleDir
                             source:sourceFileName logMessage:logMessage force:true.
                     ].
                 ].
@@ -2320,7 +2320,7 @@
             "/ check what happened - the contents of the cmdOut file may be:
             "/   empty   -> nothing changed
             "/   M xxx   -> merged-in changes from other users
-            "/   C xxx   -> a conflict occured and the differences have been merged into the source
+            "/   C xxx   -> a conflict occurred and the differences have been merged into the source
             "/              needs special action
             "/
             (cmdOut exists and:[cmdOut fileSize > 0]) ifTrue:[
@@ -2408,8 +2408,8 @@
             "/
             "/ merged in changes / resurrected
             "/
-            (force 
-            or:[changeLog isNil 
+            (force
+            or:[changeLog isNil
             or:[(changeLog at:#revisions ifAbsent:nil) isEmptyOrNil]]) ifTrue:[
                 "/
                 "/ pretty good - nothing has changed in the meanwhile
@@ -2433,14 +2433,14 @@
                 mySource = mergedSource ifTrue:[
                     msg := 'The source of ' , className , ' has been changed in the meanwhile as listed below.
 
-I have merged your version with the newest repository version, 
+I have merged your version with the newest repository version,
 and found no differences between the result and your current version
 (i.e. your version seemed up-to-date).'.
 
                     self checkinTroubleDialog:'Merging versions'
-                                   message:msg 
+                                   message:msg
                                    log:changesAsLogged
-                                   abortable:false 
+                                   abortable:false
                                    option:nil.
                     didMerge := false.
                 ] ifFalse:[
@@ -2448,19 +2448,19 @@
 
 If you continue, your new changes (based upon rev. ' , revision printString , ') will be MERGED
 into the newest revision. This will combine the other version with your changes
-into a new common revision which may be different from both. 
-Although this is a nice feature, it may fail to create the expected result in certain situations. 
+into a new common revision which may be different from both.
+Although this is a nice feature, it may fail to create the expected result in certain situations.
 
 You should carefully check the result - by comparing the current version with the
 most recent version in the repository. If that does not contain an acceptable version,
-change methods as required and check in again. 
+change methods as required and check in again.
 Be aware, that after that, the actual repository version is different from your current classes,
 and you should update your class from the repository.
 
 Continue ?'.
 
                     answer := self checkinTroubleDialog:'Merging versions'
-                                   message:msg 
+                                   message:msg
                                    log:changesAsLogged
                                    abortable:true
                                    option:'Stop - see first'
@@ -2496,8 +2496,8 @@
 "/
 "/If you continue, your new changes (based upon rev. ' , revision , ') will be MERGED
 "/into the newest revision. This will combine the other version with your changes
-"/into a new common revision which is different from both. 
-"/Although convenient, it may fail to create the expected result in certain situations. 
+"/into a new common revision which is different from both.
+"/Although convenient, it may fail to create the expected result in certain situations.
 "/
 "/You should carefully check the result - by comparing the current version with the
 "/most recent version in the repository. If that does not contain an acceptable version,
@@ -2529,7 +2529,7 @@
 '.
 
                 answer := self checkinTroubleDialog:'Version conflict'
-                     message:msg 
+                     message:msg
                      log:changesAsLogged
                      abortable:false
                      option:'Show conflicts'
@@ -2541,10 +2541,10 @@
                     "/ show conflicts in a 3-way DiffTextView ...
                     "/
                     Diff3TextView
-                        openOnMergedText:(tempdir construct:checkoutName) readStream contents 
-                        label:'your version (checkin attempt)' 
-                        label:'original (base version)' 
-                        label:'newest repository version'. 
+                        openOnMergedText:(tempdir construct:checkoutName) readStream contents
+                        label:'your version (checkin attempt)'
+                        label:'original (base version)'
+                        label:'newest repository version'.
                 ].
 
                 answer == #option2 ifTrue:[
@@ -2559,21 +2559,21 @@
                     emphasizedText := (tempdir construct:checkoutName) readStream contents.
                     emSep := (Array with:(#color->Color black)
                                  with:(#backgroundColor->Color green)).
-                    emphasizedText := Diff3TextView 
-                                emphasizeMergedDiff3Text:emphasizedText 
+                    emphasizedText := Diff3TextView
+                                emphasizeMergedDiff3Text:emphasizedText
                                 emphasize1:(Array with:(#color->Color white)
                                                   with:(#backgroundColor->Color blue))
                                 emphasize2:(Array with:(#color->Color white)
                                                   with:(#backgroundColor->Color red))
                                 emphasizeSep:emSep.
 
-                    comment := 
+                    comment :=
 '"/ ***************************************************************
 "/ This text contains your current versions code (blue)
 "/ merged with the conflicting code as found in the repository (red) which resulted
 "/ from some other checkin.
 "/ Each such conflict is surrounded by green text (like this paragraph).
-"/ 
+"/
 "/ Please have a look at ALL the conflicts and fix things as appropriate.
 "/ Delete the green lines as a confirmation - I will not checkin the changed text,
 "/ unless no more green parts are present. This includes this comment at the top.
@@ -2584,9 +2584,9 @@
 
                     didAccept := false. checkInRepaired := true.
                     [didAccept not and:[checkInRepaired]] whileTrue:[
-                        editor := RCSConflictEditTextView 
+                        editor := RCSConflictEditTextView
                                     setupWith:emphasizedText
-                                    title:'Resolve conflicts in ' , className , ', then accept & close to checkin'.    
+                                    title:'Resolve conflicts in ' , className , ', then accept & close to checkin'.
 
                         editor acceptAction:[:dummy |
                             repairedText := editor list.
@@ -2655,7 +2655,7 @@
                     ^ false.
                 ].
             ] ifFalse:[
-                ((whatHappened startsWith:'U ') 
+                ((whatHappened startsWith:'U ')
                 or:[ (whatHappened startsWith:'P ') ]) ifTrue:[
                     "/
                     "/ nothing changed here, but the repository already contains
@@ -2702,8 +2702,8 @@
             "/
             cmd := 'commit -m "', logMsg, '" ', checkoutName, ' >', '"', cmdOut name, '"' , ' 2>&1'.
         ].
-        (self 
-            executeCVSCommand:cmd 
+        (self
+            executeCVSCommand:cmd
             module:moduleDir
             inDirectory:tempdir name
         ) ifFalse:[
@@ -2808,8 +2808,8 @@
                     ]
                 ]
             ]
-        ] ifTrue:[      
-            "/ If the conflict was resolved manually, do NOT update the revision method 
+        ] ifTrue:[
+            "/ If the conflict was resolved manually, do NOT update the revision method
             "/ (to get a new conflict in the next check-in)
 
             "/ If there was a merge, update the revision method adding an 'm'"
@@ -2824,7 +2824,7 @@
     self postCheckInClass:cls.
 
     conflictResolvedManually ifTrue:[
-        (Dialog 
+        (Dialog
             confirm:'Now the repository contains a merge between your and the other changes.
 However, the class in your image does NOT contain the other changes.
 This will lead to more conflict-resolving whenever you check this class in again later,