Mercurial > hg > mercurial-crew-with-dirclash
changeset 4436:a764edb6fc95
Add branch information to hg export.
author | Eric Hopper <hopper@omnifarious.org> |
---|---|
date | Thu, 10 May 2007 13:42:36 -0700 |
parents | aac150af09e8 |
children | a210b40d0860 |
files | mercurial/patch.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -612,6 +612,7 @@ def export(repo, revs, template='hg-%h.p ctx = repo.changectx(rev) node = ctx.node() parents = [p.node() for p in ctx.parents() if p] + branch = ctx.branch() if switch_parent: parents.reverse() prev = (parents and parents[0]) or nullid @@ -625,6 +626,8 @@ def export(repo, revs, template='hg-%h.p fp.write("# HG changeset patch\n") fp.write("# User %s\n" % ctx.user()) fp.write("# Date %d %d\n" % ctx.date()) + if branch and (branch != 'default'): + fp.write("# Branch %s\n" % branch) fp.write("# Node ID %s\n" % hex(node)) fp.write("# Parent %s\n" % hex(prev)) if len(parents) > 1: