Show More
@@ -143,19 +143,6 b' def allblocks(text1, text2, opts=None, l' | |||
|
143 | 143 | yield s, type |
|
144 | 144 | yield s1, '=' |
|
145 | 145 | |
|
146 | def diffline(revs, a, b, opts): | |
|
147 | parts = ['diff'] | |
|
148 | if opts.git: | |
|
149 | parts.append('--git') | |
|
150 | if revs and not opts.git: | |
|
151 | parts.append(' '.join(["-r %s" % rev for rev in revs])) | |
|
152 | if opts.git: | |
|
153 | parts.append('a/%s' % a) | |
|
154 | parts.append('b/%s' % b) | |
|
155 | else: | |
|
156 | parts.append(a) | |
|
157 | return ' '.join(parts) + '\n' | |
|
158 | ||
|
159 | 146 | def unidiff(a, ad, b, bd, fn1, fn2, opts=defaultopts): |
|
160 | 147 | def datetag(date, fn=None): |
|
161 | 148 | if not opts.git and not opts.nodates: |
@@ -1664,6 +1664,19 b' def trydiff(repo, revs, ctx1, ctx2, modi' | |||
|
1664 | 1664 | def join(f): |
|
1665 | 1665 | return os.path.join(prefix, f) |
|
1666 | 1666 | |
|
1667 | def diffline(revs, a, b, opts): | |
|
1668 | parts = ['diff'] | |
|
1669 | if opts.git: | |
|
1670 | parts.append('--git') | |
|
1671 | if revs and not opts.git: | |
|
1672 | parts.append(' '.join(["-r %s" % rev for rev in revs])) | |
|
1673 | if opts.git: | |
|
1674 | parts.append('a/%s' % a) | |
|
1675 | parts.append('b/%s' % b) | |
|
1676 | else: | |
|
1677 | parts.append(a) | |
|
1678 | return ' '.join(parts) + '\n' | |
|
1679 | ||
|
1667 | 1680 | date1 = util.datestr(ctx1.date()) |
|
1668 | 1681 | man1 = ctx1.manifest() |
|
1669 | 1682 | |
@@ -1749,7 +1762,7 b' def trydiff(repo, revs, ctx1, ctx2, modi' | |||
|
1749 | 1762 | |
|
1750 | 1763 | if dodiff: |
|
1751 | 1764 | if opts.git or revs: |
|
1752 |
header.insert(0, |
|
|
1765 | header.insert(0, diffline(revs, join(a), join(b), opts)) | |
|
1753 | 1766 | if dodiff == 'binary': |
|
1754 | 1767 | text = mdiff.b85diff(to, tn) |
|
1755 | 1768 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now