merge-recursive: Use '~' instead of '_' to separate file names from branch names

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>
This commit is contained in:
Fredrik Kuivinen 2005-11-12 00:55:36 +01:00 коммит произвёл Junio C Hamano
Родитель 857f26d2f4
Коммит e9af60c88b
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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