equal
deleted
inserted
replaced
1752 else: |
1752 else: |
1753 aprefix = 'a/' |
1753 aprefix = 'a/' |
1754 bprefix = 'b/' |
1754 bprefix = 'b/' |
1755 |
1755 |
1756 def diffline(f, revs): |
1756 def diffline(f, revs): |
1757 if not repo.ui.quiet: |
1757 revinfo = ' '.join(["-r %s" % rev for rev in revs]) |
1758 revinfo = ' '.join(["-r %s" % rev for rev in revs]) |
1758 return 'diff %s %s\n' % (revinfo, f) |
1759 line = 'diff %s %s\n' % (revinfo, f) |
|
1760 else: |
|
1761 line = '' |
|
1762 return line |
|
1763 |
1759 |
1764 date1 = util.datestr(ctx1.date()) |
1760 date1 = util.datestr(ctx1.date()) |
1765 date2 = util.datestr(ctx2.date()) |
1761 date2 = util.datestr(ctx2.date()) |
1766 |
1762 |
1767 gone = set() |
1763 gone = set() |
1852 header.append('old mode %s\n' % mode1) |
1848 header.append('old mode %s\n' % mode1) |
1853 header.append('new mode %s\n' % mode2) |
1849 header.append('new mode %s\n' % mode2) |
1854 if op is not None: |
1850 if op is not None: |
1855 header.append('%s from %s\n' % (op, path1)) |
1851 header.append('%s from %s\n' % (op, path1)) |
1856 header.append('%s to %s\n' % (op, path2)) |
1852 header.append('%s to %s\n' % (op, path2)) |
1857 elif revs: |
1853 elif revs and not repo.ui.quiet: |
1858 header.append(diffline(path1, revs)) |
1854 header.append(diffline(path1, revs)) |
1859 |
1855 |
1860 if binarydiff and not opts.nobinary: |
1856 if binarydiff and not opts.nobinary: |
1861 text = mdiff.b85diff(content1, content2) |
1857 text = mdiff.b85diff(content1, content2) |
1862 if text and opts.git: |
1858 if text and opts.git: |