Show More
@@ -1651,18 +1651,17 b' def diffui(*args, **kw):' | |||
|
1651 | 1651 | '''like diff(), but yields 2-tuples of (output, label) for ui.write()''' |
|
1652 | 1652 | return difflabel(diff, *args, **kw) |
|
1653 | 1653 | |
|
1654 | ||
|
1655 | def _addmodehdr(header, omode, nmode): | |
|
1656 | if omode != nmode: | |
|
1657 | header.append('old mode %s\n' % omode) | |
|
1658 | header.append('new mode %s\n' % nmode) | |
|
1659 | ||
|
1660 | 1654 | def trydiff(repo, revs, ctx1, ctx2, modified, added, removed, |
|
1661 | 1655 | copy, getfilectx, opts, losedatafn, prefix): |
|
1662 | 1656 | |
|
1663 | 1657 | def join(f): |
|
1664 | 1658 | return os.path.join(prefix, f) |
|
1665 | 1659 | |
|
1660 | def addmodehdr(header, omode, nmode): | |
|
1661 | if omode != nmode: | |
|
1662 | header.append('old mode %s\n' % omode) | |
|
1663 | header.append('new mode %s\n' % nmode) | |
|
1664 | ||
|
1666 | 1665 | def diffline(a, b, revs): |
|
1667 | 1666 | if opts.git: |
|
1668 | 1667 | line = 'diff --git a/%s b/%s\n' % (a, b) |
@@ -1707,7 +1706,7 b' def trydiff(repo, revs, ctx1, ctx2, modi' | |||
|
1707 | 1706 | else: |
|
1708 | 1707 | a = copyto[f] |
|
1709 | 1708 | omode = gitmode[man1.flags(a)] |
|
1710 |
|
|
|
1709 | addmodehdr(header, omode, mode) | |
|
1711 | 1710 | if a in removed and a not in gone: |
|
1712 | 1711 | op = 'rename' |
|
1713 | 1712 | gone.add(a) |
@@ -1753,7 +1752,7 b' def trydiff(repo, revs, ctx1, ctx2, modi' | |||
|
1753 | 1752 | nflag = ctx2.flags(f) |
|
1754 | 1753 | binary = util.binary(to) or util.binary(tn) |
|
1755 | 1754 | if opts.git: |
|
1756 |
|
|
|
1755 | addmodehdr(header, gitmode[oflag], gitmode[nflag]) | |
|
1757 | 1756 | if binary: |
|
1758 | 1757 | dodiff = 'binary' |
|
1759 | 1758 | elif binary or nflag != oflag: |
General Comments 0
You need to be logged in to leave comments.
Login now