class: CVSSourceCodeManager
authorClaus Gittinger <cg@exept.de>
Fri, 27 Feb 2015 15:17:50 +0100
changeset 3811 777f2281af5c
parent 3810 542fa7a00a6f
child 3812 173678af0074
class: CVSSourceCodeManager commented / changed: #revisionInfoFromString:inClass:
CVSSourceCodeManager.st
--- a/CVSSourceCodeManager.st	Thu Feb 26 02:07:10 2015 +0100
+++ b/CVSSourceCodeManager.st	Fri Feb 27 15:17:50 2015 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1995 by Claus Gittinger
               All Rights Reserved
@@ -1494,7 +1496,7 @@
     rightPart := rightPart copyFrom:idx+1.
 
     "/ originalVersionString:
-    "/      '$Header: /cvs/stx/stx/libbasic3/CVSSourceCodeManager.st,v 1.498 2015-02-06 13:30:16 cg Exp $'
+    "/      '$Header: /cvs/stx/stx/libbasic3/CVSSourceCodeManager.st,v 1.499 2015-02-27 14:17:50 cg Exp $'
     "/ leftPart:
     "/      '$Header: /cvs/stx/stx/goodies/refactoryBrowser/lint/RBLiteralArrayContainsCommaRule.st,v'
     "/ dateAndTimePart:
@@ -4611,67 +4613,73 @@
 
     autoFixHolder := UserPreferences current showBadRevisionStringDialogs not asValue.
 
-    Dialog aboutToOpenBoxNotificationSignal handle:[:ex |
-        ex box addCheckBoxAtBottom:'Do not show this dialog again (always fix & proceed)' on:autoFixHolder.
-    ] do:[
-        "/ temporary fix Felix' bad string translation:
-        (aString startsWith:'§Header:') ifTrue:[
-            (aString endsWith:'Exp §') ifTrue:[
-                fixedString := '$' , (aString copyFrom:3 to:(aString size - 2)) , '$'.
-
-                aClass isNil ifTrue:[
-                    autoFixHolder value ifFalse:[
-                        Dialog information:'Attention: the CVS version string is corrupted (§-bug). Please fix it manually'.
-                    ]
-                ] ifFalse:[
-                    (autoFixHolder value 
-                        or:[ Dialog confirm:('Attention: the CVS version string is corrupted in "%1" (§-bug). Fix it?' withCRs bindWith:aClass name) ]
-                    ) ifTrue:[
-                        self updateVersionMethodOf:aClass for:fixedString.
+    Dialog
+        modifyingBoxWith:[:box |
+            box addCheckBoxAtBottom:'Do not show this dialog again (always fix & proceed)' on:autoFixHolder.
+        ] do:[
+            "/ info: in some older ST/X releases, there have been bugs in the header string rewriting code,
+            "/ which lead to invalid CVS strings being checked into our repository.
+            "/ The following repairs such corrupted revision strings 'on the fly'.
+            "/ The repair code will be removed at some time in the future...
+
+            "/ temporary fix Felix' bad string translation:
+            (aString startsWith:'§Header:') ifTrue:[
+                (aString endsWith:'Exp §') ifTrue:[
+                    fixedString := '$' , (aString copyFrom:3 to:(aString size - 2)) , '$'.
+
+                    aClass isNil ifTrue:[
+                        autoFixHolder value ifFalse:[
+                            Dialog information:'Attention: the CVS version string is corrupted (§-bug). Please fix it manually'.
+                        ]
+                    ] ifFalse:[
+                        (autoFixHolder value 
+                            or:[ Dialog confirm:('Attention: the CVS version string is corrupted in "%1" (§-bug). Fix it?' withCRs bindWith:aClass name) ]
+                        ) ifTrue:[
+                            self updateVersionMethodOf:aClass for:fixedString.
+                        ].
                     ].
                 ].
             ].
-        ].
-
-        "/ temporary fix Jan's bad Umlaut-removal (which results in Felix's bad § being removed):
-        (aString startsWith:'Header: ') ifTrue:[
-            (aString endsWith:'Exp ') ifTrue:[
-                fixedString := '$' , aString , '$'.
-
-                aClass isNil ifTrue:[
-                    autoFixHolder value ifFalse:[
-                        Dialog information:'Attention: the CVS version string is corrupted (Umlaut remover-bug). Please fix it manually'.
-                    ]
-                ] ifFalse:[
-                    (autoFixHolder value 
-                        or:[ Dialog confirm:('Attention: the CVS version string is corrupted in "%1" (Umlaut remover-bug). Fix it?' withCRs bindWith:aClass name) ]
-                    ) ifTrue:[
-                        self updateVersionMethodOf:aClass for:fixedString.
+
+            "/ temporary fix Jan's bad Umlaut-removal (which results in Felix's bad § being removed):
+            (aString startsWith:'Header: ') ifTrue:[
+                (aString endsWith:'Exp ') ifTrue:[
+                    fixedString := '$' , aString , '$'.
+
+                    aClass isNil ifTrue:[
+                        autoFixHolder value ifFalse:[
+                            Dialog information:'Attention: the CVS version string is corrupted (Umlaut remover-bug). Please fix it manually'.
+                        ]
+                    ] ifFalse:[
+                        (autoFixHolder value 
+                            or:[ Dialog confirm:('Attention: the CVS version string is corrupted in "%1" (Umlaut remover-bug). Fix it?' withCRs bindWith:aClass name) ]
+                        ) ifTrue:[
+                            self updateVersionMethodOf:aClass for:fixedString.
+                        ].
                     ].
                 ].
             ].
-        ].
-
-        "/ temporary fix translated (-sign) and not restored strings:
-        (aString startsWith:'Header: ') ifTrue:[
-            (aString endsWith:'Exp ') ifTrue:[
-                fixedString := '$' , (aString copyFrom:2 to:(aString size - 1)) , '$'.
-
-                aClass isNil ifTrue:[
-                    autoFixHolder value ifFalse:[
-                        Dialog information:'Attention: the CVS version string is corrupted (Escaper-bug). Please fix it manually'.
-                    ]
-                ] ifFalse:[
-                    (autoFixHolder value 
-                        or:[ Dialog confirm:('Attention: the CVS version string is corrupted in "%1" (Escaper-bug).\\Fix it?' withCRs bindWith:aClass name) ]
-                    ) ifTrue:[
-                        self updateVersionMethodOf:aClass for:fixedString.
+
+            "/ temporary fix translated (-sign) and not restored strings:
+            (aString startsWith:'Header: ') ifTrue:[
+                (aString endsWith:'Exp ') ifTrue:[
+                    fixedString := '$' , (aString copyFrom:2 to:(aString size - 1)) , '$'.
+
+                    aClass isNil ifTrue:[
+                        autoFixHolder value ifFalse:[
+                            Dialog information:'Attention: the CVS version string is corrupted (Escaper-bug). Please fix it manually'.
+                        ]
+                    ] ifFalse:[
+                        (autoFixHolder value 
+                            or:[ Dialog confirm:('Attention: the CVS version string is corrupted in "%1" (Escaper-bug).\\Fix it?' withCRs bindWith:aClass name) ]
+                        ) ifTrue:[
+                            self updateVersionMethodOf:aClass for:fixedString.
+                        ].
                     ].
                 ].
             ].
+            UserPreferences current showBadRevisionStringDialogs:autoFixHolder value not.
         ].
-        UserPreferences current showBadRevisionStringDialogs:autoFixHolder value not.
-    ].
 
     ^ CVSVersionInfo fromRCSString:(fixedString ? aString)
 
@@ -5559,11 +5567,11 @@
 !CVSSourceCodeManager class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/CVSSourceCodeManager.st,v 1.498 2015-02-06 13:30:16 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/CVSSourceCodeManager.st,v 1.499 2015-02-27 14:17:50 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic3/CVSSourceCodeManager.st,v 1.498 2015-02-06 13:30:16 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/CVSSourceCodeManager.st,v 1.499 2015-02-27 14:17:50 cg Exp $'
 ! !