Show More
@@ -991,6 +991,14 b' def tryimportone(ui, repo, hunk, parents' | |||
|
991 | 991 | lockmod.release(dsguard) |
|
992 | 992 | os.unlink(tmpname) |
|
993 | 993 | |
|
994 | # facility to let extensions include additional data in an exported patch | |
|
995 | # list of identifiers to be executed in order | |
|
996 | extraexport = [] | |
|
997 | # mapping from identifier to actual export function | |
|
998 | # function as to return a string to be added to the header or None | |
|
999 | # it is given two arguments (sequencenumber, changectx) | |
|
1000 | extraexportmap = {} | |
|
1001 | ||
|
994 | 1002 | def export(repo, revs, template='hg-%h.patch', fp=None, switch_parent=False, |
|
995 | 1003 | opts=None, match=None): |
|
996 | 1004 | '''export changesets as hg patches.''' |
@@ -1040,6 +1048,11 b" def export(repo, revs, template='hg-%h.p" | |||
|
1040 | 1048 | write("# Parent %s\n" % hex(prev)) |
|
1041 | 1049 | if len(parents) > 1: |
|
1042 | 1050 | write("# Parent %s\n" % hex(parents[1])) |
|
1051 | ||
|
1052 | for headerid in extraexport: | |
|
1053 | header = extraexportmap[headerid](seqno, ctx) | |
|
1054 | if header is not None: | |
|
1055 | write('# %s\n' % header) | |
|
1043 | 1056 | write(ctx.description().rstrip()) |
|
1044 | 1057 | write("\n\n") |
|
1045 | 1058 |
General Comments 0
You need to be logged in to leave comments.
Login now