diff: swap and simplify diffline args
Args order swapped, since a, b are more important than revs
(which is only used on non-git format), and change to read opts
from context.
--- a/mercurial/patch.py Thu Nov 15 13:49:04 2012 -0800
+++ b/mercurial/patch.py Thu Nov 15 13:52:51 2012 -0800
@@ -1663,7 +1663,7 @@
def join(f):
return os.path.join(prefix, f)
- def diffline(revs, a, b, opts):
+ def diffline(a, b, revs):
if repo.ui.quiet and not opts.git:
return ''
parts = ['diff']
@@ -1763,7 +1763,7 @@
if dodiff:
if opts.git or revs:
- header.insert(0, diffline(revs, join(a), join(b), opts))
+ header.insert(0, diffline(join(a), join(b), revs))
if dodiff == 'binary':
text = mdiff.b85diff(to, tn)
else: