[PATCH 09 of 24] bookmarks: process pulled remote bookmarks in sorted order
Mads Kiilerich
mads at kiilerich.com
Sun Dec 16 16:34:04 CST 2012
# HG changeset patch
# User Mads Kiilerich <mads at kiilerich.com>
# Date 1355687456 -3600
# Node ID 3c6e2e0aad7fbd090bac10d2cd6589da6421556b
# Parent c5976bcb3832034ff1934a3093e0241088112cc9
bookmarks: process pulled remote bookmarks in sorted order
diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py
--- a/mercurial/bookmarks.py
+++ b/mercurial/bookmarks.py
@@ -198,7 +198,7 @@
rb = remote.listkeys('bookmarks')
changed = False
localmarks = repo._bookmarks
- for k in rb.keys():
+ for k in sorted(rb):
if k in localmarks:
nr, nl = rb[k], localmarks[k]
if nr in repo:
diff --git a/tests/test-bookmarks-pushpull.t b/tests/test-bookmarks-pushpull.t
--- a/tests/test-bookmarks-pushpull.t
+++ b/tests/test-bookmarks-pushpull.t
@@ -41,8 +41,8 @@
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
+ adding remote bookmark X
updating bookmark Y
- adding remote bookmark X
adding remote bookmark Z
(run 'hg update' to get a working copy)
$ hg bookmarks
@@ -145,9 +145,9 @@
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
+ divergent bookmark @ stored as @foo
divergent bookmark X stored as X at foo
updating bookmark Z
- divergent bookmark @ stored as @foo
(run 'hg heads' to see heads, 'hg merge' to merge)
$ hg book
@ 1:9b140be10808
@@ -324,10 +324,10 @@
pulling from http://localhost:$HGPORT/
no changes found
divergent bookmark @ stored as @1
+ divergent bookmark X stored as X at 1
+ adding remote bookmark Z
adding remote bookmark foo
adding remote bookmark foobar
- divergent bookmark X stored as X at 1
- adding remote bookmark Z
importing bookmark Z
$ hg clone http://localhost:$HGPORT/ cloned-bookmarks
requesting all changes
More information about the Mercurial-devel
mailing list