[PATCH] add a --switch-parent option to export
Benoit Boissinot
benoit.boissinot at ens-lyon.org
Thu Dec 15 17:14:48 UTC 2005
On Mon, Dec 12, 2005 at 03:02:58PM +0100, Benoit Boissinot wrote:
> This option can be useful when reviewing merges.
>
i left a bug, please apply the patch below.
(i knew i should have re-tested after cleaning up the patch)
sorry,
Benoit
# HG changeset patch
# User Benoit Boissinot <benoit.boissinot at ens-lyon.org>
# Node ID c5748fc83507aefd088d8a689ec61e58e60a1d93
# Parent 675ca845c2f891b549ef96b12aa30cd7e21f2505
fix a bug in hg export --switch-parent
diff -r 675ca845c2f8 -r c5748fc83507 mercurial/commands.py
--- a/mercurial/commands.py Thu Dec 15 18:04:39 2005 +0100
+++ b/mercurial/commands.py Thu Dec 15 18:13:08 2005 +0100
@@ -1119,11 +1119,11 @@
def doexport(ui, repo, changeset, seqno, total, revwidth, opts):
node = repo.lookup(changeset)
parents = [p for p in repo.changelog.parents(node) if p != nullid]
+ if opts['switch_parent']:
+ parents.reverse()
prev = (parents and parents[0]) or nullid
change = repo.changelog.read(node)
- if opts['switch_parent']:
- parents.reverse()
fp = make_file(repo, repo.changelog, opts['output'],
node=node, total=total, seqno=seqno,
revwidth=revwidth)
More information about the Mercurial
mailing list