提交 e9af60c8 编写于 作者: F Fredrik Kuivinen 提交者: Junio C Hamano

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: NFredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 857f26d2
......@@ -304,13 +304,13 @@ def fileExists(path):
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册