Patchwork [21,of,24] convert: process missing branches in sorted order

login
register
mail settings
Submitter Mads Kiilerich
Date Dec. 16, 2012, 10:34 p.m.
Message ID <9620cbd6db4c07b26d60.1355697256@localhost6.localdomain6>
Download mbox | patch
Permalink /patch/147/
State Accepted
Commit 687ed69f6fdfb4e5c2354ed172acdf996b7692c0
Headers show

Comments

Mads Kiilerich - Dec. 16, 2012, 10:34 p.m.
# HG changeset patch
# User Mads Kiilerich <mads at kiilerich.com>
# Date 1355687458 -3600
# Node ID 9620cbd6db4c07b26d6076cb6fee1aea80cf3cfc
# Parent  d8ae1e3965a185b2dda639c59a34b31b3117e48d
convert: process missing branches in sorted order
Bryan O'Sullivan - Dec. 17, 2012, 9:09 p.m.
On Sun, Dec 16, 2012 at 2:34 PM, Mads Kiilerich <mads at kiilerich.com> wrote:

> convert: process missing branches in sorted order
>

Looks good, thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20121217/65295700/attachment.html>

Patch

diff --git a/hgext/convert/hg.py b/hgext/convert/hg.py
--- a/hgext/convert/hg.py
+++ b/hgext/convert/hg.py
@@ -110,7 +110,7 @@ 
 
         if missings:
             self.after()
-            for pbranch, heads in missings.iteritems():
+            for pbranch, heads in sorted(missings.iteritems()):
                 pbranchpath = os.path.join(self.path, pbranch)
                 prepo = hg.peer(self.ui, {}, pbranchpath)
                 self.ui.note(_('pulling from %s into %s\n') % (pbranch, branch))
diff --git a/tests/test-convert-clonebranches.t b/tests/test-convert-clonebranches.t
--- a/tests/test-convert-clonebranches.t
+++ b/tests/test-convert-clonebranches.t
@@ -82,7 +82,7 @@ 
   pulling from branch0 into branch2
   4 changesets found
   0 c3
+  pulling from branch1 into branch3
+  5 changesets found
   pulling from branch2 into branch3
-  5 changesets found
-  pulling from branch1 into branch3
   1 changesets found