[PATCH 1 of 3 STABLE] pushkey: add more verbose debug output regarding pushkey
pierre-yves.david at logilab.fr
pierre-yves.david at logilab.fr
Fri Jul 27 16:40:07 UTC 2012
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at logilab.fr>
# Date 1343313552 -7200
# Branch stable
# Node ID 2db9bef469b3bcae4f16938774f0e3051b604ee6
# Parent d9626b91623a0344cb54326c69abfb0cb1d04181
pushkey: add more verbose debug output regarding pushkey
Very few data are displayed now making it hard to dbug phases and obsolete
related issue.
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -2538,17 +2538,19 @@ class localrepository(object):
return self.pull(remote, heads)
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)
return ret
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
def debugwireargs(self, one, two, three=None, four=None, five=None):
diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -234,10 +234,11 @@ class wirepeer(peer.peerrepository):
@batchable
def pushkey(self, namespace, key, old, new):
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),
new=encoding.fromlocal(new)), f
d = f.value
@@ -254,10 +255,11 @@ class wirepeer(peer.peerrepository):
@batchable
def listkeys(self, namespace):
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 = {}
for l in d.splitlines():
k, v = l.split('\t')
diff --git a/tests/test-acl.t b/tests/test-acl.t
--- a/tests/test-acl.t
+++ b/tests/test-acl.t
@@ -80,10 +80,11 @@ Extension disabled for lack of a hook
"""
pushing to ../b
query 1; heads
searching for changes
all remote heads known locally
+ listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
911600dab2ae7a9baff75958b84fe606851ce955
@@ -113,12 +114,15 @@ Extension disabled for lack of a hook
adding foo/file.txt revisions
files: 2/3 chunks (66.67%)
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
$ echo '[hooks]' >> $config
@@ -135,10 +139,11 @@ Extension disabled for lack of acl.sourc
pushing to ../b
query 1; heads
searching for changes
all remote heads known locally
invalidating branch cache (tip differs)
+ listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
911600dab2ae7a9baff75958b84fe606851ce955
@@ -170,12 +175,15 @@ Extension disabled for lack of acl.sourc
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: 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
No [acl.allow]/[acl.deny]
@@ -193,10 +201,11 @@ No [acl.allow]/[acl.deny]
pushing to ../b
query 1; heads
searching for changes
all remote heads known locally
invalidating branch cache (tip differs)
+ listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
911600dab2ae7a9baff75958b84fe606851ce955
@@ -238,12 +247,15 @@ No [acl.allow]/[acl.deny]
acl: path access granted: "ef1ea85a6374"
acl: branch access granted: "f9cafe1212c8" on branch "default"
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
Empty [acl.allow]
@@ -261,10 +273,11 @@ Empty [acl.allow]
pushing to ../b
query 1; heads
searching for changes
all remote heads known locally
invalidating branch cache (tip differs)
+ listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
911600dab2ae7a9baff75958b84fe606851ce955
@@ -326,10 +339,11 @@ fred is allowed inside foo/
"""
pushing to ../b
query 1; heads
searching for changes
all remote heads known locally
+ listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
911600dab2ae7a9baff75958b84fe606851ce955
@@ -396,10 +410,11 @@ Empty [acl.deny]
"""
pushing to ../b
query 1; heads
searching for changes
all remote heads known locally
+ listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
911600dab2ae7a9baff75958b84fe606851ce955
@@ -463,10 +478,11 @@ 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 "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
911600dab2ae7a9baff75958b84fe606851ce955
@@ -535,10 +551,11 @@ 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 "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
911600dab2ae7a9baff75958b84fe606851ce955
@@ -604,10 +621,11 @@ 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 "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
911600dab2ae7a9baff75958b84fe606851ce955
@@ -675,10 +693,11 @@ barney is allowed everywhere
"""
pushing to ../b
query 1; heads
searching for changes
all remote heads known locally
+ listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
911600dab2ae7a9baff75958b84fe606851ce955
@@ -720,12 +739,15 @@ barney is allowed everywhere
acl: path access granted: "ef1ea85a6374"
acl: branch access granted: "f9cafe1212c8" on branch "default"
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
wilma can change files with a .txt extension
@@ -750,10 +772,11 @@ wilma can change files with a .txt exten
pushing to ../b
query 1; heads
searching for changes
all remote heads known locally
invalidating branch cache (tip differs)
+ listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
911600dab2ae7a9baff75958b84fe606851ce955
@@ -828,10 +851,11 @@ 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 "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
911600dab2ae7a9baff75958b84fe606851ce955
@@ -863,14 +887,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 2] *: '../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
@@ -901,10 +925,11 @@ 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 "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
911600dab2ae7a9baff75958b84fe606851ce955
@@ -985,10 +1010,11 @@ 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 "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
911600dab2ae7a9baff75958b84fe606851ce955
@@ -1030,12 +1056,15 @@ acl.config can set only [acl.allow]/[acl
acl: path access granted: "ef1ea85a6374"
acl: branch access granted: "f9cafe1212c8" on branch "default"
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
asterisk
@@ -1061,10 +1090,11 @@ fred is always allowed
pushing to ../b
query 1; heads
searching for changes
all remote heads known locally
invalidating branch cache (tip differs)
+ listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
911600dab2ae7a9baff75958b84fe606851ce955
@@ -1106,12 +1136,15 @@ fred is always allowed
acl: path access granted: "ef1ea85a6374"
acl: branch access granted: "f9cafe1212c8" on branch "default"
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
$ echo '[acl.deny]' >> $config
@@ -1133,10 +1166,11 @@ no one is allowed inside foo/Bar/
pushing to ../b
query 1; heads
searching for changes
all remote heads known locally
invalidating branch cache (tip differs)
+ listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
911600dab2ae7a9baff75958b84fe606851ce955
@@ -1207,10 +1241,11 @@ OS-level groups
"""
pushing to ../b
query 1; heads
searching for changes
all remote heads known locally
+ listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
911600dab2ae7a9baff75958b84fe606851ce955
@@ -1253,12 +1288,15 @@ OS-level groups
acl: path access granted: "ef1ea85a6374"
acl: branch access granted: "f9cafe1212c8" on branch "default"
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
$ echo '[acl.deny]' >> $config
@@ -1280,10 +1318,11 @@ OS-level groups
pushing to ../b
query 1; heads
searching for changes
all remote heads known locally
invalidating branch cache (tip differs)
+ listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
911600dab2ae7a9baff75958b84fe606851ce955
@@ -1393,10 +1432,11 @@ No branch acls specified
"""
pushing to ../b
query 1; heads
searching for changes
all remote heads known locally
+ listing keys for "bookmarks"
4 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
911600dab2ae7a9baff75958b84fe606851ce955
@@ -1449,12 +1489,15 @@ No branch acls specified
acl: path access granted: "f9cafe1212c8"
acl: branch access granted: "911600dab2ae" on branch "default"
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
Branch acl deny test
@@ -1473,10 +1516,11 @@ Branch acl deny test
pushing to ../b
query 1; heads
searching for changes
all remote heads known locally
invalidating branch cache (tip differs)
+ listing keys for "bookmarks"
4 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
911600dab2ae7a9baff75958b84fe606851ce955
@@ -1551,10 +1595,11 @@ Branch acl empty allow test
"""
pushing to ../b
query 1; heads
searching for changes
all remote heads known locally
+ listing keys for "bookmarks"
4 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
911600dab2ae7a9baff75958b84fe606851ce955
@@ -1625,10 +1670,11 @@ Branch acl allow other
"""
pushing to ../b
query 1; heads
searching for changes
all remote heads known locally
+ listing keys for "bookmarks"
4 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
911600dab2ae7a9baff75958b84fe606851ce955
@@ -1693,10 +1739,11 @@ Branch acl allow other
"""
pushing to ../b
query 1; heads
searching for changes
all remote heads known locally
+ listing keys for "bookmarks"
4 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
911600dab2ae7a9baff75958b84fe606851ce955
@@ -1749,12 +1796,15 @@ Branch acl allow other
acl: path access granted: "f9cafe1212c8"
acl: branch access granted: "911600dab2ae" on branch "default"
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
Branch acl conflicting allow
@@ -1778,10 +1828,11 @@ push foobar into the remote
pushing to ../b
query 1; heads
searching for changes
all remote heads known locally
invalidating branch cache (tip differs)
+ listing keys for "bookmarks"
4 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
911600dab2ae7a9baff75958b84fe606851ce955
@@ -1834,12 +1885,15 @@ push foobar into the remote
acl: path access granted: "f9cafe1212c8"
acl: branch access granted: "911600dab2ae" on branch "default"
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
Branch acl conflicting deny
@@ -1862,10 +1916,11 @@ Branch acl conflicting deny
pushing to ../b
query 1; heads
searching for changes
all remote heads known locally
invalidating branch cache (tip differs)
+ listing keys for "bookmarks"
4 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
911600dab2ae7a9baff75958b84fe606851ce955
@@ -1935,10 +1990,11 @@ User 'astro' must not be denied
"""
pushing to ../b
query 1; heads
searching for changes
all remote heads known locally
+ listing keys for "bookmarks"
4 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
911600dab2ae7a9baff75958b84fe606851ce955
@@ -1991,12 +2047,15 @@ User 'astro' must not be denied
acl: path access granted: "f9cafe1212c8"
acl: branch access granted: "911600dab2ae" on branch "default"
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
Non-astro users must be denied
@@ -2013,10 +2072,11 @@ Non-astro users must be denied
pushing to ../b
query 1; heads
searching for changes
all remote heads known locally
invalidating branch cache (tip differs)
+ listing keys for "bookmarks"
4 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
911600dab2ae7a9baff75958b84fe606851ce955
diff --git a/tests/test-clone.t b/tests/test-clone.t
--- a/tests/test-clone.t
+++ b/tests/test-clone.t
@@ -49,10 +49,11 @@ Invalid dest '' must abort:
No update, with debug option:
#if hardlink
$ hg --debug clone -U . ../c
linked 8 files
+ listing keys for "bookmarks"
#else
$ hg --debug clone -U . ../c
copied 8 files
#endif
$ cd ../c
diff --git a/tests/test-hardlinks.t b/tests/test-hardlinks.t
--- a/tests/test-hardlinks.t
+++ b/tests/test-hardlinks.t
@@ -55,10 +55,11 @@ Prepare repo r1:
Create hardlinked clone r2:
$ hg clone -U --debug r1 r2
linked 7 files
+ listing keys for "bookmarks"
Create non-hardlinked clone r3:
$ hg clone --pull r1 r3
requesting all changes
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
@@ -35,10 +35,11 @@
searching for changes
taking quick initial sample
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!
(you should pull and merge or use push -f to force)
[255]
More information about the Mercurial-devel
mailing list