[PATCH 1 of 3 STABLE-v2] pushkey: add more verbose debug output regarding pushkey

Pierre-Yves David pierre-yves.david at ens-lyon.org
Sat Jul 28 05:45:57 CDT 2012


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at logilab.fr>
# Date 1343471315 -7200
# Branch stable
# Node ID 6a44d2a3f69636ecacdc51a0bd7fbfcbc659151b
# Parent  d9626b91623a0344cb54326c69abfb0cb1d04181
pushkey: add more verbose debug output regarding pushkey

Very few data are displayed now, making it hard to debug phases and obsolete
related issues.

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -2540,6 +2540,7 @@
     def pushkey(self, namespace, key, old, new):
         self.hook('prepushkey', throw=True, namespace=namespace, key=key,
                   old=old, new=new)
+        self.ui.debug('pushing key for "%s:%s"\n' % (namespace, key))
         ret = pushkey.push(self, namespace, key, old, new)
         self.hook('pushkey', namespace=namespace, key=key, old=old, new=new,
                   ret=ret)
@@ -2547,6 +2548,7 @@
 
     def listkeys(self, namespace):
         self.hook('prelistkeys', throw=True, namespace=namespace)
+        self.ui.debug('listing keys for "%s"\n' % namespace)
         values = pushkey.list(self, namespace)
         self.hook('listkeys', namespace=namespace, values=values)
         return values
diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -236,6 +236,7 @@
         if not self.capable('pushkey'):
             yield False, None
         f = future()
+        self.ui.debug('preparing pushkey for "%s:%s"\n' % (namespace, key))
         yield todict(namespace=encoding.fromlocal(namespace),
                      key=encoding.fromlocal(key),
                      old=encoding.fromlocal(old),
@@ -256,6 +257,7 @@
         if not self.capable('pushkey'):
             yield {}, None
         f = future()
+        self.ui.debug('preparing listkeys for "%s"\n' % namespace)
         yield todict(namespace=encoding.fromlocal(namespace)), f
         d = f.value
         r = {}
diff --git a/tests/test-acl.t b/tests/test-acl.t
--- a/tests/test-acl.t
+++ b/tests/test-acl.t
@@ -82,6 +82,7 @@
   query 1; heads
   searching for changes
   all remote heads known locally
+  listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -115,8 +116,11 @@
   adding quux/file.py revisions
   files: 3/3 chunks (100.00%)
   added 3 changesets with 3 changes to 3 files
+  listing keys for "phases"
+  listing keys for "namespaces"
   updating the branch cache
   checking for updated bookmarks
+  listing keys for "bookmarks"
   repository tip rolled back to revision 0 (undo push)
   0:6675d58eff77
   
@@ -137,6 +141,7 @@
   searching for changes
   all remote heads known locally
   invalidating branch cache (tip differs)
+  listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -172,8 +177,11 @@
   added 3 changesets with 3 changes to 3 files
   calling hook pretxnchangegroup.acl: hgext.acl.hook
   acl: changes have source "push" - skipping
+  listing keys for "phases"
+  listing keys for "namespaces"
   updating the branch cache
   checking for updated bookmarks
+  listing keys for "bookmarks"
   repository tip rolled back to revision 0 (undo push)
   0:6675d58eff77
   
@@ -195,6 +203,7 @@
   searching for changes
   all remote heads known locally
   invalidating branch cache (tip differs)
+  listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -240,8 +249,11 @@
   acl: path access granted: "f9cafe1212c8"
   acl: branch access granted: "911600dab2ae" on branch "default"
   acl: path access granted: "911600dab2ae"
+  listing keys for "phases"
+  listing keys for "namespaces"
   updating the branch cache
   checking for updated bookmarks
+  listing keys for "bookmarks"
   repository tip rolled back to revision 0 (undo push)
   0:6675d58eff77
   
@@ -263,6 +275,7 @@
   searching for changes
   all remote heads known locally
   invalidating branch cache (tip differs)
+  listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -328,6 +341,7 @@
   query 1; heads
   searching for changes
   all remote heads known locally
+  listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -398,6 +412,7 @@
   query 1; heads
   searching for changes
   all remote heads known locally
+  listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -465,6 +480,7 @@
   query 1; heads
   searching for changes
   all remote heads known locally
+  listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -537,6 +553,7 @@
   query 1; heads
   searching for changes
   all remote heads known locally
+  listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -606,6 +623,7 @@
   query 1; heads
   searching for changes
   all remote heads known locally
+  listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -677,6 +695,7 @@
   query 1; heads
   searching for changes
   all remote heads known locally
+  listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -722,8 +741,11 @@
   acl: path access granted: "f9cafe1212c8"
   acl: branch access granted: "911600dab2ae" on branch "default"
   acl: path access granted: "911600dab2ae"
+  listing keys for "phases"
+  listing keys for "namespaces"
   updating the branch cache
   checking for updated bookmarks
+  listing keys for "bookmarks"
   repository tip rolled back to revision 0 (undo push)
   0:6675d58eff77
   
@@ -752,6 +774,7 @@
   searching for changes
   all remote heads known locally
   invalidating branch cache (tip differs)
+  listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -830,6 +853,7 @@
   query 1; heads
   searching for changes
   all remote heads known locally
+  listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -903,6 +927,7 @@
   query 1; heads
   searching for changes
   all remote heads known locally
+  listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -987,6 +1012,7 @@
   query 1; heads
   searching for changes
   all remote heads known locally
+  listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1032,8 +1058,11 @@
   acl: path access granted: "f9cafe1212c8"
   acl: branch access granted: "911600dab2ae" on branch "default"
   acl: path access granted: "911600dab2ae"
+  listing keys for "phases"
+  listing keys for "namespaces"
   updating the branch cache
   checking for updated bookmarks
+  listing keys for "bookmarks"
   repository tip rolled back to revision 0 (undo push)
   0:6675d58eff77
   
@@ -1063,6 +1092,7 @@
   searching for changes
   all remote heads known locally
   invalidating branch cache (tip differs)
+  listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1108,8 +1138,11 @@
   acl: path access granted: "f9cafe1212c8"
   acl: branch access granted: "911600dab2ae" on branch "default"
   acl: path access granted: "911600dab2ae"
+  listing keys for "phases"
+  listing keys for "namespaces"
   updating the branch cache
   checking for updated bookmarks
+  listing keys for "bookmarks"
   repository tip rolled back to revision 0 (undo push)
   0:6675d58eff77
   
@@ -1135,6 +1168,7 @@
   searching for changes
   all remote heads known locally
   invalidating branch cache (tip differs)
+  listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1209,6 +1243,7 @@
   query 1; heads
   searching for changes
   all remote heads known locally
+  listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1255,8 +1290,11 @@
   acl: path access granted: "f9cafe1212c8"
   acl: branch access granted: "911600dab2ae" on branch "default"
   acl: path access granted: "911600dab2ae"
+  listing keys for "phases"
+  listing keys for "namespaces"
   updating the branch cache
   checking for updated bookmarks
+  listing keys for "bookmarks"
   repository tip rolled back to revision 0 (undo push)
   0:6675d58eff77
   
@@ -1282,6 +1320,7 @@
   searching for changes
   all remote heads known locally
   invalidating branch cache (tip differs)
+  listing keys for "bookmarks"
   3 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1395,6 +1434,7 @@
   query 1; heads
   searching for changes
   all remote heads known locally
+  listing keys for "bookmarks"
   4 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1451,8 +1491,11 @@
   acl: path access granted: "911600dab2ae"
   acl: branch access granted: "e8fc755d4d82" on branch "foobar"
   acl: path access granted: "e8fc755d4d82"
+  listing keys for "phases"
+  listing keys for "namespaces"
   updating the branch cache
   checking for updated bookmarks
+  listing keys for "bookmarks"
   repository tip rolled back to revision 2 (undo push)
   2:fb35475503ef
   
@@ -1475,6 +1518,7 @@
   searching for changes
   all remote heads known locally
   invalidating branch cache (tip differs)
+  listing keys for "bookmarks"
   4 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1553,6 +1597,7 @@
   query 1; heads
   searching for changes
   all remote heads known locally
+  listing keys for "bookmarks"
   4 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1627,6 +1672,7 @@
   query 1; heads
   searching for changes
   all remote heads known locally
+  listing keys for "bookmarks"
   4 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1695,6 +1741,7 @@
   query 1; heads
   searching for changes
   all remote heads known locally
+  listing keys for "bookmarks"
   4 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1751,8 +1798,11 @@
   acl: path access granted: "911600dab2ae"
   acl: branch access granted: "e8fc755d4d82" on branch "foobar"
   acl: path access granted: "e8fc755d4d82"
+  listing keys for "phases"
+  listing keys for "namespaces"
   updating the branch cache
   checking for updated bookmarks
+  listing keys for "bookmarks"
   repository tip rolled back to revision 2 (undo push)
   2:fb35475503ef
   
@@ -1780,6 +1830,7 @@
   searching for changes
   all remote heads known locally
   invalidating branch cache (tip differs)
+  listing keys for "bookmarks"
   4 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1836,8 +1887,11 @@
   acl: path access granted: "911600dab2ae"
   acl: branch access granted: "e8fc755d4d82" on branch "foobar"
   acl: path access granted: "e8fc755d4d82"
+  listing keys for "phases"
+  listing keys for "namespaces"
   updating the branch cache
   checking for updated bookmarks
+  listing keys for "bookmarks"
   repository tip rolled back to revision 2 (undo push)
   2:fb35475503ef
   
@@ -1864,6 +1918,7 @@
   searching for changes
   all remote heads known locally
   invalidating branch cache (tip differs)
+  listing keys for "bookmarks"
   4 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1937,6 +1992,7 @@
   query 1; heads
   searching for changes
   all remote heads known locally
+  listing keys for "bookmarks"
   4 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1993,8 +2049,11 @@
   acl: path access granted: "911600dab2ae"
   acl: branch access granted: "e8fc755d4d82" on branch "foobar"
   acl: path access granted: "e8fc755d4d82"
+  listing keys for "phases"
+  listing keys for "namespaces"
   updating the branch cache
   checking for updated bookmarks
+  listing keys for "bookmarks"
   repository tip rolled back to revision 2 (undo push)
   2:fb35475503ef
   
@@ -2015,6 +2074,7 @@
   searching for changes
   all remote heads known locally
   invalidating branch cache (tip differs)
+  listing keys for "bookmarks"
   4 changesets found
   list of changesets:
   ef1ea85a6374b77d6da9dcda9541f498f2d17df7
diff --git a/tests/test-clone.t b/tests/test-clone.t
--- a/tests/test-clone.t
+++ b/tests/test-clone.t
@@ -51,6 +51,7 @@
 #if hardlink
   $ hg --debug clone -U . ../c
   linked 8 files
+  listing keys for "bookmarks"
 #else
   $ hg --debug clone -U . ../c
   copied 8 files
diff --git a/tests/test-hardlinks.t b/tests/test-hardlinks.t
--- a/tests/test-hardlinks.t
+++ b/tests/test-hardlinks.t
@@ -57,6 +57,7 @@
 
   $ hg clone -U --debug r1 r2
   linked 7 files
+  listing keys for "bookmarks"
 
 Create non-hardlinked clone r3:
 
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
@@ -37,6 +37,7 @@
   searching: 2 queries
   query 2; still undecided: 1, sample size is: 1
   2 total queries
+  listing keys for "bookmarks"
   new remote heads on branch 'default'
   new remote head 1e108cc5548c
   abort: push creates new remote head 1e108cc5548c!


More information about the Mercurial-devel mailing list