class: MCWorkingCopy
authorJan Vrany <jan.vrany@fit.cvut.cz>
Wed, 29 May 2013 00:01:05 +0200
changeset 799 0072c73bf0a1
parent 798 6776d12ebe9b
child 800 834ebea8b9c9
class: MCWorkingCopy changed: #nextVersionName - sanitize special characters like : or / when generating package name (which turns to be a filename). That's usefull when saving Smalltalk/X package as .mcz
MCWorkingCopy.st
--- a/MCWorkingCopy.st	Tue May 28 12:31:59 2013 +0200
+++ b/MCWorkingCopy.st	Wed May 29 00:01:05 2013 +0200
@@ -236,7 +236,7 @@
 nextVersionName
         | branch oldName |
         ancestry ancestors isEmpty
-                ifTrue: [counter ifNil: [counter := 0]. branch := package name]
+                ifTrue: [counter ifNil: [counter := 0]. branch := package name asString copy replaceAll: $/ with: $_; replaceAll: $: with: $_]
                 ifFalse:
                         [oldName := ancestry ancestors first name.
                         oldName last isDigit
@@ -254,7 +254,7 @@
                 reject:[:c|c isSeparator])
             , '.', counter asString
 
-    "Modified: / 23-08-2011 / 07:36:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 28-05-2013 / 22:55:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 possiblyNewerVersions
@@ -300,7 +300,8 @@
 !MCWorkingCopy class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCWorkingCopy.st,v 1.3 2012-09-11 21:14:59 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCWorkingCopy.st,v 1.4 2013-05-28 22:01:05 vrany Exp $'
 ! !
 
+
 MCWorkingCopy initialize!