[PATCH 5 of 5] trydiff: use 'ctx1.flags()' for symmetry with 'ctx2.flags()'
Martin von Zweigbergk
martinvonz at google.com
Tue Dec 23 18:44:15 CST 2014
# HG changeset patch
# User Martin von Zweigbergk <martinvonz at google.com>
# Date 1419380186 28800
# Tue Dec 23 16:16:26 2014 -0800
# Node ID 2d533c714aa631e2a3eb7a322e7f4105b6c3e016
# Parent 09218e2b5e5da534916698fb524567625bff9ec3
trydiff: use 'ctx1.flags()' for symmetry with 'ctx2.flags()'
diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -1785,7 +1785,6 @@
date1 = util.datestr(ctx1.date())
date2 = util.datestr(ctx2.date())
- man1 = ctx1.manifest()
gone = set()
gitmode = {'l': '120000', 'x': '100755', '': '100644'}
@@ -1821,7 +1820,7 @@
a = copy[f]
else:
a = copyto[f]
- omode = gitmode[man1.flags(a)]
+ omode = gitmode[ctx1.flags(a)]
addmodehdr(header, omode, mode)
if a in removedset and a not in gone:
op = 'rename'
@@ -1859,14 +1858,14 @@
dodiff = False
else:
header.append('deleted file mode %s\n' %
- gitmode[man1.flags(f)])
+ gitmode[ctx1.flags(f)])
if util.binary(to):
dodiff = 'binary'
elif not to or util.binary(to):
# regular diffs cannot represent empty file deletion
losedatafn(f)
else:
- oflag = man1.flags(f)
+ oflag = ctx1.flags(f)
nflag = ctx2.flags(f)
binary = util.binary(to) or util.binary(tn)
if opts.git:
More information about the Mercurial-devel
mailing list