changeset 1589:fce5292866c6

fix a bug in hg export --switch-parent
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Fri, 16 Dec 2005 00:12:00 -0600
parents a679a364436a
children bae3f3f993d6
files mercurial/commands.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Thu Dec 15 16:19:23 2005 +0100
+++ b/mercurial/commands.py	Fri Dec 16 00:12:00 2005 -0600
@@ -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)