##// END OF EJS Templates
patch: git delete mode shouldn't be used at all
Mads Kiilerich -
r11020:dd157720 default
parent child Browse files
Show More
@@ -347,8 +347,6 b' def readgitpatch(lr):'
347 gp.path = line[8:]
347 gp.path = line[8:]
348 elif line.startswith('deleted file'):
348 elif line.startswith('deleted file'):
349 gp.op = 'DELETE'
349 gp.op = 'DELETE'
350 # is the deleted file a symlink?
351 gp.setmode(int(line[-6:], 8))
352 elif line.startswith('new file mode '):
350 elif line.startswith('new file mode '):
353 gp.op = 'ADD'
351 gp.op = 'ADD'
354 gp.setmode(int(line[-6:], 8))
352 gp.setmode(int(line[-6:], 8))
@@ -1241,8 +1239,7 b' def updatedir(ui, repo, patches, similar'
1241 if gp.op == 'ADD' and not os.path.exists(dst):
1239 if gp.op == 'ADD' and not os.path.exists(dst):
1242 flags = (isexec and 'x' or '') + (islink and 'l' or '')
1240 flags = (isexec and 'x' or '') + (islink and 'l' or '')
1243 repo.wwrite(gp.path, '', flags)
1241 repo.wwrite(gp.path, '', flags)
1244 elif gp.op != 'DELETE':
1242 util.set_flags(dst, islink, isexec)
1245 util.set_flags(dst, islink, isexec)
1246 cmdutil.addremove(repo, cfiles, similarity=similarity)
1243 cmdutil.addremove(repo, cfiles, similarity=similarity)
1247 files = patches.keys()
1244 files = patches.keys()
1248 files.extend([r for r in removes if r not in files])
1245 files.extend([r for r in removes if r not in files])
General Comments 0
You need to be logged in to leave comments. Login now