[PATCH 3 of 7] patch: git delete mode shouldn't be used at all
Mads Kiilerich
mads at kiilerich.com
Mon Apr 26 07:37:54 CDT 2010
# HG changeset patch
# User Mads Kiilerich <mads at kiilerich.com>
# Date 1272280862 -7200
# Node ID 7e65479fe7b82026f9016fb0bfa4a2a2c4917e57
# Parent 563ae480f2681dc7eb2c3244d63ed49caba8c708
patch: git delete mode shouldn't be used at all
diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -347,8 +347,6 @@
gp.path = line[8:]
elif line.startswith('deleted file'):
gp.op = 'DELETE'
- # is the deleted file a symlink?
- gp.setmode(int(line[-6:], 8))
elif line.startswith('new file mode '):
gp.op = 'ADD'
gp.setmode(int(line[-6:], 8))
@@ -1241,8 +1239,7 @@
if gp.op == 'ADD' and not os.path.exists(dst):
flags = (isexec and 'x' or '') + (islink and 'l' or '')
repo.wwrite(gp.path, '', flags)
- elif gp.op != 'DELETE':
- util.set_flags(dst, islink, isexec)
+ util.set_flags(dst, islink, isexec)
cmdutil.addremove(repo, cfiles, similarity=similarity)
files = patches.keys()
files.extend([r for r in removes if r not in files])
More information about the Mercurial-devel
mailing list