[PATCH 2 of 5] push: Move bookmark discovery with other discovery steps

Pierre-Yves David pierre-yves.david at ens-lyon.org
Mon Aug 18 23:48:00 UTC 2014


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1408153179 25200
#      Fri Aug 15 18:39:39 2014 -0700
# Node ID 9548edead3a6e03cb104206c55665fc5839712dc
# Parent  6076552e3523a34b047dba890b8ff35141175a7c
push: Move bookmark discovery with other discovery steps

The discovery of necessary bookmark update is now done withing the "discovery
phases". This open the door to the inclusion of bookmarks in a unified bundle2
push.

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -81,10 +81,12 @@ class pushoperation(object):
         self.outdatedphases = None
         # phases changes that must be pushed if changeset push fails
         self.fallbackoutdatedphases = None
         # outgoing obsmarkers
         self.outobsmarkers = set()
+        # outgoing bookmarks
+        self.outbookmarks = []
 
     @util.propertycache
     def futureheads(self):
         """future remote heads if the changeset push succeeds"""
         return self.outgoing.missingheads
@@ -278,10 +280,28 @@ def _pushdiscoveryphase(pushop):
 
 @pushdiscovery('obsmarker')
 def _pushdiscoveryobsmarkers(pushop):
     pushop.outobsmarkers = pushop.repo.obsstore
 
+ at pushdiscovery('bookmarks')
+def _pushdiscoverybookmarks(pushop):
+    ui = pushop.ui
+    repo = pushop.repo.unfiltered()
+    remote = pushop.remote
+    ui.debug("checking for updated bookmarks\n")
+    ancestors = ()
+    if pushop.revs:
+        revnums = map(repo.changelog.rev, pushop.revs)
+        ancestors = repo.changelog.ancestors(revnums, inclusive=True)
+    remotebookmark = remote.listkeys('bookmarks')
+
+    comp = bookmarks.compare(repo, repo._bookmarks, remotebookmark, srchex=hex)
+    (addsrc, adddst, advsrc, advdst, diverge, differ, invalid) = comp
+    for b, scid, dcid in advsrc:
+        if not ancestors or repo[scid].rev() in ancestors:
+            pushop.outbookmarks.append((b, dcid, scid))
+
 def _pushcheckoutgoing(pushop):
     outgoing = pushop.outgoing
     unfi = pushop.repo.unfiltered()
     if not outgoing.missing:
         # nothing to push
@@ -614,24 +634,13 @@ def _pushobsolete(pushop):
 def _pushbookmark(pushop):
     """Update bookmark position on remote"""
     if pushop.ret == 0:
         return
     ui = pushop.ui
-    repo = pushop.repo.unfiltered()
     remote = pushop.remote
-    ui.debug("checking for updated bookmarks\n")
-    ancestors = ()
-    if pushop.revs:
-        revnums = map(repo.changelog.rev, pushop.revs)
-        ancestors = repo.changelog.ancestors(revnums, inclusive=True)
-    remotebookmark = remote.listkeys('bookmarks')
-    comp = bookmarks.compare(repo, repo._bookmarks, remotebookmark, srchex=hex)
-    (addsrc, adddst, advsrc, advdst, diverge, differ, invalid) = comp
-    for b, scid, dcid in advsrc:
-        if ancestors and repo[scid].rev() not in ancestors:
-            continue
-        if remote.pushkey('bookmarks', b, dcid, scid):
+    for b, old, new in pushop.outbookmarks:
+        if remote.pushkey('bookmarks', b, old, new):
             ui.status(_("updating bookmark %s\n") % b)
         else:
             ui.warn(_('updating bookmark %s failed!\n') % b)
 
 class pulloperation(object):
diff --git a/tests/test-acl.t b/tests/test-acl.t
--- a/tests/test-acl.t
+++ b/tests/test-acl.t
@@ -81,10 +81,12 @@ Extension disabled for lack of a hook
   pushing to ../b
   query 1; heads
   searching for changes
   all remote heads known locally
   listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
   listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
   f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
@@ -118,12 +120,10 @@ Extension disabled for lack of a hook
   files: 3/3 chunks (100.00%)
   added 3 changesets with 3 changes to 3 files
   updating the branch cache
   listing keys for "phases"
   try to push obsolete markers to remote
-  checking for updated bookmarks
-  listing keys for "bookmarks"
   repository tip rolled back to revision 0 (undo push)
   0:6675d58eff77
   
 
   $ echo '[hooks]' >> $config
@@ -140,10 +140,12 @@ Extension disabled for lack of acl.sourc
   pushing to ../b
   query 1; heads
   searching for changes
   all remote heads known locally
   listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
   invalid branchheads cache (served): tip differs
   listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -180,12 +182,10 @@ Extension disabled for lack of acl.sourc
   calling hook pretxnchangegroup.acl: hgext.acl.hook
   acl: changes have source "push" - skipping
   updating the branch cache
   listing keys for "phases"
   try to push obsolete markers to remote
-  checking for updated bookmarks
-  listing keys for "bookmarks"
   repository tip rolled back to revision 0 (undo push)
   0:6675d58eff77
   
 
 No [acl.allow]/[acl.deny]
@@ -203,10 +203,12 @@ No [acl.allow]/[acl.deny]
   pushing to ../b
   query 1; heads
   searching for changes
   all remote heads known locally
   listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
   invalid branchheads cache (served): tip differs
   listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -253,12 +255,10 @@ No [acl.allow]/[acl.deny]
   acl: branch access granted: "911600dab2ae" on branch "default"
   acl: path access granted: "911600dab2ae"
   updating the branch cache
   listing keys for "phases"
   try to push obsolete markers to remote
-  checking for updated bookmarks
-  listing keys for "bookmarks"
   repository tip rolled back to revision 0 (undo push)
   0:6675d58eff77
   
 
 Empty [acl.allow]
@@ -276,10 +276,12 @@ Empty [acl.allow]
   pushing to ../b
   query 1; heads
   searching for changes
   all remote heads known locally
   listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
   invalid branchheads cache (served): tip differs
   listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -344,10 +346,12 @@ fred is allowed inside foo/
   pushing to ../b
   query 1; heads
   searching for changes
   all remote heads known locally
   listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
   invalid branchheads cache (served): tip differs
   listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -417,10 +421,12 @@ Empty [acl.deny]
   pushing to ../b
   query 1; heads
   searching for changes
   all remote heads known locally
   listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
   invalid branchheads cache (served): tip differs
   listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -487,10 +493,12 @@ fred is allowed inside foo/, but not foo
   pushing to ../b
   query 1; heads
   searching for changes
   all remote heads known locally
   listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
   invalid branchheads cache (served): tip differs
   listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -562,10 +570,12 @@ fred is allowed inside foo/, but not foo
   pushing to ../b
   query 1; heads
   searching for changes
   all remote heads known locally
   listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
   invalid branchheads cache (served): tip differs
   listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -634,10 +644,12 @@ fred is allowed inside foo/, but not foo
   pushing to ../b
   query 1; heads
   searching for changes
   all remote heads known locally
   listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
   invalid branchheads cache (served): tip differs
   listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -708,10 +720,12 @@ barney is allowed everywhere
   pushing to ../b
   query 1; heads
   searching for changes
   all remote heads known locally
   listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
   invalid branchheads cache (served): tip differs
   listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -758,12 +772,10 @@ barney is allowed everywhere
   acl: branch access granted: "911600dab2ae" on branch "default"
   acl: path access granted: "911600dab2ae"
   updating the branch cache
   listing keys for "phases"
   try to push obsolete markers to remote
-  checking for updated bookmarks
-  listing keys for "bookmarks"
   repository tip rolled back to revision 0 (undo push)
   0:6675d58eff77
   
 
 wilma can change files with a .txt extension
@@ -788,10 +800,12 @@ wilma can change files with a .txt exten
   pushing to ../b
   query 1; heads
   searching for changes
   all remote heads known locally
   listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
   invalid branchheads cache (served): tip differs
   listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -869,10 +883,12 @@ file specified by acl.config does not ex
   pushing to ../b
   query 1; heads
   searching for changes
   all remote heads known locally
   listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
   invalid branchheads cache (served): tip differs
   listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -906,14 +922,14 @@ file specified by acl.config does not ex
   adding quux/file.py revisions
   files: 3/3 chunks (100.00%)
   added 3 changesets with 3 changes to 3 files
   calling hook pretxnchangegroup.acl: hgext.acl.hook
   acl: checking access for user "barney"
-  error: pretxnchangegroup.acl hook raised an exception: [Errno *] *: '../acl.config' (glob)
+  error: pretxnchangegroup.acl hook raised an exception: [Errno 2] No such file or directory: '../acl.config'
   transaction abort!
   rollback completed
-  abort: *: ../acl.config (glob)
+  abort: No such file or directory: ../acl.config
   no rollback information available
   0:6675d58eff77
   
 
 betty is allowed inside foo/ by a acl.config file
@@ -945,10 +961,12 @@ betty is allowed inside foo/ by a acl.co
   pushing to ../b
   query 1; heads
   searching for changes
   all remote heads known locally
   listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
   invalid branchheads cache (served): tip differs
   listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1032,10 +1050,12 @@ acl.config can set only [acl.allow]/[acl
   pushing to ../b
   query 1; heads
   searching for changes
   all remote heads known locally
   listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
   invalid branchheads cache (served): tip differs
   listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1082,12 +1102,10 @@ acl.config can set only [acl.allow]/[acl
   acl: branch access granted: "911600dab2ae" on branch "default"
   acl: path access granted: "911600dab2ae"
   updating the branch cache
   listing keys for "phases"
   try to push obsolete markers to remote
-  checking for updated bookmarks
-  listing keys for "bookmarks"
   repository tip rolled back to revision 0 (undo push)
   0:6675d58eff77
   
 
 asterisk
@@ -1113,10 +1131,12 @@ fred is always allowed
   pushing to ../b
   query 1; heads
   searching for changes
   all remote heads known locally
   listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
   invalid branchheads cache (served): tip differs
   listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1163,12 +1183,10 @@ fred is always allowed
   acl: branch access granted: "911600dab2ae" on branch "default"
   acl: path access granted: "911600dab2ae"
   updating the branch cache
   listing keys for "phases"
   try to push obsolete markers to remote
-  checking for updated bookmarks
-  listing keys for "bookmarks"
   repository tip rolled back to revision 0 (undo push)
   0:6675d58eff77
   
 
   $ echo '[acl.deny]' >> $config
@@ -1190,10 +1208,12 @@ no one is allowed inside foo/Bar/
   pushing to ../b
   query 1; heads
   searching for changes
   all remote heads known locally
   listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
   invalid branchheads cache (served): tip differs
   listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1267,10 +1287,12 @@ OS-level groups
   pushing to ../b
   query 1; heads
   searching for changes
   all remote heads known locally
   listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
   invalid branchheads cache (served): tip differs
   listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1318,12 +1340,10 @@ OS-level groups
   acl: branch access granted: "911600dab2ae" on branch "default"
   acl: path access granted: "911600dab2ae"
   updating the branch cache
   listing keys for "phases"
   try to push obsolete markers to remote
-  checking for updated bookmarks
-  listing keys for "bookmarks"
   repository tip rolled back to revision 0 (undo push)
   0:6675d58eff77
   
 
   $ echo '[acl.deny]' >> $config
@@ -1345,10 +1365,12 @@ OS-level groups
   pushing to ../b
   query 1; heads
   searching for changes
   all remote heads known locally
   listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
   invalid branchheads cache (served): tip differs
   listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1461,10 +1483,12 @@ No branch acls specified
   pushing to ../b
   query 1; heads
   searching for changes
   all remote heads known locally
   listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
   listing keys for "bookmarks"
   4 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
   f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
@@ -1521,12 +1545,10 @@ No branch acls specified
   acl: branch access granted: "e8fc755d4d82" on branch "foobar"
   acl: path access granted: "e8fc755d4d82"
   updating the branch cache
   listing keys for "phases"
   try to push obsolete markers to remote
-  checking for updated bookmarks
-  listing keys for "bookmarks"
   repository tip rolled back to revision 2 (undo push)
   2:fb35475503ef
   
 
 Branch acl deny test
@@ -1545,10 +1567,12 @@ Branch acl deny test
   pushing to ../b
   query 1; heads
   searching for changes
   all remote heads known locally
   listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
   listing keys for "bookmarks"
   4 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
   f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
@@ -1625,10 +1649,12 @@ Branch acl empty allow test
   pushing to ../b
   query 1; heads
   searching for changes
   all remote heads known locally
   listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
   listing keys for "bookmarks"
   4 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
   f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
@@ -1701,10 +1727,12 @@ Branch acl allow other
   pushing to ../b
   query 1; heads
   searching for changes
   all remote heads known locally
   listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
   listing keys for "bookmarks"
   4 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
   f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
@@ -1771,10 +1799,12 @@ Branch acl allow other
   pushing to ../b
   query 1; heads
   searching for changes
   all remote heads known locally
   listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
   listing keys for "bookmarks"
   4 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
   f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
@@ -1831,12 +1861,10 @@ Branch acl allow other
   acl: branch access granted: "e8fc755d4d82" on branch "foobar"
   acl: path access granted: "e8fc755d4d82"
   updating the branch cache
   listing keys for "phases"
   try to push obsolete markers to remote
-  checking for updated bookmarks
-  listing keys for "bookmarks"
   repository tip rolled back to revision 2 (undo push)
   2:fb35475503ef
   
 
 Branch acl conflicting allow
@@ -1860,10 +1888,12 @@ push foobar into the remote
   pushing to ../b
   query 1; heads
   searching for changes
   all remote heads known locally
   listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
   listing keys for "bookmarks"
   4 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
   f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
@@ -1920,12 +1950,10 @@ push foobar into the remote
   acl: branch access granted: "e8fc755d4d82" on branch "foobar"
   acl: path access granted: "e8fc755d4d82"
   updating the branch cache
   listing keys for "phases"
   try to push obsolete markers to remote
-  checking for updated bookmarks
-  listing keys for "bookmarks"
   repository tip rolled back to revision 2 (undo push)
   2:fb35475503ef
   
 Branch acl conflicting deny
 
@@ -1948,10 +1976,12 @@ Branch acl conflicting deny
   pushing to ../b
   query 1; heads
   searching for changes
   all remote heads known locally
   listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
   listing keys for "bookmarks"
   4 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
   f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
@@ -2023,10 +2053,12 @@ User 'astro' must not be denied
   pushing to ../b
   query 1; heads
   searching for changes
   all remote heads known locally
   listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
   listing keys for "bookmarks"
   4 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
   f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
@@ -2083,12 +2115,10 @@ User 'astro' must not be denied
   acl: branch access granted: "e8fc755d4d82" on branch "foobar"
   acl: path access granted: "e8fc755d4d82"
   updating the branch cache
   listing keys for "phases"
   try to push obsolete markers to remote
-  checking for updated bookmarks
-  listing keys for "bookmarks"
   repository tip rolled back to revision 2 (undo push)
   2:fb35475503ef
   
 
 Non-astro users must be denied
@@ -2105,10 +2135,12 @@ Non-astro users must be denied
   pushing to ../b
   query 1; heads
   searching for changes
   all remote heads known locally
   listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
   listing keys for "bookmarks"
   4 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
   f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
diff --git a/tests/test-hook.t b/tests/test-hook.t
--- a/tests/test-hook.t
+++ b/tests/test-hook.t
@@ -209,14 +209,14 @@ test that prepushkey can prevent incomin
   $ hg bookmark -r null baz
   $ hg push -B baz ../a
   pushing to ../a
   searching for changes
   listkeys hook: HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'}
+  listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'}
   no changes found
   listkeys hook: HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'}
   listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'}
-  listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'}
   exporting bookmark baz
   prepushkey.forbid hook: HG_KEY=baz HG_NAMESPACE=bookmarks HG_NEW=0000000000000000000000000000000000000000
   abort: prepushkey hook exited with status 1
   [255]
   $ cd ../a
diff --git a/tests/test-http.t b/tests/test-http.t
--- a/tests/test-http.t
+++ b/tests/test-http.t
@@ -261,16 +261,16 @@ test http authentication
   "GET /?cmd=listkeys HTTP/1.1" 403 - x-hgarg-1:namespace=namespaces
   "GET /?cmd=capabilities HTTP/1.1" 200 -
   "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872
   "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=phases
   "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
+  "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
   "GET /?cmd=branchmap HTTP/1.1" 200 -
   "GET /?cmd=branchmap HTTP/1.1" 200 -
   "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
   "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+5eb5abfefeea63c80dd7553bcc3783f37e0c5524
   "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
-  "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
 
 #endif
   $ cd ..
 
 clone of serve with repo in root and unserved subrepo (issue2970)
diff --git a/tests/test-obsolete.t b/tests/test-obsolete.t
--- a/tests/test-obsolete.t
+++ b/tests/test-obsolete.t
@@ -324,13 +324,13 @@ Check obsolete keys are exchanged only i
 
   $ hg init empty
   $ hg --config extensions.debugkeys=debugkeys.py -R empty push tmpd
   pushing to tmpd
   listkeys phases
+  listkeys bookmarks
   no changes found
   listkeys phases
-  listkeys bookmarks
   [1]
 
 clone support
 (markers are copied and extinct changesets are included to allow hardlinks)
 
diff --git a/tests/test-push-warn.t b/tests/test-push-warn.t
--- a/tests/test-push-warn.t
+++ b/tests/test-push-warn.t
@@ -34,10 +34,12 @@
   taking quick initial sample
   searching: 2 queries
   query 2; still undecided: 1, sample size is: 1
   2 total queries
   listing keys for "phases"
+  checking for updated bookmarks
+  listing keys for "bookmarks"
   listing keys for "bookmarks"
   remote has heads on branch 'default' that are not known locally: 1c9246a22a0a
   new remote heads on branch 'default':
    1e108cc5548c
   abort: push creates new remote head 1e108cc5548c!
diff --git a/tests/test-treediscovery.t b/tests/test-treediscovery.t
--- a/tests/test-treediscovery.t
+++ b/tests/test-treediscovery.t
@@ -521,15 +521,15 @@ Both have new stuff in existing named br
   "GET /?cmd=changegroupsubset HTTP/1.1" 200 - x-hgarg-1:bases=d8f638ac69e9ae8dea4f09f11d696546a912d961&heads=d8f638ac69e9ae8dea4f09f11d696546a912d961+2c8d5d5ec612be65cdfdeac78b7662ab1696324a
   "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
   "GET /?cmd=capabilities HTTP/1.1" 200 -
   "GET /?cmd=heads HTTP/1.1" 200 -
   "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
+  "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
   "GET /?cmd=branchmap HTTP/1.1" 200 -
   "GET /?cmd=branchmap HTTP/1.1" 200 -
   "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
   "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+1827a5bb63e602382eb89dd58f2ac9f3b007ad91
   "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
-  "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
   "GET /?cmd=capabilities HTTP/1.1" 200 -
   "GET /?cmd=heads HTTP/1.1" 200 -
   "GET /?cmd=capabilities HTTP/1.1" 200 -
   "GET /?cmd=heads HTTP/1.1" 200 -



More information about the Mercurial-devel mailing list