Patchwork [20,of,24] convert: process splicemap in sorted order

login
register
mail settings
Submitter Mads Kiilerich
Date Dec. 16, 2012, 10:34 p.m.
Message ID <d8ae1e3965a185b2dda6.1355697255@localhost6.localdomain6>
Download mbox | patch
Permalink /patch/144/
State Accepted
Commit 5965997b70235e768c4244454afae5ca86b3caaa
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 d8ae1e3965a185b2dda639c59a34b31b3117e48d
# Parent  b03e365968f876ad504b324c93737434b9397731
convert: process splicemap 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 splicemap in sorted order
>

This doesn't have any visible consequences?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20121217/b9848f34/attachment.html>
Mads Kiilerich - Dec. 18, 2012, 1:59 a.m.
Bryan O'Sullivan wrote, On 12/17/2012 10:09 PM:
> On Sun, Dec 16, 2012 at 2:34 PM, Mads Kiilerich <mads at kiilerich.com 
> <mailto:mads at kiilerich.com>> wrote:
>
>     convert: process splicemap in sorted order
>
>
> This doesn't have any visible consequences?

Correct, not with the default hash seed.

Some tests (test-splicemap.t IIRC) would sometimes fail when running 
with random seed - either because of different output ordering or 
because of assumptions in the test code.

That is actually the case for most of the patches in this series. 
Enumerating the failures I have seen and how they were fixed is not 
feasible.

/Mads

Patch

diff --git a/hgext/convert/convcmd.py b/hgext/convert/convcmd.py
--- a/hgext/convert/convcmd.py
+++ b/hgext/convert/convcmd.py
@@ -147,7 +147,7 @@ 
         map contains valid revision identifiers and merge the new
         links in the source graph.
         """
-        for c in splicemap:
+        for c in sorted(splicemap):
             if c not in parents:
                 if not self.dest.hascommit(self.map.get(c, c)):
                     # Could be in source but not converted during this run