##// END OF EJS Templates
trydiff: replace dodiff=True/'binary' by binarydiff=False/True
Martin von Zweigbergk -
r23754:ed645dc6 default
parent child Browse files
Show More
@@ -1798,7 +1798,7 b' def trydiff(repo, revs, ctx1, ctx2, modi'
1798 1798 for f in sorted(modified + added + removed):
1799 1799 to = None
1800 1800 tn = None
1801 dodiff = True
1801 binarydiff = False
1802 1802 header = []
1803 1803 if f not in addedset:
1804 1804 to = getfilectx(f, ctx1).data()
@@ -1836,7 +1836,7 b' def trydiff(repo, revs, ctx1, ctx2, modi'
1836 1836 # forces git mode.
1837 1837 if util.binary(tn):
1838 1838 if opts.git:
1839 dodiff = 'binary'
1839 binarydiff = True
1840 1840 else:
1841 1841 losedatafn(f)
1842 1842 if not opts.git and not tn:
@@ -1854,7 +1854,7 b' def trydiff(repo, revs, ctx1, ctx2, modi'
1854 1854 header.append('deleted file mode %s\n' %
1855 1855 gitmode[ctx1.flags(f)])
1856 1856 if util.binary(to):
1857 dodiff = 'binary'
1857 binarydiff = True
1858 1858 elif not to or util.binary(to):
1859 1859 # regular diffs cannot represent empty file deletion
1860 1860 losedatafn(f)
@@ -1865,13 +1865,13 b' def trydiff(repo, revs, ctx1, ctx2, modi'
1865 1865 if opts.git:
1866 1866 addmodehdr(header, gitmode[oflag], gitmode[nflag])
1867 1867 if binary:
1868 dodiff = 'binary'
1868 binarydiff = True
1869 1869 elif binary or nflag != oflag:
1870 1870 losedatafn(f)
1871 1871
1872 1872 if opts.git or revs:
1873 1873 header.insert(0, diffline(join(a), join(b), revs))
1874 if dodiff == 'binary' and not opts.nobinary:
1874 if binarydiff and not opts.nobinary:
1875 1875 text = mdiff.b85diff(to, tn)
1876 1876 if text and opts.git:
1877 1877 addindexmeta(header, gitindex(to), gitindex(tn))
General Comments 0
You need to be logged in to leave comments. Login now