##// END OF EJS Templates
clone: properly mark branches closed with --uncompressed (issue4428)...
Matt Mackall -
r23126:8b4a8a91 stable
parent child Browse files
Show More
@@ -1680,15 +1680,22 b' class localrepository(object):'
1680
1680
1681 if rbranchmap:
1681 if rbranchmap:
1682 rbheads = []
1682 rbheads = []
1683 closed = []
1683 for bheads in rbranchmap.itervalues():
1684 for bheads in rbranchmap.itervalues():
1684 rbheads.extend(bheads)
1685 rbheads.extend(bheads)
1686 for h in bheads:
1687 r = self.changelog.rev(h)
1688 b, c = self.changelog.branchinfo(r)
1689 if c:
1690 closed.append(h)
1685
1691
1686 if rbheads:
1692 if rbheads:
1687 rtiprev = max((int(self.changelog.rev(node))
1693 rtiprev = max((int(self.changelog.rev(node))
1688 for node in rbheads))
1694 for node in rbheads))
1689 cache = branchmap.branchcache(rbranchmap,
1695 cache = branchmap.branchcache(rbranchmap,
1690 self[rtiprev].node(),
1696 self[rtiprev].node(),
1691 rtiprev)
1697 rtiprev,
1698 closednodes=closed)
1692 # Try to stick it as low as possible
1699 # Try to stick it as low as possible
1693 # filter above served are unlikely to be fetch from a clone
1700 # filter above served are unlikely to be fetch from a clone
1694 for candidate in ('base', 'immutable', 'served'):
1701 for candidate in ('base', 'immutable', 'served'):
@@ -9,6 +9,20 b" creating 'remote' repo"
9 $ echo this > foo
9 $ echo this > foo
10 $ echo this > fooO
10 $ echo this > fooO
11 $ hg ci -A -m "init" foo fooO
11 $ hg ci -A -m "init" foo fooO
12
13 insert a closed branch (issue4428)
14
15 $ hg up null
16 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
17 $ hg branch closed
18 marked working directory as branch closed
19 (branches are permanent and global, did you want a bookmark?)
20 $ hg ci -mc0
21 $ hg ci --close-branch -mc1
22 $ hg up -q default
23
24 configure for serving
25
12 $ cat <<EOF > .hg/hgrc
26 $ cat <<EOF > .hg/hgrc
13 > [server]
27 > [server]
14 > uncompressed = True
28 > uncompressed = True
@@ -36,8 +50,8 b' clone remote via stream'
36
50
37 $ hg clone -e "python \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/remote local-stream
51 $ hg clone -e "python \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/remote local-stream
38 streaming all changes
52 streaming all changes
39 4 files to transfer, 392 bytes of data
53 4 files to transfer, 615 bytes of data
40 transferred 392 bytes in * seconds (*/sec) (glob)
54 transferred 615 bytes in * seconds (*) (glob)
41 searching for changes
55 searching for changes
42 no changes found
56 no changes found
43 updating to branch default
57 updating to branch default
@@ -48,7 +62,9 b' clone remote via stream'
48 checking manifests
62 checking manifests
49 crosschecking files in changesets and manifests
63 crosschecking files in changesets and manifests
50 checking files
64 checking files
51 2 files, 1 changesets, 2 total revisions
65 2 files, 3 changesets, 2 total revisions
66 $ hg branches
67 default 0:1160648e36ce
52 $ cd ..
68 $ cd ..
53
69
54 clone bookmarks via stream
70 clone bookmarks via stream
@@ -56,8 +72,8 b' clone bookmarks via stream'
56 $ hg -R local-stream book mybook
72 $ hg -R local-stream book mybook
57 $ hg clone -e "python \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/local-stream stream2
73 $ hg clone -e "python \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/local-stream stream2
58 streaming all changes
74 streaming all changes
59 4 files to transfer, 392 bytes of data
75 4 files to transfer, 615 bytes of data
60 transferred 392 bytes in * seconds (* KB/sec) (glob)
76 transferred 615 bytes in * seconds (*) (glob)
61 searching for changes
77 searching for changes
62 no changes found
78 no changes found
63 updating to branch default
79 updating to branch default
@@ -75,7 +91,7 b' clone remote via pull'
75 adding changesets
91 adding changesets
76 adding manifests
92 adding manifests
77 adding file changes
93 adding file changes
78 added 1 changesets with 2 changes to 2 files
94 added 3 changesets with 2 changes to 2 files
79 updating to branch default
95 updating to branch default
80 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
96 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
81
97
@@ -87,7 +103,7 b' verify'
87 checking manifests
103 checking manifests
88 crosschecking files in changesets and manifests
104 crosschecking files in changesets and manifests
89 checking files
105 checking files
90 2 files, 1 changesets, 2 total revisions
106 2 files, 3 changesets, 2 total revisions
91 $ echo '[hooks]' >> .hg/hgrc
107 $ echo '[hooks]' >> .hg/hgrc
92 $ echo "changegroup = python \"$TESTDIR/printenv.py\" changegroup-in-local 0 ../dummylog" >> .hg/hgrc
108 $ echo "changegroup = python \"$TESTDIR/printenv.py\" changegroup-in-local 0 ../dummylog" >> .hg/hgrc
93
109
@@ -116,8 +132,9 b' find outgoing'
116 $ hg out ssh://user@dummy/remote
132 $ hg out ssh://user@dummy/remote
117 comparing with ssh://user@dummy/remote
133 comparing with ssh://user@dummy/remote
118 searching for changes
134 searching for changes
119 changeset: 1:a28a9d1a809c
135 changeset: 3:a28a9d1a809c
120 tag: tip
136 tag: tip
137 parent: 0:1160648e36ce
121 user: test
138 user: test
122 date: Thu Jan 01 00:00:00 1970 +0000
139 date: Thu Jan 01 00:00:00 1970 +0000
123 summary: add
140 summary: add
@@ -128,8 +145,9 b' find incoming on the remote side'
128 $ hg incoming -R ../remote -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/local
145 $ hg incoming -R ../remote -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/local
129 comparing with ssh://user@dummy/local
146 comparing with ssh://user@dummy/local
130 searching for changes
147 searching for changes
131 changeset: 1:a28a9d1a809c
148 changeset: 3:a28a9d1a809c
132 tag: tip
149 tag: tip
150 parent: 0:1160648e36ce
133 user: test
151 user: test
134 date: Thu Jan 01 00:00:00 1970 +0000
152 date: Thu Jan 01 00:00:00 1970 +0000
135 summary: add
153 summary: add
@@ -140,8 +158,9 b' find incoming on the remote side (using '
140 $ hg incoming -R ../remote -e "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`"
158 $ hg incoming -R ../remote -e "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`"
141 comparing with ssh://user@dummy/$TESTTMP/local
159 comparing with ssh://user@dummy/$TESTTMP/local
142 searching for changes
160 searching for changes
143 changeset: 1:a28a9d1a809c
161 changeset: 3:a28a9d1a809c
144 tag: tip
162 tag: tip
163 parent: 0:1160648e36ce
145 user: test
164 user: test
146 date: Thu Jan 01 00:00:00 1970 +0000
165 date: Thu Jan 01 00:00:00 1970 +0000
147 summary: add
166 summary: add
@@ -161,8 +180,9 b' push'
161 check remote tip
180 check remote tip
162
181
163 $ hg tip
182 $ hg tip
164 changeset: 1:a28a9d1a809c
183 changeset: 3:a28a9d1a809c
165 tag: tip
184 tag: tip
185 parent: 0:1160648e36ce
166 user: test
186 user: test
167 date: Thu Jan 01 00:00:00 1970 +0000
187 date: Thu Jan 01 00:00:00 1970 +0000
168 summary: add
188 summary: add
@@ -172,7 +192,7 b' check remote tip'
172 checking manifests
192 checking manifests
173 crosschecking files in changesets and manifests
193 crosschecking files in changesets and manifests
174 checking files
194 checking files
175 2 files, 2 changesets, 3 total revisions
195 2 files, 4 changesets, 3 total revisions
176 $ hg cat -r tip foo
196 $ hg cat -r tip foo
177 bleah
197 bleah
178 $ echo z > z
198 $ echo z > z
@@ -248,14 +268,14 b' push should succeed even though it has a'
248 remote: added 1 changesets with 1 changes to 1 files
268 remote: added 1 changesets with 1 changes to 1 files
249 remote: KABOOM
269 remote: KABOOM
250 $ hg -R ../remote heads
270 $ hg -R ../remote heads
251 changeset: 3:1383141674ec
271 changeset: 5:1383141674ec
252 tag: tip
272 tag: tip
253 parent: 1:a28a9d1a809c
273 parent: 3:a28a9d1a809c
254 user: test
274 user: test
255 date: Thu Jan 01 00:00:00 1970 +0000
275 date: Thu Jan 01 00:00:00 1970 +0000
256 summary: z
276 summary: z
257
277
258 changeset: 2:6c0482d977a3
278 changeset: 4:6c0482d977a3
259 parent: 0:1160648e36ce
279 parent: 0:1160648e36ce
260 user: test
280 user: test
261 date: Thu Jan 01 00:00:00 1970 +0000
281 date: Thu Jan 01 00:00:00 1970 +0000
@@ -266,17 +286,17 b' clone bookmarks'
266
286
267 $ hg -R ../remote bookmark test
287 $ hg -R ../remote bookmark test
268 $ hg -R ../remote bookmarks
288 $ hg -R ../remote bookmarks
269 * test 2:6c0482d977a3
289 * test 4:6c0482d977a3
270 $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks
290 $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks
271 requesting all changes
291 requesting all changes
272 adding changesets
292 adding changesets
273 adding manifests
293 adding manifests
274 adding file changes
294 adding file changes
275 added 4 changesets with 5 changes to 4 files (+1 heads)
295 added 6 changesets with 5 changes to 4 files (+1 heads)
276 updating to branch default
296 updating to branch default
277 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
297 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
278 $ hg -R local-bookmarks bookmarks
298 $ hg -R local-bookmarks bookmarks
279 test 2:6c0482d977a3
299 test 4:6c0482d977a3
280
300
281 passwords in ssh urls are not supported
301 passwords in ssh urls are not supported
282 (we use a glob here because different Python versions give different
302 (we use a glob here because different Python versions give different
@@ -359,7 +379,7 b' Test hg-ssh in read-only mode:'
359 adding changesets
379 adding changesets
360 adding manifests
380 adding manifests
361 adding file changes
381 adding file changes
362 added 4 changesets with 5 changes to 4 files (+1 heads)
382 added 6 changesets with 5 changes to 4 files (+1 heads)
363 updating to branch default
383 updating to branch default
364 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
384 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
365
385
General Comments 0
You need to be logged in to leave comments. Login now