Show More
@@ -1738,9 +1738,15 b' def trydiff(repo, revs, ctx1, ctx2, modi' | |||||
1738 | s.update(text) |
|
1738 | s.update(text) | |
1739 | return s.hexdigest() |
|
1739 | return s.hexdigest() | |
1740 |
|
1740 | |||
|
1741 | if opts.noprefix: | |||
|
1742 | aprefix = bprefix = '' | |||
|
1743 | else: | |||
|
1744 | aprefix = 'a/' | |||
|
1745 | bprefix = 'b/' | |||
|
1746 | ||||
1741 | def diffline(a, b, revs): |
|
1747 | def diffline(a, b, revs): | |
1742 | if opts.git: |
|
1748 | if opts.git: | |
1743 |
line = 'diff --git |
|
1749 | line = 'diff --git %s%s %s%s\n' % (aprefix, a, bprefix, b) | |
1744 | elif not repo.ui.quiet: |
|
1750 | elif not repo.ui.quiet: | |
1745 | if revs: |
|
1751 | if revs: | |
1746 | revinfo = ' '.join(["-r %s" % rev for rev in revs]) |
|
1752 | revinfo = ' '.join(["-r %s" % rev for rev in revs]) |
@@ -232,7 +232,7 b' Git diff, adding space' | |||||
232 | Git diff with noprefix |
|
232 | Git diff with noprefix | |
233 |
|
233 | |||
234 | $ hg --config diff.noprefix=True diff --git --nodates |
|
234 | $ hg --config diff.noprefix=True diff --git --nodates | |
235 |
diff --git |
|
235 | diff --git f1 f 1 | |
236 | rename from f1 |
|
236 | rename from f1 | |
237 | rename to f 1 |
|
237 | rename to f 1 | |
238 | --- f1 |
|
238 | --- f1 | |
@@ -253,7 +253,7 b' noprefix config disabled in plain mode, ' | |||||
253 | -a |
|
253 | -a | |
254 | +b |
|
254 | +b | |
255 | $ HGPLAIN=1 hg diff --git --noprefix --nodates |
|
255 | $ HGPLAIN=1 hg diff --git --noprefix --nodates | |
256 |
diff --git |
|
256 | diff --git f1 f 1 | |
257 | rename from f1 |
|
257 | rename from f1 | |
258 | rename to f 1 |
|
258 | rename to f 1 | |
259 | --- f1 |
|
259 | --- f1 |
General Comments 0
You need to be logged in to leave comments.
Login now