Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 26229:d1530c6e8613
extdiff: enable -I/-X with --patch
Not sure how useful this really is, but it's trivial to add and ignoring the
existing arguments supported seems like a bad UI.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Wed, 09 Sep 2015 22:27:48 -0400 |
parents | 3095b1027661 |
children | 4a8e21578e14 |
comparison
equal
deleted
inserted
replaced
26228:0fd20a71abdb | 26229:d1530c6e8613 |
---|---|
990 finally: | 990 finally: |
991 lockmod.release(dsguard) | 991 lockmod.release(dsguard) |
992 os.unlink(tmpname) | 992 os.unlink(tmpname) |
993 | 993 |
994 def export(repo, revs, template='hg-%h.patch', fp=None, switch_parent=False, | 994 def export(repo, revs, template='hg-%h.patch', fp=None, switch_parent=False, |
995 opts=None): | 995 opts=None, match=None): |
996 '''export changesets as hg patches.''' | 996 '''export changesets as hg patches.''' |
997 | 997 |
998 total = len(revs) | 998 total = len(revs) |
999 revwidth = max([len(str(rev)) for rev in revs]) | 999 revwidth = max([len(str(rev)) for rev in revs]) |
1000 filemode = {} | 1000 filemode = {} |
1041 if len(parents) > 1: | 1041 if len(parents) > 1: |
1042 write("# Parent %s\n" % hex(parents[1])) | 1042 write("# Parent %s\n" % hex(parents[1])) |
1043 write(ctx.description().rstrip()) | 1043 write(ctx.description().rstrip()) |
1044 write("\n\n") | 1044 write("\n\n") |
1045 | 1045 |
1046 for chunk, label in patch.diffui(repo, prev, node, opts=opts): | 1046 for chunk, label in patch.diffui(repo, prev, node, match, opts=opts): |
1047 write(chunk, label=label) | 1047 write(chunk, label=label) |
1048 | 1048 |
1049 if shouldclose: | 1049 if shouldclose: |
1050 fp.close() | 1050 fp.close() |
1051 | 1051 |