##// END OF EJS Templates
branchmap: improve invalid cache message when reading...
Pierre-Yves David -
r18166:3a2e810d default
parent child Browse files
Show More
@@ -1,175 +1,174
1 # branchmap.py - logic to computes, maintain and stores branchmap for local repo
1 # branchmap.py - logic to computes, maintain and stores branchmap for local repo
2 #
2 #
3 # Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
3 # Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
4 #
4 #
5 # This software may be used and distributed according to the terms of the
5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version.
6 # GNU General Public License version 2 or any later version.
7
7
8 from node import bin, hex, nullid, nullrev
8 from node import bin, hex, nullid, nullrev
9 import encoding
9 import encoding
10
10
11 def read(repo):
11 def read(repo):
12 try:
12 try:
13 f = repo.opener("cache/branchheads")
13 f = repo.opener("cache/branchheads")
14 lines = f.read().split('\n')
14 lines = f.read().split('\n')
15 f.close()
15 f.close()
16 except (IOError, OSError):
16 except (IOError, OSError):
17 return branchcache()
17 return branchcache()
18
18
19 try:
19 try:
20 last, lrev = lines.pop(0).split(" ", 1)
20 last, lrev = lines.pop(0).split(" ", 1)
21 last, lrev = bin(last), int(lrev)
21 last, lrev = bin(last), int(lrev)
22 partial = branchcache(tipnode=last, tiprev=lrev)
22 partial = branchcache(tipnode=last, tiprev=lrev)
23 if not partial.validfor(repo):
23 if not partial.validfor(repo):
24 # invalidate the cache
24 # invalidate the cache
25 raise ValueError('invalidating branch cache (tip differs)')
25 raise ValueError('tip differs')
26 for l in lines:
26 for l in lines:
27 if not l:
27 if not l:
28 continue
28 continue
29 node, label = l.split(" ", 1)
29 node, label = l.split(" ", 1)
30 label = encoding.tolocal(label.strip())
30 label = encoding.tolocal(label.strip())
31 if not node in repo:
31 if not node in repo:
32 raise ValueError('invalidating branch cache because node '+
32 raise ValueError('node %s does not exist' % node)
33 '%s does not exist' % node)
34 partial.setdefault(label, []).append(bin(node))
33 partial.setdefault(label, []).append(bin(node))
35 except KeyboardInterrupt:
34 except KeyboardInterrupt:
36 raise
35 raise
37 except Exception, inst:
36 except Exception, inst:
38 if repo.ui.debugflag:
37 if repo.ui.debugflag:
39 repo.ui.warn(str(inst), '\n')
38 repo.ui.warn(('invalid branchheads cache: %s\n') % inst)
40 partial = branchcache()
39 partial = branchcache()
41 return partial
40 return partial
42
41
43
42
44
43
45 def updatecache(repo):
44 def updatecache(repo):
46 repo = repo.unfiltered() # Until we get a smarter cache management
45 repo = repo.unfiltered() # Until we get a smarter cache management
47 cl = repo.changelog
46 cl = repo.changelog
48 partial = repo._branchcache
47 partial = repo._branchcache
49
48
50 if partial is None or not partial.validfor(repo):
49 if partial is None or not partial.validfor(repo):
51 partial = read(repo)
50 partial = read(repo)
52
51
53 catip = repo._cacheabletip()
52 catip = repo._cacheabletip()
54 # if partial.tiprev == catip: cache is already up to date
53 # if partial.tiprev == catip: cache is already up to date
55 # if partial.tiprev > catip: we have uncachable element in `partial` can't
54 # if partial.tiprev > catip: we have uncachable element in `partial` can't
56 # write on disk
55 # write on disk
57 if partial.tiprev < catip:
56 if partial.tiprev < catip:
58 ctxgen = (repo[r] for r in cl.revs(partial.tiprev + 1, catip))
57 ctxgen = (repo[r] for r in cl.revs(partial.tiprev + 1, catip))
59 partial.update(repo, ctxgen)
58 partial.update(repo, ctxgen)
60 partial.write(repo)
59 partial.write(repo)
61 # If cacheable tip were lower than actual tip, we need to update the
60 # If cacheable tip were lower than actual tip, we need to update the
62 # cache up to tip. This update (from cacheable to actual tip) is not
61 # cache up to tip. This update (from cacheable to actual tip) is not
63 # written to disk since it's not cacheable.
62 # written to disk since it's not cacheable.
64 tiprev = len(repo) - 1
63 tiprev = len(repo) - 1
65 if partial.tiprev < tiprev:
64 if partial.tiprev < tiprev:
66 ctxgen = (repo[r] for r in cl.revs(partial.tiprev + 1, tiprev))
65 ctxgen = (repo[r] for r in cl.revs(partial.tiprev + 1, tiprev))
67 partial.update(repo, ctxgen)
66 partial.update(repo, ctxgen)
68 repo._branchcache = partial
67 repo._branchcache = partial
69
68
70 class branchcache(dict):
69 class branchcache(dict):
71 """A dict like object that hold branches heads cache"""
70 """A dict like object that hold branches heads cache"""
72
71
73 def __init__(self, entries=(), tipnode=nullid, tiprev=nullrev):
72 def __init__(self, entries=(), tipnode=nullid, tiprev=nullrev):
74 super(branchcache, self).__init__(entries)
73 super(branchcache, self).__init__(entries)
75 self.tipnode = tipnode
74 self.tipnode = tipnode
76 self.tiprev = tiprev
75 self.tiprev = tiprev
77
76
78 def validfor(self, repo):
77 def validfor(self, repo):
79 """Is the cache content valide regarding a repo
78 """Is the cache content valide regarding a repo
80
79
81 - False when cached tipnode are unknown or if we detect a strip.
80 - False when cached tipnode are unknown or if we detect a strip.
82 - True when cache is up to date or a subset of current repo."""
81 - True when cache is up to date or a subset of current repo."""
83 try:
82 try:
84 return self.tipnode == repo.changelog.node(self.tiprev)
83 return self.tipnode == repo.changelog.node(self.tiprev)
85 except IndexError:
84 except IndexError:
86 return False
85 return False
87
86
88
87
89 def write(self, repo):
88 def write(self, repo):
90 try:
89 try:
91 f = repo.opener("cache/branchheads", "w", atomictemp=True)
90 f = repo.opener("cache/branchheads", "w", atomictemp=True)
92 f.write("%s %s\n" % (hex(self.tipnode), self.tiprev))
91 f.write("%s %s\n" % (hex(self.tipnode), self.tiprev))
93 for label, nodes in self.iteritems():
92 for label, nodes in self.iteritems():
94 for node in nodes:
93 for node in nodes:
95 f.write("%s %s\n" % (hex(node), encoding.fromlocal(label)))
94 f.write("%s %s\n" % (hex(node), encoding.fromlocal(label)))
96 f.close()
95 f.close()
97 except (IOError, OSError):
96 except (IOError, OSError):
98 pass
97 pass
99
98
100 def update(self, repo, ctxgen):
99 def update(self, repo, ctxgen):
101 """Given a branchhead cache, self, that may have extra nodes or be
100 """Given a branchhead cache, self, that may have extra nodes or be
102 missing heads, and a generator of nodes that are at least a superset of
101 missing heads, and a generator of nodes that are at least a superset of
103 heads missing, this function updates self to be correct.
102 heads missing, this function updates self to be correct.
104 """
103 """
105 cl = repo.changelog
104 cl = repo.changelog
106 # collect new branch entries
105 # collect new branch entries
107 newbranches = {}
106 newbranches = {}
108 for c in ctxgen:
107 for c in ctxgen:
109 newbranches.setdefault(c.branch(), []).append(c.node())
108 newbranches.setdefault(c.branch(), []).append(c.node())
110 # if older branchheads are reachable from new ones, they aren't
109 # if older branchheads are reachable from new ones, they aren't
111 # really branchheads. Note checking parents is insufficient:
110 # really branchheads. Note checking parents is insufficient:
112 # 1 (branch a) -> 2 (branch b) -> 3 (branch a)
111 # 1 (branch a) -> 2 (branch b) -> 3 (branch a)
113 for branch, newnodes in newbranches.iteritems():
112 for branch, newnodes in newbranches.iteritems():
114 bheads = self.setdefault(branch, [])
113 bheads = self.setdefault(branch, [])
115 # Remove candidate heads that no longer are in the repo (e.g., as
114 # Remove candidate heads that no longer are in the repo (e.g., as
116 # the result of a strip that just happened). Avoid using 'node in
115 # the result of a strip that just happened). Avoid using 'node in
117 # self' here because that dives down into branchcache code somewhat
116 # self' here because that dives down into branchcache code somewhat
118 # recursively.
117 # recursively.
119 bheadrevs = [cl.rev(node) for node in bheads
118 bheadrevs = [cl.rev(node) for node in bheads
120 if cl.hasnode(node)]
119 if cl.hasnode(node)]
121 newheadrevs = [cl.rev(node) for node in newnodes
120 newheadrevs = [cl.rev(node) for node in newnodes
122 if cl.hasnode(node)]
121 if cl.hasnode(node)]
123 ctxisnew = bheadrevs and min(newheadrevs) > max(bheadrevs)
122 ctxisnew = bheadrevs and min(newheadrevs) > max(bheadrevs)
124 # Remove duplicates - nodes that are in newheadrevs and are already
123 # Remove duplicates - nodes that are in newheadrevs and are already
125 # in bheadrevs. This can happen if you strip a node whose parent
124 # in bheadrevs. This can happen if you strip a node whose parent
126 # was already a head (because they're on different branches).
125 # was already a head (because they're on different branches).
127 bheadrevs = sorted(set(bheadrevs).union(newheadrevs))
126 bheadrevs = sorted(set(bheadrevs).union(newheadrevs))
128
127
129 # Starting from tip means fewer passes over reachable. If we know
128 # Starting from tip means fewer passes over reachable. If we know
130 # the new candidates are not ancestors of existing heads, we don't
129 # the new candidates are not ancestors of existing heads, we don't
131 # have to examine ancestors of existing heads
130 # have to examine ancestors of existing heads
132 if ctxisnew:
131 if ctxisnew:
133 iterrevs = sorted(newheadrevs)
132 iterrevs = sorted(newheadrevs)
134 else:
133 else:
135 iterrevs = list(bheadrevs)
134 iterrevs = list(bheadrevs)
136
135
137 # This loop prunes out two kinds of heads - heads that are
136 # This loop prunes out two kinds of heads - heads that are
138 # superseded by a head in newheadrevs, and newheadrevs that are not
137 # superseded by a head in newheadrevs, and newheadrevs that are not
139 # heads because an existing head is their descendant.
138 # heads because an existing head is their descendant.
140 while iterrevs:
139 while iterrevs:
141 latest = iterrevs.pop()
140 latest = iterrevs.pop()
142 if latest not in bheadrevs:
141 if latest not in bheadrevs:
143 continue
142 continue
144 ancestors = set(cl.ancestors([latest],
143 ancestors = set(cl.ancestors([latest],
145 bheadrevs[0]))
144 bheadrevs[0]))
146 if ancestors:
145 if ancestors:
147 bheadrevs = [b for b in bheadrevs if b not in ancestors]
146 bheadrevs = [b for b in bheadrevs if b not in ancestors]
148 self[branch] = [cl.node(rev) for rev in bheadrevs]
147 self[branch] = [cl.node(rev) for rev in bheadrevs]
149 tiprev = max(bheadrevs)
148 tiprev = max(bheadrevs)
150 if tiprev > self.tiprev:
149 if tiprev > self.tiprev:
151 self.tipnode = cl.node(tiprev)
150 self.tipnode = cl.node(tiprev)
152 self.tiprev = tiprev
151 self.tiprev = tiprev
153
152
154 # There may be branches that cease to exist when the last commit in the
153 # There may be branches that cease to exist when the last commit in the
155 # branch was stripped. This code filters them out. Note that the
154 # branch was stripped. This code filters them out. Note that the
156 # branch that ceased to exist may not be in newbranches because
155 # branch that ceased to exist may not be in newbranches because
157 # newbranches is the set of candidate heads, which when you strip the
156 # newbranches is the set of candidate heads, which when you strip the
158 # last commit in a branch will be the parent branch.
157 # last commit in a branch will be the parent branch.
159 droppednodes = []
158 droppednodes = []
160 for branch in self.keys():
159 for branch in self.keys():
161 nodes = [head for head in self[branch]
160 nodes = [head for head in self[branch]
162 if cl.hasnode(head)]
161 if cl.hasnode(head)]
163 if not nodes:
162 if not nodes:
164 droppednodes.extend(nodes)
163 droppednodes.extend(nodes)
165 del self[branch]
164 del self[branch]
166 if ((not self.validfor(repo)) or (self.tipnode in droppednodes)):
165 if ((not self.validfor(repo)) or (self.tipnode in droppednodes)):
167
166
168 # cache key are not valid anymore
167 # cache key are not valid anymore
169 self.tipnode = nullid
168 self.tipnode = nullid
170 self.tiprev = nullrev
169 self.tiprev = nullrev
171 for heads in self.values():
170 for heads in self.values():
172 tiprev = max(cl.rev(node) for node in heads)
171 tiprev = max(cl.rev(node) for node in heads)
173 if tiprev > self.tiprev:
172 if tiprev > self.tiprev:
174 self.tipnode = cl.node(tiprev)
173 self.tipnode = cl.node(tiprev)
175 self.tiprev = tiprev
174 self.tiprev = tiprev
@@ -1,2133 +1,2133
1 > do_push()
1 > do_push()
2 > {
2 > {
3 > user=$1
3 > user=$1
4 > shift
4 > shift
5 > echo "Pushing as user $user"
5 > echo "Pushing as user $user"
6 > echo 'hgrc = """'
6 > echo 'hgrc = """'
7 > sed -e 1,2d b/.hg/hgrc | grep -v fakegroups.py
7 > sed -e 1,2d b/.hg/hgrc | grep -v fakegroups.py
8 > echo '"""'
8 > echo '"""'
9 > if test -f acl.config; then
9 > if test -f acl.config; then
10 > echo 'acl.config = """'
10 > echo 'acl.config = """'
11 > cat acl.config
11 > cat acl.config
12 > echo '"""'
12 > echo '"""'
13 > fi
13 > fi
14 > # On AIX /etc/profile sets LOGNAME read-only. So
14 > # On AIX /etc/profile sets LOGNAME read-only. So
15 > # LOGNAME=$user hg --cws a --debug push ../b
15 > # LOGNAME=$user hg --cws a --debug push ../b
16 > # fails with "This variable is read only."
16 > # fails with "This variable is read only."
17 > # Use env to work around this.
17 > # Use env to work around this.
18 > env LOGNAME=$user hg --cwd a --debug push ../b
18 > env LOGNAME=$user hg --cwd a --debug push ../b
19 > hg --cwd b rollback
19 > hg --cwd b rollback
20 > hg --cwd b --quiet tip
20 > hg --cwd b --quiet tip
21 > echo
21 > echo
22 > }
22 > }
23
23
24 > init_config()
24 > init_config()
25 > {
25 > {
26 > cat > fakegroups.py <<EOF
26 > cat > fakegroups.py <<EOF
27 > from hgext import acl
27 > from hgext import acl
28 > def fakegetusers(ui, group):
28 > def fakegetusers(ui, group):
29 > try:
29 > try:
30 > return acl._getusersorig(ui, group)
30 > return acl._getusersorig(ui, group)
31 > except:
31 > except:
32 > return ["fred", "betty"]
32 > return ["fred", "betty"]
33 > acl._getusersorig = acl._getusers
33 > acl._getusersorig = acl._getusers
34 > acl._getusers = fakegetusers
34 > acl._getusers = fakegetusers
35 > EOF
35 > EOF
36 > rm -f acl.config
36 > rm -f acl.config
37 > cat > $config <<EOF
37 > cat > $config <<EOF
38 > [hooks]
38 > [hooks]
39 > pretxnchangegroup.acl = python:hgext.acl.hook
39 > pretxnchangegroup.acl = python:hgext.acl.hook
40 > [acl]
40 > [acl]
41 > sources = push
41 > sources = push
42 > [extensions]
42 > [extensions]
43 > f=`pwd`/fakegroups.py
43 > f=`pwd`/fakegroups.py
44 > EOF
44 > EOF
45 > }
45 > }
46
46
47 $ hg init a
47 $ hg init a
48 $ cd a
48 $ cd a
49 $ mkdir foo foo/Bar quux
49 $ mkdir foo foo/Bar quux
50 $ echo 'in foo' > foo/file.txt
50 $ echo 'in foo' > foo/file.txt
51 $ echo 'in foo/Bar' > foo/Bar/file.txt
51 $ echo 'in foo/Bar' > foo/Bar/file.txt
52 $ echo 'in quux' > quux/file.py
52 $ echo 'in quux' > quux/file.py
53 $ hg add -q
53 $ hg add -q
54 $ hg ci -m 'add files' -d '1000000 0'
54 $ hg ci -m 'add files' -d '1000000 0'
55 $ echo >> foo/file.txt
55 $ echo >> foo/file.txt
56 $ hg ci -m 'change foo/file' -d '1000001 0'
56 $ hg ci -m 'change foo/file' -d '1000001 0'
57 $ echo >> foo/Bar/file.txt
57 $ echo >> foo/Bar/file.txt
58 $ hg ci -m 'change foo/Bar/file' -d '1000002 0'
58 $ hg ci -m 'change foo/Bar/file' -d '1000002 0'
59 $ echo >> quux/file.py
59 $ echo >> quux/file.py
60 $ hg ci -m 'change quux/file' -d '1000003 0'
60 $ hg ci -m 'change quux/file' -d '1000003 0'
61 $ hg tip --quiet
61 $ hg tip --quiet
62 3:911600dab2ae
62 3:911600dab2ae
63
63
64 $ cd ..
64 $ cd ..
65 $ hg clone -r 0 a b
65 $ hg clone -r 0 a b
66 adding changesets
66 adding changesets
67 adding manifests
67 adding manifests
68 adding file changes
68 adding file changes
69 added 1 changesets with 3 changes to 3 files
69 added 1 changesets with 3 changes to 3 files
70 updating to branch default
70 updating to branch default
71 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
71 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
72
72
73 $ config=b/.hg/hgrc
73 $ config=b/.hg/hgrc
74
74
75 Extension disabled for lack of a hook
75 Extension disabled for lack of a hook
76
76
77 $ do_push fred
77 $ do_push fred
78 Pushing as user fred
78 Pushing as user fred
79 hgrc = """
79 hgrc = """
80 """
80 """
81 pushing to ../b
81 pushing to ../b
82 query 1; heads
82 query 1; heads
83 searching for changes
83 searching for changes
84 all remote heads known locally
84 all remote heads known locally
85 listing keys for "bookmarks"
85 listing keys for "bookmarks"
86 3 changesets found
86 3 changesets found
87 list of changesets:
87 list of changesets:
88 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
88 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
89 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
89 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
90 911600dab2ae7a9baff75958b84fe606851ce955
90 911600dab2ae7a9baff75958b84fe606851ce955
91 adding changesets
91 adding changesets
92 bundling: 1/3 changesets (33.33%)
92 bundling: 1/3 changesets (33.33%)
93 bundling: 2/3 changesets (66.67%)
93 bundling: 2/3 changesets (66.67%)
94 bundling: 3/3 changesets (100.00%)
94 bundling: 3/3 changesets (100.00%)
95 bundling: 1/3 manifests (33.33%)
95 bundling: 1/3 manifests (33.33%)
96 bundling: 2/3 manifests (66.67%)
96 bundling: 2/3 manifests (66.67%)
97 bundling: 3/3 manifests (100.00%)
97 bundling: 3/3 manifests (100.00%)
98 bundling: foo/Bar/file.txt 1/3 files (33.33%)
98 bundling: foo/Bar/file.txt 1/3 files (33.33%)
99 bundling: foo/file.txt 2/3 files (66.67%)
99 bundling: foo/file.txt 2/3 files (66.67%)
100 bundling: quux/file.py 3/3 files (100.00%)
100 bundling: quux/file.py 3/3 files (100.00%)
101 changesets: 1 chunks
101 changesets: 1 chunks
102 add changeset ef1ea85a6374
102 add changeset ef1ea85a6374
103 changesets: 2 chunks
103 changesets: 2 chunks
104 add changeset f9cafe1212c8
104 add changeset f9cafe1212c8
105 changesets: 3 chunks
105 changesets: 3 chunks
106 add changeset 911600dab2ae
106 add changeset 911600dab2ae
107 adding manifests
107 adding manifests
108 manifests: 1/3 chunks (33.33%)
108 manifests: 1/3 chunks (33.33%)
109 manifests: 2/3 chunks (66.67%)
109 manifests: 2/3 chunks (66.67%)
110 manifests: 3/3 chunks (100.00%)
110 manifests: 3/3 chunks (100.00%)
111 adding file changes
111 adding file changes
112 adding foo/Bar/file.txt revisions
112 adding foo/Bar/file.txt revisions
113 files: 1/3 chunks (33.33%)
113 files: 1/3 chunks (33.33%)
114 adding foo/file.txt revisions
114 adding foo/file.txt revisions
115 files: 2/3 chunks (66.67%)
115 files: 2/3 chunks (66.67%)
116 adding quux/file.py revisions
116 adding quux/file.py revisions
117 files: 3/3 chunks (100.00%)
117 files: 3/3 chunks (100.00%)
118 added 3 changesets with 3 changes to 3 files
118 added 3 changesets with 3 changes to 3 files
119 listing keys for "phases"
119 listing keys for "phases"
120 try to push obsolete markers to remote
120 try to push obsolete markers to remote
121 updating the branch cache
121 updating the branch cache
122 checking for updated bookmarks
122 checking for updated bookmarks
123 listing keys for "bookmarks"
123 listing keys for "bookmarks"
124 repository tip rolled back to revision 0 (undo push)
124 repository tip rolled back to revision 0 (undo push)
125 0:6675d58eff77
125 0:6675d58eff77
126
126
127
127
128 $ echo '[hooks]' >> $config
128 $ echo '[hooks]' >> $config
129 $ echo 'pretxnchangegroup.acl = python:hgext.acl.hook' >> $config
129 $ echo 'pretxnchangegroup.acl = python:hgext.acl.hook' >> $config
130
130
131 Extension disabled for lack of acl.sources
131 Extension disabled for lack of acl.sources
132
132
133 $ do_push fred
133 $ do_push fred
134 Pushing as user fred
134 Pushing as user fred
135 hgrc = """
135 hgrc = """
136 [hooks]
136 [hooks]
137 pretxnchangegroup.acl = python:hgext.acl.hook
137 pretxnchangegroup.acl = python:hgext.acl.hook
138 """
138 """
139 pushing to ../b
139 pushing to ../b
140 query 1; heads
140 query 1; heads
141 searching for changes
141 searching for changes
142 all remote heads known locally
142 all remote heads known locally
143 invalidating branch cache (tip differs)
143 invalid branchheads cache: tip differs
144 listing keys for "bookmarks"
144 listing keys for "bookmarks"
145 3 changesets found
145 3 changesets found
146 list of changesets:
146 list of changesets:
147 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
147 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
148 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
148 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
149 911600dab2ae7a9baff75958b84fe606851ce955
149 911600dab2ae7a9baff75958b84fe606851ce955
150 adding changesets
150 adding changesets
151 bundling: 1/3 changesets (33.33%)
151 bundling: 1/3 changesets (33.33%)
152 bundling: 2/3 changesets (66.67%)
152 bundling: 2/3 changesets (66.67%)
153 bundling: 3/3 changesets (100.00%)
153 bundling: 3/3 changesets (100.00%)
154 bundling: 1/3 manifests (33.33%)
154 bundling: 1/3 manifests (33.33%)
155 bundling: 2/3 manifests (66.67%)
155 bundling: 2/3 manifests (66.67%)
156 bundling: 3/3 manifests (100.00%)
156 bundling: 3/3 manifests (100.00%)
157 bundling: foo/Bar/file.txt 1/3 files (33.33%)
157 bundling: foo/Bar/file.txt 1/3 files (33.33%)
158 bundling: foo/file.txt 2/3 files (66.67%)
158 bundling: foo/file.txt 2/3 files (66.67%)
159 bundling: quux/file.py 3/3 files (100.00%)
159 bundling: quux/file.py 3/3 files (100.00%)
160 changesets: 1 chunks
160 changesets: 1 chunks
161 add changeset ef1ea85a6374
161 add changeset ef1ea85a6374
162 changesets: 2 chunks
162 changesets: 2 chunks
163 add changeset f9cafe1212c8
163 add changeset f9cafe1212c8
164 changesets: 3 chunks
164 changesets: 3 chunks
165 add changeset 911600dab2ae
165 add changeset 911600dab2ae
166 adding manifests
166 adding manifests
167 manifests: 1/3 chunks (33.33%)
167 manifests: 1/3 chunks (33.33%)
168 manifests: 2/3 chunks (66.67%)
168 manifests: 2/3 chunks (66.67%)
169 manifests: 3/3 chunks (100.00%)
169 manifests: 3/3 chunks (100.00%)
170 adding file changes
170 adding file changes
171 adding foo/Bar/file.txt revisions
171 adding foo/Bar/file.txt revisions
172 files: 1/3 chunks (33.33%)
172 files: 1/3 chunks (33.33%)
173 adding foo/file.txt revisions
173 adding foo/file.txt revisions
174 files: 2/3 chunks (66.67%)
174 files: 2/3 chunks (66.67%)
175 adding quux/file.py revisions
175 adding quux/file.py revisions
176 files: 3/3 chunks (100.00%)
176 files: 3/3 chunks (100.00%)
177 added 3 changesets with 3 changes to 3 files
177 added 3 changesets with 3 changes to 3 files
178 calling hook pretxnchangegroup.acl: hgext.acl.hook
178 calling hook pretxnchangegroup.acl: hgext.acl.hook
179 acl: changes have source "push" - skipping
179 acl: changes have source "push" - skipping
180 listing keys for "phases"
180 listing keys for "phases"
181 try to push obsolete markers to remote
181 try to push obsolete markers to remote
182 updating the branch cache
182 updating the branch cache
183 checking for updated bookmarks
183 checking for updated bookmarks
184 listing keys for "bookmarks"
184 listing keys for "bookmarks"
185 repository tip rolled back to revision 0 (undo push)
185 repository tip rolled back to revision 0 (undo push)
186 0:6675d58eff77
186 0:6675d58eff77
187
187
188
188
189 No [acl.allow]/[acl.deny]
189 No [acl.allow]/[acl.deny]
190
190
191 $ echo '[acl]' >> $config
191 $ echo '[acl]' >> $config
192 $ echo 'sources = push' >> $config
192 $ echo 'sources = push' >> $config
193 $ do_push fred
193 $ do_push fred
194 Pushing as user fred
194 Pushing as user fred
195 hgrc = """
195 hgrc = """
196 [hooks]
196 [hooks]
197 pretxnchangegroup.acl = python:hgext.acl.hook
197 pretxnchangegroup.acl = python:hgext.acl.hook
198 [acl]
198 [acl]
199 sources = push
199 sources = push
200 """
200 """
201 pushing to ../b
201 pushing to ../b
202 query 1; heads
202 query 1; heads
203 searching for changes
203 searching for changes
204 all remote heads known locally
204 all remote heads known locally
205 invalidating branch cache (tip differs)
205 invalid branchheads cache: tip differs
206 listing keys for "bookmarks"
206 listing keys for "bookmarks"
207 3 changesets found
207 3 changesets found
208 list of changesets:
208 list of changesets:
209 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
209 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
210 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
210 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
211 911600dab2ae7a9baff75958b84fe606851ce955
211 911600dab2ae7a9baff75958b84fe606851ce955
212 adding changesets
212 adding changesets
213 bundling: 1/3 changesets (33.33%)
213 bundling: 1/3 changesets (33.33%)
214 bundling: 2/3 changesets (66.67%)
214 bundling: 2/3 changesets (66.67%)
215 bundling: 3/3 changesets (100.00%)
215 bundling: 3/3 changesets (100.00%)
216 bundling: 1/3 manifests (33.33%)
216 bundling: 1/3 manifests (33.33%)
217 bundling: 2/3 manifests (66.67%)
217 bundling: 2/3 manifests (66.67%)
218 bundling: 3/3 manifests (100.00%)
218 bundling: 3/3 manifests (100.00%)
219 bundling: foo/Bar/file.txt 1/3 files (33.33%)
219 bundling: foo/Bar/file.txt 1/3 files (33.33%)
220 bundling: foo/file.txt 2/3 files (66.67%)
220 bundling: foo/file.txt 2/3 files (66.67%)
221 bundling: quux/file.py 3/3 files (100.00%)
221 bundling: quux/file.py 3/3 files (100.00%)
222 changesets: 1 chunks
222 changesets: 1 chunks
223 add changeset ef1ea85a6374
223 add changeset ef1ea85a6374
224 changesets: 2 chunks
224 changesets: 2 chunks
225 add changeset f9cafe1212c8
225 add changeset f9cafe1212c8
226 changesets: 3 chunks
226 changesets: 3 chunks
227 add changeset 911600dab2ae
227 add changeset 911600dab2ae
228 adding manifests
228 adding manifests
229 manifests: 1/3 chunks (33.33%)
229 manifests: 1/3 chunks (33.33%)
230 manifests: 2/3 chunks (66.67%)
230 manifests: 2/3 chunks (66.67%)
231 manifests: 3/3 chunks (100.00%)
231 manifests: 3/3 chunks (100.00%)
232 adding file changes
232 adding file changes
233 adding foo/Bar/file.txt revisions
233 adding foo/Bar/file.txt revisions
234 files: 1/3 chunks (33.33%)
234 files: 1/3 chunks (33.33%)
235 adding foo/file.txt revisions
235 adding foo/file.txt revisions
236 files: 2/3 chunks (66.67%)
236 files: 2/3 chunks (66.67%)
237 adding quux/file.py revisions
237 adding quux/file.py revisions
238 files: 3/3 chunks (100.00%)
238 files: 3/3 chunks (100.00%)
239 added 3 changesets with 3 changes to 3 files
239 added 3 changesets with 3 changes to 3 files
240 calling hook pretxnchangegroup.acl: hgext.acl.hook
240 calling hook pretxnchangegroup.acl: hgext.acl.hook
241 acl: checking access for user "fred"
241 acl: checking access for user "fred"
242 acl: acl.allow.branches not enabled
242 acl: acl.allow.branches not enabled
243 acl: acl.deny.branches not enabled
243 acl: acl.deny.branches not enabled
244 acl: acl.allow not enabled
244 acl: acl.allow not enabled
245 acl: acl.deny not enabled
245 acl: acl.deny not enabled
246 acl: branch access granted: "ef1ea85a6374" on branch "default"
246 acl: branch access granted: "ef1ea85a6374" on branch "default"
247 acl: path access granted: "ef1ea85a6374"
247 acl: path access granted: "ef1ea85a6374"
248 acl: branch access granted: "f9cafe1212c8" on branch "default"
248 acl: branch access granted: "f9cafe1212c8" on branch "default"
249 acl: path access granted: "f9cafe1212c8"
249 acl: path access granted: "f9cafe1212c8"
250 acl: branch access granted: "911600dab2ae" on branch "default"
250 acl: branch access granted: "911600dab2ae" on branch "default"
251 acl: path access granted: "911600dab2ae"
251 acl: path access granted: "911600dab2ae"
252 listing keys for "phases"
252 listing keys for "phases"
253 try to push obsolete markers to remote
253 try to push obsolete markers to remote
254 updating the branch cache
254 updating the branch cache
255 checking for updated bookmarks
255 checking for updated bookmarks
256 listing keys for "bookmarks"
256 listing keys for "bookmarks"
257 repository tip rolled back to revision 0 (undo push)
257 repository tip rolled back to revision 0 (undo push)
258 0:6675d58eff77
258 0:6675d58eff77
259
259
260
260
261 Empty [acl.allow]
261 Empty [acl.allow]
262
262
263 $ echo '[acl.allow]' >> $config
263 $ echo '[acl.allow]' >> $config
264 $ do_push fred
264 $ do_push fred
265 Pushing as user fred
265 Pushing as user fred
266 hgrc = """
266 hgrc = """
267 [hooks]
267 [hooks]
268 pretxnchangegroup.acl = python:hgext.acl.hook
268 pretxnchangegroup.acl = python:hgext.acl.hook
269 [acl]
269 [acl]
270 sources = push
270 sources = push
271 [acl.allow]
271 [acl.allow]
272 """
272 """
273 pushing to ../b
273 pushing to ../b
274 query 1; heads
274 query 1; heads
275 searching for changes
275 searching for changes
276 all remote heads known locally
276 all remote heads known locally
277 invalidating branch cache (tip differs)
277 invalid branchheads cache: tip differs
278 listing keys for "bookmarks"
278 listing keys for "bookmarks"
279 3 changesets found
279 3 changesets found
280 list of changesets:
280 list of changesets:
281 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
281 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
282 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
282 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
283 911600dab2ae7a9baff75958b84fe606851ce955
283 911600dab2ae7a9baff75958b84fe606851ce955
284 adding changesets
284 adding changesets
285 bundling: 1/3 changesets (33.33%)
285 bundling: 1/3 changesets (33.33%)
286 bundling: 2/3 changesets (66.67%)
286 bundling: 2/3 changesets (66.67%)
287 bundling: 3/3 changesets (100.00%)
287 bundling: 3/3 changesets (100.00%)
288 bundling: 1/3 manifests (33.33%)
288 bundling: 1/3 manifests (33.33%)
289 bundling: 2/3 manifests (66.67%)
289 bundling: 2/3 manifests (66.67%)
290 bundling: 3/3 manifests (100.00%)
290 bundling: 3/3 manifests (100.00%)
291 bundling: foo/Bar/file.txt 1/3 files (33.33%)
291 bundling: foo/Bar/file.txt 1/3 files (33.33%)
292 bundling: foo/file.txt 2/3 files (66.67%)
292 bundling: foo/file.txt 2/3 files (66.67%)
293 bundling: quux/file.py 3/3 files (100.00%)
293 bundling: quux/file.py 3/3 files (100.00%)
294 changesets: 1 chunks
294 changesets: 1 chunks
295 add changeset ef1ea85a6374
295 add changeset ef1ea85a6374
296 changesets: 2 chunks
296 changesets: 2 chunks
297 add changeset f9cafe1212c8
297 add changeset f9cafe1212c8
298 changesets: 3 chunks
298 changesets: 3 chunks
299 add changeset 911600dab2ae
299 add changeset 911600dab2ae
300 adding manifests
300 adding manifests
301 manifests: 1/3 chunks (33.33%)
301 manifests: 1/3 chunks (33.33%)
302 manifests: 2/3 chunks (66.67%)
302 manifests: 2/3 chunks (66.67%)
303 manifests: 3/3 chunks (100.00%)
303 manifests: 3/3 chunks (100.00%)
304 adding file changes
304 adding file changes
305 adding foo/Bar/file.txt revisions
305 adding foo/Bar/file.txt revisions
306 files: 1/3 chunks (33.33%)
306 files: 1/3 chunks (33.33%)
307 adding foo/file.txt revisions
307 adding foo/file.txt revisions
308 files: 2/3 chunks (66.67%)
308 files: 2/3 chunks (66.67%)
309 adding quux/file.py revisions
309 adding quux/file.py revisions
310 files: 3/3 chunks (100.00%)
310 files: 3/3 chunks (100.00%)
311 added 3 changesets with 3 changes to 3 files
311 added 3 changesets with 3 changes to 3 files
312 calling hook pretxnchangegroup.acl: hgext.acl.hook
312 calling hook pretxnchangegroup.acl: hgext.acl.hook
313 acl: checking access for user "fred"
313 acl: checking access for user "fred"
314 acl: acl.allow.branches not enabled
314 acl: acl.allow.branches not enabled
315 acl: acl.deny.branches not enabled
315 acl: acl.deny.branches not enabled
316 acl: acl.allow enabled, 0 entries for user fred
316 acl: acl.allow enabled, 0 entries for user fred
317 acl: acl.deny not enabled
317 acl: acl.deny not enabled
318 acl: branch access granted: "ef1ea85a6374" on branch "default"
318 acl: branch access granted: "ef1ea85a6374" on branch "default"
319 error: pretxnchangegroup.acl hook failed: acl: user "fred" not allowed on "foo/file.txt" (changeset "ef1ea85a6374")
319 error: pretxnchangegroup.acl hook failed: acl: user "fred" not allowed on "foo/file.txt" (changeset "ef1ea85a6374")
320 transaction abort!
320 transaction abort!
321 rollback completed
321 rollback completed
322 abort: acl: user "fred" not allowed on "foo/file.txt" (changeset "ef1ea85a6374")
322 abort: acl: user "fred" not allowed on "foo/file.txt" (changeset "ef1ea85a6374")
323 no rollback information available
323 no rollback information available
324 0:6675d58eff77
324 0:6675d58eff77
325
325
326
326
327 fred is allowed inside foo/
327 fred is allowed inside foo/
328
328
329 $ echo 'foo/** = fred' >> $config
329 $ echo 'foo/** = fred' >> $config
330 $ do_push fred
330 $ do_push fred
331 Pushing as user fred
331 Pushing as user fred
332 hgrc = """
332 hgrc = """
333 [hooks]
333 [hooks]
334 pretxnchangegroup.acl = python:hgext.acl.hook
334 pretxnchangegroup.acl = python:hgext.acl.hook
335 [acl]
335 [acl]
336 sources = push
336 sources = push
337 [acl.allow]
337 [acl.allow]
338 foo/** = fred
338 foo/** = fred
339 """
339 """
340 pushing to ../b
340 pushing to ../b
341 query 1; heads
341 query 1; heads
342 searching for changes
342 searching for changes
343 all remote heads known locally
343 all remote heads known locally
344 listing keys for "bookmarks"
344 listing keys for "bookmarks"
345 3 changesets found
345 3 changesets found
346 list of changesets:
346 list of changesets:
347 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
347 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
348 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
348 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
349 911600dab2ae7a9baff75958b84fe606851ce955
349 911600dab2ae7a9baff75958b84fe606851ce955
350 adding changesets
350 adding changesets
351 bundling: 1/3 changesets (33.33%)
351 bundling: 1/3 changesets (33.33%)
352 bundling: 2/3 changesets (66.67%)
352 bundling: 2/3 changesets (66.67%)
353 bundling: 3/3 changesets (100.00%)
353 bundling: 3/3 changesets (100.00%)
354 bundling: 1/3 manifests (33.33%)
354 bundling: 1/3 manifests (33.33%)
355 bundling: 2/3 manifests (66.67%)
355 bundling: 2/3 manifests (66.67%)
356 bundling: 3/3 manifests (100.00%)
356 bundling: 3/3 manifests (100.00%)
357 bundling: foo/Bar/file.txt 1/3 files (33.33%)
357 bundling: foo/Bar/file.txt 1/3 files (33.33%)
358 bundling: foo/file.txt 2/3 files (66.67%)
358 bundling: foo/file.txt 2/3 files (66.67%)
359 bundling: quux/file.py 3/3 files (100.00%)
359 bundling: quux/file.py 3/3 files (100.00%)
360 changesets: 1 chunks
360 changesets: 1 chunks
361 add changeset ef1ea85a6374
361 add changeset ef1ea85a6374
362 changesets: 2 chunks
362 changesets: 2 chunks
363 add changeset f9cafe1212c8
363 add changeset f9cafe1212c8
364 changesets: 3 chunks
364 changesets: 3 chunks
365 add changeset 911600dab2ae
365 add changeset 911600dab2ae
366 adding manifests
366 adding manifests
367 manifests: 1/3 chunks (33.33%)
367 manifests: 1/3 chunks (33.33%)
368 manifests: 2/3 chunks (66.67%)
368 manifests: 2/3 chunks (66.67%)
369 manifests: 3/3 chunks (100.00%)
369 manifests: 3/3 chunks (100.00%)
370 adding file changes
370 adding file changes
371 adding foo/Bar/file.txt revisions
371 adding foo/Bar/file.txt revisions
372 files: 1/3 chunks (33.33%)
372 files: 1/3 chunks (33.33%)
373 adding foo/file.txt revisions
373 adding foo/file.txt revisions
374 files: 2/3 chunks (66.67%)
374 files: 2/3 chunks (66.67%)
375 adding quux/file.py revisions
375 adding quux/file.py revisions
376 files: 3/3 chunks (100.00%)
376 files: 3/3 chunks (100.00%)
377 added 3 changesets with 3 changes to 3 files
377 added 3 changesets with 3 changes to 3 files
378 calling hook pretxnchangegroup.acl: hgext.acl.hook
378 calling hook pretxnchangegroup.acl: hgext.acl.hook
379 acl: checking access for user "fred"
379 acl: checking access for user "fred"
380 acl: acl.allow.branches not enabled
380 acl: acl.allow.branches not enabled
381 acl: acl.deny.branches not enabled
381 acl: acl.deny.branches not enabled
382 acl: acl.allow enabled, 1 entries for user fred
382 acl: acl.allow enabled, 1 entries for user fred
383 acl: acl.deny not enabled
383 acl: acl.deny not enabled
384 acl: branch access granted: "ef1ea85a6374" on branch "default"
384 acl: branch access granted: "ef1ea85a6374" on branch "default"
385 acl: path access granted: "ef1ea85a6374"
385 acl: path access granted: "ef1ea85a6374"
386 acl: branch access granted: "f9cafe1212c8" on branch "default"
386 acl: branch access granted: "f9cafe1212c8" on branch "default"
387 acl: path access granted: "f9cafe1212c8"
387 acl: path access granted: "f9cafe1212c8"
388 acl: branch access granted: "911600dab2ae" on branch "default"
388 acl: branch access granted: "911600dab2ae" on branch "default"
389 error: pretxnchangegroup.acl hook failed: acl: user "fred" not allowed on "quux/file.py" (changeset "911600dab2ae")
389 error: pretxnchangegroup.acl hook failed: acl: user "fred" not allowed on "quux/file.py" (changeset "911600dab2ae")
390 transaction abort!
390 transaction abort!
391 rollback completed
391 rollback completed
392 abort: acl: user "fred" not allowed on "quux/file.py" (changeset "911600dab2ae")
392 abort: acl: user "fred" not allowed on "quux/file.py" (changeset "911600dab2ae")
393 no rollback information available
393 no rollback information available
394 0:6675d58eff77
394 0:6675d58eff77
395
395
396
396
397 Empty [acl.deny]
397 Empty [acl.deny]
398
398
399 $ echo '[acl.deny]' >> $config
399 $ echo '[acl.deny]' >> $config
400 $ do_push barney
400 $ do_push barney
401 Pushing as user barney
401 Pushing as user barney
402 hgrc = """
402 hgrc = """
403 [hooks]
403 [hooks]
404 pretxnchangegroup.acl = python:hgext.acl.hook
404 pretxnchangegroup.acl = python:hgext.acl.hook
405 [acl]
405 [acl]
406 sources = push
406 sources = push
407 [acl.allow]
407 [acl.allow]
408 foo/** = fred
408 foo/** = fred
409 [acl.deny]
409 [acl.deny]
410 """
410 """
411 pushing to ../b
411 pushing to ../b
412 query 1; heads
412 query 1; heads
413 searching for changes
413 searching for changes
414 all remote heads known locally
414 all remote heads known locally
415 listing keys for "bookmarks"
415 listing keys for "bookmarks"
416 3 changesets found
416 3 changesets found
417 list of changesets:
417 list of changesets:
418 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
418 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
419 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
419 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
420 911600dab2ae7a9baff75958b84fe606851ce955
420 911600dab2ae7a9baff75958b84fe606851ce955
421 adding changesets
421 adding changesets
422 bundling: 1/3 changesets (33.33%)
422 bundling: 1/3 changesets (33.33%)
423 bundling: 2/3 changesets (66.67%)
423 bundling: 2/3 changesets (66.67%)
424 bundling: 3/3 changesets (100.00%)
424 bundling: 3/3 changesets (100.00%)
425 bundling: 1/3 manifests (33.33%)
425 bundling: 1/3 manifests (33.33%)
426 bundling: 2/3 manifests (66.67%)
426 bundling: 2/3 manifests (66.67%)
427 bundling: 3/3 manifests (100.00%)
427 bundling: 3/3 manifests (100.00%)
428 bundling: foo/Bar/file.txt 1/3 files (33.33%)
428 bundling: foo/Bar/file.txt 1/3 files (33.33%)
429 bundling: foo/file.txt 2/3 files (66.67%)
429 bundling: foo/file.txt 2/3 files (66.67%)
430 bundling: quux/file.py 3/3 files (100.00%)
430 bundling: quux/file.py 3/3 files (100.00%)
431 changesets: 1 chunks
431 changesets: 1 chunks
432 add changeset ef1ea85a6374
432 add changeset ef1ea85a6374
433 changesets: 2 chunks
433 changesets: 2 chunks
434 add changeset f9cafe1212c8
434 add changeset f9cafe1212c8
435 changesets: 3 chunks
435 changesets: 3 chunks
436 add changeset 911600dab2ae
436 add changeset 911600dab2ae
437 adding manifests
437 adding manifests
438 manifests: 1/3 chunks (33.33%)
438 manifests: 1/3 chunks (33.33%)
439 manifests: 2/3 chunks (66.67%)
439 manifests: 2/3 chunks (66.67%)
440 manifests: 3/3 chunks (100.00%)
440 manifests: 3/3 chunks (100.00%)
441 adding file changes
441 adding file changes
442 adding foo/Bar/file.txt revisions
442 adding foo/Bar/file.txt revisions
443 files: 1/3 chunks (33.33%)
443 files: 1/3 chunks (33.33%)
444 adding foo/file.txt revisions
444 adding foo/file.txt revisions
445 files: 2/3 chunks (66.67%)
445 files: 2/3 chunks (66.67%)
446 adding quux/file.py revisions
446 adding quux/file.py revisions
447 files: 3/3 chunks (100.00%)
447 files: 3/3 chunks (100.00%)
448 added 3 changesets with 3 changes to 3 files
448 added 3 changesets with 3 changes to 3 files
449 calling hook pretxnchangegroup.acl: hgext.acl.hook
449 calling hook pretxnchangegroup.acl: hgext.acl.hook
450 acl: checking access for user "barney"
450 acl: checking access for user "barney"
451 acl: acl.allow.branches not enabled
451 acl: acl.allow.branches not enabled
452 acl: acl.deny.branches not enabled
452 acl: acl.deny.branches not enabled
453 acl: acl.allow enabled, 0 entries for user barney
453 acl: acl.allow enabled, 0 entries for user barney
454 acl: acl.deny enabled, 0 entries for user barney
454 acl: acl.deny enabled, 0 entries for user barney
455 acl: branch access granted: "ef1ea85a6374" on branch "default"
455 acl: branch access granted: "ef1ea85a6374" on branch "default"
456 error: pretxnchangegroup.acl hook failed: acl: user "barney" not allowed on "foo/file.txt" (changeset "ef1ea85a6374")
456 error: pretxnchangegroup.acl hook failed: acl: user "barney" not allowed on "foo/file.txt" (changeset "ef1ea85a6374")
457 transaction abort!
457 transaction abort!
458 rollback completed
458 rollback completed
459 abort: acl: user "barney" not allowed on "foo/file.txt" (changeset "ef1ea85a6374")
459 abort: acl: user "barney" not allowed on "foo/file.txt" (changeset "ef1ea85a6374")
460 no rollback information available
460 no rollback information available
461 0:6675d58eff77
461 0:6675d58eff77
462
462
463
463
464 fred is allowed inside foo/, but not foo/bar/ (case matters)
464 fred is allowed inside foo/, but not foo/bar/ (case matters)
465
465
466 $ echo 'foo/bar/** = fred' >> $config
466 $ echo 'foo/bar/** = fred' >> $config
467 $ do_push fred
467 $ do_push fred
468 Pushing as user fred
468 Pushing as user fred
469 hgrc = """
469 hgrc = """
470 [hooks]
470 [hooks]
471 pretxnchangegroup.acl = python:hgext.acl.hook
471 pretxnchangegroup.acl = python:hgext.acl.hook
472 [acl]
472 [acl]
473 sources = push
473 sources = push
474 [acl.allow]
474 [acl.allow]
475 foo/** = fred
475 foo/** = fred
476 [acl.deny]
476 [acl.deny]
477 foo/bar/** = fred
477 foo/bar/** = fred
478 """
478 """
479 pushing to ../b
479 pushing to ../b
480 query 1; heads
480 query 1; heads
481 searching for changes
481 searching for changes
482 all remote heads known locally
482 all remote heads known locally
483 listing keys for "bookmarks"
483 listing keys for "bookmarks"
484 3 changesets found
484 3 changesets found
485 list of changesets:
485 list of changesets:
486 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
486 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
487 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
487 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
488 911600dab2ae7a9baff75958b84fe606851ce955
488 911600dab2ae7a9baff75958b84fe606851ce955
489 adding changesets
489 adding changesets
490 bundling: 1/3 changesets (33.33%)
490 bundling: 1/3 changesets (33.33%)
491 bundling: 2/3 changesets (66.67%)
491 bundling: 2/3 changesets (66.67%)
492 bundling: 3/3 changesets (100.00%)
492 bundling: 3/3 changesets (100.00%)
493 bundling: 1/3 manifests (33.33%)
493 bundling: 1/3 manifests (33.33%)
494 bundling: 2/3 manifests (66.67%)
494 bundling: 2/3 manifests (66.67%)
495 bundling: 3/3 manifests (100.00%)
495 bundling: 3/3 manifests (100.00%)
496 bundling: foo/Bar/file.txt 1/3 files (33.33%)
496 bundling: foo/Bar/file.txt 1/3 files (33.33%)
497 bundling: foo/file.txt 2/3 files (66.67%)
497 bundling: foo/file.txt 2/3 files (66.67%)
498 bundling: quux/file.py 3/3 files (100.00%)
498 bundling: quux/file.py 3/3 files (100.00%)
499 changesets: 1 chunks
499 changesets: 1 chunks
500 add changeset ef1ea85a6374
500 add changeset ef1ea85a6374
501 changesets: 2 chunks
501 changesets: 2 chunks
502 add changeset f9cafe1212c8
502 add changeset f9cafe1212c8
503 changesets: 3 chunks
503 changesets: 3 chunks
504 add changeset 911600dab2ae
504 add changeset 911600dab2ae
505 adding manifests
505 adding manifests
506 manifests: 1/3 chunks (33.33%)
506 manifests: 1/3 chunks (33.33%)
507 manifests: 2/3 chunks (66.67%)
507 manifests: 2/3 chunks (66.67%)
508 manifests: 3/3 chunks (100.00%)
508 manifests: 3/3 chunks (100.00%)
509 adding file changes
509 adding file changes
510 adding foo/Bar/file.txt revisions
510 adding foo/Bar/file.txt revisions
511 files: 1/3 chunks (33.33%)
511 files: 1/3 chunks (33.33%)
512 adding foo/file.txt revisions
512 adding foo/file.txt revisions
513 files: 2/3 chunks (66.67%)
513 files: 2/3 chunks (66.67%)
514 adding quux/file.py revisions
514 adding quux/file.py revisions
515 files: 3/3 chunks (100.00%)
515 files: 3/3 chunks (100.00%)
516 added 3 changesets with 3 changes to 3 files
516 added 3 changesets with 3 changes to 3 files
517 calling hook pretxnchangegroup.acl: hgext.acl.hook
517 calling hook pretxnchangegroup.acl: hgext.acl.hook
518 acl: checking access for user "fred"
518 acl: checking access for user "fred"
519 acl: acl.allow.branches not enabled
519 acl: acl.allow.branches not enabled
520 acl: acl.deny.branches not enabled
520 acl: acl.deny.branches not enabled
521 acl: acl.allow enabled, 1 entries for user fred
521 acl: acl.allow enabled, 1 entries for user fred
522 acl: acl.deny enabled, 1 entries for user fred
522 acl: acl.deny enabled, 1 entries for user fred
523 acl: branch access granted: "ef1ea85a6374" on branch "default"
523 acl: branch access granted: "ef1ea85a6374" on branch "default"
524 acl: path access granted: "ef1ea85a6374"
524 acl: path access granted: "ef1ea85a6374"
525 acl: branch access granted: "f9cafe1212c8" on branch "default"
525 acl: branch access granted: "f9cafe1212c8" on branch "default"
526 acl: path access granted: "f9cafe1212c8"
526 acl: path access granted: "f9cafe1212c8"
527 acl: branch access granted: "911600dab2ae" on branch "default"
527 acl: branch access granted: "911600dab2ae" on branch "default"
528 error: pretxnchangegroup.acl hook failed: acl: user "fred" not allowed on "quux/file.py" (changeset "911600dab2ae")
528 error: pretxnchangegroup.acl hook failed: acl: user "fred" not allowed on "quux/file.py" (changeset "911600dab2ae")
529 transaction abort!
529 transaction abort!
530 rollback completed
530 rollback completed
531 abort: acl: user "fred" not allowed on "quux/file.py" (changeset "911600dab2ae")
531 abort: acl: user "fred" not allowed on "quux/file.py" (changeset "911600dab2ae")
532 no rollback information available
532 no rollback information available
533 0:6675d58eff77
533 0:6675d58eff77
534
534
535
535
536 fred is allowed inside foo/, but not foo/Bar/
536 fred is allowed inside foo/, but not foo/Bar/
537
537
538 $ echo 'foo/Bar/** = fred' >> $config
538 $ echo 'foo/Bar/** = fred' >> $config
539 $ do_push fred
539 $ do_push fred
540 Pushing as user fred
540 Pushing as user fred
541 hgrc = """
541 hgrc = """
542 [hooks]
542 [hooks]
543 pretxnchangegroup.acl = python:hgext.acl.hook
543 pretxnchangegroup.acl = python:hgext.acl.hook
544 [acl]
544 [acl]
545 sources = push
545 sources = push
546 [acl.allow]
546 [acl.allow]
547 foo/** = fred
547 foo/** = fred
548 [acl.deny]
548 [acl.deny]
549 foo/bar/** = fred
549 foo/bar/** = fred
550 foo/Bar/** = fred
550 foo/Bar/** = fred
551 """
551 """
552 pushing to ../b
552 pushing to ../b
553 query 1; heads
553 query 1; heads
554 searching for changes
554 searching for changes
555 all remote heads known locally
555 all remote heads known locally
556 listing keys for "bookmarks"
556 listing keys for "bookmarks"
557 3 changesets found
557 3 changesets found
558 list of changesets:
558 list of changesets:
559 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
559 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
560 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
560 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
561 911600dab2ae7a9baff75958b84fe606851ce955
561 911600dab2ae7a9baff75958b84fe606851ce955
562 adding changesets
562 adding changesets
563 bundling: 1/3 changesets (33.33%)
563 bundling: 1/3 changesets (33.33%)
564 bundling: 2/3 changesets (66.67%)
564 bundling: 2/3 changesets (66.67%)
565 bundling: 3/3 changesets (100.00%)
565 bundling: 3/3 changesets (100.00%)
566 bundling: 1/3 manifests (33.33%)
566 bundling: 1/3 manifests (33.33%)
567 bundling: 2/3 manifests (66.67%)
567 bundling: 2/3 manifests (66.67%)
568 bundling: 3/3 manifests (100.00%)
568 bundling: 3/3 manifests (100.00%)
569 bundling: foo/Bar/file.txt 1/3 files (33.33%)
569 bundling: foo/Bar/file.txt 1/3 files (33.33%)
570 bundling: foo/file.txt 2/3 files (66.67%)
570 bundling: foo/file.txt 2/3 files (66.67%)
571 bundling: quux/file.py 3/3 files (100.00%)
571 bundling: quux/file.py 3/3 files (100.00%)
572 changesets: 1 chunks
572 changesets: 1 chunks
573 add changeset ef1ea85a6374
573 add changeset ef1ea85a6374
574 changesets: 2 chunks
574 changesets: 2 chunks
575 add changeset f9cafe1212c8
575 add changeset f9cafe1212c8
576 changesets: 3 chunks
576 changesets: 3 chunks
577 add changeset 911600dab2ae
577 add changeset 911600dab2ae
578 adding manifests
578 adding manifests
579 manifests: 1/3 chunks (33.33%)
579 manifests: 1/3 chunks (33.33%)
580 manifests: 2/3 chunks (66.67%)
580 manifests: 2/3 chunks (66.67%)
581 manifests: 3/3 chunks (100.00%)
581 manifests: 3/3 chunks (100.00%)
582 adding file changes
582 adding file changes
583 adding foo/Bar/file.txt revisions
583 adding foo/Bar/file.txt revisions
584 files: 1/3 chunks (33.33%)
584 files: 1/3 chunks (33.33%)
585 adding foo/file.txt revisions
585 adding foo/file.txt revisions
586 files: 2/3 chunks (66.67%)
586 files: 2/3 chunks (66.67%)
587 adding quux/file.py revisions
587 adding quux/file.py revisions
588 files: 3/3 chunks (100.00%)
588 files: 3/3 chunks (100.00%)
589 added 3 changesets with 3 changes to 3 files
589 added 3 changesets with 3 changes to 3 files
590 calling hook pretxnchangegroup.acl: hgext.acl.hook
590 calling hook pretxnchangegroup.acl: hgext.acl.hook
591 acl: checking access for user "fred"
591 acl: checking access for user "fred"
592 acl: acl.allow.branches not enabled
592 acl: acl.allow.branches not enabled
593 acl: acl.deny.branches not enabled
593 acl: acl.deny.branches not enabled
594 acl: acl.allow enabled, 1 entries for user fred
594 acl: acl.allow enabled, 1 entries for user fred
595 acl: acl.deny enabled, 2 entries for user fred
595 acl: acl.deny enabled, 2 entries for user fred
596 acl: branch access granted: "ef1ea85a6374" on branch "default"
596 acl: branch access granted: "ef1ea85a6374" on branch "default"
597 acl: path access granted: "ef1ea85a6374"
597 acl: path access granted: "ef1ea85a6374"
598 acl: branch access granted: "f9cafe1212c8" on branch "default"
598 acl: branch access granted: "f9cafe1212c8" on branch "default"
599 error: pretxnchangegroup.acl hook failed: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8")
599 error: pretxnchangegroup.acl hook failed: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8")
600 transaction abort!
600 transaction abort!
601 rollback completed
601 rollback completed
602 abort: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8")
602 abort: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8")
603 no rollback information available
603 no rollback information available
604 0:6675d58eff77
604 0:6675d58eff77
605
605
606
606
607 $ echo 'barney is not mentioned => not allowed anywhere'
607 $ echo 'barney is not mentioned => not allowed anywhere'
608 barney is not mentioned => not allowed anywhere
608 barney is not mentioned => not allowed anywhere
609 $ do_push barney
609 $ do_push barney
610 Pushing as user barney
610 Pushing as user barney
611 hgrc = """
611 hgrc = """
612 [hooks]
612 [hooks]
613 pretxnchangegroup.acl = python:hgext.acl.hook
613 pretxnchangegroup.acl = python:hgext.acl.hook
614 [acl]
614 [acl]
615 sources = push
615 sources = push
616 [acl.allow]
616 [acl.allow]
617 foo/** = fred
617 foo/** = fred
618 [acl.deny]
618 [acl.deny]
619 foo/bar/** = fred
619 foo/bar/** = fred
620 foo/Bar/** = fred
620 foo/Bar/** = fred
621 """
621 """
622 pushing to ../b
622 pushing to ../b
623 query 1; heads
623 query 1; heads
624 searching for changes
624 searching for changes
625 all remote heads known locally
625 all remote heads known locally
626 listing keys for "bookmarks"
626 listing keys for "bookmarks"
627 3 changesets found
627 3 changesets found
628 list of changesets:
628 list of changesets:
629 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
629 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
630 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
630 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
631 911600dab2ae7a9baff75958b84fe606851ce955
631 911600dab2ae7a9baff75958b84fe606851ce955
632 adding changesets
632 adding changesets
633 bundling: 1/3 changesets (33.33%)
633 bundling: 1/3 changesets (33.33%)
634 bundling: 2/3 changesets (66.67%)
634 bundling: 2/3 changesets (66.67%)
635 bundling: 3/3 changesets (100.00%)
635 bundling: 3/3 changesets (100.00%)
636 bundling: 1/3 manifests (33.33%)
636 bundling: 1/3 manifests (33.33%)
637 bundling: 2/3 manifests (66.67%)
637 bundling: 2/3 manifests (66.67%)
638 bundling: 3/3 manifests (100.00%)
638 bundling: 3/3 manifests (100.00%)
639 bundling: foo/Bar/file.txt 1/3 files (33.33%)
639 bundling: foo/Bar/file.txt 1/3 files (33.33%)
640 bundling: foo/file.txt 2/3 files (66.67%)
640 bundling: foo/file.txt 2/3 files (66.67%)
641 bundling: quux/file.py 3/3 files (100.00%)
641 bundling: quux/file.py 3/3 files (100.00%)
642 changesets: 1 chunks
642 changesets: 1 chunks
643 add changeset ef1ea85a6374
643 add changeset ef1ea85a6374
644 changesets: 2 chunks
644 changesets: 2 chunks
645 add changeset f9cafe1212c8
645 add changeset f9cafe1212c8
646 changesets: 3 chunks
646 changesets: 3 chunks
647 add changeset 911600dab2ae
647 add changeset 911600dab2ae
648 adding manifests
648 adding manifests
649 manifests: 1/3 chunks (33.33%)
649 manifests: 1/3 chunks (33.33%)
650 manifests: 2/3 chunks (66.67%)
650 manifests: 2/3 chunks (66.67%)
651 manifests: 3/3 chunks (100.00%)
651 manifests: 3/3 chunks (100.00%)
652 adding file changes
652 adding file changes
653 adding foo/Bar/file.txt revisions
653 adding foo/Bar/file.txt revisions
654 files: 1/3 chunks (33.33%)
654 files: 1/3 chunks (33.33%)
655 adding foo/file.txt revisions
655 adding foo/file.txt revisions
656 files: 2/3 chunks (66.67%)
656 files: 2/3 chunks (66.67%)
657 adding quux/file.py revisions
657 adding quux/file.py revisions
658 files: 3/3 chunks (100.00%)
658 files: 3/3 chunks (100.00%)
659 added 3 changesets with 3 changes to 3 files
659 added 3 changesets with 3 changes to 3 files
660 calling hook pretxnchangegroup.acl: hgext.acl.hook
660 calling hook pretxnchangegroup.acl: hgext.acl.hook
661 acl: checking access for user "barney"
661 acl: checking access for user "barney"
662 acl: acl.allow.branches not enabled
662 acl: acl.allow.branches not enabled
663 acl: acl.deny.branches not enabled
663 acl: acl.deny.branches not enabled
664 acl: acl.allow enabled, 0 entries for user barney
664 acl: acl.allow enabled, 0 entries for user barney
665 acl: acl.deny enabled, 0 entries for user barney
665 acl: acl.deny enabled, 0 entries for user barney
666 acl: branch access granted: "ef1ea85a6374" on branch "default"
666 acl: branch access granted: "ef1ea85a6374" on branch "default"
667 error: pretxnchangegroup.acl hook failed: acl: user "barney" not allowed on "foo/file.txt" (changeset "ef1ea85a6374")
667 error: pretxnchangegroup.acl hook failed: acl: user "barney" not allowed on "foo/file.txt" (changeset "ef1ea85a6374")
668 transaction abort!
668 transaction abort!
669 rollback completed
669 rollback completed
670 abort: acl: user "barney" not allowed on "foo/file.txt" (changeset "ef1ea85a6374")
670 abort: acl: user "barney" not allowed on "foo/file.txt" (changeset "ef1ea85a6374")
671 no rollback information available
671 no rollback information available
672 0:6675d58eff77
672 0:6675d58eff77
673
673
674
674
675 barney is allowed everywhere
675 barney is allowed everywhere
676
676
677 $ echo '[acl.allow]' >> $config
677 $ echo '[acl.allow]' >> $config
678 $ echo '** = barney' >> $config
678 $ echo '** = barney' >> $config
679 $ do_push barney
679 $ do_push barney
680 Pushing as user barney
680 Pushing as user barney
681 hgrc = """
681 hgrc = """
682 [hooks]
682 [hooks]
683 pretxnchangegroup.acl = python:hgext.acl.hook
683 pretxnchangegroup.acl = python:hgext.acl.hook
684 [acl]
684 [acl]
685 sources = push
685 sources = push
686 [acl.allow]
686 [acl.allow]
687 foo/** = fred
687 foo/** = fred
688 [acl.deny]
688 [acl.deny]
689 foo/bar/** = fred
689 foo/bar/** = fred
690 foo/Bar/** = fred
690 foo/Bar/** = fred
691 [acl.allow]
691 [acl.allow]
692 ** = barney
692 ** = barney
693 """
693 """
694 pushing to ../b
694 pushing to ../b
695 query 1; heads
695 query 1; heads
696 searching for changes
696 searching for changes
697 all remote heads known locally
697 all remote heads known locally
698 listing keys for "bookmarks"
698 listing keys for "bookmarks"
699 3 changesets found
699 3 changesets found
700 list of changesets:
700 list of changesets:
701 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
701 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
702 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
702 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
703 911600dab2ae7a9baff75958b84fe606851ce955
703 911600dab2ae7a9baff75958b84fe606851ce955
704 adding changesets
704 adding changesets
705 bundling: 1/3 changesets (33.33%)
705 bundling: 1/3 changesets (33.33%)
706 bundling: 2/3 changesets (66.67%)
706 bundling: 2/3 changesets (66.67%)
707 bundling: 3/3 changesets (100.00%)
707 bundling: 3/3 changesets (100.00%)
708 bundling: 1/3 manifests (33.33%)
708 bundling: 1/3 manifests (33.33%)
709 bundling: 2/3 manifests (66.67%)
709 bundling: 2/3 manifests (66.67%)
710 bundling: 3/3 manifests (100.00%)
710 bundling: 3/3 manifests (100.00%)
711 bundling: foo/Bar/file.txt 1/3 files (33.33%)
711 bundling: foo/Bar/file.txt 1/3 files (33.33%)
712 bundling: foo/file.txt 2/3 files (66.67%)
712 bundling: foo/file.txt 2/3 files (66.67%)
713 bundling: quux/file.py 3/3 files (100.00%)
713 bundling: quux/file.py 3/3 files (100.00%)
714 changesets: 1 chunks
714 changesets: 1 chunks
715 add changeset ef1ea85a6374
715 add changeset ef1ea85a6374
716 changesets: 2 chunks
716 changesets: 2 chunks
717 add changeset f9cafe1212c8
717 add changeset f9cafe1212c8
718 changesets: 3 chunks
718 changesets: 3 chunks
719 add changeset 911600dab2ae
719 add changeset 911600dab2ae
720 adding manifests
720 adding manifests
721 manifests: 1/3 chunks (33.33%)
721 manifests: 1/3 chunks (33.33%)
722 manifests: 2/3 chunks (66.67%)
722 manifests: 2/3 chunks (66.67%)
723 manifests: 3/3 chunks (100.00%)
723 manifests: 3/3 chunks (100.00%)
724 adding file changes
724 adding file changes
725 adding foo/Bar/file.txt revisions
725 adding foo/Bar/file.txt revisions
726 files: 1/3 chunks (33.33%)
726 files: 1/3 chunks (33.33%)
727 adding foo/file.txt revisions
727 adding foo/file.txt revisions
728 files: 2/3 chunks (66.67%)
728 files: 2/3 chunks (66.67%)
729 adding quux/file.py revisions
729 adding quux/file.py revisions
730 files: 3/3 chunks (100.00%)
730 files: 3/3 chunks (100.00%)
731 added 3 changesets with 3 changes to 3 files
731 added 3 changesets with 3 changes to 3 files
732 calling hook pretxnchangegroup.acl: hgext.acl.hook
732 calling hook pretxnchangegroup.acl: hgext.acl.hook
733 acl: checking access for user "barney"
733 acl: checking access for user "barney"
734 acl: acl.allow.branches not enabled
734 acl: acl.allow.branches not enabled
735 acl: acl.deny.branches not enabled
735 acl: acl.deny.branches not enabled
736 acl: acl.allow enabled, 1 entries for user barney
736 acl: acl.allow enabled, 1 entries for user barney
737 acl: acl.deny enabled, 0 entries for user barney
737 acl: acl.deny enabled, 0 entries for user barney
738 acl: branch access granted: "ef1ea85a6374" on branch "default"
738 acl: branch access granted: "ef1ea85a6374" on branch "default"
739 acl: path access granted: "ef1ea85a6374"
739 acl: path access granted: "ef1ea85a6374"
740 acl: branch access granted: "f9cafe1212c8" on branch "default"
740 acl: branch access granted: "f9cafe1212c8" on branch "default"
741 acl: path access granted: "f9cafe1212c8"
741 acl: path access granted: "f9cafe1212c8"
742 acl: branch access granted: "911600dab2ae" on branch "default"
742 acl: branch access granted: "911600dab2ae" on branch "default"
743 acl: path access granted: "911600dab2ae"
743 acl: path access granted: "911600dab2ae"
744 listing keys for "phases"
744 listing keys for "phases"
745 try to push obsolete markers to remote
745 try to push obsolete markers to remote
746 updating the branch cache
746 updating the branch cache
747 checking for updated bookmarks
747 checking for updated bookmarks
748 listing keys for "bookmarks"
748 listing keys for "bookmarks"
749 repository tip rolled back to revision 0 (undo push)
749 repository tip rolled back to revision 0 (undo push)
750 0:6675d58eff77
750 0:6675d58eff77
751
751
752
752
753 wilma can change files with a .txt extension
753 wilma can change files with a .txt extension
754
754
755 $ echo '**/*.txt = wilma' >> $config
755 $ echo '**/*.txt = wilma' >> $config
756 $ do_push wilma
756 $ do_push wilma
757 Pushing as user wilma
757 Pushing as user wilma
758 hgrc = """
758 hgrc = """
759 [hooks]
759 [hooks]
760 pretxnchangegroup.acl = python:hgext.acl.hook
760 pretxnchangegroup.acl = python:hgext.acl.hook
761 [acl]
761 [acl]
762 sources = push
762 sources = push
763 [acl.allow]
763 [acl.allow]
764 foo/** = fred
764 foo/** = fred
765 [acl.deny]
765 [acl.deny]
766 foo/bar/** = fred
766 foo/bar/** = fred
767 foo/Bar/** = fred
767 foo/Bar/** = fred
768 [acl.allow]
768 [acl.allow]
769 ** = barney
769 ** = barney
770 **/*.txt = wilma
770 **/*.txt = wilma
771 """
771 """
772 pushing to ../b
772 pushing to ../b
773 query 1; heads
773 query 1; heads
774 searching for changes
774 searching for changes
775 all remote heads known locally
775 all remote heads known locally
776 invalidating branch cache (tip differs)
776 invalid branchheads cache: tip differs
777 listing keys for "bookmarks"
777 listing keys for "bookmarks"
778 3 changesets found
778 3 changesets found
779 list of changesets:
779 list of changesets:
780 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
780 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
781 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
781 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
782 911600dab2ae7a9baff75958b84fe606851ce955
782 911600dab2ae7a9baff75958b84fe606851ce955
783 adding changesets
783 adding changesets
784 bundling: 1/3 changesets (33.33%)
784 bundling: 1/3 changesets (33.33%)
785 bundling: 2/3 changesets (66.67%)
785 bundling: 2/3 changesets (66.67%)
786 bundling: 3/3 changesets (100.00%)
786 bundling: 3/3 changesets (100.00%)
787 bundling: 1/3 manifests (33.33%)
787 bundling: 1/3 manifests (33.33%)
788 bundling: 2/3 manifests (66.67%)
788 bundling: 2/3 manifests (66.67%)
789 bundling: 3/3 manifests (100.00%)
789 bundling: 3/3 manifests (100.00%)
790 bundling: foo/Bar/file.txt 1/3 files (33.33%)
790 bundling: foo/Bar/file.txt 1/3 files (33.33%)
791 bundling: foo/file.txt 2/3 files (66.67%)
791 bundling: foo/file.txt 2/3 files (66.67%)
792 bundling: quux/file.py 3/3 files (100.00%)
792 bundling: quux/file.py 3/3 files (100.00%)
793 changesets: 1 chunks
793 changesets: 1 chunks
794 add changeset ef1ea85a6374
794 add changeset ef1ea85a6374
795 changesets: 2 chunks
795 changesets: 2 chunks
796 add changeset f9cafe1212c8
796 add changeset f9cafe1212c8
797 changesets: 3 chunks
797 changesets: 3 chunks
798 add changeset 911600dab2ae
798 add changeset 911600dab2ae
799 adding manifests
799 adding manifests
800 manifests: 1/3 chunks (33.33%)
800 manifests: 1/3 chunks (33.33%)
801 manifests: 2/3 chunks (66.67%)
801 manifests: 2/3 chunks (66.67%)
802 manifests: 3/3 chunks (100.00%)
802 manifests: 3/3 chunks (100.00%)
803 adding file changes
803 adding file changes
804 adding foo/Bar/file.txt revisions
804 adding foo/Bar/file.txt revisions
805 files: 1/3 chunks (33.33%)
805 files: 1/3 chunks (33.33%)
806 adding foo/file.txt revisions
806 adding foo/file.txt revisions
807 files: 2/3 chunks (66.67%)
807 files: 2/3 chunks (66.67%)
808 adding quux/file.py revisions
808 adding quux/file.py revisions
809 files: 3/3 chunks (100.00%)
809 files: 3/3 chunks (100.00%)
810 added 3 changesets with 3 changes to 3 files
810 added 3 changesets with 3 changes to 3 files
811 calling hook pretxnchangegroup.acl: hgext.acl.hook
811 calling hook pretxnchangegroup.acl: hgext.acl.hook
812 acl: checking access for user "wilma"
812 acl: checking access for user "wilma"
813 acl: acl.allow.branches not enabled
813 acl: acl.allow.branches not enabled
814 acl: acl.deny.branches not enabled
814 acl: acl.deny.branches not enabled
815 acl: acl.allow enabled, 1 entries for user wilma
815 acl: acl.allow enabled, 1 entries for user wilma
816 acl: acl.deny enabled, 0 entries for user wilma
816 acl: acl.deny enabled, 0 entries for user wilma
817 acl: branch access granted: "ef1ea85a6374" on branch "default"
817 acl: branch access granted: "ef1ea85a6374" on branch "default"
818 acl: path access granted: "ef1ea85a6374"
818 acl: path access granted: "ef1ea85a6374"
819 acl: branch access granted: "f9cafe1212c8" on branch "default"
819 acl: branch access granted: "f9cafe1212c8" on branch "default"
820 acl: path access granted: "f9cafe1212c8"
820 acl: path access granted: "f9cafe1212c8"
821 acl: branch access granted: "911600dab2ae" on branch "default"
821 acl: branch access granted: "911600dab2ae" on branch "default"
822 error: pretxnchangegroup.acl hook failed: acl: user "wilma" not allowed on "quux/file.py" (changeset "911600dab2ae")
822 error: pretxnchangegroup.acl hook failed: acl: user "wilma" not allowed on "quux/file.py" (changeset "911600dab2ae")
823 transaction abort!
823 transaction abort!
824 rollback completed
824 rollback completed
825 abort: acl: user "wilma" not allowed on "quux/file.py" (changeset "911600dab2ae")
825 abort: acl: user "wilma" not allowed on "quux/file.py" (changeset "911600dab2ae")
826 no rollback information available
826 no rollback information available
827 0:6675d58eff77
827 0:6675d58eff77
828
828
829
829
830 file specified by acl.config does not exist
830 file specified by acl.config does not exist
831
831
832 $ echo '[acl]' >> $config
832 $ echo '[acl]' >> $config
833 $ echo 'config = ../acl.config' >> $config
833 $ echo 'config = ../acl.config' >> $config
834 $ do_push barney
834 $ do_push barney
835 Pushing as user barney
835 Pushing as user barney
836 hgrc = """
836 hgrc = """
837 [hooks]
837 [hooks]
838 pretxnchangegroup.acl = python:hgext.acl.hook
838 pretxnchangegroup.acl = python:hgext.acl.hook
839 [acl]
839 [acl]
840 sources = push
840 sources = push
841 [acl.allow]
841 [acl.allow]
842 foo/** = fred
842 foo/** = fred
843 [acl.deny]
843 [acl.deny]
844 foo/bar/** = fred
844 foo/bar/** = fred
845 foo/Bar/** = fred
845 foo/Bar/** = fred
846 [acl.allow]
846 [acl.allow]
847 ** = barney
847 ** = barney
848 **/*.txt = wilma
848 **/*.txt = wilma
849 [acl]
849 [acl]
850 config = ../acl.config
850 config = ../acl.config
851 """
851 """
852 pushing to ../b
852 pushing to ../b
853 query 1; heads
853 query 1; heads
854 searching for changes
854 searching for changes
855 all remote heads known locally
855 all remote heads known locally
856 listing keys for "bookmarks"
856 listing keys for "bookmarks"
857 3 changesets found
857 3 changesets found
858 list of changesets:
858 list of changesets:
859 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
859 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
860 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
860 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
861 911600dab2ae7a9baff75958b84fe606851ce955
861 911600dab2ae7a9baff75958b84fe606851ce955
862 adding changesets
862 adding changesets
863 bundling: 1/3 changesets (33.33%)
863 bundling: 1/3 changesets (33.33%)
864 bundling: 2/3 changesets (66.67%)
864 bundling: 2/3 changesets (66.67%)
865 bundling: 3/3 changesets (100.00%)
865 bundling: 3/3 changesets (100.00%)
866 bundling: 1/3 manifests (33.33%)
866 bundling: 1/3 manifests (33.33%)
867 bundling: 2/3 manifests (66.67%)
867 bundling: 2/3 manifests (66.67%)
868 bundling: 3/3 manifests (100.00%)
868 bundling: 3/3 manifests (100.00%)
869 bundling: foo/Bar/file.txt 1/3 files (33.33%)
869 bundling: foo/Bar/file.txt 1/3 files (33.33%)
870 bundling: foo/file.txt 2/3 files (66.67%)
870 bundling: foo/file.txt 2/3 files (66.67%)
871 bundling: quux/file.py 3/3 files (100.00%)
871 bundling: quux/file.py 3/3 files (100.00%)
872 changesets: 1 chunks
872 changesets: 1 chunks
873 add changeset ef1ea85a6374
873 add changeset ef1ea85a6374
874 changesets: 2 chunks
874 changesets: 2 chunks
875 add changeset f9cafe1212c8
875 add changeset f9cafe1212c8
876 changesets: 3 chunks
876 changesets: 3 chunks
877 add changeset 911600dab2ae
877 add changeset 911600dab2ae
878 adding manifests
878 adding manifests
879 manifests: 1/3 chunks (33.33%)
879 manifests: 1/3 chunks (33.33%)
880 manifests: 2/3 chunks (66.67%)
880 manifests: 2/3 chunks (66.67%)
881 manifests: 3/3 chunks (100.00%)
881 manifests: 3/3 chunks (100.00%)
882 adding file changes
882 adding file changes
883 adding foo/Bar/file.txt revisions
883 adding foo/Bar/file.txt revisions
884 files: 1/3 chunks (33.33%)
884 files: 1/3 chunks (33.33%)
885 adding foo/file.txt revisions
885 adding foo/file.txt revisions
886 files: 2/3 chunks (66.67%)
886 files: 2/3 chunks (66.67%)
887 adding quux/file.py revisions
887 adding quux/file.py revisions
888 files: 3/3 chunks (100.00%)
888 files: 3/3 chunks (100.00%)
889 added 3 changesets with 3 changes to 3 files
889 added 3 changesets with 3 changes to 3 files
890 calling hook pretxnchangegroup.acl: hgext.acl.hook
890 calling hook pretxnchangegroup.acl: hgext.acl.hook
891 acl: checking access for user "barney"
891 acl: checking access for user "barney"
892 error: pretxnchangegroup.acl hook raised an exception: [Errno *] *: '../acl.config' (glob)
892 error: pretxnchangegroup.acl hook raised an exception: [Errno *] *: '../acl.config' (glob)
893 transaction abort!
893 transaction abort!
894 rollback completed
894 rollback completed
895 abort: *: ../acl.config (glob)
895 abort: *: ../acl.config (glob)
896 no rollback information available
896 no rollback information available
897 0:6675d58eff77
897 0:6675d58eff77
898
898
899
899
900 betty is allowed inside foo/ by a acl.config file
900 betty is allowed inside foo/ by a acl.config file
901
901
902 $ echo '[acl.allow]' >> acl.config
902 $ echo '[acl.allow]' >> acl.config
903 $ echo 'foo/** = betty' >> acl.config
903 $ echo 'foo/** = betty' >> acl.config
904 $ do_push betty
904 $ do_push betty
905 Pushing as user betty
905 Pushing as user betty
906 hgrc = """
906 hgrc = """
907 [hooks]
907 [hooks]
908 pretxnchangegroup.acl = python:hgext.acl.hook
908 pretxnchangegroup.acl = python:hgext.acl.hook
909 [acl]
909 [acl]
910 sources = push
910 sources = push
911 [acl.allow]
911 [acl.allow]
912 foo/** = fred
912 foo/** = fred
913 [acl.deny]
913 [acl.deny]
914 foo/bar/** = fred
914 foo/bar/** = fred
915 foo/Bar/** = fred
915 foo/Bar/** = fred
916 [acl.allow]
916 [acl.allow]
917 ** = barney
917 ** = barney
918 **/*.txt = wilma
918 **/*.txt = wilma
919 [acl]
919 [acl]
920 config = ../acl.config
920 config = ../acl.config
921 """
921 """
922 acl.config = """
922 acl.config = """
923 [acl.allow]
923 [acl.allow]
924 foo/** = betty
924 foo/** = betty
925 """
925 """
926 pushing to ../b
926 pushing to ../b
927 query 1; heads
927 query 1; heads
928 searching for changes
928 searching for changes
929 all remote heads known locally
929 all remote heads known locally
930 listing keys for "bookmarks"
930 listing keys for "bookmarks"
931 3 changesets found
931 3 changesets found
932 list of changesets:
932 list of changesets:
933 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
933 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
934 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
934 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
935 911600dab2ae7a9baff75958b84fe606851ce955
935 911600dab2ae7a9baff75958b84fe606851ce955
936 adding changesets
936 adding changesets
937 bundling: 1/3 changesets (33.33%)
937 bundling: 1/3 changesets (33.33%)
938 bundling: 2/3 changesets (66.67%)
938 bundling: 2/3 changesets (66.67%)
939 bundling: 3/3 changesets (100.00%)
939 bundling: 3/3 changesets (100.00%)
940 bundling: 1/3 manifests (33.33%)
940 bundling: 1/3 manifests (33.33%)
941 bundling: 2/3 manifests (66.67%)
941 bundling: 2/3 manifests (66.67%)
942 bundling: 3/3 manifests (100.00%)
942 bundling: 3/3 manifests (100.00%)
943 bundling: foo/Bar/file.txt 1/3 files (33.33%)
943 bundling: foo/Bar/file.txt 1/3 files (33.33%)
944 bundling: foo/file.txt 2/3 files (66.67%)
944 bundling: foo/file.txt 2/3 files (66.67%)
945 bundling: quux/file.py 3/3 files (100.00%)
945 bundling: quux/file.py 3/3 files (100.00%)
946 changesets: 1 chunks
946 changesets: 1 chunks
947 add changeset ef1ea85a6374
947 add changeset ef1ea85a6374
948 changesets: 2 chunks
948 changesets: 2 chunks
949 add changeset f9cafe1212c8
949 add changeset f9cafe1212c8
950 changesets: 3 chunks
950 changesets: 3 chunks
951 add changeset 911600dab2ae
951 add changeset 911600dab2ae
952 adding manifests
952 adding manifests
953 manifests: 1/3 chunks (33.33%)
953 manifests: 1/3 chunks (33.33%)
954 manifests: 2/3 chunks (66.67%)
954 manifests: 2/3 chunks (66.67%)
955 manifests: 3/3 chunks (100.00%)
955 manifests: 3/3 chunks (100.00%)
956 adding file changes
956 adding file changes
957 adding foo/Bar/file.txt revisions
957 adding foo/Bar/file.txt revisions
958 files: 1/3 chunks (33.33%)
958 files: 1/3 chunks (33.33%)
959 adding foo/file.txt revisions
959 adding foo/file.txt revisions
960 files: 2/3 chunks (66.67%)
960 files: 2/3 chunks (66.67%)
961 adding quux/file.py revisions
961 adding quux/file.py revisions
962 files: 3/3 chunks (100.00%)
962 files: 3/3 chunks (100.00%)
963 added 3 changesets with 3 changes to 3 files
963 added 3 changesets with 3 changes to 3 files
964 calling hook pretxnchangegroup.acl: hgext.acl.hook
964 calling hook pretxnchangegroup.acl: hgext.acl.hook
965 acl: checking access for user "betty"
965 acl: checking access for user "betty"
966 acl: acl.allow.branches not enabled
966 acl: acl.allow.branches not enabled
967 acl: acl.deny.branches not enabled
967 acl: acl.deny.branches not enabled
968 acl: acl.allow enabled, 1 entries for user betty
968 acl: acl.allow enabled, 1 entries for user betty
969 acl: acl.deny enabled, 0 entries for user betty
969 acl: acl.deny enabled, 0 entries for user betty
970 acl: branch access granted: "ef1ea85a6374" on branch "default"
970 acl: branch access granted: "ef1ea85a6374" on branch "default"
971 acl: path access granted: "ef1ea85a6374"
971 acl: path access granted: "ef1ea85a6374"
972 acl: branch access granted: "f9cafe1212c8" on branch "default"
972 acl: branch access granted: "f9cafe1212c8" on branch "default"
973 acl: path access granted: "f9cafe1212c8"
973 acl: path access granted: "f9cafe1212c8"
974 acl: branch access granted: "911600dab2ae" on branch "default"
974 acl: branch access granted: "911600dab2ae" on branch "default"
975 error: pretxnchangegroup.acl hook failed: acl: user "betty" not allowed on "quux/file.py" (changeset "911600dab2ae")
975 error: pretxnchangegroup.acl hook failed: acl: user "betty" not allowed on "quux/file.py" (changeset "911600dab2ae")
976 transaction abort!
976 transaction abort!
977 rollback completed
977 rollback completed
978 abort: acl: user "betty" not allowed on "quux/file.py" (changeset "911600dab2ae")
978 abort: acl: user "betty" not allowed on "quux/file.py" (changeset "911600dab2ae")
979 no rollback information available
979 no rollback information available
980 0:6675d58eff77
980 0:6675d58eff77
981
981
982
982
983 acl.config can set only [acl.allow]/[acl.deny]
983 acl.config can set only [acl.allow]/[acl.deny]
984
984
985 $ echo '[hooks]' >> acl.config
985 $ echo '[hooks]' >> acl.config
986 $ echo 'changegroup.acl = false' >> acl.config
986 $ echo 'changegroup.acl = false' >> acl.config
987 $ do_push barney
987 $ do_push barney
988 Pushing as user barney
988 Pushing as user barney
989 hgrc = """
989 hgrc = """
990 [hooks]
990 [hooks]
991 pretxnchangegroup.acl = python:hgext.acl.hook
991 pretxnchangegroup.acl = python:hgext.acl.hook
992 [acl]
992 [acl]
993 sources = push
993 sources = push
994 [acl.allow]
994 [acl.allow]
995 foo/** = fred
995 foo/** = fred
996 [acl.deny]
996 [acl.deny]
997 foo/bar/** = fred
997 foo/bar/** = fred
998 foo/Bar/** = fred
998 foo/Bar/** = fred
999 [acl.allow]
999 [acl.allow]
1000 ** = barney
1000 ** = barney
1001 **/*.txt = wilma
1001 **/*.txt = wilma
1002 [acl]
1002 [acl]
1003 config = ../acl.config
1003 config = ../acl.config
1004 """
1004 """
1005 acl.config = """
1005 acl.config = """
1006 [acl.allow]
1006 [acl.allow]
1007 foo/** = betty
1007 foo/** = betty
1008 [hooks]
1008 [hooks]
1009 changegroup.acl = false
1009 changegroup.acl = false
1010 """
1010 """
1011 pushing to ../b
1011 pushing to ../b
1012 query 1; heads
1012 query 1; heads
1013 searching for changes
1013 searching for changes
1014 all remote heads known locally
1014 all remote heads known locally
1015 listing keys for "bookmarks"
1015 listing keys for "bookmarks"
1016 3 changesets found
1016 3 changesets found
1017 list of changesets:
1017 list of changesets:
1018 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
1018 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
1019 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
1019 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
1020 911600dab2ae7a9baff75958b84fe606851ce955
1020 911600dab2ae7a9baff75958b84fe606851ce955
1021 adding changesets
1021 adding changesets
1022 bundling: 1/3 changesets (33.33%)
1022 bundling: 1/3 changesets (33.33%)
1023 bundling: 2/3 changesets (66.67%)
1023 bundling: 2/3 changesets (66.67%)
1024 bundling: 3/3 changesets (100.00%)
1024 bundling: 3/3 changesets (100.00%)
1025 bundling: 1/3 manifests (33.33%)
1025 bundling: 1/3 manifests (33.33%)
1026 bundling: 2/3 manifests (66.67%)
1026 bundling: 2/3 manifests (66.67%)
1027 bundling: 3/3 manifests (100.00%)
1027 bundling: 3/3 manifests (100.00%)
1028 bundling: foo/Bar/file.txt 1/3 files (33.33%)
1028 bundling: foo/Bar/file.txt 1/3 files (33.33%)
1029 bundling: foo/file.txt 2/3 files (66.67%)
1029 bundling: foo/file.txt 2/3 files (66.67%)
1030 bundling: quux/file.py 3/3 files (100.00%)
1030 bundling: quux/file.py 3/3 files (100.00%)
1031 changesets: 1 chunks
1031 changesets: 1 chunks
1032 add changeset ef1ea85a6374
1032 add changeset ef1ea85a6374
1033 changesets: 2 chunks
1033 changesets: 2 chunks
1034 add changeset f9cafe1212c8
1034 add changeset f9cafe1212c8
1035 changesets: 3 chunks
1035 changesets: 3 chunks
1036 add changeset 911600dab2ae
1036 add changeset 911600dab2ae
1037 adding manifests
1037 adding manifests
1038 manifests: 1/3 chunks (33.33%)
1038 manifests: 1/3 chunks (33.33%)
1039 manifests: 2/3 chunks (66.67%)
1039 manifests: 2/3 chunks (66.67%)
1040 manifests: 3/3 chunks (100.00%)
1040 manifests: 3/3 chunks (100.00%)
1041 adding file changes
1041 adding file changes
1042 adding foo/Bar/file.txt revisions
1042 adding foo/Bar/file.txt revisions
1043 files: 1/3 chunks (33.33%)
1043 files: 1/3 chunks (33.33%)
1044 adding foo/file.txt revisions
1044 adding foo/file.txt revisions
1045 files: 2/3 chunks (66.67%)
1045 files: 2/3 chunks (66.67%)
1046 adding quux/file.py revisions
1046 adding quux/file.py revisions
1047 files: 3/3 chunks (100.00%)
1047 files: 3/3 chunks (100.00%)
1048 added 3 changesets with 3 changes to 3 files
1048 added 3 changesets with 3 changes to 3 files
1049 calling hook pretxnchangegroup.acl: hgext.acl.hook
1049 calling hook pretxnchangegroup.acl: hgext.acl.hook
1050 acl: checking access for user "barney"
1050 acl: checking access for user "barney"
1051 acl: acl.allow.branches not enabled
1051 acl: acl.allow.branches not enabled
1052 acl: acl.deny.branches not enabled
1052 acl: acl.deny.branches not enabled
1053 acl: acl.allow enabled, 1 entries for user barney
1053 acl: acl.allow enabled, 1 entries for user barney
1054 acl: acl.deny enabled, 0 entries for user barney
1054 acl: acl.deny enabled, 0 entries for user barney
1055 acl: branch access granted: "ef1ea85a6374" on branch "default"
1055 acl: branch access granted: "ef1ea85a6374" on branch "default"
1056 acl: path access granted: "ef1ea85a6374"
1056 acl: path access granted: "ef1ea85a6374"
1057 acl: branch access granted: "f9cafe1212c8" on branch "default"
1057 acl: branch access granted: "f9cafe1212c8" on branch "default"
1058 acl: path access granted: "f9cafe1212c8"
1058 acl: path access granted: "f9cafe1212c8"
1059 acl: branch access granted: "911600dab2ae" on branch "default"
1059 acl: branch access granted: "911600dab2ae" on branch "default"
1060 acl: path access granted: "911600dab2ae"
1060 acl: path access granted: "911600dab2ae"
1061 listing keys for "phases"
1061 listing keys for "phases"
1062 try to push obsolete markers to remote
1062 try to push obsolete markers to remote
1063 updating the branch cache
1063 updating the branch cache
1064 checking for updated bookmarks
1064 checking for updated bookmarks
1065 listing keys for "bookmarks"
1065 listing keys for "bookmarks"
1066 repository tip rolled back to revision 0 (undo push)
1066 repository tip rolled back to revision 0 (undo push)
1067 0:6675d58eff77
1067 0:6675d58eff77
1068
1068
1069
1069
1070 asterisk
1070 asterisk
1071
1071
1072 $ init_config
1072 $ init_config
1073
1073
1074 asterisk test
1074 asterisk test
1075
1075
1076 $ echo '[acl.allow]' >> $config
1076 $ echo '[acl.allow]' >> $config
1077 $ echo "** = fred" >> $config
1077 $ echo "** = fred" >> $config
1078
1078
1079 fred is always allowed
1079 fred is always allowed
1080
1080
1081 $ do_push fred
1081 $ do_push fred
1082 Pushing as user fred
1082 Pushing as user fred
1083 hgrc = """
1083 hgrc = """
1084 [acl]
1084 [acl]
1085 sources = push
1085 sources = push
1086 [extensions]
1086 [extensions]
1087 [acl.allow]
1087 [acl.allow]
1088 ** = fred
1088 ** = fred
1089 """
1089 """
1090 pushing to ../b
1090 pushing to ../b
1091 query 1; heads
1091 query 1; heads
1092 searching for changes
1092 searching for changes
1093 all remote heads known locally
1093 all remote heads known locally
1094 invalidating branch cache (tip differs)
1094 invalid branchheads cache: tip differs
1095 listing keys for "bookmarks"
1095 listing keys for "bookmarks"
1096 3 changesets found
1096 3 changesets found
1097 list of changesets:
1097 list of changesets:
1098 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
1098 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
1099 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
1099 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
1100 911600dab2ae7a9baff75958b84fe606851ce955
1100 911600dab2ae7a9baff75958b84fe606851ce955
1101 adding changesets
1101 adding changesets
1102 bundling: 1/3 changesets (33.33%)
1102 bundling: 1/3 changesets (33.33%)
1103 bundling: 2/3 changesets (66.67%)
1103 bundling: 2/3 changesets (66.67%)
1104 bundling: 3/3 changesets (100.00%)
1104 bundling: 3/3 changesets (100.00%)
1105 bundling: 1/3 manifests (33.33%)
1105 bundling: 1/3 manifests (33.33%)
1106 bundling: 2/3 manifests (66.67%)
1106 bundling: 2/3 manifests (66.67%)
1107 bundling: 3/3 manifests (100.00%)
1107 bundling: 3/3 manifests (100.00%)
1108 bundling: foo/Bar/file.txt 1/3 files (33.33%)
1108 bundling: foo/Bar/file.txt 1/3 files (33.33%)
1109 bundling: foo/file.txt 2/3 files (66.67%)
1109 bundling: foo/file.txt 2/3 files (66.67%)
1110 bundling: quux/file.py 3/3 files (100.00%)
1110 bundling: quux/file.py 3/3 files (100.00%)
1111 changesets: 1 chunks
1111 changesets: 1 chunks
1112 add changeset ef1ea85a6374
1112 add changeset ef1ea85a6374
1113 changesets: 2 chunks
1113 changesets: 2 chunks
1114 add changeset f9cafe1212c8
1114 add changeset f9cafe1212c8
1115 changesets: 3 chunks
1115 changesets: 3 chunks
1116 add changeset 911600dab2ae
1116 add changeset 911600dab2ae
1117 adding manifests
1117 adding manifests
1118 manifests: 1/3 chunks (33.33%)
1118 manifests: 1/3 chunks (33.33%)
1119 manifests: 2/3 chunks (66.67%)
1119 manifests: 2/3 chunks (66.67%)
1120 manifests: 3/3 chunks (100.00%)
1120 manifests: 3/3 chunks (100.00%)
1121 adding file changes
1121 adding file changes
1122 adding foo/Bar/file.txt revisions
1122 adding foo/Bar/file.txt revisions
1123 files: 1/3 chunks (33.33%)
1123 files: 1/3 chunks (33.33%)
1124 adding foo/file.txt revisions
1124 adding foo/file.txt revisions
1125 files: 2/3 chunks (66.67%)
1125 files: 2/3 chunks (66.67%)
1126 adding quux/file.py revisions
1126 adding quux/file.py revisions
1127 files: 3/3 chunks (100.00%)
1127 files: 3/3 chunks (100.00%)
1128 added 3 changesets with 3 changes to 3 files
1128 added 3 changesets with 3 changes to 3 files
1129 calling hook pretxnchangegroup.acl: hgext.acl.hook
1129 calling hook pretxnchangegroup.acl: hgext.acl.hook
1130 acl: checking access for user "fred"
1130 acl: checking access for user "fred"
1131 acl: acl.allow.branches not enabled
1131 acl: acl.allow.branches not enabled
1132 acl: acl.deny.branches not enabled
1132 acl: acl.deny.branches not enabled
1133 acl: acl.allow enabled, 1 entries for user fred
1133 acl: acl.allow enabled, 1 entries for user fred
1134 acl: acl.deny not enabled
1134 acl: acl.deny not enabled
1135 acl: branch access granted: "ef1ea85a6374" on branch "default"
1135 acl: branch access granted: "ef1ea85a6374" on branch "default"
1136 acl: path access granted: "ef1ea85a6374"
1136 acl: path access granted: "ef1ea85a6374"
1137 acl: branch access granted: "f9cafe1212c8" on branch "default"
1137 acl: branch access granted: "f9cafe1212c8" on branch "default"
1138 acl: path access granted: "f9cafe1212c8"
1138 acl: path access granted: "f9cafe1212c8"
1139 acl: branch access granted: "911600dab2ae" on branch "default"
1139 acl: branch access granted: "911600dab2ae" on branch "default"
1140 acl: path access granted: "911600dab2ae"
1140 acl: path access granted: "911600dab2ae"
1141 listing keys for "phases"
1141 listing keys for "phases"
1142 try to push obsolete markers to remote
1142 try to push obsolete markers to remote
1143 updating the branch cache
1143 updating the branch cache
1144 checking for updated bookmarks
1144 checking for updated bookmarks
1145 listing keys for "bookmarks"
1145 listing keys for "bookmarks"
1146 repository tip rolled back to revision 0 (undo push)
1146 repository tip rolled back to revision 0 (undo push)
1147 0:6675d58eff77
1147 0:6675d58eff77
1148
1148
1149
1149
1150 $ echo '[acl.deny]' >> $config
1150 $ echo '[acl.deny]' >> $config
1151 $ echo "foo/Bar/** = *" >> $config
1151 $ echo "foo/Bar/** = *" >> $config
1152
1152
1153 no one is allowed inside foo/Bar/
1153 no one is allowed inside foo/Bar/
1154
1154
1155 $ do_push fred
1155 $ do_push fred
1156 Pushing as user fred
1156 Pushing as user fred
1157 hgrc = """
1157 hgrc = """
1158 [acl]
1158 [acl]
1159 sources = push
1159 sources = push
1160 [extensions]
1160 [extensions]
1161 [acl.allow]
1161 [acl.allow]
1162 ** = fred
1162 ** = fred
1163 [acl.deny]
1163 [acl.deny]
1164 foo/Bar/** = *
1164 foo/Bar/** = *
1165 """
1165 """
1166 pushing to ../b
1166 pushing to ../b
1167 query 1; heads
1167 query 1; heads
1168 searching for changes
1168 searching for changes
1169 all remote heads known locally
1169 all remote heads known locally
1170 invalidating branch cache (tip differs)
1170 invalid branchheads cache: tip differs
1171 listing keys for "bookmarks"
1171 listing keys for "bookmarks"
1172 3 changesets found
1172 3 changesets found
1173 list of changesets:
1173 list of changesets:
1174 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
1174 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
1175 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
1175 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
1176 911600dab2ae7a9baff75958b84fe606851ce955
1176 911600dab2ae7a9baff75958b84fe606851ce955
1177 adding changesets
1177 adding changesets
1178 bundling: 1/3 changesets (33.33%)
1178 bundling: 1/3 changesets (33.33%)
1179 bundling: 2/3 changesets (66.67%)
1179 bundling: 2/3 changesets (66.67%)
1180 bundling: 3/3 changesets (100.00%)
1180 bundling: 3/3 changesets (100.00%)
1181 bundling: 1/3 manifests (33.33%)
1181 bundling: 1/3 manifests (33.33%)
1182 bundling: 2/3 manifests (66.67%)
1182 bundling: 2/3 manifests (66.67%)
1183 bundling: 3/3 manifests (100.00%)
1183 bundling: 3/3 manifests (100.00%)
1184 bundling: foo/Bar/file.txt 1/3 files (33.33%)
1184 bundling: foo/Bar/file.txt 1/3 files (33.33%)
1185 bundling: foo/file.txt 2/3 files (66.67%)
1185 bundling: foo/file.txt 2/3 files (66.67%)
1186 bundling: quux/file.py 3/3 files (100.00%)
1186 bundling: quux/file.py 3/3 files (100.00%)
1187 changesets: 1 chunks
1187 changesets: 1 chunks
1188 add changeset ef1ea85a6374
1188 add changeset ef1ea85a6374
1189 changesets: 2 chunks
1189 changesets: 2 chunks
1190 add changeset f9cafe1212c8
1190 add changeset f9cafe1212c8
1191 changesets: 3 chunks
1191 changesets: 3 chunks
1192 add changeset 911600dab2ae
1192 add changeset 911600dab2ae
1193 adding manifests
1193 adding manifests
1194 manifests: 1/3 chunks (33.33%)
1194 manifests: 1/3 chunks (33.33%)
1195 manifests: 2/3 chunks (66.67%)
1195 manifests: 2/3 chunks (66.67%)
1196 manifests: 3/3 chunks (100.00%)
1196 manifests: 3/3 chunks (100.00%)
1197 adding file changes
1197 adding file changes
1198 adding foo/Bar/file.txt revisions
1198 adding foo/Bar/file.txt revisions
1199 files: 1/3 chunks (33.33%)
1199 files: 1/3 chunks (33.33%)
1200 adding foo/file.txt revisions
1200 adding foo/file.txt revisions
1201 files: 2/3 chunks (66.67%)
1201 files: 2/3 chunks (66.67%)
1202 adding quux/file.py revisions
1202 adding quux/file.py revisions
1203 files: 3/3 chunks (100.00%)
1203 files: 3/3 chunks (100.00%)
1204 added 3 changesets with 3 changes to 3 files
1204 added 3 changesets with 3 changes to 3 files
1205 calling hook pretxnchangegroup.acl: hgext.acl.hook
1205 calling hook pretxnchangegroup.acl: hgext.acl.hook
1206 acl: checking access for user "fred"
1206 acl: checking access for user "fred"
1207 acl: acl.allow.branches not enabled
1207 acl: acl.allow.branches not enabled
1208 acl: acl.deny.branches not enabled
1208 acl: acl.deny.branches not enabled
1209 acl: acl.allow enabled, 1 entries for user fred
1209 acl: acl.allow enabled, 1 entries for user fred
1210 acl: acl.deny enabled, 1 entries for user fred
1210 acl: acl.deny enabled, 1 entries for user fred
1211 acl: branch access granted: "ef1ea85a6374" on branch "default"
1211 acl: branch access granted: "ef1ea85a6374" on branch "default"
1212 acl: path access granted: "ef1ea85a6374"
1212 acl: path access granted: "ef1ea85a6374"
1213 acl: branch access granted: "f9cafe1212c8" on branch "default"
1213 acl: branch access granted: "f9cafe1212c8" on branch "default"
1214 error: pretxnchangegroup.acl hook failed: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8")
1214 error: pretxnchangegroup.acl hook failed: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8")
1215 transaction abort!
1215 transaction abort!
1216 rollback completed
1216 rollback completed
1217 abort: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8")
1217 abort: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8")
1218 no rollback information available
1218 no rollback information available
1219 0:6675d58eff77
1219 0:6675d58eff77
1220
1220
1221
1221
1222 Groups
1222 Groups
1223
1223
1224 $ init_config
1224 $ init_config
1225
1225
1226 OS-level groups
1226 OS-level groups
1227
1227
1228 $ echo '[acl.allow]' >> $config
1228 $ echo '[acl.allow]' >> $config
1229 $ echo "** = @group1" >> $config
1229 $ echo "** = @group1" >> $config
1230
1230
1231 @group1 is always allowed
1231 @group1 is always allowed
1232
1232
1233 $ do_push fred
1233 $ do_push fred
1234 Pushing as user fred
1234 Pushing as user fred
1235 hgrc = """
1235 hgrc = """
1236 [acl]
1236 [acl]
1237 sources = push
1237 sources = push
1238 [extensions]
1238 [extensions]
1239 [acl.allow]
1239 [acl.allow]
1240 ** = @group1
1240 ** = @group1
1241 """
1241 """
1242 pushing to ../b
1242 pushing to ../b
1243 query 1; heads
1243 query 1; heads
1244 searching for changes
1244 searching for changes
1245 all remote heads known locally
1245 all remote heads known locally
1246 listing keys for "bookmarks"
1246 listing keys for "bookmarks"
1247 3 changesets found
1247 3 changesets found
1248 list of changesets:
1248 list of changesets:
1249 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
1249 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
1250 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
1250 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
1251 911600dab2ae7a9baff75958b84fe606851ce955
1251 911600dab2ae7a9baff75958b84fe606851ce955
1252 adding changesets
1252 adding changesets
1253 bundling: 1/3 changesets (33.33%)
1253 bundling: 1/3 changesets (33.33%)
1254 bundling: 2/3 changesets (66.67%)
1254 bundling: 2/3 changesets (66.67%)
1255 bundling: 3/3 changesets (100.00%)
1255 bundling: 3/3 changesets (100.00%)
1256 bundling: 1/3 manifests (33.33%)
1256 bundling: 1/3 manifests (33.33%)
1257 bundling: 2/3 manifests (66.67%)
1257 bundling: 2/3 manifests (66.67%)
1258 bundling: 3/3 manifests (100.00%)
1258 bundling: 3/3 manifests (100.00%)
1259 bundling: foo/Bar/file.txt 1/3 files (33.33%)
1259 bundling: foo/Bar/file.txt 1/3 files (33.33%)
1260 bundling: foo/file.txt 2/3 files (66.67%)
1260 bundling: foo/file.txt 2/3 files (66.67%)
1261 bundling: quux/file.py 3/3 files (100.00%)
1261 bundling: quux/file.py 3/3 files (100.00%)
1262 changesets: 1 chunks
1262 changesets: 1 chunks
1263 add changeset ef1ea85a6374
1263 add changeset ef1ea85a6374
1264 changesets: 2 chunks
1264 changesets: 2 chunks
1265 add changeset f9cafe1212c8
1265 add changeset f9cafe1212c8
1266 changesets: 3 chunks
1266 changesets: 3 chunks
1267 add changeset 911600dab2ae
1267 add changeset 911600dab2ae
1268 adding manifests
1268 adding manifests
1269 manifests: 1/3 chunks (33.33%)
1269 manifests: 1/3 chunks (33.33%)
1270 manifests: 2/3 chunks (66.67%)
1270 manifests: 2/3 chunks (66.67%)
1271 manifests: 3/3 chunks (100.00%)
1271 manifests: 3/3 chunks (100.00%)
1272 adding file changes
1272 adding file changes
1273 adding foo/Bar/file.txt revisions
1273 adding foo/Bar/file.txt revisions
1274 files: 1/3 chunks (33.33%)
1274 files: 1/3 chunks (33.33%)
1275 adding foo/file.txt revisions
1275 adding foo/file.txt revisions
1276 files: 2/3 chunks (66.67%)
1276 files: 2/3 chunks (66.67%)
1277 adding quux/file.py revisions
1277 adding quux/file.py revisions
1278 files: 3/3 chunks (100.00%)
1278 files: 3/3 chunks (100.00%)
1279 added 3 changesets with 3 changes to 3 files
1279 added 3 changesets with 3 changes to 3 files
1280 calling hook pretxnchangegroup.acl: hgext.acl.hook
1280 calling hook pretxnchangegroup.acl: hgext.acl.hook
1281 acl: checking access for user "fred"
1281 acl: checking access for user "fred"
1282 acl: acl.allow.branches not enabled
1282 acl: acl.allow.branches not enabled
1283 acl: acl.deny.branches not enabled
1283 acl: acl.deny.branches not enabled
1284 acl: "group1" not defined in [acl.groups]
1284 acl: "group1" not defined in [acl.groups]
1285 acl: acl.allow enabled, 1 entries for user fred
1285 acl: acl.allow enabled, 1 entries for user fred
1286 acl: acl.deny not enabled
1286 acl: acl.deny not enabled
1287 acl: branch access granted: "ef1ea85a6374" on branch "default"
1287 acl: branch access granted: "ef1ea85a6374" on branch "default"
1288 acl: path access granted: "ef1ea85a6374"
1288 acl: path access granted: "ef1ea85a6374"
1289 acl: branch access granted: "f9cafe1212c8" on branch "default"
1289 acl: branch access granted: "f9cafe1212c8" on branch "default"
1290 acl: path access granted: "f9cafe1212c8"
1290 acl: path access granted: "f9cafe1212c8"
1291 acl: branch access granted: "911600dab2ae" on branch "default"
1291 acl: branch access granted: "911600dab2ae" on branch "default"
1292 acl: path access granted: "911600dab2ae"
1292 acl: path access granted: "911600dab2ae"
1293 listing keys for "phases"
1293 listing keys for "phases"
1294 try to push obsolete markers to remote
1294 try to push obsolete markers to remote
1295 updating the branch cache
1295 updating the branch cache
1296 checking for updated bookmarks
1296 checking for updated bookmarks
1297 listing keys for "bookmarks"
1297 listing keys for "bookmarks"
1298 repository tip rolled back to revision 0 (undo push)
1298 repository tip rolled back to revision 0 (undo push)
1299 0:6675d58eff77
1299 0:6675d58eff77
1300
1300
1301
1301
1302 $ echo '[acl.deny]' >> $config
1302 $ echo '[acl.deny]' >> $config
1303 $ echo "foo/Bar/** = @group1" >> $config
1303 $ echo "foo/Bar/** = @group1" >> $config
1304
1304
1305 @group is allowed inside anything but foo/Bar/
1305 @group is allowed inside anything but foo/Bar/
1306
1306
1307 $ do_push fred
1307 $ do_push fred
1308 Pushing as user fred
1308 Pushing as user fred
1309 hgrc = """
1309 hgrc = """
1310 [acl]
1310 [acl]
1311 sources = push
1311 sources = push
1312 [extensions]
1312 [extensions]
1313 [acl.allow]
1313 [acl.allow]
1314 ** = @group1
1314 ** = @group1
1315 [acl.deny]
1315 [acl.deny]
1316 foo/Bar/** = @group1
1316 foo/Bar/** = @group1
1317 """
1317 """
1318 pushing to ../b
1318 pushing to ../b
1319 query 1; heads
1319 query 1; heads
1320 searching for changes
1320 searching for changes
1321 all remote heads known locally
1321 all remote heads known locally
1322 invalidating branch cache (tip differs)
1322 invalid branchheads cache: tip differs
1323 listing keys for "bookmarks"
1323 listing keys for "bookmarks"
1324 3 changesets found
1324 3 changesets found
1325 list of changesets:
1325 list of changesets:
1326 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
1326 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
1327 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
1327 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
1328 911600dab2ae7a9baff75958b84fe606851ce955
1328 911600dab2ae7a9baff75958b84fe606851ce955
1329 adding changesets
1329 adding changesets
1330 bundling: 1/3 changesets (33.33%)
1330 bundling: 1/3 changesets (33.33%)
1331 bundling: 2/3 changesets (66.67%)
1331 bundling: 2/3 changesets (66.67%)
1332 bundling: 3/3 changesets (100.00%)
1332 bundling: 3/3 changesets (100.00%)
1333 bundling: 1/3 manifests (33.33%)
1333 bundling: 1/3 manifests (33.33%)
1334 bundling: 2/3 manifests (66.67%)
1334 bundling: 2/3 manifests (66.67%)
1335 bundling: 3/3 manifests (100.00%)
1335 bundling: 3/3 manifests (100.00%)
1336 bundling: foo/Bar/file.txt 1/3 files (33.33%)
1336 bundling: foo/Bar/file.txt 1/3 files (33.33%)
1337 bundling: foo/file.txt 2/3 files (66.67%)
1337 bundling: foo/file.txt 2/3 files (66.67%)
1338 bundling: quux/file.py 3/3 files (100.00%)
1338 bundling: quux/file.py 3/3 files (100.00%)
1339 changesets: 1 chunks
1339 changesets: 1 chunks
1340 add changeset ef1ea85a6374
1340 add changeset ef1ea85a6374
1341 changesets: 2 chunks
1341 changesets: 2 chunks
1342 add changeset f9cafe1212c8
1342 add changeset f9cafe1212c8
1343 changesets: 3 chunks
1343 changesets: 3 chunks
1344 add changeset 911600dab2ae
1344 add changeset 911600dab2ae
1345 adding manifests
1345 adding manifests
1346 manifests: 1/3 chunks (33.33%)
1346 manifests: 1/3 chunks (33.33%)
1347 manifests: 2/3 chunks (66.67%)
1347 manifests: 2/3 chunks (66.67%)
1348 manifests: 3/3 chunks (100.00%)
1348 manifests: 3/3 chunks (100.00%)
1349 adding file changes
1349 adding file changes
1350 adding foo/Bar/file.txt revisions
1350 adding foo/Bar/file.txt revisions
1351 files: 1/3 chunks (33.33%)
1351 files: 1/3 chunks (33.33%)
1352 adding foo/file.txt revisions
1352 adding foo/file.txt revisions
1353 files: 2/3 chunks (66.67%)
1353 files: 2/3 chunks (66.67%)
1354 adding quux/file.py revisions
1354 adding quux/file.py revisions
1355 files: 3/3 chunks (100.00%)
1355 files: 3/3 chunks (100.00%)
1356 added 3 changesets with 3 changes to 3 files
1356 added 3 changesets with 3 changes to 3 files
1357 calling hook pretxnchangegroup.acl: hgext.acl.hook
1357 calling hook pretxnchangegroup.acl: hgext.acl.hook
1358 acl: checking access for user "fred"
1358 acl: checking access for user "fred"
1359 acl: acl.allow.branches not enabled
1359 acl: acl.allow.branches not enabled
1360 acl: acl.deny.branches not enabled
1360 acl: acl.deny.branches not enabled
1361 acl: "group1" not defined in [acl.groups]
1361 acl: "group1" not defined in [acl.groups]
1362 acl: acl.allow enabled, 1 entries for user fred
1362 acl: acl.allow enabled, 1 entries for user fred
1363 acl: "group1" not defined in [acl.groups]
1363 acl: "group1" not defined in [acl.groups]
1364 acl: acl.deny enabled, 1 entries for user fred
1364 acl: acl.deny enabled, 1 entries for user fred
1365 acl: branch access granted: "ef1ea85a6374" on branch "default"
1365 acl: branch access granted: "ef1ea85a6374" on branch "default"
1366 acl: path access granted: "ef1ea85a6374"
1366 acl: path access granted: "ef1ea85a6374"
1367 acl: branch access granted: "f9cafe1212c8" on branch "default"
1367 acl: branch access granted: "f9cafe1212c8" on branch "default"
1368 error: pretxnchangegroup.acl hook failed: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8")
1368 error: pretxnchangegroup.acl hook failed: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8")
1369 transaction abort!
1369 transaction abort!
1370 rollback completed
1370 rollback completed
1371 abort: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8")
1371 abort: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8")
1372 no rollback information available
1372 no rollback information available
1373 0:6675d58eff77
1373 0:6675d58eff77
1374
1374
1375
1375
1376 Invalid group
1376 Invalid group
1377
1377
1378 Disable the fakegroups trick to get real failures
1378 Disable the fakegroups trick to get real failures
1379
1379
1380 $ grep -v fakegroups $config > config.tmp
1380 $ grep -v fakegroups $config > config.tmp
1381 $ mv config.tmp $config
1381 $ mv config.tmp $config
1382 $ echo '[acl.allow]' >> $config
1382 $ echo '[acl.allow]' >> $config
1383 $ echo "** = @unlikelytoexist" >> $config
1383 $ echo "** = @unlikelytoexist" >> $config
1384 $ do_push fred 2>&1 | grep unlikelytoexist
1384 $ do_push fred 2>&1 | grep unlikelytoexist
1385 ** = @unlikelytoexist
1385 ** = @unlikelytoexist
1386 acl: "unlikelytoexist" not defined in [acl.groups]
1386 acl: "unlikelytoexist" not defined in [acl.groups]
1387 error: pretxnchangegroup.acl hook failed: group 'unlikelytoexist' is undefined
1387 error: pretxnchangegroup.acl hook failed: group 'unlikelytoexist' is undefined
1388 abort: group 'unlikelytoexist' is undefined
1388 abort: group 'unlikelytoexist' is undefined
1389
1389
1390
1390
1391 Branch acl tests setup
1391 Branch acl tests setup
1392
1392
1393 $ init_config
1393 $ init_config
1394 $ cd b
1394 $ cd b
1395 $ hg up
1395 $ hg up
1396 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1396 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1397 $ hg branch foobar
1397 $ hg branch foobar
1398 marked working directory as branch foobar
1398 marked working directory as branch foobar
1399 (branches are permanent and global, did you want a bookmark?)
1399 (branches are permanent and global, did you want a bookmark?)
1400 $ hg commit -m 'create foobar'
1400 $ hg commit -m 'create foobar'
1401 $ echo 'foo contents' > abc.txt
1401 $ echo 'foo contents' > abc.txt
1402 $ hg add abc.txt
1402 $ hg add abc.txt
1403 $ hg commit -m 'foobar contents'
1403 $ hg commit -m 'foobar contents'
1404 $ cd ..
1404 $ cd ..
1405 $ hg --cwd a pull ../b
1405 $ hg --cwd a pull ../b
1406 pulling from ../b
1406 pulling from ../b
1407 searching for changes
1407 searching for changes
1408 adding changesets
1408 adding changesets
1409 adding manifests
1409 adding manifests
1410 adding file changes
1410 adding file changes
1411 added 2 changesets with 1 changes to 1 files (+1 heads)
1411 added 2 changesets with 1 changes to 1 files (+1 heads)
1412 (run 'hg heads' to see heads)
1412 (run 'hg heads' to see heads)
1413
1413
1414 Create additional changeset on foobar branch
1414 Create additional changeset on foobar branch
1415
1415
1416 $ cd a
1416 $ cd a
1417 $ hg up -C foobar
1417 $ hg up -C foobar
1418 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
1418 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
1419 $ echo 'foo contents2' > abc.txt
1419 $ echo 'foo contents2' > abc.txt
1420 $ hg commit -m 'foobar contents2'
1420 $ hg commit -m 'foobar contents2'
1421 $ cd ..
1421 $ cd ..
1422
1422
1423
1423
1424 No branch acls specified
1424 No branch acls specified
1425
1425
1426 $ do_push astro
1426 $ do_push astro
1427 Pushing as user astro
1427 Pushing as user astro
1428 hgrc = """
1428 hgrc = """
1429 [acl]
1429 [acl]
1430 sources = push
1430 sources = push
1431 [extensions]
1431 [extensions]
1432 """
1432 """
1433 pushing to ../b
1433 pushing to ../b
1434 query 1; heads
1434 query 1; heads
1435 searching for changes
1435 searching for changes
1436 all remote heads known locally
1436 all remote heads known locally
1437 listing keys for "bookmarks"
1437 listing keys for "bookmarks"
1438 4 changesets found
1438 4 changesets found
1439 list of changesets:
1439 list of changesets:
1440 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
1440 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
1441 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
1441 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
1442 911600dab2ae7a9baff75958b84fe606851ce955
1442 911600dab2ae7a9baff75958b84fe606851ce955
1443 e8fc755d4d8217ee5b0c2bb41558c40d43b92c01
1443 e8fc755d4d8217ee5b0c2bb41558c40d43b92c01
1444 adding changesets
1444 adding changesets
1445 bundling: 1/4 changesets (25.00%)
1445 bundling: 1/4 changesets (25.00%)
1446 bundling: 2/4 changesets (50.00%)
1446 bundling: 2/4 changesets (50.00%)
1447 bundling: 3/4 changesets (75.00%)
1447 bundling: 3/4 changesets (75.00%)
1448 bundling: 4/4 changesets (100.00%)
1448 bundling: 4/4 changesets (100.00%)
1449 bundling: 1/4 manifests (25.00%)
1449 bundling: 1/4 manifests (25.00%)
1450 bundling: 2/4 manifests (50.00%)
1450 bundling: 2/4 manifests (50.00%)
1451 bundling: 3/4 manifests (75.00%)
1451 bundling: 3/4 manifests (75.00%)
1452 bundling: 4/4 manifests (100.00%)
1452 bundling: 4/4 manifests (100.00%)
1453 bundling: abc.txt 1/4 files (25.00%)
1453 bundling: abc.txt 1/4 files (25.00%)
1454 bundling: foo/Bar/file.txt 2/4 files (50.00%)
1454 bundling: foo/Bar/file.txt 2/4 files (50.00%)
1455 bundling: foo/file.txt 3/4 files (75.00%)
1455 bundling: foo/file.txt 3/4 files (75.00%)
1456 bundling: quux/file.py 4/4 files (100.00%)
1456 bundling: quux/file.py 4/4 files (100.00%)
1457 changesets: 1 chunks
1457 changesets: 1 chunks
1458 add changeset ef1ea85a6374
1458 add changeset ef1ea85a6374
1459 changesets: 2 chunks
1459 changesets: 2 chunks
1460 add changeset f9cafe1212c8
1460 add changeset f9cafe1212c8
1461 changesets: 3 chunks
1461 changesets: 3 chunks
1462 add changeset 911600dab2ae
1462 add changeset 911600dab2ae
1463 changesets: 4 chunks
1463 changesets: 4 chunks
1464 add changeset e8fc755d4d82
1464 add changeset e8fc755d4d82
1465 adding manifests
1465 adding manifests
1466 manifests: 1/4 chunks (25.00%)
1466 manifests: 1/4 chunks (25.00%)
1467 manifests: 2/4 chunks (50.00%)
1467 manifests: 2/4 chunks (50.00%)
1468 manifests: 3/4 chunks (75.00%)
1468 manifests: 3/4 chunks (75.00%)
1469 manifests: 4/4 chunks (100.00%)
1469 manifests: 4/4 chunks (100.00%)
1470 adding file changes
1470 adding file changes
1471 adding abc.txt revisions
1471 adding abc.txt revisions
1472 files: 1/4 chunks (25.00%)
1472 files: 1/4 chunks (25.00%)
1473 adding foo/Bar/file.txt revisions
1473 adding foo/Bar/file.txt revisions
1474 files: 2/4 chunks (50.00%)
1474 files: 2/4 chunks (50.00%)
1475 adding foo/file.txt revisions
1475 adding foo/file.txt revisions
1476 files: 3/4 chunks (75.00%)
1476 files: 3/4 chunks (75.00%)
1477 adding quux/file.py revisions
1477 adding quux/file.py revisions
1478 files: 4/4 chunks (100.00%)
1478 files: 4/4 chunks (100.00%)
1479 added 4 changesets with 4 changes to 4 files (+1 heads)
1479 added 4 changesets with 4 changes to 4 files (+1 heads)
1480 calling hook pretxnchangegroup.acl: hgext.acl.hook
1480 calling hook pretxnchangegroup.acl: hgext.acl.hook
1481 acl: checking access for user "astro"
1481 acl: checking access for user "astro"
1482 acl: acl.allow.branches not enabled
1482 acl: acl.allow.branches not enabled
1483 acl: acl.deny.branches not enabled
1483 acl: acl.deny.branches not enabled
1484 acl: acl.allow not enabled
1484 acl: acl.allow not enabled
1485 acl: acl.deny not enabled
1485 acl: acl.deny not enabled
1486 acl: branch access granted: "ef1ea85a6374" on branch "default"
1486 acl: branch access granted: "ef1ea85a6374" on branch "default"
1487 acl: path access granted: "ef1ea85a6374"
1487 acl: path access granted: "ef1ea85a6374"
1488 acl: branch access granted: "f9cafe1212c8" on branch "default"
1488 acl: branch access granted: "f9cafe1212c8" on branch "default"
1489 acl: path access granted: "f9cafe1212c8"
1489 acl: path access granted: "f9cafe1212c8"
1490 acl: branch access granted: "911600dab2ae" on branch "default"
1490 acl: branch access granted: "911600dab2ae" on branch "default"
1491 acl: path access granted: "911600dab2ae"
1491 acl: path access granted: "911600dab2ae"
1492 acl: branch access granted: "e8fc755d4d82" on branch "foobar"
1492 acl: branch access granted: "e8fc755d4d82" on branch "foobar"
1493 acl: path access granted: "e8fc755d4d82"
1493 acl: path access granted: "e8fc755d4d82"
1494 listing keys for "phases"
1494 listing keys for "phases"
1495 try to push obsolete markers to remote
1495 try to push obsolete markers to remote
1496 updating the branch cache
1496 updating the branch cache
1497 checking for updated bookmarks
1497 checking for updated bookmarks
1498 listing keys for "bookmarks"
1498 listing keys for "bookmarks"
1499 repository tip rolled back to revision 2 (undo push)
1499 repository tip rolled back to revision 2 (undo push)
1500 2:fb35475503ef
1500 2:fb35475503ef
1501
1501
1502
1502
1503 Branch acl deny test
1503 Branch acl deny test
1504
1504
1505 $ echo "[acl.deny.branches]" >> $config
1505 $ echo "[acl.deny.branches]" >> $config
1506 $ echo "foobar = *" >> $config
1506 $ echo "foobar = *" >> $config
1507 $ do_push astro
1507 $ do_push astro
1508 Pushing as user astro
1508 Pushing as user astro
1509 hgrc = """
1509 hgrc = """
1510 [acl]
1510 [acl]
1511 sources = push
1511 sources = push
1512 [extensions]
1512 [extensions]
1513 [acl.deny.branches]
1513 [acl.deny.branches]
1514 foobar = *
1514 foobar = *
1515 """
1515 """
1516 pushing to ../b
1516 pushing to ../b
1517 query 1; heads
1517 query 1; heads
1518 searching for changes
1518 searching for changes
1519 all remote heads known locally
1519 all remote heads known locally
1520 invalidating branch cache (tip differs)
1520 invalid branchheads cache: tip differs
1521 listing keys for "bookmarks"
1521 listing keys for "bookmarks"
1522 4 changesets found
1522 4 changesets found
1523 list of changesets:
1523 list of changesets:
1524 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
1524 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
1525 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
1525 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
1526 911600dab2ae7a9baff75958b84fe606851ce955
1526 911600dab2ae7a9baff75958b84fe606851ce955
1527 e8fc755d4d8217ee5b0c2bb41558c40d43b92c01
1527 e8fc755d4d8217ee5b0c2bb41558c40d43b92c01
1528 adding changesets
1528 adding changesets
1529 bundling: 1/4 changesets (25.00%)
1529 bundling: 1/4 changesets (25.00%)
1530 bundling: 2/4 changesets (50.00%)
1530 bundling: 2/4 changesets (50.00%)
1531 bundling: 3/4 changesets (75.00%)
1531 bundling: 3/4 changesets (75.00%)
1532 bundling: 4/4 changesets (100.00%)
1532 bundling: 4/4 changesets (100.00%)
1533 bundling: 1/4 manifests (25.00%)
1533 bundling: 1/4 manifests (25.00%)
1534 bundling: 2/4 manifests (50.00%)
1534 bundling: 2/4 manifests (50.00%)
1535 bundling: 3/4 manifests (75.00%)
1535 bundling: 3/4 manifests (75.00%)
1536 bundling: 4/4 manifests (100.00%)
1536 bundling: 4/4 manifests (100.00%)
1537 bundling: abc.txt 1/4 files (25.00%)
1537 bundling: abc.txt 1/4 files (25.00%)
1538 bundling: foo/Bar/file.txt 2/4 files (50.00%)
1538 bundling: foo/Bar/file.txt 2/4 files (50.00%)
1539 bundling: foo/file.txt 3/4 files (75.00%)
1539 bundling: foo/file.txt 3/4 files (75.00%)
1540 bundling: quux/file.py 4/4 files (100.00%)
1540 bundling: quux/file.py 4/4 files (100.00%)
1541 changesets: 1 chunks
1541 changesets: 1 chunks
1542 add changeset ef1ea85a6374
1542 add changeset ef1ea85a6374
1543 changesets: 2 chunks
1543 changesets: 2 chunks
1544 add changeset f9cafe1212c8
1544 add changeset f9cafe1212c8
1545 changesets: 3 chunks
1545 changesets: 3 chunks
1546 add changeset 911600dab2ae
1546 add changeset 911600dab2ae
1547 changesets: 4 chunks
1547 changesets: 4 chunks
1548 add changeset e8fc755d4d82
1548 add changeset e8fc755d4d82
1549 adding manifests
1549 adding manifests
1550 manifests: 1/4 chunks (25.00%)
1550 manifests: 1/4 chunks (25.00%)
1551 manifests: 2/4 chunks (50.00%)
1551 manifests: 2/4 chunks (50.00%)
1552 manifests: 3/4 chunks (75.00%)
1552 manifests: 3/4 chunks (75.00%)
1553 manifests: 4/4 chunks (100.00%)
1553 manifests: 4/4 chunks (100.00%)
1554 adding file changes
1554 adding file changes
1555 adding abc.txt revisions
1555 adding abc.txt revisions
1556 files: 1/4 chunks (25.00%)
1556 files: 1/4 chunks (25.00%)
1557 adding foo/Bar/file.txt revisions
1557 adding foo/Bar/file.txt revisions
1558 files: 2/4 chunks (50.00%)
1558 files: 2/4 chunks (50.00%)
1559 adding foo/file.txt revisions
1559 adding foo/file.txt revisions
1560 files: 3/4 chunks (75.00%)
1560 files: 3/4 chunks (75.00%)
1561 adding quux/file.py revisions
1561 adding quux/file.py revisions
1562 files: 4/4 chunks (100.00%)
1562 files: 4/4 chunks (100.00%)
1563 added 4 changesets with 4 changes to 4 files (+1 heads)
1563 added 4 changesets with 4 changes to 4 files (+1 heads)
1564 calling hook pretxnchangegroup.acl: hgext.acl.hook
1564 calling hook pretxnchangegroup.acl: hgext.acl.hook
1565 acl: checking access for user "astro"
1565 acl: checking access for user "astro"
1566 acl: acl.allow.branches not enabled
1566 acl: acl.allow.branches not enabled
1567 acl: acl.deny.branches enabled, 1 entries for user astro
1567 acl: acl.deny.branches enabled, 1 entries for user astro
1568 acl: acl.allow not enabled
1568 acl: acl.allow not enabled
1569 acl: acl.deny not enabled
1569 acl: acl.deny not enabled
1570 acl: branch access granted: "ef1ea85a6374" on branch "default"
1570 acl: branch access granted: "ef1ea85a6374" on branch "default"
1571 acl: path access granted: "ef1ea85a6374"
1571 acl: path access granted: "ef1ea85a6374"
1572 acl: branch access granted: "f9cafe1212c8" on branch "default"
1572 acl: branch access granted: "f9cafe1212c8" on branch "default"
1573 acl: path access granted: "f9cafe1212c8"
1573 acl: path access granted: "f9cafe1212c8"
1574 acl: branch access granted: "911600dab2ae" on branch "default"
1574 acl: branch access granted: "911600dab2ae" on branch "default"
1575 acl: path access granted: "911600dab2ae"
1575 acl: path access granted: "911600dab2ae"
1576 error: pretxnchangegroup.acl hook failed: acl: user "astro" denied on branch "foobar" (changeset "e8fc755d4d82")
1576 error: pretxnchangegroup.acl hook failed: acl: user "astro" denied on branch "foobar" (changeset "e8fc755d4d82")
1577 transaction abort!
1577 transaction abort!
1578 rollback completed
1578 rollback completed
1579 abort: acl: user "astro" denied on branch "foobar" (changeset "e8fc755d4d82")
1579 abort: acl: user "astro" denied on branch "foobar" (changeset "e8fc755d4d82")
1580 no rollback information available
1580 no rollback information available
1581 2:fb35475503ef
1581 2:fb35475503ef
1582
1582
1583
1583
1584 Branch acl empty allow test
1584 Branch acl empty allow test
1585
1585
1586 $ init_config
1586 $ init_config
1587 $ echo "[acl.allow.branches]" >> $config
1587 $ echo "[acl.allow.branches]" >> $config
1588 $ do_push astro
1588 $ do_push astro
1589 Pushing as user astro
1589 Pushing as user astro
1590 hgrc = """
1590 hgrc = """
1591 [acl]
1591 [acl]
1592 sources = push
1592 sources = push
1593 [extensions]
1593 [extensions]
1594 [acl.allow.branches]
1594 [acl.allow.branches]
1595 """
1595 """
1596 pushing to ../b
1596 pushing to ../b
1597 query 1; heads
1597 query 1; heads
1598 searching for changes
1598 searching for changes
1599 all remote heads known locally
1599 all remote heads known locally
1600 listing keys for "bookmarks"
1600 listing keys for "bookmarks"
1601 4 changesets found
1601 4 changesets found
1602 list of changesets:
1602 list of changesets:
1603 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
1603 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
1604 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
1604 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
1605 911600dab2ae7a9baff75958b84fe606851ce955
1605 911600dab2ae7a9baff75958b84fe606851ce955
1606 e8fc755d4d8217ee5b0c2bb41558c40d43b92c01
1606 e8fc755d4d8217ee5b0c2bb41558c40d43b92c01
1607 adding changesets
1607 adding changesets
1608 bundling: 1/4 changesets (25.00%)
1608 bundling: 1/4 changesets (25.00%)
1609 bundling: 2/4 changesets (50.00%)
1609 bundling: 2/4 changesets (50.00%)
1610 bundling: 3/4 changesets (75.00%)
1610 bundling: 3/4 changesets (75.00%)
1611 bundling: 4/4 changesets (100.00%)
1611 bundling: 4/4 changesets (100.00%)
1612 bundling: 1/4 manifests (25.00%)
1612 bundling: 1/4 manifests (25.00%)
1613 bundling: 2/4 manifests (50.00%)
1613 bundling: 2/4 manifests (50.00%)
1614 bundling: 3/4 manifests (75.00%)
1614 bundling: 3/4 manifests (75.00%)
1615 bundling: 4/4 manifests (100.00%)
1615 bundling: 4/4 manifests (100.00%)
1616 bundling: abc.txt 1/4 files (25.00%)
1616 bundling: abc.txt 1/4 files (25.00%)
1617 bundling: foo/Bar/file.txt 2/4 files (50.00%)
1617 bundling: foo/Bar/file.txt 2/4 files (50.00%)
1618 bundling: foo/file.txt 3/4 files (75.00%)
1618 bundling: foo/file.txt 3/4 files (75.00%)
1619 bundling: quux/file.py 4/4 files (100.00%)
1619 bundling: quux/file.py 4/4 files (100.00%)
1620 changesets: 1 chunks
1620 changesets: 1 chunks
1621 add changeset ef1ea85a6374
1621 add changeset ef1ea85a6374
1622 changesets: 2 chunks
1622 changesets: 2 chunks
1623 add changeset f9cafe1212c8
1623 add changeset f9cafe1212c8
1624 changesets: 3 chunks
1624 changesets: 3 chunks
1625 add changeset 911600dab2ae
1625 add changeset 911600dab2ae
1626 changesets: 4 chunks
1626 changesets: 4 chunks
1627 add changeset e8fc755d4d82
1627 add changeset e8fc755d4d82
1628 adding manifests
1628 adding manifests
1629 manifests: 1/4 chunks (25.00%)
1629 manifests: 1/4 chunks (25.00%)
1630 manifests: 2/4 chunks (50.00%)
1630 manifests: 2/4 chunks (50.00%)
1631 manifests: 3/4 chunks (75.00%)
1631 manifests: 3/4 chunks (75.00%)
1632 manifests: 4/4 chunks (100.00%)
1632 manifests: 4/4 chunks (100.00%)
1633 adding file changes
1633 adding file changes
1634 adding abc.txt revisions
1634 adding abc.txt revisions
1635 files: 1/4 chunks (25.00%)
1635 files: 1/4 chunks (25.00%)
1636 adding foo/Bar/file.txt revisions
1636 adding foo/Bar/file.txt revisions
1637 files: 2/4 chunks (50.00%)
1637 files: 2/4 chunks (50.00%)
1638 adding foo/file.txt revisions
1638 adding foo/file.txt revisions
1639 files: 3/4 chunks (75.00%)
1639 files: 3/4 chunks (75.00%)
1640 adding quux/file.py revisions
1640 adding quux/file.py revisions
1641 files: 4/4 chunks (100.00%)
1641 files: 4/4 chunks (100.00%)
1642 added 4 changesets with 4 changes to 4 files (+1 heads)
1642 added 4 changesets with 4 changes to 4 files (+1 heads)
1643 calling hook pretxnchangegroup.acl: hgext.acl.hook
1643 calling hook pretxnchangegroup.acl: hgext.acl.hook
1644 acl: checking access for user "astro"
1644 acl: checking access for user "astro"
1645 acl: acl.allow.branches enabled, 0 entries for user astro
1645 acl: acl.allow.branches enabled, 0 entries for user astro
1646 acl: acl.deny.branches not enabled
1646 acl: acl.deny.branches not enabled
1647 acl: acl.allow not enabled
1647 acl: acl.allow not enabled
1648 acl: acl.deny not enabled
1648 acl: acl.deny not enabled
1649 error: pretxnchangegroup.acl hook failed: acl: user "astro" not allowed on branch "default" (changeset "ef1ea85a6374")
1649 error: pretxnchangegroup.acl hook failed: acl: user "astro" not allowed on branch "default" (changeset "ef1ea85a6374")
1650 transaction abort!
1650 transaction abort!
1651 rollback completed
1651 rollback completed
1652 abort: acl: user "astro" not allowed on branch "default" (changeset "ef1ea85a6374")
1652 abort: acl: user "astro" not allowed on branch "default" (changeset "ef1ea85a6374")
1653 no rollback information available
1653 no rollback information available
1654 2:fb35475503ef
1654 2:fb35475503ef
1655
1655
1656
1656
1657 Branch acl allow other
1657 Branch acl allow other
1658
1658
1659 $ init_config
1659 $ init_config
1660 $ echo "[acl.allow.branches]" >> $config
1660 $ echo "[acl.allow.branches]" >> $config
1661 $ echo "* = george" >> $config
1661 $ echo "* = george" >> $config
1662 $ do_push astro
1662 $ do_push astro
1663 Pushing as user astro
1663 Pushing as user astro
1664 hgrc = """
1664 hgrc = """
1665 [acl]
1665 [acl]
1666 sources = push
1666 sources = push
1667 [extensions]
1667 [extensions]
1668 [acl.allow.branches]
1668 [acl.allow.branches]
1669 * = george
1669 * = george
1670 """
1670 """
1671 pushing to ../b
1671 pushing to ../b
1672 query 1; heads
1672 query 1; heads
1673 searching for changes
1673 searching for changes
1674 all remote heads known locally
1674 all remote heads known locally
1675 listing keys for "bookmarks"
1675 listing keys for "bookmarks"
1676 4 changesets found
1676 4 changesets found
1677 list of changesets:
1677 list of changesets:
1678 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
1678 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
1679 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
1679 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
1680 911600dab2ae7a9baff75958b84fe606851ce955
1680 911600dab2ae7a9baff75958b84fe606851ce955
1681 e8fc755d4d8217ee5b0c2bb41558c40d43b92c01
1681 e8fc755d4d8217ee5b0c2bb41558c40d43b92c01
1682 adding changesets
1682 adding changesets
1683 bundling: 1/4 changesets (25.00%)
1683 bundling: 1/4 changesets (25.00%)
1684 bundling: 2/4 changesets (50.00%)
1684 bundling: 2/4 changesets (50.00%)
1685 bundling: 3/4 changesets (75.00%)
1685 bundling: 3/4 changesets (75.00%)
1686 bundling: 4/4 changesets (100.00%)
1686 bundling: 4/4 changesets (100.00%)
1687 bundling: 1/4 manifests (25.00%)
1687 bundling: 1/4 manifests (25.00%)
1688 bundling: 2/4 manifests (50.00%)
1688 bundling: 2/4 manifests (50.00%)
1689 bundling: 3/4 manifests (75.00%)
1689 bundling: 3/4 manifests (75.00%)
1690 bundling: 4/4 manifests (100.00%)
1690 bundling: 4/4 manifests (100.00%)
1691 bundling: abc.txt 1/4 files (25.00%)
1691 bundling: abc.txt 1/4 files (25.00%)
1692 bundling: foo/Bar/file.txt 2/4 files (50.00%)
1692 bundling: foo/Bar/file.txt 2/4 files (50.00%)
1693 bundling: foo/file.txt 3/4 files (75.00%)
1693 bundling: foo/file.txt 3/4 files (75.00%)
1694 bundling: quux/file.py 4/4 files (100.00%)
1694 bundling: quux/file.py 4/4 files (100.00%)
1695 changesets: 1 chunks
1695 changesets: 1 chunks
1696 add changeset ef1ea85a6374
1696 add changeset ef1ea85a6374
1697 changesets: 2 chunks
1697 changesets: 2 chunks
1698 add changeset f9cafe1212c8
1698 add changeset f9cafe1212c8
1699 changesets: 3 chunks
1699 changesets: 3 chunks
1700 add changeset 911600dab2ae
1700 add changeset 911600dab2ae
1701 changesets: 4 chunks
1701 changesets: 4 chunks
1702 add changeset e8fc755d4d82
1702 add changeset e8fc755d4d82
1703 adding manifests
1703 adding manifests
1704 manifests: 1/4 chunks (25.00%)
1704 manifests: 1/4 chunks (25.00%)
1705 manifests: 2/4 chunks (50.00%)
1705 manifests: 2/4 chunks (50.00%)
1706 manifests: 3/4 chunks (75.00%)
1706 manifests: 3/4 chunks (75.00%)
1707 manifests: 4/4 chunks (100.00%)
1707 manifests: 4/4 chunks (100.00%)
1708 adding file changes
1708 adding file changes
1709 adding abc.txt revisions
1709 adding abc.txt revisions
1710 files: 1/4 chunks (25.00%)
1710 files: 1/4 chunks (25.00%)
1711 adding foo/Bar/file.txt revisions
1711 adding foo/Bar/file.txt revisions
1712 files: 2/4 chunks (50.00%)
1712 files: 2/4 chunks (50.00%)
1713 adding foo/file.txt revisions
1713 adding foo/file.txt revisions
1714 files: 3/4 chunks (75.00%)
1714 files: 3/4 chunks (75.00%)
1715 adding quux/file.py revisions
1715 adding quux/file.py revisions
1716 files: 4/4 chunks (100.00%)
1716 files: 4/4 chunks (100.00%)
1717 added 4 changesets with 4 changes to 4 files (+1 heads)
1717 added 4 changesets with 4 changes to 4 files (+1 heads)
1718 calling hook pretxnchangegroup.acl: hgext.acl.hook
1718 calling hook pretxnchangegroup.acl: hgext.acl.hook
1719 acl: checking access for user "astro"
1719 acl: checking access for user "astro"
1720 acl: acl.allow.branches enabled, 0 entries for user astro
1720 acl: acl.allow.branches enabled, 0 entries for user astro
1721 acl: acl.deny.branches not enabled
1721 acl: acl.deny.branches not enabled
1722 acl: acl.allow not enabled
1722 acl: acl.allow not enabled
1723 acl: acl.deny not enabled
1723 acl: acl.deny not enabled
1724 error: pretxnchangegroup.acl hook failed: acl: user "astro" not allowed on branch "default" (changeset "ef1ea85a6374")
1724 error: pretxnchangegroup.acl hook failed: acl: user "astro" not allowed on branch "default" (changeset "ef1ea85a6374")
1725 transaction abort!
1725 transaction abort!
1726 rollback completed
1726 rollback completed
1727 abort: acl: user "astro" not allowed on branch "default" (changeset "ef1ea85a6374")
1727 abort: acl: user "astro" not allowed on branch "default" (changeset "ef1ea85a6374")
1728 no rollback information available
1728 no rollback information available
1729 2:fb35475503ef
1729 2:fb35475503ef
1730
1730
1731 $ do_push george
1731 $ do_push george
1732 Pushing as user george
1732 Pushing as user george
1733 hgrc = """
1733 hgrc = """
1734 [acl]
1734 [acl]
1735 sources = push
1735 sources = push
1736 [extensions]
1736 [extensions]
1737 [acl.allow.branches]
1737 [acl.allow.branches]
1738 * = george
1738 * = george
1739 """
1739 """
1740 pushing to ../b
1740 pushing to ../b
1741 query 1; heads
1741 query 1; heads
1742 searching for changes
1742 searching for changes
1743 all remote heads known locally
1743 all remote heads known locally
1744 listing keys for "bookmarks"
1744 listing keys for "bookmarks"
1745 4 changesets found
1745 4 changesets found
1746 list of changesets:
1746 list of changesets:
1747 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
1747 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
1748 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
1748 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
1749 911600dab2ae7a9baff75958b84fe606851ce955
1749 911600dab2ae7a9baff75958b84fe606851ce955
1750 e8fc755d4d8217ee5b0c2bb41558c40d43b92c01
1750 e8fc755d4d8217ee5b0c2bb41558c40d43b92c01
1751 adding changesets
1751 adding changesets
1752 bundling: 1/4 changesets (25.00%)
1752 bundling: 1/4 changesets (25.00%)
1753 bundling: 2/4 changesets (50.00%)
1753 bundling: 2/4 changesets (50.00%)
1754 bundling: 3/4 changesets (75.00%)
1754 bundling: 3/4 changesets (75.00%)
1755 bundling: 4/4 changesets (100.00%)
1755 bundling: 4/4 changesets (100.00%)
1756 bundling: 1/4 manifests (25.00%)
1756 bundling: 1/4 manifests (25.00%)
1757 bundling: 2/4 manifests (50.00%)
1757 bundling: 2/4 manifests (50.00%)
1758 bundling: 3/4 manifests (75.00%)
1758 bundling: 3/4 manifests (75.00%)
1759 bundling: 4/4 manifests (100.00%)
1759 bundling: 4/4 manifests (100.00%)
1760 bundling: abc.txt 1/4 files (25.00%)
1760 bundling: abc.txt 1/4 files (25.00%)
1761 bundling: foo/Bar/file.txt 2/4 files (50.00%)
1761 bundling: foo/Bar/file.txt 2/4 files (50.00%)
1762 bundling: foo/file.txt 3/4 files (75.00%)
1762 bundling: foo/file.txt 3/4 files (75.00%)
1763 bundling: quux/file.py 4/4 files (100.00%)
1763 bundling: quux/file.py 4/4 files (100.00%)
1764 changesets: 1 chunks
1764 changesets: 1 chunks
1765 add changeset ef1ea85a6374
1765 add changeset ef1ea85a6374
1766 changesets: 2 chunks
1766 changesets: 2 chunks
1767 add changeset f9cafe1212c8
1767 add changeset f9cafe1212c8
1768 changesets: 3 chunks
1768 changesets: 3 chunks
1769 add changeset 911600dab2ae
1769 add changeset 911600dab2ae
1770 changesets: 4 chunks
1770 changesets: 4 chunks
1771 add changeset e8fc755d4d82
1771 add changeset e8fc755d4d82
1772 adding manifests
1772 adding manifests
1773 manifests: 1/4 chunks (25.00%)
1773 manifests: 1/4 chunks (25.00%)
1774 manifests: 2/4 chunks (50.00%)
1774 manifests: 2/4 chunks (50.00%)
1775 manifests: 3/4 chunks (75.00%)
1775 manifests: 3/4 chunks (75.00%)
1776 manifests: 4/4 chunks (100.00%)
1776 manifests: 4/4 chunks (100.00%)
1777 adding file changes
1777 adding file changes
1778 adding abc.txt revisions
1778 adding abc.txt revisions
1779 files: 1/4 chunks (25.00%)
1779 files: 1/4 chunks (25.00%)
1780 adding foo/Bar/file.txt revisions
1780 adding foo/Bar/file.txt revisions
1781 files: 2/4 chunks (50.00%)
1781 files: 2/4 chunks (50.00%)
1782 adding foo/file.txt revisions
1782 adding foo/file.txt revisions
1783 files: 3/4 chunks (75.00%)
1783 files: 3/4 chunks (75.00%)
1784 adding quux/file.py revisions
1784 adding quux/file.py revisions
1785 files: 4/4 chunks (100.00%)
1785 files: 4/4 chunks (100.00%)
1786 added 4 changesets with 4 changes to 4 files (+1 heads)
1786 added 4 changesets with 4 changes to 4 files (+1 heads)
1787 calling hook pretxnchangegroup.acl: hgext.acl.hook
1787 calling hook pretxnchangegroup.acl: hgext.acl.hook
1788 acl: checking access for user "george"
1788 acl: checking access for user "george"
1789 acl: acl.allow.branches enabled, 1 entries for user george
1789 acl: acl.allow.branches enabled, 1 entries for user george
1790 acl: acl.deny.branches not enabled
1790 acl: acl.deny.branches not enabled
1791 acl: acl.allow not enabled
1791 acl: acl.allow not enabled
1792 acl: acl.deny not enabled
1792 acl: acl.deny not enabled
1793 acl: branch access granted: "ef1ea85a6374" on branch "default"
1793 acl: branch access granted: "ef1ea85a6374" on branch "default"
1794 acl: path access granted: "ef1ea85a6374"
1794 acl: path access granted: "ef1ea85a6374"
1795 acl: branch access granted: "f9cafe1212c8" on branch "default"
1795 acl: branch access granted: "f9cafe1212c8" on branch "default"
1796 acl: path access granted: "f9cafe1212c8"
1796 acl: path access granted: "f9cafe1212c8"
1797 acl: branch access granted: "911600dab2ae" on branch "default"
1797 acl: branch access granted: "911600dab2ae" on branch "default"
1798 acl: path access granted: "911600dab2ae"
1798 acl: path access granted: "911600dab2ae"
1799 acl: branch access granted: "e8fc755d4d82" on branch "foobar"
1799 acl: branch access granted: "e8fc755d4d82" on branch "foobar"
1800 acl: path access granted: "e8fc755d4d82"
1800 acl: path access granted: "e8fc755d4d82"
1801 listing keys for "phases"
1801 listing keys for "phases"
1802 try to push obsolete markers to remote
1802 try to push obsolete markers to remote
1803 updating the branch cache
1803 updating the branch cache
1804 checking for updated bookmarks
1804 checking for updated bookmarks
1805 listing keys for "bookmarks"
1805 listing keys for "bookmarks"
1806 repository tip rolled back to revision 2 (undo push)
1806 repository tip rolled back to revision 2 (undo push)
1807 2:fb35475503ef
1807 2:fb35475503ef
1808
1808
1809
1809
1810 Branch acl conflicting allow
1810 Branch acl conflicting allow
1811 asterisk ends up applying to all branches and allowing george to
1811 asterisk ends up applying to all branches and allowing george to
1812 push foobar into the remote
1812 push foobar into the remote
1813
1813
1814 $ init_config
1814 $ init_config
1815 $ echo "[acl.allow.branches]" >> $config
1815 $ echo "[acl.allow.branches]" >> $config
1816 $ echo "foobar = astro" >> $config
1816 $ echo "foobar = astro" >> $config
1817 $ echo "* = george" >> $config
1817 $ echo "* = george" >> $config
1818 $ do_push george
1818 $ do_push george
1819 Pushing as user george
1819 Pushing as user george
1820 hgrc = """
1820 hgrc = """
1821 [acl]
1821 [acl]
1822 sources = push
1822 sources = push
1823 [extensions]
1823 [extensions]
1824 [acl.allow.branches]
1824 [acl.allow.branches]
1825 foobar = astro
1825 foobar = astro
1826 * = george
1826 * = george
1827 """
1827 """
1828 pushing to ../b
1828 pushing to ../b
1829 query 1; heads
1829 query 1; heads
1830 searching for changes
1830 searching for changes
1831 all remote heads known locally
1831 all remote heads known locally
1832 invalidating branch cache (tip differs)
1832 invalid branchheads cache: tip differs
1833 listing keys for "bookmarks"
1833 listing keys for "bookmarks"
1834 4 changesets found
1834 4 changesets found
1835 list of changesets:
1835 list of changesets:
1836 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
1836 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
1837 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
1837 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
1838 911600dab2ae7a9baff75958b84fe606851ce955
1838 911600dab2ae7a9baff75958b84fe606851ce955
1839 e8fc755d4d8217ee5b0c2bb41558c40d43b92c01
1839 e8fc755d4d8217ee5b0c2bb41558c40d43b92c01
1840 adding changesets
1840 adding changesets
1841 bundling: 1/4 changesets (25.00%)
1841 bundling: 1/4 changesets (25.00%)
1842 bundling: 2/4 changesets (50.00%)
1842 bundling: 2/4 changesets (50.00%)
1843 bundling: 3/4 changesets (75.00%)
1843 bundling: 3/4 changesets (75.00%)
1844 bundling: 4/4 changesets (100.00%)
1844 bundling: 4/4 changesets (100.00%)
1845 bundling: 1/4 manifests (25.00%)
1845 bundling: 1/4 manifests (25.00%)
1846 bundling: 2/4 manifests (50.00%)
1846 bundling: 2/4 manifests (50.00%)
1847 bundling: 3/4 manifests (75.00%)
1847 bundling: 3/4 manifests (75.00%)
1848 bundling: 4/4 manifests (100.00%)
1848 bundling: 4/4 manifests (100.00%)
1849 bundling: abc.txt 1/4 files (25.00%)
1849 bundling: abc.txt 1/4 files (25.00%)
1850 bundling: foo/Bar/file.txt 2/4 files (50.00%)
1850 bundling: foo/Bar/file.txt 2/4 files (50.00%)
1851 bundling: foo/file.txt 3/4 files (75.00%)
1851 bundling: foo/file.txt 3/4 files (75.00%)
1852 bundling: quux/file.py 4/4 files (100.00%)
1852 bundling: quux/file.py 4/4 files (100.00%)
1853 changesets: 1 chunks
1853 changesets: 1 chunks
1854 add changeset ef1ea85a6374
1854 add changeset ef1ea85a6374
1855 changesets: 2 chunks
1855 changesets: 2 chunks
1856 add changeset f9cafe1212c8
1856 add changeset f9cafe1212c8
1857 changesets: 3 chunks
1857 changesets: 3 chunks
1858 add changeset 911600dab2ae
1858 add changeset 911600dab2ae
1859 changesets: 4 chunks
1859 changesets: 4 chunks
1860 add changeset e8fc755d4d82
1860 add changeset e8fc755d4d82
1861 adding manifests
1861 adding manifests
1862 manifests: 1/4 chunks (25.00%)
1862 manifests: 1/4 chunks (25.00%)
1863 manifests: 2/4 chunks (50.00%)
1863 manifests: 2/4 chunks (50.00%)
1864 manifests: 3/4 chunks (75.00%)
1864 manifests: 3/4 chunks (75.00%)
1865 manifests: 4/4 chunks (100.00%)
1865 manifests: 4/4 chunks (100.00%)
1866 adding file changes
1866 adding file changes
1867 adding abc.txt revisions
1867 adding abc.txt revisions
1868 files: 1/4 chunks (25.00%)
1868 files: 1/4 chunks (25.00%)
1869 adding foo/Bar/file.txt revisions
1869 adding foo/Bar/file.txt revisions
1870 files: 2/4 chunks (50.00%)
1870 files: 2/4 chunks (50.00%)
1871 adding foo/file.txt revisions
1871 adding foo/file.txt revisions
1872 files: 3/4 chunks (75.00%)
1872 files: 3/4 chunks (75.00%)
1873 adding quux/file.py revisions
1873 adding quux/file.py revisions
1874 files: 4/4 chunks (100.00%)
1874 files: 4/4 chunks (100.00%)
1875 added 4 changesets with 4 changes to 4 files (+1 heads)
1875 added 4 changesets with 4 changes to 4 files (+1 heads)
1876 calling hook pretxnchangegroup.acl: hgext.acl.hook
1876 calling hook pretxnchangegroup.acl: hgext.acl.hook
1877 acl: checking access for user "george"
1877 acl: checking access for user "george"
1878 acl: acl.allow.branches enabled, 1 entries for user george
1878 acl: acl.allow.branches enabled, 1 entries for user george
1879 acl: acl.deny.branches not enabled
1879 acl: acl.deny.branches not enabled
1880 acl: acl.allow not enabled
1880 acl: acl.allow not enabled
1881 acl: acl.deny not enabled
1881 acl: acl.deny not enabled
1882 acl: branch access granted: "ef1ea85a6374" on branch "default"
1882 acl: branch access granted: "ef1ea85a6374" on branch "default"
1883 acl: path access granted: "ef1ea85a6374"
1883 acl: path access granted: "ef1ea85a6374"
1884 acl: branch access granted: "f9cafe1212c8" on branch "default"
1884 acl: branch access granted: "f9cafe1212c8" on branch "default"
1885 acl: path access granted: "f9cafe1212c8"
1885 acl: path access granted: "f9cafe1212c8"
1886 acl: branch access granted: "911600dab2ae" on branch "default"
1886 acl: branch access granted: "911600dab2ae" on branch "default"
1887 acl: path access granted: "911600dab2ae"
1887 acl: path access granted: "911600dab2ae"
1888 acl: branch access granted: "e8fc755d4d82" on branch "foobar"
1888 acl: branch access granted: "e8fc755d4d82" on branch "foobar"
1889 acl: path access granted: "e8fc755d4d82"
1889 acl: path access granted: "e8fc755d4d82"
1890 listing keys for "phases"
1890 listing keys for "phases"
1891 try to push obsolete markers to remote
1891 try to push obsolete markers to remote
1892 updating the branch cache
1892 updating the branch cache
1893 checking for updated bookmarks
1893 checking for updated bookmarks
1894 listing keys for "bookmarks"
1894 listing keys for "bookmarks"
1895 repository tip rolled back to revision 2 (undo push)
1895 repository tip rolled back to revision 2 (undo push)
1896 2:fb35475503ef
1896 2:fb35475503ef
1897
1897
1898 Branch acl conflicting deny
1898 Branch acl conflicting deny
1899
1899
1900 $ init_config
1900 $ init_config
1901 $ echo "[acl.deny.branches]" >> $config
1901 $ echo "[acl.deny.branches]" >> $config
1902 $ echo "foobar = astro" >> $config
1902 $ echo "foobar = astro" >> $config
1903 $ echo "default = astro" >> $config
1903 $ echo "default = astro" >> $config
1904 $ echo "* = george" >> $config
1904 $ echo "* = george" >> $config
1905 $ do_push george
1905 $ do_push george
1906 Pushing as user george
1906 Pushing as user george
1907 hgrc = """
1907 hgrc = """
1908 [acl]
1908 [acl]
1909 sources = push
1909 sources = push
1910 [extensions]
1910 [extensions]
1911 [acl.deny.branches]
1911 [acl.deny.branches]
1912 foobar = astro
1912 foobar = astro
1913 default = astro
1913 default = astro
1914 * = george
1914 * = george
1915 """
1915 """
1916 pushing to ../b
1916 pushing to ../b
1917 query 1; heads
1917 query 1; heads
1918 searching for changes
1918 searching for changes
1919 all remote heads known locally
1919 all remote heads known locally
1920 invalidating branch cache (tip differs)
1920 invalid branchheads cache: tip differs
1921 listing keys for "bookmarks"
1921 listing keys for "bookmarks"
1922 4 changesets found
1922 4 changesets found
1923 list of changesets:
1923 list of changesets:
1924 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
1924 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
1925 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
1925 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
1926 911600dab2ae7a9baff75958b84fe606851ce955
1926 911600dab2ae7a9baff75958b84fe606851ce955
1927 e8fc755d4d8217ee5b0c2bb41558c40d43b92c01
1927 e8fc755d4d8217ee5b0c2bb41558c40d43b92c01
1928 adding changesets
1928 adding changesets
1929 bundling: 1/4 changesets (25.00%)
1929 bundling: 1/4 changesets (25.00%)
1930 bundling: 2/4 changesets (50.00%)
1930 bundling: 2/4 changesets (50.00%)
1931 bundling: 3/4 changesets (75.00%)
1931 bundling: 3/4 changesets (75.00%)
1932 bundling: 4/4 changesets (100.00%)
1932 bundling: 4/4 changesets (100.00%)
1933 bundling: 1/4 manifests (25.00%)
1933 bundling: 1/4 manifests (25.00%)
1934 bundling: 2/4 manifests (50.00%)
1934 bundling: 2/4 manifests (50.00%)
1935 bundling: 3/4 manifests (75.00%)
1935 bundling: 3/4 manifests (75.00%)
1936 bundling: 4/4 manifests (100.00%)
1936 bundling: 4/4 manifests (100.00%)
1937 bundling: abc.txt 1/4 files (25.00%)
1937 bundling: abc.txt 1/4 files (25.00%)
1938 bundling: foo/Bar/file.txt 2/4 files (50.00%)
1938 bundling: foo/Bar/file.txt 2/4 files (50.00%)
1939 bundling: foo/file.txt 3/4 files (75.00%)
1939 bundling: foo/file.txt 3/4 files (75.00%)
1940 bundling: quux/file.py 4/4 files (100.00%)
1940 bundling: quux/file.py 4/4 files (100.00%)
1941 changesets: 1 chunks
1941 changesets: 1 chunks
1942 add changeset ef1ea85a6374
1942 add changeset ef1ea85a6374
1943 changesets: 2 chunks
1943 changesets: 2 chunks
1944 add changeset f9cafe1212c8
1944 add changeset f9cafe1212c8
1945 changesets: 3 chunks
1945 changesets: 3 chunks
1946 add changeset 911600dab2ae
1946 add changeset 911600dab2ae
1947 changesets: 4 chunks
1947 changesets: 4 chunks
1948 add changeset e8fc755d4d82
1948 add changeset e8fc755d4d82
1949 adding manifests
1949 adding manifests
1950 manifests: 1/4 chunks (25.00%)
1950 manifests: 1/4 chunks (25.00%)
1951 manifests: 2/4 chunks (50.00%)
1951 manifests: 2/4 chunks (50.00%)
1952 manifests: 3/4 chunks (75.00%)
1952 manifests: 3/4 chunks (75.00%)
1953 manifests: 4/4 chunks (100.00%)
1953 manifests: 4/4 chunks (100.00%)
1954 adding file changes
1954 adding file changes
1955 adding abc.txt revisions
1955 adding abc.txt revisions
1956 files: 1/4 chunks (25.00%)
1956 files: 1/4 chunks (25.00%)
1957 adding foo/Bar/file.txt revisions
1957 adding foo/Bar/file.txt revisions
1958 files: 2/4 chunks (50.00%)
1958 files: 2/4 chunks (50.00%)
1959 adding foo/file.txt revisions
1959 adding foo/file.txt revisions
1960 files: 3/4 chunks (75.00%)
1960 files: 3/4 chunks (75.00%)
1961 adding quux/file.py revisions
1961 adding quux/file.py revisions
1962 files: 4/4 chunks (100.00%)
1962 files: 4/4 chunks (100.00%)
1963 added 4 changesets with 4 changes to 4 files (+1 heads)
1963 added 4 changesets with 4 changes to 4 files (+1 heads)
1964 calling hook pretxnchangegroup.acl: hgext.acl.hook
1964 calling hook pretxnchangegroup.acl: hgext.acl.hook
1965 acl: checking access for user "george"
1965 acl: checking access for user "george"
1966 acl: acl.allow.branches not enabled
1966 acl: acl.allow.branches not enabled
1967 acl: acl.deny.branches enabled, 1 entries for user george
1967 acl: acl.deny.branches enabled, 1 entries for user george
1968 acl: acl.allow not enabled
1968 acl: acl.allow not enabled
1969 acl: acl.deny not enabled
1969 acl: acl.deny not enabled
1970 error: pretxnchangegroup.acl hook failed: acl: user "george" denied on branch "default" (changeset "ef1ea85a6374")
1970 error: pretxnchangegroup.acl hook failed: acl: user "george" denied on branch "default" (changeset "ef1ea85a6374")
1971 transaction abort!
1971 transaction abort!
1972 rollback completed
1972 rollback completed
1973 abort: acl: user "george" denied on branch "default" (changeset "ef1ea85a6374")
1973 abort: acl: user "george" denied on branch "default" (changeset "ef1ea85a6374")
1974 no rollback information available
1974 no rollback information available
1975 2:fb35475503ef
1975 2:fb35475503ef
1976
1976
1977 User 'astro' must not be denied
1977 User 'astro' must not be denied
1978
1978
1979 $ init_config
1979 $ init_config
1980 $ echo "[acl.deny.branches]" >> $config
1980 $ echo "[acl.deny.branches]" >> $config
1981 $ echo "default = !astro" >> $config
1981 $ echo "default = !astro" >> $config
1982 $ do_push astro
1982 $ do_push astro
1983 Pushing as user astro
1983 Pushing as user astro
1984 hgrc = """
1984 hgrc = """
1985 [acl]
1985 [acl]
1986 sources = push
1986 sources = push
1987 [extensions]
1987 [extensions]
1988 [acl.deny.branches]
1988 [acl.deny.branches]
1989 default = !astro
1989 default = !astro
1990 """
1990 """
1991 pushing to ../b
1991 pushing to ../b
1992 query 1; heads
1992 query 1; heads
1993 searching for changes
1993 searching for changes
1994 all remote heads known locally
1994 all remote heads known locally
1995 listing keys for "bookmarks"
1995 listing keys for "bookmarks"
1996 4 changesets found
1996 4 changesets found
1997 list of changesets:
1997 list of changesets:
1998 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
1998 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
1999 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
1999 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
2000 911600dab2ae7a9baff75958b84fe606851ce955
2000 911600dab2ae7a9baff75958b84fe606851ce955
2001 e8fc755d4d8217ee5b0c2bb41558c40d43b92c01
2001 e8fc755d4d8217ee5b0c2bb41558c40d43b92c01
2002 adding changesets
2002 adding changesets
2003 bundling: 1/4 changesets (25.00%)
2003 bundling: 1/4 changesets (25.00%)
2004 bundling: 2/4 changesets (50.00%)
2004 bundling: 2/4 changesets (50.00%)
2005 bundling: 3/4 changesets (75.00%)
2005 bundling: 3/4 changesets (75.00%)
2006 bundling: 4/4 changesets (100.00%)
2006 bundling: 4/4 changesets (100.00%)
2007 bundling: 1/4 manifests (25.00%)
2007 bundling: 1/4 manifests (25.00%)
2008 bundling: 2/4 manifests (50.00%)
2008 bundling: 2/4 manifests (50.00%)
2009 bundling: 3/4 manifests (75.00%)
2009 bundling: 3/4 manifests (75.00%)
2010 bundling: 4/4 manifests (100.00%)
2010 bundling: 4/4 manifests (100.00%)
2011 bundling: abc.txt 1/4 files (25.00%)
2011 bundling: abc.txt 1/4 files (25.00%)
2012 bundling: foo/Bar/file.txt 2/4 files (50.00%)
2012 bundling: foo/Bar/file.txt 2/4 files (50.00%)
2013 bundling: foo/file.txt 3/4 files (75.00%)
2013 bundling: foo/file.txt 3/4 files (75.00%)
2014 bundling: quux/file.py 4/4 files (100.00%)
2014 bundling: quux/file.py 4/4 files (100.00%)
2015 changesets: 1 chunks
2015 changesets: 1 chunks
2016 add changeset ef1ea85a6374
2016 add changeset ef1ea85a6374
2017 changesets: 2 chunks
2017 changesets: 2 chunks
2018 add changeset f9cafe1212c8
2018 add changeset f9cafe1212c8
2019 changesets: 3 chunks
2019 changesets: 3 chunks
2020 add changeset 911600dab2ae
2020 add changeset 911600dab2ae
2021 changesets: 4 chunks
2021 changesets: 4 chunks
2022 add changeset e8fc755d4d82
2022 add changeset e8fc755d4d82
2023 adding manifests
2023 adding manifests
2024 manifests: 1/4 chunks (25.00%)
2024 manifests: 1/4 chunks (25.00%)
2025 manifests: 2/4 chunks (50.00%)
2025 manifests: 2/4 chunks (50.00%)
2026 manifests: 3/4 chunks (75.00%)
2026 manifests: 3/4 chunks (75.00%)
2027 manifests: 4/4 chunks (100.00%)
2027 manifests: 4/4 chunks (100.00%)
2028 adding file changes
2028 adding file changes
2029 adding abc.txt revisions
2029 adding abc.txt revisions
2030 files: 1/4 chunks (25.00%)
2030 files: 1/4 chunks (25.00%)
2031 adding foo/Bar/file.txt revisions
2031 adding foo/Bar/file.txt revisions
2032 files: 2/4 chunks (50.00%)
2032 files: 2/4 chunks (50.00%)
2033 adding foo/file.txt revisions
2033 adding foo/file.txt revisions
2034 files: 3/4 chunks (75.00%)
2034 files: 3/4 chunks (75.00%)
2035 adding quux/file.py revisions
2035 adding quux/file.py revisions
2036 files: 4/4 chunks (100.00%)
2036 files: 4/4 chunks (100.00%)
2037 added 4 changesets with 4 changes to 4 files (+1 heads)
2037 added 4 changesets with 4 changes to 4 files (+1 heads)
2038 calling hook pretxnchangegroup.acl: hgext.acl.hook
2038 calling hook pretxnchangegroup.acl: hgext.acl.hook
2039 acl: checking access for user "astro"
2039 acl: checking access for user "astro"
2040 acl: acl.allow.branches not enabled
2040 acl: acl.allow.branches not enabled
2041 acl: acl.deny.branches enabled, 0 entries for user astro
2041 acl: acl.deny.branches enabled, 0 entries for user astro
2042 acl: acl.allow not enabled
2042 acl: acl.allow not enabled
2043 acl: acl.deny not enabled
2043 acl: acl.deny not enabled
2044 acl: branch access granted: "ef1ea85a6374" on branch "default"
2044 acl: branch access granted: "ef1ea85a6374" on branch "default"
2045 acl: path access granted: "ef1ea85a6374"
2045 acl: path access granted: "ef1ea85a6374"
2046 acl: branch access granted: "f9cafe1212c8" on branch "default"
2046 acl: branch access granted: "f9cafe1212c8" on branch "default"
2047 acl: path access granted: "f9cafe1212c8"
2047 acl: path access granted: "f9cafe1212c8"
2048 acl: branch access granted: "911600dab2ae" on branch "default"
2048 acl: branch access granted: "911600dab2ae" on branch "default"
2049 acl: path access granted: "911600dab2ae"
2049 acl: path access granted: "911600dab2ae"
2050 acl: branch access granted: "e8fc755d4d82" on branch "foobar"
2050 acl: branch access granted: "e8fc755d4d82" on branch "foobar"
2051 acl: path access granted: "e8fc755d4d82"
2051 acl: path access granted: "e8fc755d4d82"
2052 listing keys for "phases"
2052 listing keys for "phases"
2053 try to push obsolete markers to remote
2053 try to push obsolete markers to remote
2054 updating the branch cache
2054 updating the branch cache
2055 checking for updated bookmarks
2055 checking for updated bookmarks
2056 listing keys for "bookmarks"
2056 listing keys for "bookmarks"
2057 repository tip rolled back to revision 2 (undo push)
2057 repository tip rolled back to revision 2 (undo push)
2058 2:fb35475503ef
2058 2:fb35475503ef
2059
2059
2060
2060
2061 Non-astro users must be denied
2061 Non-astro users must be denied
2062
2062
2063 $ do_push george
2063 $ do_push george
2064 Pushing as user george
2064 Pushing as user george
2065 hgrc = """
2065 hgrc = """
2066 [acl]
2066 [acl]
2067 sources = push
2067 sources = push
2068 [extensions]
2068 [extensions]
2069 [acl.deny.branches]
2069 [acl.deny.branches]
2070 default = !astro
2070 default = !astro
2071 """
2071 """
2072 pushing to ../b
2072 pushing to ../b
2073 query 1; heads
2073 query 1; heads
2074 searching for changes
2074 searching for changes
2075 all remote heads known locally
2075 all remote heads known locally
2076 invalidating branch cache (tip differs)
2076 invalid branchheads cache: tip differs
2077 listing keys for "bookmarks"
2077 listing keys for "bookmarks"
2078 4 changesets found
2078 4 changesets found
2079 list of changesets:
2079 list of changesets:
2080 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
2080 ef1ea85a6374b77d6da9dcda9541f498f2d17df7
2081 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
2081 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
2082 911600dab2ae7a9baff75958b84fe606851ce955
2082 911600dab2ae7a9baff75958b84fe606851ce955
2083 e8fc755d4d8217ee5b0c2bb41558c40d43b92c01
2083 e8fc755d4d8217ee5b0c2bb41558c40d43b92c01
2084 adding changesets
2084 adding changesets
2085 bundling: 1/4 changesets (25.00%)
2085 bundling: 1/4 changesets (25.00%)
2086 bundling: 2/4 changesets (50.00%)
2086 bundling: 2/4 changesets (50.00%)
2087 bundling: 3/4 changesets (75.00%)
2087 bundling: 3/4 changesets (75.00%)
2088 bundling: 4/4 changesets (100.00%)
2088 bundling: 4/4 changesets (100.00%)
2089 bundling: 1/4 manifests (25.00%)
2089 bundling: 1/4 manifests (25.00%)
2090 bundling: 2/4 manifests (50.00%)
2090 bundling: 2/4 manifests (50.00%)
2091 bundling: 3/4 manifests (75.00%)
2091 bundling: 3/4 manifests (75.00%)
2092 bundling: 4/4 manifests (100.00%)
2092 bundling: 4/4 manifests (100.00%)
2093 bundling: abc.txt 1/4 files (25.00%)
2093 bundling: abc.txt 1/4 files (25.00%)
2094 bundling: foo/Bar/file.txt 2/4 files (50.00%)
2094 bundling: foo/Bar/file.txt 2/4 files (50.00%)
2095 bundling: foo/file.txt 3/4 files (75.00%)
2095 bundling: foo/file.txt 3/4 files (75.00%)
2096 bundling: quux/file.py 4/4 files (100.00%)
2096 bundling: quux/file.py 4/4 files (100.00%)
2097 changesets: 1 chunks
2097 changesets: 1 chunks
2098 add changeset ef1ea85a6374
2098 add changeset ef1ea85a6374
2099 changesets: 2 chunks
2099 changesets: 2 chunks
2100 add changeset f9cafe1212c8
2100 add changeset f9cafe1212c8
2101 changesets: 3 chunks
2101 changesets: 3 chunks
2102 add changeset 911600dab2ae
2102 add changeset 911600dab2ae
2103 changesets: 4 chunks
2103 changesets: 4 chunks
2104 add changeset e8fc755d4d82
2104 add changeset e8fc755d4d82
2105 adding manifests
2105 adding manifests
2106 manifests: 1/4 chunks (25.00%)
2106 manifests: 1/4 chunks (25.00%)
2107 manifests: 2/4 chunks (50.00%)
2107 manifests: 2/4 chunks (50.00%)
2108 manifests: 3/4 chunks (75.00%)
2108 manifests: 3/4 chunks (75.00%)
2109 manifests: 4/4 chunks (100.00%)
2109 manifests: 4/4 chunks (100.00%)
2110 adding file changes
2110 adding file changes
2111 adding abc.txt revisions
2111 adding abc.txt revisions
2112 files: 1/4 chunks (25.00%)
2112 files: 1/4 chunks (25.00%)
2113 adding foo/Bar/file.txt revisions
2113 adding foo/Bar/file.txt revisions
2114 files: 2/4 chunks (50.00%)
2114 files: 2/4 chunks (50.00%)
2115 adding foo/file.txt revisions
2115 adding foo/file.txt revisions
2116 files: 3/4 chunks (75.00%)
2116 files: 3/4 chunks (75.00%)
2117 adding quux/file.py revisions
2117 adding quux/file.py revisions
2118 files: 4/4 chunks (100.00%)
2118 files: 4/4 chunks (100.00%)
2119 added 4 changesets with 4 changes to 4 files (+1 heads)
2119 added 4 changesets with 4 changes to 4 files (+1 heads)
2120 calling hook pretxnchangegroup.acl: hgext.acl.hook
2120 calling hook pretxnchangegroup.acl: hgext.acl.hook
2121 acl: checking access for user "george"
2121 acl: checking access for user "george"
2122 acl: acl.allow.branches not enabled
2122 acl: acl.allow.branches not enabled
2123 acl: acl.deny.branches enabled, 1 entries for user george
2123 acl: acl.deny.branches enabled, 1 entries for user george
2124 acl: acl.allow not enabled
2124 acl: acl.allow not enabled
2125 acl: acl.deny not enabled
2125 acl: acl.deny not enabled
2126 error: pretxnchangegroup.acl hook failed: acl: user "george" denied on branch "default" (changeset "ef1ea85a6374")
2126 error: pretxnchangegroup.acl hook failed: acl: user "george" denied on branch "default" (changeset "ef1ea85a6374")
2127 transaction abort!
2127 transaction abort!
2128 rollback completed
2128 rollback completed
2129 abort: acl: user "george" denied on branch "default" (changeset "ef1ea85a6374")
2129 abort: acl: user "george" denied on branch "default" (changeset "ef1ea85a6374")
2130 no rollback information available
2130 no rollback information available
2131 2:fb35475503ef
2131 2:fb35475503ef
2132
2132
2133
2133
@@ -1,330 +1,330
1 $ branchcache=.hg/cache/branchheads
1 $ branchcache=.hg/cache/branchheads
2
2
3 $ hg init t
3 $ hg init t
4 $ cd t
4 $ cd t
5
5
6 $ hg branches
6 $ hg branches
7 $ echo foo > a
7 $ echo foo > a
8 $ hg add a
8 $ hg add a
9 $ hg ci -m "initial"
9 $ hg ci -m "initial"
10 $ hg branch foo
10 $ hg branch foo
11 marked working directory as branch foo
11 marked working directory as branch foo
12 (branches are permanent and global, did you want a bookmark?)
12 (branches are permanent and global, did you want a bookmark?)
13 $ hg branch
13 $ hg branch
14 foo
14 foo
15 $ hg ci -m "add branch name"
15 $ hg ci -m "add branch name"
16 $ hg branch bar
16 $ hg branch bar
17 marked working directory as branch bar
17 marked working directory as branch bar
18 (branches are permanent and global, did you want a bookmark?)
18 (branches are permanent and global, did you want a bookmark?)
19 $ hg ci -m "change branch name"
19 $ hg ci -m "change branch name"
20
20
21 Branch shadowing:
21 Branch shadowing:
22
22
23 $ hg branch default
23 $ hg branch default
24 abort: a branch of the same name already exists
24 abort: a branch of the same name already exists
25 (use 'hg update' to switch to it)
25 (use 'hg update' to switch to it)
26 [255]
26 [255]
27
27
28 $ hg branch -f default
28 $ hg branch -f default
29 marked working directory as branch default
29 marked working directory as branch default
30 (branches are permanent and global, did you want a bookmark?)
30 (branches are permanent and global, did you want a bookmark?)
31
31
32 $ hg ci -m "clear branch name"
32 $ hg ci -m "clear branch name"
33 created new head
33 created new head
34
34
35 There should be only one default branch head
35 There should be only one default branch head
36
36
37 $ hg heads .
37 $ hg heads .
38 changeset: 3:1c28f494dae6
38 changeset: 3:1c28f494dae6
39 tag: tip
39 tag: tip
40 user: test
40 user: test
41 date: Thu Jan 01 00:00:00 1970 +0000
41 date: Thu Jan 01 00:00:00 1970 +0000
42 summary: clear branch name
42 summary: clear branch name
43
43
44
44
45 $ hg co foo
45 $ hg co foo
46 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
46 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
47 $ hg branch
47 $ hg branch
48 foo
48 foo
49 $ echo bleah > a
49 $ echo bleah > a
50 $ hg ci -m "modify a branch"
50 $ hg ci -m "modify a branch"
51
51
52 $ hg merge default
52 $ hg merge default
53 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
53 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
54 (branch merge, don't forget to commit)
54 (branch merge, don't forget to commit)
55
55
56 $ hg branch
56 $ hg branch
57 foo
57 foo
58 $ hg ci -m "merge"
58 $ hg ci -m "merge"
59
59
60 $ hg log
60 $ hg log
61 changeset: 5:530046499edf
61 changeset: 5:530046499edf
62 branch: foo
62 branch: foo
63 tag: tip
63 tag: tip
64 parent: 4:adf1a74a7f7b
64 parent: 4:adf1a74a7f7b
65 parent: 3:1c28f494dae6
65 parent: 3:1c28f494dae6
66 user: test
66 user: test
67 date: Thu Jan 01 00:00:00 1970 +0000
67 date: Thu Jan 01 00:00:00 1970 +0000
68 summary: merge
68 summary: merge
69
69
70 changeset: 4:adf1a74a7f7b
70 changeset: 4:adf1a74a7f7b
71 branch: foo
71 branch: foo
72 parent: 1:6c0e42da283a
72 parent: 1:6c0e42da283a
73 user: test
73 user: test
74 date: Thu Jan 01 00:00:00 1970 +0000
74 date: Thu Jan 01 00:00:00 1970 +0000
75 summary: modify a branch
75 summary: modify a branch
76
76
77 changeset: 3:1c28f494dae6
77 changeset: 3:1c28f494dae6
78 user: test
78 user: test
79 date: Thu Jan 01 00:00:00 1970 +0000
79 date: Thu Jan 01 00:00:00 1970 +0000
80 summary: clear branch name
80 summary: clear branch name
81
81
82 changeset: 2:c21617b13b22
82 changeset: 2:c21617b13b22
83 branch: bar
83 branch: bar
84 user: test
84 user: test
85 date: Thu Jan 01 00:00:00 1970 +0000
85 date: Thu Jan 01 00:00:00 1970 +0000
86 summary: change branch name
86 summary: change branch name
87
87
88 changeset: 1:6c0e42da283a
88 changeset: 1:6c0e42da283a
89 branch: foo
89 branch: foo
90 user: test
90 user: test
91 date: Thu Jan 01 00:00:00 1970 +0000
91 date: Thu Jan 01 00:00:00 1970 +0000
92 summary: add branch name
92 summary: add branch name
93
93
94 changeset: 0:db01e8ea3388
94 changeset: 0:db01e8ea3388
95 user: test
95 user: test
96 date: Thu Jan 01 00:00:00 1970 +0000
96 date: Thu Jan 01 00:00:00 1970 +0000
97 summary: initial
97 summary: initial
98
98
99 $ hg branches
99 $ hg branches
100 foo 5:530046499edf
100 foo 5:530046499edf
101 default 3:1c28f494dae6 (inactive)
101 default 3:1c28f494dae6 (inactive)
102 bar 2:c21617b13b22 (inactive)
102 bar 2:c21617b13b22 (inactive)
103
103
104 $ hg branches -q
104 $ hg branches -q
105 foo
105 foo
106 default
106 default
107 bar
107 bar
108
108
109 Test for invalid branch cache:
109 Test for invalid branch cache:
110
110
111 $ hg rollback
111 $ hg rollback
112 repository tip rolled back to revision 4 (undo commit)
112 repository tip rolled back to revision 4 (undo commit)
113 working directory now based on revisions 4 and 3
113 working directory now based on revisions 4 and 3
114
114
115 $ cp $branchcache .hg/bc-invalid
115 $ cp $branchcache .hg/bc-invalid
116
116
117 $ hg log -r foo
117 $ hg log -r foo
118 changeset: 4:adf1a74a7f7b
118 changeset: 4:adf1a74a7f7b
119 branch: foo
119 branch: foo
120 tag: tip
120 tag: tip
121 parent: 1:6c0e42da283a
121 parent: 1:6c0e42da283a
122 user: test
122 user: test
123 date: Thu Jan 01 00:00:00 1970 +0000
123 date: Thu Jan 01 00:00:00 1970 +0000
124 summary: modify a branch
124 summary: modify a branch
125
125
126 $ cp .hg/bc-invalid $branchcache
126 $ cp .hg/bc-invalid $branchcache
127
127
128 $ hg --debug log -r foo
128 $ hg --debug log -r foo
129 invalidating branch cache (tip differs)
129 invalid branchheads cache: tip differs
130 changeset: 4:adf1a74a7f7b4cd193d12992f5d0d6a004ed21d6
130 changeset: 4:adf1a74a7f7b4cd193d12992f5d0d6a004ed21d6
131 branch: foo
131 branch: foo
132 tag: tip
132 tag: tip
133 phase: draft
133 phase: draft
134 parent: 1:6c0e42da283a56b5edc5b4fadb491365ec7f5fa8
134 parent: 1:6c0e42da283a56b5edc5b4fadb491365ec7f5fa8
135 parent: -1:0000000000000000000000000000000000000000
135 parent: -1:0000000000000000000000000000000000000000
136 manifest: 1:8c342a37dfba0b3d3ce073562a00d8a813c54ffe
136 manifest: 1:8c342a37dfba0b3d3ce073562a00d8a813c54ffe
137 user: test
137 user: test
138 date: Thu Jan 01 00:00:00 1970 +0000
138 date: Thu Jan 01 00:00:00 1970 +0000
139 files: a
139 files: a
140 extra: branch=foo
140 extra: branch=foo
141 description:
141 description:
142 modify a branch
142 modify a branch
143
143
144
144
145 $ rm $branchcache
145 $ rm $branchcache
146 $ echo corrupted > $branchcache
146 $ echo corrupted > $branchcache
147
147
148 $ hg log -qr foo
148 $ hg log -qr foo
149 4:adf1a74a7f7b
149 4:adf1a74a7f7b
150
150
151 $ cat $branchcache
151 $ cat $branchcache
152 adf1a74a7f7b4cd193d12992f5d0d6a004ed21d6 4
152 adf1a74a7f7b4cd193d12992f5d0d6a004ed21d6 4
153 1c28f494dae69a2f8fc815059d257eccf3fcfe75 default
153 1c28f494dae69a2f8fc815059d257eccf3fcfe75 default
154 adf1a74a7f7b4cd193d12992f5d0d6a004ed21d6 foo
154 adf1a74a7f7b4cd193d12992f5d0d6a004ed21d6 foo
155 c21617b13b220988e7a2e26290fbe4325ffa7139 bar
155 c21617b13b220988e7a2e26290fbe4325ffa7139 bar
156
156
157 Push should update the branch cache:
157 Push should update the branch cache:
158
158
159 $ hg init ../target
159 $ hg init ../target
160
160
161 Pushing just rev 0:
161 Pushing just rev 0:
162
162
163 $ hg push -qr 0 ../target
163 $ hg push -qr 0 ../target
164
164
165 $ cat ../target/$branchcache
165 $ cat ../target/$branchcache
166 db01e8ea3388fd3c7c94e1436ea2bd6a53d581c5 0
166 db01e8ea3388fd3c7c94e1436ea2bd6a53d581c5 0
167 db01e8ea3388fd3c7c94e1436ea2bd6a53d581c5 default
167 db01e8ea3388fd3c7c94e1436ea2bd6a53d581c5 default
168
168
169 Pushing everything:
169 Pushing everything:
170
170
171 $ hg push -qf ../target
171 $ hg push -qf ../target
172
172
173 $ cat ../target/$branchcache
173 $ cat ../target/$branchcache
174 adf1a74a7f7b4cd193d12992f5d0d6a004ed21d6 4
174 adf1a74a7f7b4cd193d12992f5d0d6a004ed21d6 4
175 1c28f494dae69a2f8fc815059d257eccf3fcfe75 default
175 1c28f494dae69a2f8fc815059d257eccf3fcfe75 default
176 adf1a74a7f7b4cd193d12992f5d0d6a004ed21d6 foo
176 adf1a74a7f7b4cd193d12992f5d0d6a004ed21d6 foo
177 c21617b13b220988e7a2e26290fbe4325ffa7139 bar
177 c21617b13b220988e7a2e26290fbe4325ffa7139 bar
178
178
179 Update with no arguments: tipmost revision of the current branch:
179 Update with no arguments: tipmost revision of the current branch:
180
180
181 $ hg up -q -C 0
181 $ hg up -q -C 0
182 $ hg up -q
182 $ hg up -q
183 $ hg id
183 $ hg id
184 1c28f494dae6
184 1c28f494dae6
185
185
186 $ hg up -q 1
186 $ hg up -q 1
187 $ hg up -q
187 $ hg up -q
188 $ hg id
188 $ hg id
189 adf1a74a7f7b (foo) tip
189 adf1a74a7f7b (foo) tip
190
190
191 $ hg branch foobar
191 $ hg branch foobar
192 marked working directory as branch foobar
192 marked working directory as branch foobar
193 (branches are permanent and global, did you want a bookmark?)
193 (branches are permanent and global, did you want a bookmark?)
194
194
195 $ hg up
195 $ hg up
196 abort: branch foobar not found
196 abort: branch foobar not found
197 [255]
197 [255]
198
198
199 Fastforward merge:
199 Fastforward merge:
200
200
201 $ hg branch ff
201 $ hg branch ff
202 marked working directory as branch ff
202 marked working directory as branch ff
203 (branches are permanent and global, did you want a bookmark?)
203 (branches are permanent and global, did you want a bookmark?)
204
204
205 $ echo ff > ff
205 $ echo ff > ff
206 $ hg ci -Am'fast forward'
206 $ hg ci -Am'fast forward'
207 adding ff
207 adding ff
208
208
209 $ hg up foo
209 $ hg up foo
210 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
210 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
211
211
212 $ hg merge ff
212 $ hg merge ff
213 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
213 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
214 (branch merge, don't forget to commit)
214 (branch merge, don't forget to commit)
215
215
216 $ hg branch
216 $ hg branch
217 foo
217 foo
218 $ hg commit -m'Merge ff into foo'
218 $ hg commit -m'Merge ff into foo'
219 $ hg parents
219 $ hg parents
220 changeset: 6:185ffbfefa30
220 changeset: 6:185ffbfefa30
221 branch: foo
221 branch: foo
222 tag: tip
222 tag: tip
223 parent: 4:adf1a74a7f7b
223 parent: 4:adf1a74a7f7b
224 parent: 5:1a3c27dc5e11
224 parent: 5:1a3c27dc5e11
225 user: test
225 user: test
226 date: Thu Jan 01 00:00:00 1970 +0000
226 date: Thu Jan 01 00:00:00 1970 +0000
227 summary: Merge ff into foo
227 summary: Merge ff into foo
228
228
229 $ hg manifest
229 $ hg manifest
230 a
230 a
231 ff
231 ff
232
232
233
233
234 Test merging, add 3 default heads and one test head:
234 Test merging, add 3 default heads and one test head:
235
235
236 $ cd ..
236 $ cd ..
237 $ hg init merges
237 $ hg init merges
238 $ cd merges
238 $ cd merges
239 $ echo a > a
239 $ echo a > a
240 $ hg ci -Ama
240 $ hg ci -Ama
241 adding a
241 adding a
242
242
243 $ echo b > b
243 $ echo b > b
244 $ hg ci -Amb
244 $ hg ci -Amb
245 adding b
245 adding b
246
246
247 $ hg up 0
247 $ hg up 0
248 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
248 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
249 $ echo c > c
249 $ echo c > c
250 $ hg ci -Amc
250 $ hg ci -Amc
251 adding c
251 adding c
252 created new head
252 created new head
253
253
254 $ hg up 0
254 $ hg up 0
255 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
255 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
256 $ echo d > d
256 $ echo d > d
257 $ hg ci -Amd
257 $ hg ci -Amd
258 adding d
258 adding d
259 created new head
259 created new head
260
260
261 $ hg up 0
261 $ hg up 0
262 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
262 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
263 $ hg branch test
263 $ hg branch test
264 marked working directory as branch test
264 marked working directory as branch test
265 (branches are permanent and global, did you want a bookmark?)
265 (branches are permanent and global, did you want a bookmark?)
266 $ echo e >> e
266 $ echo e >> e
267 $ hg ci -Ame
267 $ hg ci -Ame
268 adding e
268 adding e
269
269
270 $ hg log
270 $ hg log
271 changeset: 4:3a1e01ed1df4
271 changeset: 4:3a1e01ed1df4
272 branch: test
272 branch: test
273 tag: tip
273 tag: tip
274 parent: 0:cb9a9f314b8b
274 parent: 0:cb9a9f314b8b
275 user: test
275 user: test
276 date: Thu Jan 01 00:00:00 1970 +0000
276 date: Thu Jan 01 00:00:00 1970 +0000
277 summary: e
277 summary: e
278
278
279 changeset: 3:980f7dc84c29
279 changeset: 3:980f7dc84c29
280 parent: 0:cb9a9f314b8b
280 parent: 0:cb9a9f314b8b
281 user: test
281 user: test
282 date: Thu Jan 01 00:00:00 1970 +0000
282 date: Thu Jan 01 00:00:00 1970 +0000
283 summary: d
283 summary: d
284
284
285 changeset: 2:d36c0562f908
285 changeset: 2:d36c0562f908
286 parent: 0:cb9a9f314b8b
286 parent: 0:cb9a9f314b8b
287 user: test
287 user: test
288 date: Thu Jan 01 00:00:00 1970 +0000
288 date: Thu Jan 01 00:00:00 1970 +0000
289 summary: c
289 summary: c
290
290
291 changeset: 1:d2ae7f538514
291 changeset: 1:d2ae7f538514
292 user: test
292 user: test
293 date: Thu Jan 01 00:00:00 1970 +0000
293 date: Thu Jan 01 00:00:00 1970 +0000
294 summary: b
294 summary: b
295
295
296 changeset: 0:cb9a9f314b8b
296 changeset: 0:cb9a9f314b8b
297 user: test
297 user: test
298 date: Thu Jan 01 00:00:00 1970 +0000
298 date: Thu Jan 01 00:00:00 1970 +0000
299 summary: a
299 summary: a
300
300
301 Implicit merge with test branch as parent:
301 Implicit merge with test branch as parent:
302
302
303 $ hg merge
303 $ hg merge
304 abort: branch 'test' has one head - please merge with an explicit rev
304 abort: branch 'test' has one head - please merge with an explicit rev
305 (run 'hg heads' to see all heads)
305 (run 'hg heads' to see all heads)
306 [255]
306 [255]
307 $ hg up -C default
307 $ hg up -C default
308 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
308 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
309
309
310 Implicit merge with default branch as parent:
310 Implicit merge with default branch as parent:
311
311
312 $ hg merge
312 $ hg merge
313 abort: branch 'default' has 3 heads - please merge with an explicit rev
313 abort: branch 'default' has 3 heads - please merge with an explicit rev
314 (run 'hg heads .' to see heads)
314 (run 'hg heads .' to see heads)
315 [255]
315 [255]
316
316
317 3 branch heads, explicit merge required:
317 3 branch heads, explicit merge required:
318
318
319 $ hg merge 2
319 $ hg merge 2
320 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
320 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
321 (branch merge, don't forget to commit)
321 (branch merge, don't forget to commit)
322 $ hg ci -m merge
322 $ hg ci -m merge
323
323
324 2 branch heads, implicit merge works:
324 2 branch heads, implicit merge works:
325
325
326 $ hg merge
326 $ hg merge
327 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
327 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
328 (branch merge, don't forget to commit)
328 (branch merge, don't forget to commit)
329
329
330 $ cd ..
330 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now