equal
deleted
inserted
replaced
1661 copy, getfilectx, opts, losedatafn, prefix): |
1661 copy, getfilectx, opts, losedatafn, prefix): |
1662 |
1662 |
1663 def join(f): |
1663 def join(f): |
1664 return os.path.join(prefix, f) |
1664 return os.path.join(prefix, f) |
1665 |
1665 |
1666 def diffline(revs, a, b, opts): |
1666 def diffline(a, b, revs): |
1667 if repo.ui.quiet and not opts.git: |
1667 if repo.ui.quiet and not opts.git: |
1668 return '' |
1668 return '' |
1669 parts = ['diff'] |
1669 parts = ['diff'] |
1670 if opts.git: |
1670 if opts.git: |
1671 parts.append('--git') |
1671 parts.append('--git') |
1761 elif binary or nflag != oflag: |
1761 elif binary or nflag != oflag: |
1762 losedatafn(f) |
1762 losedatafn(f) |
1763 |
1763 |
1764 if dodiff: |
1764 if dodiff: |
1765 if opts.git or revs: |
1765 if opts.git or revs: |
1766 header.insert(0, diffline(revs, join(a), join(b), opts)) |
1766 header.insert(0, diffline(join(a), join(b), revs)) |
1767 if dodiff == 'binary': |
1767 if dodiff == 'binary': |
1768 text = mdiff.b85diff(to, tn) |
1768 text = mdiff.b85diff(to, tn) |
1769 else: |
1769 else: |
1770 text = mdiff.unidiff(to, date1, |
1770 text = mdiff.unidiff(to, date1, |
1771 # ctx2 date may be dynamic |
1771 # ctx2 date may be dynamic |