merge-recursive: Use '~' instead of '_' to separate file names from branch names
authorFredrik Kuivinen <freku045@student.liu.se>
Fri, 11 Nov 2005 23:55:36 +0000 (00:55 +0100)
committerJunio C Hamano <junkio@cox.net>
Sat, 12 Nov 2005 05:14:39 +0000 (21:14 -0800)
Makes it less probable that we get a clash with an existing file,
furthermore Cogito already uses '~' for this purpose.

Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-merge-recursive.py

index 21f1e92..1bf73f3 100755 (executable)
@@ -304,13 +304,13 @@ def uniquePath(path, branch):
                 raise
 
     branch = branch.replace('/', '_')
-    newPath = path + '_' + branch
+    newPath = path + '~' + branch
     suffix = 0
     while newPath in currentFileSet or \
           newPath in currentDirectorySet  or \
           fileExists(newPath):
         suffix += 1
-        newPath = path + '_' + branch + '_' + str(suffix)
+        newPath = path + '~' + branch + '_' + str(suffix)
     currentFileSet.add(newPath)
     return newPath