trydiff: transpose 'if opts.git or losedatafn' with 'if f[12]'
Perhaps it's more readable this way...
--- a/mercurial/patch.py Thu Jan 22 23:29:00 2015 -0800
+++ b/mercurial/patch.py Fri Feb 06 16:09:43 2015 -0800
@@ -1804,18 +1804,18 @@
ctx1, modified, added, removed, copy, opts):
content1 = None
content2 = None
- if f1:
- content1 = getfilectx(f1, ctx1).data()
- if f2:
- content2 = getfilectx(f2, ctx2).data()
flag1 = None
flag2 = None
+ if f1:
+ content1 = getfilectx(f1, ctx1).data()
+ if opts.git or losedatafn:
+ flag1 = ctx1.flags(f1)
+ if f2:
+ content2 = getfilectx(f2, ctx2).data()
+ if opts.git or losedatafn:
+ flag2 = ctx2.flags(f2)
binary = False
if opts.git or losedatafn:
- if f1:
- flag1 = ctx1.flags(f1)
- if f2:
- flag2 = ctx2.flags(f2)
binary = util.binary(content1) or util.binary(content2)
if losedatafn and not opts.git: