Show More
@@ -1,249 +1,253 b'' | |||||
1 | # setdiscovery.py - improved discovery of common nodeset for mercurial |
|
1 | # setdiscovery.py - improved discovery of common nodeset for mercurial | |
2 | # |
|
2 | # | |
3 | # Copyright 2010 Benoit Boissinot <bboissin@gmail.com> |
|
3 | # Copyright 2010 Benoit Boissinot <bboissin@gmail.com> | |
4 | # and Peter Arrenbrecht <peter@arrenbrecht.ch> |
|
4 | # and Peter Arrenbrecht <peter@arrenbrecht.ch> | |
5 | # |
|
5 | # | |
6 | # This software may be used and distributed according to the terms of the |
|
6 | # This software may be used and distributed according to the terms of the | |
7 | # GNU General Public License version 2 or any later version. |
|
7 | # GNU General Public License version 2 or any later version. | |
8 | """ |
|
8 | """ | |
9 | Algorithm works in the following way. You have two repository: local and |
|
9 | Algorithm works in the following way. You have two repository: local and | |
10 | remote. They both contains a DAG of changelists. |
|
10 | remote. They both contains a DAG of changelists. | |
11 |
|
11 | |||
12 | The goal of the discovery protocol is to find one set of node *common*, |
|
12 | The goal of the discovery protocol is to find one set of node *common*, | |
13 | the set of nodes shared by local and remote. |
|
13 | the set of nodes shared by local and remote. | |
14 |
|
14 | |||
15 | One of the issue with the original protocol was latency, it could |
|
15 | One of the issue with the original protocol was latency, it could | |
16 | potentially require lots of roundtrips to discover that the local repo was a |
|
16 | potentially require lots of roundtrips to discover that the local repo was a | |
17 | subset of remote (which is a very common case, you usually have few changes |
|
17 | subset of remote (which is a very common case, you usually have few changes | |
18 | compared to upstream, while upstream probably had lots of development). |
|
18 | compared to upstream, while upstream probably had lots of development). | |
19 |
|
19 | |||
20 | The new protocol only requires one interface for the remote repo: `known()`, |
|
20 | The new protocol only requires one interface for the remote repo: `known()`, | |
21 | which given a set of changelists tells you if they are present in the DAG. |
|
21 | which given a set of changelists tells you if they are present in the DAG. | |
22 |
|
22 | |||
23 | The algorithm then works as follow: |
|
23 | The algorithm then works as follow: | |
24 |
|
24 | |||
25 | - We will be using three sets, `common`, `missing`, `unknown`. Originally |
|
25 | - We will be using three sets, `common`, `missing`, `unknown`. Originally | |
26 | all nodes are in `unknown`. |
|
26 | all nodes are in `unknown`. | |
27 | - Take a sample from `unknown`, call `remote.known(sample)` |
|
27 | - Take a sample from `unknown`, call `remote.known(sample)` | |
28 | - For each node that remote knows, move it and all its ancestors to `common` |
|
28 | - For each node that remote knows, move it and all its ancestors to `common` | |
29 | - For each node that remote doesn't know, move it and all its descendants |
|
29 | - For each node that remote doesn't know, move it and all its descendants | |
30 | to `missing` |
|
30 | to `missing` | |
31 | - Iterate until `unknown` is empty |
|
31 | - Iterate until `unknown` is empty | |
32 |
|
32 | |||
33 | There are a couple optimizations, first is instead of starting with a random |
|
33 | There are a couple optimizations, first is instead of starting with a random | |
34 | sample of missing, start by sending all heads, in the case where the local |
|
34 | sample of missing, start by sending all heads, in the case where the local | |
35 | repo is a subset, you computed the answer in one round trip. |
|
35 | repo is a subset, you computed the answer in one round trip. | |
36 |
|
36 | |||
37 | Then you can do something similar to the bisecting strategy used when |
|
37 | Then you can do something similar to the bisecting strategy used when | |
38 | finding faulty changesets. Instead of random samples, you can try picking |
|
38 | finding faulty changesets. Instead of random samples, you can try picking | |
39 | nodes that will maximize the number of nodes that will be |
|
39 | nodes that will maximize the number of nodes that will be | |
40 | classified with it (since all ancestors or descendants will be marked as well). |
|
40 | classified with it (since all ancestors or descendants will be marked as well). | |
41 | """ |
|
41 | """ | |
42 |
|
42 | |||
43 | from __future__ import absolute_import |
|
43 | from __future__ import absolute_import | |
44 |
|
44 | |||
45 | import collections |
|
45 | import collections | |
46 | import random |
|
46 | import random | |
47 |
|
47 | |||
48 | from .i18n import _ |
|
48 | from .i18n import _ | |
49 | from .node import ( |
|
49 | from .node import ( | |
50 | nullid, |
|
50 | nullid, | |
51 | nullrev, |
|
51 | nullrev, | |
52 | ) |
|
52 | ) | |
53 | from . import ( |
|
53 | from . import ( | |
54 | dagutil, |
|
54 | dagutil, | |
55 | error, |
|
55 | error, | |
|
56 | util, | |||
56 | ) |
|
57 | ) | |
57 |
|
58 | |||
58 | def _updatesample(dag, nodes, sample, quicksamplesize=0): |
|
59 | def _updatesample(dag, nodes, sample, quicksamplesize=0): | |
59 | """update an existing sample to match the expected size |
|
60 | """update an existing sample to match the expected size | |
60 |
|
61 | |||
61 | The sample is updated with nodes exponentially distant from each head of the |
|
62 | The sample is updated with nodes exponentially distant from each head of the | |
62 | <nodes> set. (H~1, H~2, H~4, H~8, etc). |
|
63 | <nodes> set. (H~1, H~2, H~4, H~8, etc). | |
63 |
|
64 | |||
64 | If a target size is specified, the sampling will stop once this size is |
|
65 | If a target size is specified, the sampling will stop once this size is | |
65 | reached. Otherwise sampling will happen until roots of the <nodes> set are |
|
66 | reached. Otherwise sampling will happen until roots of the <nodes> set are | |
66 | reached. |
|
67 | reached. | |
67 |
|
68 | |||
68 | :dag: a dag object from dagutil |
|
69 | :dag: a dag object from dagutil | |
69 | :nodes: set of nodes we want to discover (if None, assume the whole dag) |
|
70 | :nodes: set of nodes we want to discover (if None, assume the whole dag) | |
70 | :sample: a sample to update |
|
71 | :sample: a sample to update | |
71 | :quicksamplesize: optional target size of the sample""" |
|
72 | :quicksamplesize: optional target size of the sample""" | |
72 | # if nodes is empty we scan the entire graph |
|
73 | # if nodes is empty we scan the entire graph | |
73 | if nodes: |
|
74 | if nodes: | |
74 | heads = dag.headsetofconnecteds(nodes) |
|
75 | heads = dag.headsetofconnecteds(nodes) | |
75 | else: |
|
76 | else: | |
76 | heads = dag.heads() |
|
77 | heads = dag.heads() | |
77 | dist = {} |
|
78 | dist = {} | |
78 | visit = collections.deque(heads) |
|
79 | visit = collections.deque(heads) | |
79 | seen = set() |
|
80 | seen = set() | |
80 | factor = 1 |
|
81 | factor = 1 | |
81 | while visit: |
|
82 | while visit: | |
82 | curr = visit.popleft() |
|
83 | curr = visit.popleft() | |
83 | if curr in seen: |
|
84 | if curr in seen: | |
84 | continue |
|
85 | continue | |
85 | d = dist.setdefault(curr, 1) |
|
86 | d = dist.setdefault(curr, 1) | |
86 | if d > factor: |
|
87 | if d > factor: | |
87 | factor *= 2 |
|
88 | factor *= 2 | |
88 | if d == factor: |
|
89 | if d == factor: | |
89 | sample.add(curr) |
|
90 | sample.add(curr) | |
90 | if quicksamplesize and (len(sample) >= quicksamplesize): |
|
91 | if quicksamplesize and (len(sample) >= quicksamplesize): | |
91 | return |
|
92 | return | |
92 | seen.add(curr) |
|
93 | seen.add(curr) | |
93 | for p in dag.parents(curr): |
|
94 | for p in dag.parents(curr): | |
94 | if not nodes or p in nodes: |
|
95 | if not nodes or p in nodes: | |
95 | dist.setdefault(p, d + 1) |
|
96 | dist.setdefault(p, d + 1) | |
96 | visit.append(p) |
|
97 | visit.append(p) | |
97 |
|
98 | |||
98 | def _takequicksample(dag, nodes, size): |
|
99 | def _takequicksample(dag, nodes, size): | |
99 | """takes a quick sample of size <size> |
|
100 | """takes a quick sample of size <size> | |
100 |
|
101 | |||
101 | It is meant for initial sampling and focuses on querying heads and close |
|
102 | It is meant for initial sampling and focuses on querying heads and close | |
102 | ancestors of heads. |
|
103 | ancestors of heads. | |
103 |
|
104 | |||
104 | :dag: a dag object |
|
105 | :dag: a dag object | |
105 | :nodes: set of nodes to discover |
|
106 | :nodes: set of nodes to discover | |
106 | :size: the maximum size of the sample""" |
|
107 | :size: the maximum size of the sample""" | |
107 | sample = dag.headsetofconnecteds(nodes) |
|
108 | sample = dag.headsetofconnecteds(nodes) | |
108 | if size <= len(sample): |
|
109 | if size <= len(sample): | |
109 | return _limitsample(sample, size) |
|
110 | return _limitsample(sample, size) | |
110 | _updatesample(dag, None, sample, quicksamplesize=size) |
|
111 | _updatesample(dag, None, sample, quicksamplesize=size) | |
111 | return sample |
|
112 | return sample | |
112 |
|
113 | |||
113 | def _takefullsample(dag, nodes, size): |
|
114 | def _takefullsample(dag, nodes, size): | |
114 | sample = dag.headsetofconnecteds(nodes) |
|
115 | sample = dag.headsetofconnecteds(nodes) | |
115 | # update from heads |
|
116 | # update from heads | |
116 | _updatesample(dag, nodes, sample) |
|
117 | _updatesample(dag, nodes, sample) | |
117 | # update from roots |
|
118 | # update from roots | |
118 | _updatesample(dag.inverse(), nodes, sample) |
|
119 | _updatesample(dag.inverse(), nodes, sample) | |
119 | assert sample |
|
120 | assert sample | |
120 | sample = _limitsample(sample, size) |
|
121 | sample = _limitsample(sample, size) | |
121 | if len(sample) < size: |
|
122 | if len(sample) < size: | |
122 | more = size - len(sample) |
|
123 | more = size - len(sample) | |
123 | sample.update(random.sample(list(nodes - sample), more)) |
|
124 | sample.update(random.sample(list(nodes - sample), more)) | |
124 | return sample |
|
125 | return sample | |
125 |
|
126 | |||
126 | def _limitsample(sample, desiredlen): |
|
127 | def _limitsample(sample, desiredlen): | |
127 | """return a random subset of sample of at most desiredlen item""" |
|
128 | """return a random subset of sample of at most desiredlen item""" | |
128 | if len(sample) > desiredlen: |
|
129 | if len(sample) > desiredlen: | |
129 | sample = set(random.sample(sample, desiredlen)) |
|
130 | sample = set(random.sample(sample, desiredlen)) | |
130 | return sample |
|
131 | return sample | |
131 |
|
132 | |||
132 | def findcommonheads(ui, local, remote, |
|
133 | def findcommonheads(ui, local, remote, | |
133 | initialsamplesize=100, |
|
134 | initialsamplesize=100, | |
134 | fullsamplesize=200, |
|
135 | fullsamplesize=200, | |
135 | abortwhenunrelated=True): |
|
136 | abortwhenunrelated=True): | |
136 | '''Return a tuple (common, anyincoming, remoteheads) used to identify |
|
137 | '''Return a tuple (common, anyincoming, remoteheads) used to identify | |
137 | missing nodes from or in remote. |
|
138 | missing nodes from or in remote. | |
138 | ''' |
|
139 | ''' | |
|
140 | start = util.timer() | |||
|
141 | ||||
139 | roundtrips = 0 |
|
142 | roundtrips = 0 | |
140 | cl = local.changelog |
|
143 | cl = local.changelog | |
141 | dag = dagutil.revlogdag(cl) |
|
144 | dag = dagutil.revlogdag(cl) | |
142 |
|
145 | |||
143 | # early exit if we know all the specified remote heads already |
|
146 | # early exit if we know all the specified remote heads already | |
144 | ui.debug("query 1; heads\n") |
|
147 | ui.debug("query 1; heads\n") | |
145 | roundtrips += 1 |
|
148 | roundtrips += 1 | |
146 | ownheads = dag.heads() |
|
149 | ownheads = dag.heads() | |
147 | sample = _limitsample(ownheads, initialsamplesize) |
|
150 | sample = _limitsample(ownheads, initialsamplesize) | |
148 | # indices between sample and externalized version must match |
|
151 | # indices between sample and externalized version must match | |
149 | sample = list(sample) |
|
152 | sample = list(sample) | |
150 | batch = remote.iterbatch() |
|
153 | batch = remote.iterbatch() | |
151 | batch.heads() |
|
154 | batch.heads() | |
152 | batch.known(dag.externalizeall(sample)) |
|
155 | batch.known(dag.externalizeall(sample)) | |
153 | batch.submit() |
|
156 | batch.submit() | |
154 | srvheadhashes, yesno = batch.results() |
|
157 | srvheadhashes, yesno = batch.results() | |
155 |
|
158 | |||
156 | if cl.tip() == nullid: |
|
159 | if cl.tip() == nullid: | |
157 | if srvheadhashes != [nullid]: |
|
160 | if srvheadhashes != [nullid]: | |
158 | return [nullid], True, srvheadhashes |
|
161 | return [nullid], True, srvheadhashes | |
159 | return [nullid], False, [] |
|
162 | return [nullid], False, [] | |
160 |
|
163 | |||
161 | # start actual discovery (we note this before the next "if" for |
|
164 | # start actual discovery (we note this before the next "if" for | |
162 | # compatibility reasons) |
|
165 | # compatibility reasons) | |
163 | ui.status(_("searching for changes\n")) |
|
166 | ui.status(_("searching for changes\n")) | |
164 |
|
167 | |||
165 | srvheads = dag.internalizeall(srvheadhashes, filterunknown=True) |
|
168 | srvheads = dag.internalizeall(srvheadhashes, filterunknown=True) | |
166 | if len(srvheads) == len(srvheadhashes): |
|
169 | if len(srvheads) == len(srvheadhashes): | |
167 | ui.debug("all remote heads known locally\n") |
|
170 | ui.debug("all remote heads known locally\n") | |
168 | return (srvheadhashes, False, srvheadhashes,) |
|
171 | return (srvheadhashes, False, srvheadhashes,) | |
169 |
|
172 | |||
170 | if sample and len(ownheads) <= initialsamplesize and all(yesno): |
|
173 | if sample and len(ownheads) <= initialsamplesize and all(yesno): | |
171 | ui.note(_("all local heads known remotely\n")) |
|
174 | ui.note(_("all local heads known remotely\n")) | |
172 | ownheadhashes = dag.externalizeall(ownheads) |
|
175 | ownheadhashes = dag.externalizeall(ownheads) | |
173 | return (ownheadhashes, True, srvheadhashes,) |
|
176 | return (ownheadhashes, True, srvheadhashes,) | |
174 |
|
177 | |||
175 | # full blown discovery |
|
178 | # full blown discovery | |
176 |
|
179 | |||
177 | # own nodes I know we both know |
|
180 | # own nodes I know we both know | |
178 | # treat remote heads (and maybe own heads) as a first implicit sample |
|
181 | # treat remote heads (and maybe own heads) as a first implicit sample | |
179 | # response |
|
182 | # response | |
180 | common = cl.incrementalmissingrevs(srvheads) |
|
183 | common = cl.incrementalmissingrevs(srvheads) | |
181 | commoninsample = set(n for i, n in enumerate(sample) if yesno[i]) |
|
184 | commoninsample = set(n for i, n in enumerate(sample) if yesno[i]) | |
182 | common.addbases(commoninsample) |
|
185 | common.addbases(commoninsample) | |
183 | # own nodes where I don't know if remote knows them |
|
186 | # own nodes where I don't know if remote knows them | |
184 | undecided = set(common.missingancestors(ownheads)) |
|
187 | undecided = set(common.missingancestors(ownheads)) | |
185 | # own nodes I know remote lacks |
|
188 | # own nodes I know remote lacks | |
186 | missing = set() |
|
189 | missing = set() | |
187 |
|
190 | |||
188 | full = False |
|
191 | full = False | |
189 | while undecided: |
|
192 | while undecided: | |
190 |
|
193 | |||
191 | if sample: |
|
194 | if sample: | |
192 | missinginsample = [n for i, n in enumerate(sample) if not yesno[i]] |
|
195 | missinginsample = [n for i, n in enumerate(sample) if not yesno[i]] | |
193 | missing.update(dag.descendantset(missinginsample, missing)) |
|
196 | missing.update(dag.descendantset(missinginsample, missing)) | |
194 |
|
197 | |||
195 | undecided.difference_update(missing) |
|
198 | undecided.difference_update(missing) | |
196 |
|
199 | |||
197 | if not undecided: |
|
200 | if not undecided: | |
198 | break |
|
201 | break | |
199 |
|
202 | |||
200 | if full or common.hasbases(): |
|
203 | if full or common.hasbases(): | |
201 | if full: |
|
204 | if full: | |
202 | ui.note(_("sampling from both directions\n")) |
|
205 | ui.note(_("sampling from both directions\n")) | |
203 | else: |
|
206 | else: | |
204 | ui.debug("taking initial sample\n") |
|
207 | ui.debug("taking initial sample\n") | |
205 | samplefunc = _takefullsample |
|
208 | samplefunc = _takefullsample | |
206 | targetsize = fullsamplesize |
|
209 | targetsize = fullsamplesize | |
207 | else: |
|
210 | else: | |
208 | # use even cheaper initial sample |
|
211 | # use even cheaper initial sample | |
209 | ui.debug("taking quick initial sample\n") |
|
212 | ui.debug("taking quick initial sample\n") | |
210 | samplefunc = _takequicksample |
|
213 | samplefunc = _takequicksample | |
211 | targetsize = initialsamplesize |
|
214 | targetsize = initialsamplesize | |
212 | if len(undecided) < targetsize: |
|
215 | if len(undecided) < targetsize: | |
213 | sample = list(undecided) |
|
216 | sample = list(undecided) | |
214 | else: |
|
217 | else: | |
215 | sample = samplefunc(dag, undecided, targetsize) |
|
218 | sample = samplefunc(dag, undecided, targetsize) | |
216 | sample = _limitsample(sample, targetsize) |
|
219 | sample = _limitsample(sample, targetsize) | |
217 |
|
220 | |||
218 | roundtrips += 1 |
|
221 | roundtrips += 1 | |
219 | ui.progress(_('searching'), roundtrips, unit=_('queries')) |
|
222 | ui.progress(_('searching'), roundtrips, unit=_('queries')) | |
220 | ui.debug("query %i; still undecided: %i, sample size is: %i\n" |
|
223 | ui.debug("query %i; still undecided: %i, sample size is: %i\n" | |
221 | % (roundtrips, len(undecided), len(sample))) |
|
224 | % (roundtrips, len(undecided), len(sample))) | |
222 | # indices between sample and externalized version must match |
|
225 | # indices between sample and externalized version must match | |
223 | sample = list(sample) |
|
226 | sample = list(sample) | |
224 | yesno = remote.known(dag.externalizeall(sample)) |
|
227 | yesno = remote.known(dag.externalizeall(sample)) | |
225 | full = True |
|
228 | full = True | |
226 |
|
229 | |||
227 | if sample: |
|
230 | if sample: | |
228 | commoninsample = set(n for i, n in enumerate(sample) if yesno[i]) |
|
231 | commoninsample = set(n for i, n in enumerate(sample) if yesno[i]) | |
229 | common.addbases(commoninsample) |
|
232 | common.addbases(commoninsample) | |
230 | common.removeancestorsfrom(undecided) |
|
233 | common.removeancestorsfrom(undecided) | |
231 |
|
234 | |||
232 | # heads(common) == heads(common.bases) since common represents common.bases |
|
235 | # heads(common) == heads(common.bases) since common represents common.bases | |
233 | # and all its ancestors |
|
236 | # and all its ancestors | |
234 | result = dag.headsetofconnecteds(common.bases) |
|
237 | result = dag.headsetofconnecteds(common.bases) | |
235 | # common.bases can include nullrev, but our contract requires us to not |
|
238 | # common.bases can include nullrev, but our contract requires us to not | |
236 | # return any heads in that case, so discard that |
|
239 | # return any heads in that case, so discard that | |
237 | result.discard(nullrev) |
|
240 | result.discard(nullrev) | |
|
241 | elapsed = util.timer() - start | |||
238 | ui.progress(_('searching'), None) |
|
242 | ui.progress(_('searching'), None) | |
239 | ui.debug("%d total queries\n" % roundtrips) |
|
243 | ui.debug("%d total queries in %.4fs\n" % (roundtrips, elapsed)) | |
240 |
|
244 | |||
241 | if not result and srvheadhashes != [nullid]: |
|
245 | if not result and srvheadhashes != [nullid]: | |
242 | if abortwhenunrelated: |
|
246 | if abortwhenunrelated: | |
243 | raise error.Abort(_("repository is unrelated")) |
|
247 | raise error.Abort(_("repository is unrelated")) | |
244 | else: |
|
248 | else: | |
245 | ui.warn(_("warning: repository is unrelated\n")) |
|
249 | ui.warn(_("warning: repository is unrelated\n")) | |
246 | return ({nullid}, True, srvheadhashes,) |
|
250 | return ({nullid}, True, srvheadhashes,) | |
247 |
|
251 | |||
248 | anyincoming = (srvheadhashes != [nullid]) |
|
252 | anyincoming = (srvheadhashes != [nullid]) | |
249 | return dag.externalizeall(result), anyincoming, srvheadhashes |
|
253 | return dag.externalizeall(result), anyincoming, srvheadhashes |
@@ -1,171 +1,171 b'' | |||||
1 | Test changesets filtering during exchanges (some tests are still in |
|
1 | Test changesets filtering during exchanges (some tests are still in | |
2 | test-obsolete.t) |
|
2 | test-obsolete.t) | |
3 |
|
3 | |||
4 | $ cat >> $HGRCPATH << EOF |
|
4 | $ cat >> $HGRCPATH << EOF | |
5 | > [experimental] |
|
5 | > [experimental] | |
6 | > evolution=createmarkers |
|
6 | > evolution=createmarkers | |
7 | > EOF |
|
7 | > EOF | |
8 |
|
8 | |||
9 | Push does not corrupt remote |
|
9 | Push does not corrupt remote | |
10 | ---------------------------- |
|
10 | ---------------------------- | |
11 |
|
11 | |||
12 | Create a DAG where a changeset reuses a revision from a file first used in an |
|
12 | Create a DAG where a changeset reuses a revision from a file first used in an | |
13 | extinct changeset. |
|
13 | extinct changeset. | |
14 |
|
14 | |||
15 | $ hg init local |
|
15 | $ hg init local | |
16 | $ cd local |
|
16 | $ cd local | |
17 | $ echo 'base' > base |
|
17 | $ echo 'base' > base | |
18 | $ hg commit -Am base |
|
18 | $ hg commit -Am base | |
19 | adding base |
|
19 | adding base | |
20 | $ echo 'A' > A |
|
20 | $ echo 'A' > A | |
21 | $ hg commit -Am A |
|
21 | $ hg commit -Am A | |
22 | adding A |
|
22 | adding A | |
23 | $ hg up 0 |
|
23 | $ hg up 0 | |
24 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
24 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
25 | $ hg revert -ar 1 |
|
25 | $ hg revert -ar 1 | |
26 | adding A |
|
26 | adding A | |
27 | $ hg commit -Am "A'" |
|
27 | $ hg commit -Am "A'" | |
28 | created new head |
|
28 | created new head | |
29 | $ hg log -G --template='{desc} {node}' |
|
29 | $ hg log -G --template='{desc} {node}' | |
30 | @ A' f89bcc95eba5174b1ccc3e33a82e84c96e8338ee |
|
30 | @ A' f89bcc95eba5174b1ccc3e33a82e84c96e8338ee | |
31 | | |
|
31 | | | |
32 | | o A 9d73aac1b2ed7d53835eaeec212ed41ea47da53a |
|
32 | | o A 9d73aac1b2ed7d53835eaeec212ed41ea47da53a | |
33 | |/ |
|
33 | |/ | |
34 | o base d20a80d4def38df63a4b330b7fb688f3d4cae1e3 |
|
34 | o base d20a80d4def38df63a4b330b7fb688f3d4cae1e3 | |
35 |
|
35 | |||
36 | $ hg debugobsolete 9d73aac1b2ed7d53835eaeec212ed41ea47da53a f89bcc95eba5174b1ccc3e33a82e84c96e8338ee |
|
36 | $ hg debugobsolete 9d73aac1b2ed7d53835eaeec212ed41ea47da53a f89bcc95eba5174b1ccc3e33a82e84c96e8338ee | |
37 |
|
37 | |||
38 | Push it. The bundle should not refer to the extinct changeset. |
|
38 | Push it. The bundle should not refer to the extinct changeset. | |
39 |
|
39 | |||
40 | $ hg init ../other |
|
40 | $ hg init ../other | |
41 | $ hg push ../other |
|
41 | $ hg push ../other | |
42 | pushing to ../other |
|
42 | pushing to ../other | |
43 | searching for changes |
|
43 | searching for changes | |
44 | adding changesets |
|
44 | adding changesets | |
45 | adding manifests |
|
45 | adding manifests | |
46 | adding file changes |
|
46 | adding file changes | |
47 | added 2 changesets with 2 changes to 2 files |
|
47 | added 2 changesets with 2 changes to 2 files | |
48 | $ hg -R ../other verify |
|
48 | $ hg -R ../other verify | |
49 | checking changesets |
|
49 | checking changesets | |
50 | checking manifests |
|
50 | checking manifests | |
51 | crosschecking files in changesets and manifests |
|
51 | crosschecking files in changesets and manifests | |
52 | checking files |
|
52 | checking files | |
53 | 2 files, 2 changesets, 2 total revisions |
|
53 | 2 files, 2 changesets, 2 total revisions | |
54 |
|
54 | |||
55 | Adding a changeset going extinct locally |
|
55 | Adding a changeset going extinct locally | |
56 | ------------------------------------------ |
|
56 | ------------------------------------------ | |
57 |
|
57 | |||
58 | Pull a changeset that will immediatly goes extinct (because you already have a |
|
58 | Pull a changeset that will immediatly goes extinct (because you already have a | |
59 | marker to obsolete him) |
|
59 | marker to obsolete him) | |
60 | (test resolution of issue3788) |
|
60 | (test resolution of issue3788) | |
61 |
|
61 | |||
62 | $ hg phase --draft --force f89bcc95eba5 |
|
62 | $ hg phase --draft --force f89bcc95eba5 | |
63 | $ hg phase -R ../other --draft --force f89bcc95eba5 |
|
63 | $ hg phase -R ../other --draft --force f89bcc95eba5 | |
64 | $ hg commit --amend -m "A''" |
|
64 | $ hg commit --amend -m "A''" | |
65 | $ hg --hidden --config extensions.mq= strip --no-backup f89bcc95eba5 |
|
65 | $ hg --hidden --config extensions.mq= strip --no-backup f89bcc95eba5 | |
66 | $ hg pull ../other |
|
66 | $ hg pull ../other | |
67 | pulling from ../other |
|
67 | pulling from ../other | |
68 | searching for changes |
|
68 | searching for changes | |
69 | adding changesets |
|
69 | adding changesets | |
70 | adding manifests |
|
70 | adding manifests | |
71 | adding file changes |
|
71 | adding file changes | |
72 | added 1 changesets with 0 changes to 1 files (+1 heads) |
|
72 | added 1 changesets with 0 changes to 1 files (+1 heads) | |
73 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
73 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
74 |
|
74 | |||
75 | check that bundle is not affected |
|
75 | check that bundle is not affected | |
76 |
|
76 | |||
77 | $ hg bundle --hidden --rev f89bcc95eba5 --base "f89bcc95eba5^" ../f89bcc95eba5.hg |
|
77 | $ hg bundle --hidden --rev f89bcc95eba5 --base "f89bcc95eba5^" ../f89bcc95eba5.hg | |
78 | 1 changesets found |
|
78 | 1 changesets found | |
79 | $ hg --hidden --config extensions.mq= strip --no-backup f89bcc95eba5 |
|
79 | $ hg --hidden --config extensions.mq= strip --no-backup f89bcc95eba5 | |
80 | $ hg unbundle ../f89bcc95eba5.hg |
|
80 | $ hg unbundle ../f89bcc95eba5.hg | |
81 | adding changesets |
|
81 | adding changesets | |
82 | adding manifests |
|
82 | adding manifests | |
83 | adding file changes |
|
83 | adding file changes | |
84 | added 1 changesets with 0 changes to 1 files (+1 heads) |
|
84 | added 1 changesets with 0 changes to 1 files (+1 heads) | |
85 | (run 'hg heads' to see heads) |
|
85 | (run 'hg heads' to see heads) | |
86 |
|
86 | |||
87 | check-that bundle can contain markers: |
|
87 | check-that bundle can contain markers: | |
88 |
|
88 | |||
89 | $ hg bundle --hidden --rev f89bcc95eba5 --base "f89bcc95eba5^" ../f89bcc95eba5-obs.hg --config experimental.evolution.bundle-obsmarker=1 |
|
89 | $ hg bundle --hidden --rev f89bcc95eba5 --base "f89bcc95eba5^" ../f89bcc95eba5-obs.hg --config experimental.evolution.bundle-obsmarker=1 | |
90 | 1 changesets found |
|
90 | 1 changesets found | |
91 | $ hg debugbundle ../f89bcc95eba5.hg |
|
91 | $ hg debugbundle ../f89bcc95eba5.hg | |
92 | Stream params: sortdict([('Compression', 'BZ')]) |
|
92 | Stream params: sortdict([('Compression', 'BZ')]) | |
93 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '1')])" |
|
93 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '1')])" | |
94 | f89bcc95eba5174b1ccc3e33a82e84c96e8338ee |
|
94 | f89bcc95eba5174b1ccc3e33a82e84c96e8338ee | |
95 | $ hg debugbundle ../f89bcc95eba5-obs.hg |
|
95 | $ hg debugbundle ../f89bcc95eba5-obs.hg | |
96 | Stream params: sortdict([('Compression', 'BZ')]) |
|
96 | Stream params: sortdict([('Compression', 'BZ')]) | |
97 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '1')])" |
|
97 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '1')])" | |
98 | f89bcc95eba5174b1ccc3e33a82e84c96e8338ee |
|
98 | f89bcc95eba5174b1ccc3e33a82e84c96e8338ee | |
99 | obsmarkers -- 'sortdict()' |
|
99 | obsmarkers -- 'sortdict()' | |
100 | version: 1 (70 bytes) |
|
100 | version: 1 (70 bytes) | |
101 | 9d73aac1b2ed7d53835eaeec212ed41ea47da53a f89bcc95eba5174b1ccc3e33a82e84c96e8338ee 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
101 | 9d73aac1b2ed7d53835eaeec212ed41ea47da53a f89bcc95eba5174b1ccc3e33a82e84c96e8338ee 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
102 |
|
102 | |||
103 | $ cd .. |
|
103 | $ cd .. | |
104 |
|
104 | |||
105 | pull does not fetch excessive changesets when common node is hidden (issue4982) |
|
105 | pull does not fetch excessive changesets when common node is hidden (issue4982) | |
106 | ------------------------------------------------------------------------------- |
|
106 | ------------------------------------------------------------------------------- | |
107 |
|
107 | |||
108 | initial repo with server and client matching |
|
108 | initial repo with server and client matching | |
109 |
|
109 | |||
110 | $ hg init pull-hidden-common |
|
110 | $ hg init pull-hidden-common | |
111 | $ cd pull-hidden-common |
|
111 | $ cd pull-hidden-common | |
112 | $ touch foo |
|
112 | $ touch foo | |
113 | $ hg -q commit -A -m initial |
|
113 | $ hg -q commit -A -m initial | |
114 | $ echo 1 > foo |
|
114 | $ echo 1 > foo | |
115 | $ hg commit -m 1 |
|
115 | $ hg commit -m 1 | |
116 | $ echo 2a > foo |
|
116 | $ echo 2a > foo | |
117 | $ hg commit -m 2a |
|
117 | $ hg commit -m 2a | |
118 | $ cd .. |
|
118 | $ cd .. | |
119 | $ hg clone --pull pull-hidden-common pull-hidden-common-client |
|
119 | $ hg clone --pull pull-hidden-common pull-hidden-common-client | |
120 | requesting all changes |
|
120 | requesting all changes | |
121 | adding changesets |
|
121 | adding changesets | |
122 | adding manifests |
|
122 | adding manifests | |
123 | adding file changes |
|
123 | adding file changes | |
124 | added 3 changesets with 3 changes to 1 files |
|
124 | added 3 changesets with 3 changes to 1 files | |
125 | updating to branch default |
|
125 | updating to branch default | |
126 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
126 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
127 |
|
127 | |||
128 | server obsoletes the old head |
|
128 | server obsoletes the old head | |
129 |
|
129 | |||
130 | $ cd pull-hidden-common |
|
130 | $ cd pull-hidden-common | |
131 | $ hg -q up -r 1 |
|
131 | $ hg -q up -r 1 | |
132 | $ echo 2b > foo |
|
132 | $ echo 2b > foo | |
133 | $ hg -q commit -m 2b |
|
133 | $ hg -q commit -m 2b | |
134 | $ hg debugobsolete 6a29ed9c68defff1a139e5c6fa9696fb1a75783d bec0734cd68e84477ba7fc1d13e6cff53ab70129 |
|
134 | $ hg debugobsolete 6a29ed9c68defff1a139e5c6fa9696fb1a75783d bec0734cd68e84477ba7fc1d13e6cff53ab70129 | |
135 | $ cd .. |
|
135 | $ cd .. | |
136 |
|
136 | |||
137 | client only pulls down 1 changeset |
|
137 | client only pulls down 1 changeset | |
138 |
|
138 | |||
139 | $ cd pull-hidden-common-client |
|
139 | $ cd pull-hidden-common-client | |
140 | $ hg pull --debug |
|
140 | $ hg pull --debug | |
141 | pulling from $TESTTMP/pull-hidden-common (glob) |
|
141 | pulling from $TESTTMP/pull-hidden-common (glob) | |
142 | query 1; heads |
|
142 | query 1; heads | |
143 | searching for changes |
|
143 | searching for changes | |
144 | taking quick initial sample |
|
144 | taking quick initial sample | |
145 | query 2; still undecided: 2, sample size is: 2 |
|
145 | query 2; still undecided: 2, sample size is: 2 | |
146 | 2 total queries |
|
146 | 2 total queries in *.????s (glob) | |
147 | 1 changesets found |
|
147 | 1 changesets found | |
148 | list of changesets: |
|
148 | list of changesets: | |
149 | bec0734cd68e84477ba7fc1d13e6cff53ab70129 |
|
149 | bec0734cd68e84477ba7fc1d13e6cff53ab70129 | |
150 | listing keys for "phases" |
|
150 | listing keys for "phases" | |
151 | listing keys for "bookmarks" |
|
151 | listing keys for "bookmarks" | |
152 | bundle2-output-bundle: "HG20", 3 parts total |
|
152 | bundle2-output-bundle: "HG20", 3 parts total | |
153 | bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload |
|
153 | bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload | |
154 | bundle2-output-part: "listkeys" (params: 1 mandatory) 58 bytes payload |
|
154 | bundle2-output-part: "listkeys" (params: 1 mandatory) 58 bytes payload | |
155 | bundle2-output-part: "listkeys" (params: 1 mandatory) empty payload |
|
155 | bundle2-output-part: "listkeys" (params: 1 mandatory) empty payload | |
156 | bundle2-input-bundle: with-transaction |
|
156 | bundle2-input-bundle: with-transaction | |
157 | bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported |
|
157 | bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported | |
158 | adding changesets |
|
158 | adding changesets | |
159 | add changeset bec0734cd68e |
|
159 | add changeset bec0734cd68e | |
160 | adding manifests |
|
160 | adding manifests | |
161 | adding file changes |
|
161 | adding file changes | |
162 | adding foo revisions |
|
162 | adding foo revisions | |
163 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
163 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
164 | bundle2-input-part: total payload size 476 |
|
164 | bundle2-input-part: total payload size 476 | |
165 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported |
|
165 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported | |
166 | bundle2-input-part: total payload size 58 |
|
166 | bundle2-input-part: total payload size 58 | |
167 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported |
|
167 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported | |
168 | bundle2-input-bundle: 2 parts total |
|
168 | bundle2-input-bundle: 2 parts total | |
169 | checking for updated bookmarks |
|
169 | checking for updated bookmarks | |
170 | updating the branch cache |
|
170 | updating the branch cache | |
171 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
171 | (run 'hg heads' to see heads, 'hg merge' to merge) |
@@ -1,792 +1,792 b'' | |||||
1 | $ hg init a |
|
1 | $ hg init a | |
2 | $ cd a |
|
2 | $ cd a | |
3 | $ echo foo > t1 |
|
3 | $ echo foo > t1 | |
4 | $ hg add t1 |
|
4 | $ hg add t1 | |
5 | $ hg commit -m "1" |
|
5 | $ hg commit -m "1" | |
6 |
|
6 | |||
7 | $ cd .. |
|
7 | $ cd .. | |
8 | $ hg clone a b |
|
8 | $ hg clone a b | |
9 | updating to branch default |
|
9 | updating to branch default | |
10 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
10 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
11 |
|
11 | |||
12 | $ cd a |
|
12 | $ cd a | |
13 | $ echo foo > t2 |
|
13 | $ echo foo > t2 | |
14 | $ hg add t2 |
|
14 | $ hg add t2 | |
15 | $ hg commit -m "2" |
|
15 | $ hg commit -m "2" | |
16 |
|
16 | |||
17 | $ cd ../b |
|
17 | $ cd ../b | |
18 | $ echo foo > t3 |
|
18 | $ echo foo > t3 | |
19 | $ hg add t3 |
|
19 | $ hg add t3 | |
20 | $ hg commit -m "3" |
|
20 | $ hg commit -m "3" | |
21 |
|
21 | |||
22 | Specifying a revset that evaluates to null will abort |
|
22 | Specifying a revset that evaluates to null will abort | |
23 |
|
23 | |||
24 | $ hg push -r '0 & 1' ../a |
|
24 | $ hg push -r '0 & 1' ../a | |
25 | pushing to ../a |
|
25 | pushing to ../a | |
26 | abort: specified revisions evaluate to an empty set |
|
26 | abort: specified revisions evaluate to an empty set | |
27 | (use different revision arguments) |
|
27 | (use different revision arguments) | |
28 | [255] |
|
28 | [255] | |
29 |
|
29 | |||
30 | $ hg push ../a |
|
30 | $ hg push ../a | |
31 | pushing to ../a |
|
31 | pushing to ../a | |
32 | searching for changes |
|
32 | searching for changes | |
33 | remote has heads on branch 'default' that are not known locally: 1c9246a22a0a |
|
33 | remote has heads on branch 'default' that are not known locally: 1c9246a22a0a | |
34 | abort: push creates new remote head 1e108cc5548c! |
|
34 | abort: push creates new remote head 1e108cc5548c! | |
35 | (pull and merge or see 'hg help push' for details about pushing new heads) |
|
35 | (pull and merge or see 'hg help push' for details about pushing new heads) | |
36 | [255] |
|
36 | [255] | |
37 |
|
37 | |||
38 | $ hg push --debug ../a |
|
38 | $ hg push --debug ../a | |
39 | pushing to ../a |
|
39 | pushing to ../a | |
40 | query 1; heads |
|
40 | query 1; heads | |
41 | searching for changes |
|
41 | searching for changes | |
42 | taking quick initial sample |
|
42 | taking quick initial sample | |
43 | query 2; still undecided: 1, sample size is: 1 |
|
43 | query 2; still undecided: 1, sample size is: 1 | |
44 | 2 total queries |
|
44 | 2 total queries in *.????s (glob) | |
45 | listing keys for "phases" |
|
45 | listing keys for "phases" | |
46 | checking for updated bookmarks |
|
46 | checking for updated bookmarks | |
47 | listing keys for "bookmarks" |
|
47 | listing keys for "bookmarks" | |
48 | listing keys for "bookmarks" |
|
48 | listing keys for "bookmarks" | |
49 | remote has heads on branch 'default' that are not known locally: 1c9246a22a0a |
|
49 | remote has heads on branch 'default' that are not known locally: 1c9246a22a0a | |
50 | new remote heads on branch 'default': |
|
50 | new remote heads on branch 'default': | |
51 | 1e108cc5548c |
|
51 | 1e108cc5548c | |
52 | abort: push creates new remote head 1e108cc5548c! |
|
52 | abort: push creates new remote head 1e108cc5548c! | |
53 | (pull and merge or see 'hg help push' for details about pushing new heads) |
|
53 | (pull and merge or see 'hg help push' for details about pushing new heads) | |
54 | [255] |
|
54 | [255] | |
55 |
|
55 | |||
56 | $ hg pull ../a |
|
56 | $ hg pull ../a | |
57 | pulling from ../a |
|
57 | pulling from ../a | |
58 | searching for changes |
|
58 | searching for changes | |
59 | adding changesets |
|
59 | adding changesets | |
60 | adding manifests |
|
60 | adding manifests | |
61 | adding file changes |
|
61 | adding file changes | |
62 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
62 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
63 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
63 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
64 |
|
64 | |||
65 | $ hg push ../a |
|
65 | $ hg push ../a | |
66 | pushing to ../a |
|
66 | pushing to ../a | |
67 | searching for changes |
|
67 | searching for changes | |
68 | abort: push creates new remote head 1e108cc5548c! |
|
68 | abort: push creates new remote head 1e108cc5548c! | |
69 | (merge or see 'hg help push' for details about pushing new heads) |
|
69 | (merge or see 'hg help push' for details about pushing new heads) | |
70 | [255] |
|
70 | [255] | |
71 |
|
71 | |||
72 | $ hg merge |
|
72 | $ hg merge | |
73 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
73 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
74 | (branch merge, don't forget to commit) |
|
74 | (branch merge, don't forget to commit) | |
75 |
|
75 | |||
76 | $ hg commit -m "4" |
|
76 | $ hg commit -m "4" | |
77 | $ hg push ../a |
|
77 | $ hg push ../a | |
78 | pushing to ../a |
|
78 | pushing to ../a | |
79 | searching for changes |
|
79 | searching for changes | |
80 | adding changesets |
|
80 | adding changesets | |
81 | adding manifests |
|
81 | adding manifests | |
82 | adding file changes |
|
82 | adding file changes | |
83 | added 2 changesets with 1 changes to 1 files |
|
83 | added 2 changesets with 1 changes to 1 files | |
84 |
|
84 | |||
85 | $ cd .. |
|
85 | $ cd .. | |
86 |
|
86 | |||
87 | $ hg init c |
|
87 | $ hg init c | |
88 | $ cd c |
|
88 | $ cd c | |
89 | $ for i in 0 1 2; do |
|
89 | $ for i in 0 1 2; do | |
90 | > echo $i >> foo |
|
90 | > echo $i >> foo | |
91 | > hg ci -Am $i |
|
91 | > hg ci -Am $i | |
92 | > done |
|
92 | > done | |
93 | adding foo |
|
93 | adding foo | |
94 | $ cd .. |
|
94 | $ cd .. | |
95 |
|
95 | |||
96 | $ hg clone c d |
|
96 | $ hg clone c d | |
97 | updating to branch default |
|
97 | updating to branch default | |
98 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
98 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
99 |
|
99 | |||
100 | $ cd d |
|
100 | $ cd d | |
101 | $ for i in 0 1; do |
|
101 | $ for i in 0 1; do | |
102 | > hg co -C $i |
|
102 | > hg co -C $i | |
103 | > echo d-$i >> foo |
|
103 | > echo d-$i >> foo | |
104 | > hg ci -m d-$i |
|
104 | > hg ci -m d-$i | |
105 | > done |
|
105 | > done | |
106 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
106 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
107 | created new head |
|
107 | created new head | |
108 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
108 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
109 | created new head |
|
109 | created new head | |
110 |
|
110 | |||
111 | $ HGMERGE=true hg merge 3 |
|
111 | $ HGMERGE=true hg merge 3 | |
112 | merging foo |
|
112 | merging foo | |
113 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
113 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
114 | (branch merge, don't forget to commit) |
|
114 | (branch merge, don't forget to commit) | |
115 |
|
115 | |||
116 | $ hg ci -m c-d |
|
116 | $ hg ci -m c-d | |
117 |
|
117 | |||
118 | $ hg push ../c |
|
118 | $ hg push ../c | |
119 | pushing to ../c |
|
119 | pushing to ../c | |
120 | searching for changes |
|
120 | searching for changes | |
121 | abort: push creates new remote head 6346d66eb9f5! |
|
121 | abort: push creates new remote head 6346d66eb9f5! | |
122 | (merge or see 'hg help push' for details about pushing new heads) |
|
122 | (merge or see 'hg help push' for details about pushing new heads) | |
123 | [255] |
|
123 | [255] | |
124 |
|
124 | |||
125 | $ hg push -r 2 ../c |
|
125 | $ hg push -r 2 ../c | |
126 | pushing to ../c |
|
126 | pushing to ../c | |
127 | searching for changes |
|
127 | searching for changes | |
128 | no changes found |
|
128 | no changes found | |
129 | [1] |
|
129 | [1] | |
130 |
|
130 | |||
131 | $ hg push -r 3 ../c |
|
131 | $ hg push -r 3 ../c | |
132 | pushing to ../c |
|
132 | pushing to ../c | |
133 | searching for changes |
|
133 | searching for changes | |
134 | abort: push creates new remote head a5dda829a167! |
|
134 | abort: push creates new remote head a5dda829a167! | |
135 | (merge or see 'hg help push' for details about pushing new heads) |
|
135 | (merge or see 'hg help push' for details about pushing new heads) | |
136 | [255] |
|
136 | [255] | |
137 |
|
137 | |||
138 | $ hg push -v -r 3 -r 4 ../c |
|
138 | $ hg push -v -r 3 -r 4 ../c | |
139 | pushing to ../c |
|
139 | pushing to ../c | |
140 | searching for changes |
|
140 | searching for changes | |
141 | new remote heads on branch 'default': |
|
141 | new remote heads on branch 'default': | |
142 | a5dda829a167 |
|
142 | a5dda829a167 | |
143 | ee8fbc7a0295 |
|
143 | ee8fbc7a0295 | |
144 | abort: push creates new remote head a5dda829a167! |
|
144 | abort: push creates new remote head a5dda829a167! | |
145 | (merge or see 'hg help push' for details about pushing new heads) |
|
145 | (merge or see 'hg help push' for details about pushing new heads) | |
146 | [255] |
|
146 | [255] | |
147 |
|
147 | |||
148 | $ hg push -v -f -r 3 -r 4 ../c |
|
148 | $ hg push -v -f -r 3 -r 4 ../c | |
149 | pushing to ../c |
|
149 | pushing to ../c | |
150 | searching for changes |
|
150 | searching for changes | |
151 | 2 changesets found |
|
151 | 2 changesets found | |
152 | uncompressed size of bundle content: |
|
152 | uncompressed size of bundle content: | |
153 | 352 (changelog) |
|
153 | 352 (changelog) | |
154 | 326 (manifests) |
|
154 | 326 (manifests) | |
155 | 253 foo |
|
155 | 253 foo | |
156 | adding changesets |
|
156 | adding changesets | |
157 | adding manifests |
|
157 | adding manifests | |
158 | adding file changes |
|
158 | adding file changes | |
159 | added 2 changesets with 2 changes to 1 files (+2 heads) |
|
159 | added 2 changesets with 2 changes to 1 files (+2 heads) | |
160 |
|
160 | |||
161 | $ hg push -r 5 ../c |
|
161 | $ hg push -r 5 ../c | |
162 | pushing to ../c |
|
162 | pushing to ../c | |
163 | searching for changes |
|
163 | searching for changes | |
164 | adding changesets |
|
164 | adding changesets | |
165 | adding manifests |
|
165 | adding manifests | |
166 | adding file changes |
|
166 | adding file changes | |
167 | added 1 changesets with 1 changes to 1 files (-1 heads) |
|
167 | added 1 changesets with 1 changes to 1 files (-1 heads) | |
168 |
|
168 | |||
169 | $ hg in ../c |
|
169 | $ hg in ../c | |
170 | comparing with ../c |
|
170 | comparing with ../c | |
171 | searching for changes |
|
171 | searching for changes | |
172 | no changes found |
|
172 | no changes found | |
173 | [1] |
|
173 | [1] | |
174 |
|
174 | |||
175 |
|
175 | |||
176 | Issue450: push -r warns about remote head creation even if no heads |
|
176 | Issue450: push -r warns about remote head creation even if no heads | |
177 | will be created |
|
177 | will be created | |
178 |
|
178 | |||
179 | $ hg init ../e |
|
179 | $ hg init ../e | |
180 | $ hg push -r 0 ../e |
|
180 | $ hg push -r 0 ../e | |
181 | pushing to ../e |
|
181 | pushing to ../e | |
182 | searching for changes |
|
182 | searching for changes | |
183 | adding changesets |
|
183 | adding changesets | |
184 | adding manifests |
|
184 | adding manifests | |
185 | adding file changes |
|
185 | adding file changes | |
186 | added 1 changesets with 1 changes to 1 files |
|
186 | added 1 changesets with 1 changes to 1 files | |
187 |
|
187 | |||
188 | $ hg push -r 1 ../e |
|
188 | $ hg push -r 1 ../e | |
189 | pushing to ../e |
|
189 | pushing to ../e | |
190 | searching for changes |
|
190 | searching for changes | |
191 | adding changesets |
|
191 | adding changesets | |
192 | adding manifests |
|
192 | adding manifests | |
193 | adding file changes |
|
193 | adding file changes | |
194 | added 1 changesets with 1 changes to 1 files |
|
194 | added 1 changesets with 1 changes to 1 files | |
195 |
|
195 | |||
196 | $ cd .. |
|
196 | $ cd .. | |
197 |
|
197 | |||
198 |
|
198 | |||
199 | Issue736: named branches are not considered for detection of |
|
199 | Issue736: named branches are not considered for detection of | |
200 | unmerged heads in "hg push" |
|
200 | unmerged heads in "hg push" | |
201 |
|
201 | |||
202 | $ hg init f |
|
202 | $ hg init f | |
203 | $ cd f |
|
203 | $ cd f | |
204 | $ hg -q branch a |
|
204 | $ hg -q branch a | |
205 | $ echo 0 > foo |
|
205 | $ echo 0 > foo | |
206 | $ hg -q ci -Am 0 |
|
206 | $ hg -q ci -Am 0 | |
207 | $ echo 1 > foo |
|
207 | $ echo 1 > foo | |
208 | $ hg -q ci -m 1 |
|
208 | $ hg -q ci -m 1 | |
209 | $ hg -q up 0 |
|
209 | $ hg -q up 0 | |
210 | $ echo 2 > foo |
|
210 | $ echo 2 > foo | |
211 | $ hg -q ci -m 2 |
|
211 | $ hg -q ci -m 2 | |
212 | $ hg -q up 0 |
|
212 | $ hg -q up 0 | |
213 | $ hg -q branch b |
|
213 | $ hg -q branch b | |
214 | $ echo 3 > foo |
|
214 | $ echo 3 > foo | |
215 | $ hg -q ci -m 3 |
|
215 | $ hg -q ci -m 3 | |
216 | $ cd .. |
|
216 | $ cd .. | |
217 |
|
217 | |||
218 | $ hg -q clone f g |
|
218 | $ hg -q clone f g | |
219 | $ cd g |
|
219 | $ cd g | |
220 |
|
220 | |||
221 | Push on existing branch and new branch: |
|
221 | Push on existing branch and new branch: | |
222 |
|
222 | |||
223 | $ hg -q up 1 |
|
223 | $ hg -q up 1 | |
224 | $ echo 4 > foo |
|
224 | $ echo 4 > foo | |
225 | $ hg -q ci -m 4 |
|
225 | $ hg -q ci -m 4 | |
226 | $ hg -q up 0 |
|
226 | $ hg -q up 0 | |
227 | $ echo 5 > foo |
|
227 | $ echo 5 > foo | |
228 | $ hg -q branch c |
|
228 | $ hg -q branch c | |
229 | $ hg -q ci -m 5 |
|
229 | $ hg -q ci -m 5 | |
230 |
|
230 | |||
231 | $ hg push ../f |
|
231 | $ hg push ../f | |
232 | pushing to ../f |
|
232 | pushing to ../f | |
233 | searching for changes |
|
233 | searching for changes | |
234 | abort: push creates new remote branches: c! |
|
234 | abort: push creates new remote branches: c! | |
235 | (use 'hg push --new-branch' to create new remote branches) |
|
235 | (use 'hg push --new-branch' to create new remote branches) | |
236 | [255] |
|
236 | [255] | |
237 |
|
237 | |||
238 | $ hg push -r 4 -r 5 ../f |
|
238 | $ hg push -r 4 -r 5 ../f | |
239 | pushing to ../f |
|
239 | pushing to ../f | |
240 | searching for changes |
|
240 | searching for changes | |
241 | abort: push creates new remote branches: c! |
|
241 | abort: push creates new remote branches: c! | |
242 | (use 'hg push --new-branch' to create new remote branches) |
|
242 | (use 'hg push --new-branch' to create new remote branches) | |
243 | [255] |
|
243 | [255] | |
244 |
|
244 | |||
245 |
|
245 | |||
246 | Multiple new branches: |
|
246 | Multiple new branches: | |
247 |
|
247 | |||
248 | $ hg -q branch d |
|
248 | $ hg -q branch d | |
249 | $ echo 6 > foo |
|
249 | $ echo 6 > foo | |
250 | $ hg -q ci -m 6 |
|
250 | $ hg -q ci -m 6 | |
251 |
|
251 | |||
252 | $ hg push ../f |
|
252 | $ hg push ../f | |
253 | pushing to ../f |
|
253 | pushing to ../f | |
254 | searching for changes |
|
254 | searching for changes | |
255 | abort: push creates new remote branches: c, d! |
|
255 | abort: push creates new remote branches: c, d! | |
256 | (use 'hg push --new-branch' to create new remote branches) |
|
256 | (use 'hg push --new-branch' to create new remote branches) | |
257 | [255] |
|
257 | [255] | |
258 |
|
258 | |||
259 | $ hg push -r 4 -r 6 ../f |
|
259 | $ hg push -r 4 -r 6 ../f | |
260 | pushing to ../f |
|
260 | pushing to ../f | |
261 | searching for changes |
|
261 | searching for changes | |
262 | abort: push creates new remote branches: c, d! |
|
262 | abort: push creates new remote branches: c, d! | |
263 | (use 'hg push --new-branch' to create new remote branches) |
|
263 | (use 'hg push --new-branch' to create new remote branches) | |
264 | [255] |
|
264 | [255] | |
265 |
|
265 | |||
266 | $ cd ../g |
|
266 | $ cd ../g | |
267 |
|
267 | |||
268 |
|
268 | |||
269 | Fail on multiple head push: |
|
269 | Fail on multiple head push: | |
270 |
|
270 | |||
271 | $ hg -q up 1 |
|
271 | $ hg -q up 1 | |
272 | $ echo 7 > foo |
|
272 | $ echo 7 > foo | |
273 | $ hg -q ci -m 7 |
|
273 | $ hg -q ci -m 7 | |
274 |
|
274 | |||
275 | $ hg push -r 4 -r 7 ../f |
|
275 | $ hg push -r 4 -r 7 ../f | |
276 | pushing to ../f |
|
276 | pushing to ../f | |
277 | searching for changes |
|
277 | searching for changes | |
278 | abort: push creates new remote head 0b715ef6ff8f on branch 'a'! |
|
278 | abort: push creates new remote head 0b715ef6ff8f on branch 'a'! | |
279 | (merge or see 'hg help push' for details about pushing new heads) |
|
279 | (merge or see 'hg help push' for details about pushing new heads) | |
280 | [255] |
|
280 | [255] | |
281 |
|
281 | |||
282 | Push replacement head on existing branches: |
|
282 | Push replacement head on existing branches: | |
283 |
|
283 | |||
284 | $ hg -q up 3 |
|
284 | $ hg -q up 3 | |
285 | $ echo 8 > foo |
|
285 | $ echo 8 > foo | |
286 | $ hg -q ci -m 8 |
|
286 | $ hg -q ci -m 8 | |
287 |
|
287 | |||
288 | $ hg push -r 7 -r 8 ../f |
|
288 | $ hg push -r 7 -r 8 ../f | |
289 | pushing to ../f |
|
289 | pushing to ../f | |
290 | searching for changes |
|
290 | searching for changes | |
291 | adding changesets |
|
291 | adding changesets | |
292 | adding manifests |
|
292 | adding manifests | |
293 | adding file changes |
|
293 | adding file changes | |
294 | added 2 changesets with 2 changes to 1 files |
|
294 | added 2 changesets with 2 changes to 1 files | |
295 |
|
295 | |||
296 |
|
296 | |||
297 | Merge of branch a to other branch b followed by unrelated push |
|
297 | Merge of branch a to other branch b followed by unrelated push | |
298 | on branch a: |
|
298 | on branch a: | |
299 |
|
299 | |||
300 | $ hg -q up 7 |
|
300 | $ hg -q up 7 | |
301 | $ HGMERGE=true hg -q merge 8 |
|
301 | $ HGMERGE=true hg -q merge 8 | |
302 | $ hg -q ci -m 9 |
|
302 | $ hg -q ci -m 9 | |
303 | $ hg -q up 8 |
|
303 | $ hg -q up 8 | |
304 | $ echo 10 > foo |
|
304 | $ echo 10 > foo | |
305 | $ hg -q ci -m 10 |
|
305 | $ hg -q ci -m 10 | |
306 |
|
306 | |||
307 | $ hg push -r 9 ../f |
|
307 | $ hg push -r 9 ../f | |
308 | pushing to ../f |
|
308 | pushing to ../f | |
309 | searching for changes |
|
309 | searching for changes | |
310 | adding changesets |
|
310 | adding changesets | |
311 | adding manifests |
|
311 | adding manifests | |
312 | adding file changes |
|
312 | adding file changes | |
313 | added 1 changesets with 1 changes to 1 files (-1 heads) |
|
313 | added 1 changesets with 1 changes to 1 files (-1 heads) | |
314 |
|
314 | |||
315 | $ hg push -r 10 ../f |
|
315 | $ hg push -r 10 ../f | |
316 | pushing to ../f |
|
316 | pushing to ../f | |
317 | searching for changes |
|
317 | searching for changes | |
318 | adding changesets |
|
318 | adding changesets | |
319 | adding manifests |
|
319 | adding manifests | |
320 | adding file changes |
|
320 | adding file changes | |
321 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
321 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
322 |
|
322 | |||
323 |
|
323 | |||
324 | Cheating the counting algorithm: |
|
324 | Cheating the counting algorithm: | |
325 |
|
325 | |||
326 | $ hg -q up 9 |
|
326 | $ hg -q up 9 | |
327 | $ HGMERGE=true hg -q merge 2 |
|
327 | $ HGMERGE=true hg -q merge 2 | |
328 | $ hg -q ci -m 11 |
|
328 | $ hg -q ci -m 11 | |
329 | $ hg -q up 1 |
|
329 | $ hg -q up 1 | |
330 | $ echo 12 > foo |
|
330 | $ echo 12 > foo | |
331 | $ hg -q ci -m 12 |
|
331 | $ hg -q ci -m 12 | |
332 |
|
332 | |||
333 | $ hg push -r 11 -r 12 ../f |
|
333 | $ hg push -r 11 -r 12 ../f | |
334 | pushing to ../f |
|
334 | pushing to ../f | |
335 | searching for changes |
|
335 | searching for changes | |
336 | adding changesets |
|
336 | adding changesets | |
337 | adding manifests |
|
337 | adding manifests | |
338 | adding file changes |
|
338 | adding file changes | |
339 | added 2 changesets with 2 changes to 1 files |
|
339 | added 2 changesets with 2 changes to 1 files | |
340 |
|
340 | |||
341 |
|
341 | |||
342 | Failed push of new named branch: |
|
342 | Failed push of new named branch: | |
343 |
|
343 | |||
344 | $ echo 12 > foo |
|
344 | $ echo 12 > foo | |
345 | $ hg -q ci -m 12a |
|
345 | $ hg -q ci -m 12a | |
346 | [1] |
|
346 | [1] | |
347 | $ hg -q up 11 |
|
347 | $ hg -q up 11 | |
348 | $ echo 13 > foo |
|
348 | $ echo 13 > foo | |
349 | $ hg -q branch e |
|
349 | $ hg -q branch e | |
350 | $ hg -q ci -m 13d |
|
350 | $ hg -q ci -m 13d | |
351 |
|
351 | |||
352 | $ hg push -r 12 -r 13 ../f |
|
352 | $ hg push -r 12 -r 13 ../f | |
353 | pushing to ../f |
|
353 | pushing to ../f | |
354 | searching for changes |
|
354 | searching for changes | |
355 | abort: push creates new remote branches: e! |
|
355 | abort: push creates new remote branches: e! | |
356 | (use 'hg push --new-branch' to create new remote branches) |
|
356 | (use 'hg push --new-branch' to create new remote branches) | |
357 | [255] |
|
357 | [255] | |
358 |
|
358 | |||
359 |
|
359 | |||
360 | Using --new-branch to push new named branch: |
|
360 | Using --new-branch to push new named branch: | |
361 |
|
361 | |||
362 | $ hg push --new-branch -r 12 -r 13 ../f |
|
362 | $ hg push --new-branch -r 12 -r 13 ../f | |
363 | pushing to ../f |
|
363 | pushing to ../f | |
364 | searching for changes |
|
364 | searching for changes | |
365 | adding changesets |
|
365 | adding changesets | |
366 | adding manifests |
|
366 | adding manifests | |
367 | adding file changes |
|
367 | adding file changes | |
368 | added 1 changesets with 1 changes to 1 files |
|
368 | added 1 changesets with 1 changes to 1 files | |
369 |
|
369 | |||
370 | Pushing multi headed new branch: |
|
370 | Pushing multi headed new branch: | |
371 |
|
371 | |||
372 | $ echo 14 > foo |
|
372 | $ echo 14 > foo | |
373 | $ hg -q branch f |
|
373 | $ hg -q branch f | |
374 | $ hg -q ci -m 14 |
|
374 | $ hg -q ci -m 14 | |
375 | $ echo 15 > foo |
|
375 | $ echo 15 > foo | |
376 | $ hg -q ci -m 15 |
|
376 | $ hg -q ci -m 15 | |
377 | $ hg -q up 14 |
|
377 | $ hg -q up 14 | |
378 | $ echo 16 > foo |
|
378 | $ echo 16 > foo | |
379 | $ hg -q ci -m 16 |
|
379 | $ hg -q ci -m 16 | |
380 | $ hg push --branch f --new-branch ../f |
|
380 | $ hg push --branch f --new-branch ../f | |
381 | pushing to ../f |
|
381 | pushing to ../f | |
382 | searching for changes |
|
382 | searching for changes | |
383 | abort: push creates new branch 'f' with multiple heads |
|
383 | abort: push creates new branch 'f' with multiple heads | |
384 | (merge or see 'hg help push' for details about pushing new heads) |
|
384 | (merge or see 'hg help push' for details about pushing new heads) | |
385 | [255] |
|
385 | [255] | |
386 | $ hg push --branch f --new-branch --force ../f |
|
386 | $ hg push --branch f --new-branch --force ../f | |
387 | pushing to ../f |
|
387 | pushing to ../f | |
388 | searching for changes |
|
388 | searching for changes | |
389 | adding changesets |
|
389 | adding changesets | |
390 | adding manifests |
|
390 | adding manifests | |
391 | adding file changes |
|
391 | adding file changes | |
392 | added 3 changesets with 3 changes to 1 files (+1 heads) |
|
392 | added 3 changesets with 3 changes to 1 files (+1 heads) | |
393 |
|
393 | |||
394 | Checking prepush logic does not allow silently pushing |
|
394 | Checking prepush logic does not allow silently pushing | |
395 | multiple new heads but also doesn't report too many heads: |
|
395 | multiple new heads but also doesn't report too many heads: | |
396 |
|
396 | |||
397 | $ cd .. |
|
397 | $ cd .. | |
398 | $ hg init h |
|
398 | $ hg init h | |
399 | $ echo init > h/init |
|
399 | $ echo init > h/init | |
400 | $ hg -R h ci -Am init |
|
400 | $ hg -R h ci -Am init | |
401 | adding init |
|
401 | adding init | |
402 | $ echo a > h/a |
|
402 | $ echo a > h/a | |
403 | $ hg -R h ci -Am a |
|
403 | $ hg -R h ci -Am a | |
404 | adding a |
|
404 | adding a | |
405 | $ hg clone h i |
|
405 | $ hg clone h i | |
406 | updating to branch default |
|
406 | updating to branch default | |
407 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
407 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
408 | $ hg -R h up 0 |
|
408 | $ hg -R h up 0 | |
409 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
409 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
410 | $ echo b > h/b |
|
410 | $ echo b > h/b | |
411 | $ hg -R h ci -Am b |
|
411 | $ hg -R h ci -Am b | |
412 | adding b |
|
412 | adding b | |
413 | created new head |
|
413 | created new head | |
414 | $ hg -R i up 0 |
|
414 | $ hg -R i up 0 | |
415 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
415 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
416 | $ echo c > i/c |
|
416 | $ echo c > i/c | |
417 | $ hg -R i ci -Am c |
|
417 | $ hg -R i ci -Am c | |
418 | adding c |
|
418 | adding c | |
419 | created new head |
|
419 | created new head | |
420 |
|
420 | |||
421 | $ for i in `python $TESTDIR/seq.py 3`; do hg -R h up -q 0; echo $i > h/b; hg -R h ci -qAm$i; done |
|
421 | $ for i in `python $TESTDIR/seq.py 3`; do hg -R h up -q 0; echo $i > h/b; hg -R h ci -qAm$i; done | |
422 |
|
422 | |||
423 | $ hg -R i push h |
|
423 | $ hg -R i push h | |
424 | pushing to h |
|
424 | pushing to h | |
425 | searching for changes |
|
425 | searching for changes | |
426 | remote has heads on branch 'default' that are not known locally: 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847 |
|
426 | remote has heads on branch 'default' that are not known locally: 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847 | |
427 | abort: push creates new remote head 97bd0c84d346! |
|
427 | abort: push creates new remote head 97bd0c84d346! | |
428 | (pull and merge or see 'hg help push' for details about pushing new heads) |
|
428 | (pull and merge or see 'hg help push' for details about pushing new heads) | |
429 | [255] |
|
429 | [255] | |
430 | $ hg -R h up -q 0; echo x > h/b; hg -R h ci -qAmx |
|
430 | $ hg -R h up -q 0; echo x > h/b; hg -R h ci -qAmx | |
431 | $ hg -R i push h |
|
431 | $ hg -R i push h | |
432 | pushing to h |
|
432 | pushing to h | |
433 | searching for changes |
|
433 | searching for changes | |
434 | remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 and 1 others |
|
434 | remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 and 1 others | |
435 | abort: push creates new remote head 97bd0c84d346! |
|
435 | abort: push creates new remote head 97bd0c84d346! | |
436 | (pull and merge or see 'hg help push' for details about pushing new heads) |
|
436 | (pull and merge or see 'hg help push' for details about pushing new heads) | |
437 | [255] |
|
437 | [255] | |
438 | $ hg -R i push h -v |
|
438 | $ hg -R i push h -v | |
439 | pushing to h |
|
439 | pushing to h | |
440 | searching for changes |
|
440 | searching for changes | |
441 | remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847 |
|
441 | remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847 | |
442 | new remote heads on branch 'default': |
|
442 | new remote heads on branch 'default': | |
443 | 97bd0c84d346 |
|
443 | 97bd0c84d346 | |
444 | abort: push creates new remote head 97bd0c84d346! |
|
444 | abort: push creates new remote head 97bd0c84d346! | |
445 | (pull and merge or see 'hg help push' for details about pushing new heads) |
|
445 | (pull and merge or see 'hg help push' for details about pushing new heads) | |
446 | [255] |
|
446 | [255] | |
447 |
|
447 | |||
448 |
|
448 | |||
449 | Check prepush logic with merged branches: |
|
449 | Check prepush logic with merged branches: | |
450 |
|
450 | |||
451 | $ hg init j |
|
451 | $ hg init j | |
452 | $ hg -R j branch a |
|
452 | $ hg -R j branch a | |
453 | marked working directory as branch a |
|
453 | marked working directory as branch a | |
454 | (branches are permanent and global, did you want a bookmark?) |
|
454 | (branches are permanent and global, did you want a bookmark?) | |
455 | $ echo init > j/foo |
|
455 | $ echo init > j/foo | |
456 | $ hg -R j ci -Am init |
|
456 | $ hg -R j ci -Am init | |
457 | adding foo |
|
457 | adding foo | |
458 | $ hg clone j k |
|
458 | $ hg clone j k | |
459 | updating to branch a |
|
459 | updating to branch a | |
460 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
460 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
461 | $ echo a1 > j/foo |
|
461 | $ echo a1 > j/foo | |
462 | $ hg -R j ci -m a1 |
|
462 | $ hg -R j ci -m a1 | |
463 | $ hg -R k branch b |
|
463 | $ hg -R k branch b | |
464 | marked working directory as branch b |
|
464 | marked working directory as branch b | |
465 | $ echo b > k/foo |
|
465 | $ echo b > k/foo | |
466 | $ hg -R k ci -m b |
|
466 | $ hg -R k ci -m b | |
467 | $ hg -R k up 0 |
|
467 | $ hg -R k up 0 | |
468 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
468 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
469 |
|
469 | |||
470 | $ hg -R k merge b |
|
470 | $ hg -R k merge b | |
471 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
471 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
472 | (branch merge, don't forget to commit) |
|
472 | (branch merge, don't forget to commit) | |
473 |
|
473 | |||
474 | $ hg -R k ci -m merge |
|
474 | $ hg -R k ci -m merge | |
475 |
|
475 | |||
476 | $ hg -R k push -r a j |
|
476 | $ hg -R k push -r a j | |
477 | pushing to j |
|
477 | pushing to j | |
478 | searching for changes |
|
478 | searching for changes | |
479 | abort: push creates new remote branches: b! |
|
479 | abort: push creates new remote branches: b! | |
480 | (use 'hg push --new-branch' to create new remote branches) |
|
480 | (use 'hg push --new-branch' to create new remote branches) | |
481 | [255] |
|
481 | [255] | |
482 |
|
482 | |||
483 |
|
483 | |||
484 | Prepush -r should not allow you to sneak in new heads: |
|
484 | Prepush -r should not allow you to sneak in new heads: | |
485 |
|
485 | |||
486 | $ hg init l |
|
486 | $ hg init l | |
487 | $ cd l |
|
487 | $ cd l | |
488 | $ echo a >> foo |
|
488 | $ echo a >> foo | |
489 | $ hg -q add foo |
|
489 | $ hg -q add foo | |
490 | $ hg -q branch a |
|
490 | $ hg -q branch a | |
491 | $ hg -q ci -ma |
|
491 | $ hg -q ci -ma | |
492 | $ hg -q up null |
|
492 | $ hg -q up null | |
493 | $ echo a >> foo |
|
493 | $ echo a >> foo | |
494 | $ hg -q add foo |
|
494 | $ hg -q add foo | |
495 | $ hg -q branch b |
|
495 | $ hg -q branch b | |
496 | $ hg -q ci -mb |
|
496 | $ hg -q ci -mb | |
497 | $ cd .. |
|
497 | $ cd .. | |
498 | $ hg -q clone l m -u a |
|
498 | $ hg -q clone l m -u a | |
499 | $ cd m |
|
499 | $ cd m | |
500 | $ hg -q merge b |
|
500 | $ hg -q merge b | |
501 | $ hg -q ci -mmb |
|
501 | $ hg -q ci -mmb | |
502 | $ hg -q up 0 |
|
502 | $ hg -q up 0 | |
503 | $ echo a >> foo |
|
503 | $ echo a >> foo | |
504 | $ hg -q ci -ma2 |
|
504 | $ hg -q ci -ma2 | |
505 | $ hg -q up 2 |
|
505 | $ hg -q up 2 | |
506 | $ echo a >> foo |
|
506 | $ echo a >> foo | |
507 | $ hg -q branch -f b |
|
507 | $ hg -q branch -f b | |
508 | $ hg -q ci -mb2 |
|
508 | $ hg -q ci -mb2 | |
509 | $ hg -q merge 3 |
|
509 | $ hg -q merge 3 | |
510 | $ hg -q ci -mma |
|
510 | $ hg -q ci -mma | |
511 |
|
511 | |||
512 | $ hg push ../l -b b |
|
512 | $ hg push ../l -b b | |
513 | pushing to ../l |
|
513 | pushing to ../l | |
514 | searching for changes |
|
514 | searching for changes | |
515 | abort: push creates new remote head 451211cc22b0 on branch 'a'! |
|
515 | abort: push creates new remote head 451211cc22b0 on branch 'a'! | |
516 | (merge or see 'hg help push' for details about pushing new heads) |
|
516 | (merge or see 'hg help push' for details about pushing new heads) | |
517 | [255] |
|
517 | [255] | |
518 |
|
518 | |||
519 | $ cd .. |
|
519 | $ cd .. | |
520 |
|
520 | |||
521 |
|
521 | |||
522 | Check prepush with new branch head on former topo non-head: |
|
522 | Check prepush with new branch head on former topo non-head: | |
523 |
|
523 | |||
524 | $ hg init n |
|
524 | $ hg init n | |
525 | $ cd n |
|
525 | $ cd n | |
526 | $ hg branch A |
|
526 | $ hg branch A | |
527 | marked working directory as branch A |
|
527 | marked working directory as branch A | |
528 | (branches are permanent and global, did you want a bookmark?) |
|
528 | (branches are permanent and global, did you want a bookmark?) | |
529 | $ echo a >a |
|
529 | $ echo a >a | |
530 | $ hg ci -Ama |
|
530 | $ hg ci -Ama | |
531 | adding a |
|
531 | adding a | |
532 | $ hg branch B |
|
532 | $ hg branch B | |
533 | marked working directory as branch B |
|
533 | marked working directory as branch B | |
534 | $ echo b >b |
|
534 | $ echo b >b | |
535 | $ hg ci -Amb |
|
535 | $ hg ci -Amb | |
536 | adding b |
|
536 | adding b | |
537 |
|
537 | |||
538 | b is now branch head of B, and a topological head |
|
538 | b is now branch head of B, and a topological head | |
539 | a is now branch head of A, but not a topological head |
|
539 | a is now branch head of A, but not a topological head | |
540 |
|
540 | |||
541 | $ hg clone . inner |
|
541 | $ hg clone . inner | |
542 | updating to branch B |
|
542 | updating to branch B | |
543 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
543 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
544 | $ cd inner |
|
544 | $ cd inner | |
545 | $ hg up B |
|
545 | $ hg up B | |
546 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
546 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
547 | $ echo b1 >b1 |
|
547 | $ echo b1 >b1 | |
548 | $ hg ci -Amb1 |
|
548 | $ hg ci -Amb1 | |
549 | adding b1 |
|
549 | adding b1 | |
550 |
|
550 | |||
551 | in the clone b1 is now the head of B |
|
551 | in the clone b1 is now the head of B | |
552 |
|
552 | |||
553 | $ cd .. |
|
553 | $ cd .. | |
554 | $ hg up 0 |
|
554 | $ hg up 0 | |
555 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
555 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
556 | $ echo a2 >a2 |
|
556 | $ echo a2 >a2 | |
557 | $ hg ci -Ama2 |
|
557 | $ hg ci -Ama2 | |
558 | adding a2 |
|
558 | adding a2 | |
559 |
|
559 | |||
560 | a2 is now the new branch head of A, and a new topological head |
|
560 | a2 is now the new branch head of A, and a new topological head | |
561 | it replaces a former inner branch head, so it should at most warn about |
|
561 | it replaces a former inner branch head, so it should at most warn about | |
562 | A, not B |
|
562 | A, not B | |
563 |
|
563 | |||
564 | glog of local: |
|
564 | glog of local: | |
565 |
|
565 | |||
566 | $ hg log -G --template "{rev}: {branches} {desc}\n" |
|
566 | $ hg log -G --template "{rev}: {branches} {desc}\n" | |
567 | @ 2: A a2 |
|
567 | @ 2: A a2 | |
568 | | |
|
568 | | | |
569 | | o 1: B b |
|
569 | | o 1: B b | |
570 | |/ |
|
570 | |/ | |
571 | o 0: A a |
|
571 | o 0: A a | |
572 |
|
572 | |||
573 | glog of remote: |
|
573 | glog of remote: | |
574 |
|
574 | |||
575 | $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" |
|
575 | $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" | |
576 | @ 2: B b1 |
|
576 | @ 2: B b1 | |
577 | | |
|
577 | | | |
578 | o 1: B b |
|
578 | o 1: B b | |
579 | | |
|
579 | | | |
580 | o 0: A a |
|
580 | o 0: A a | |
581 |
|
581 | |||
582 | outgoing: |
|
582 | outgoing: | |
583 |
|
583 | |||
584 | $ hg out inner --template "{rev}: {branches} {desc}\n" |
|
584 | $ hg out inner --template "{rev}: {branches} {desc}\n" | |
585 | comparing with inner |
|
585 | comparing with inner | |
586 | searching for changes |
|
586 | searching for changes | |
587 | 2: A a2 |
|
587 | 2: A a2 | |
588 |
|
588 | |||
589 | $ hg push inner |
|
589 | $ hg push inner | |
590 | pushing to inner |
|
590 | pushing to inner | |
591 | searching for changes |
|
591 | searching for changes | |
592 | adding changesets |
|
592 | adding changesets | |
593 | adding manifests |
|
593 | adding manifests | |
594 | adding file changes |
|
594 | adding file changes | |
595 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
595 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
596 |
|
596 | |||
597 | $ cd .. |
|
597 | $ cd .. | |
598 |
|
598 | |||
599 |
|
599 | |||
600 | Check prepush with new branch head on former topo head: |
|
600 | Check prepush with new branch head on former topo head: | |
601 |
|
601 | |||
602 | $ hg init o |
|
602 | $ hg init o | |
603 | $ cd o |
|
603 | $ cd o | |
604 | $ hg branch A |
|
604 | $ hg branch A | |
605 | marked working directory as branch A |
|
605 | marked working directory as branch A | |
606 | (branches are permanent and global, did you want a bookmark?) |
|
606 | (branches are permanent and global, did you want a bookmark?) | |
607 | $ echo a >a |
|
607 | $ echo a >a | |
608 | $ hg ci -Ama |
|
608 | $ hg ci -Ama | |
609 | adding a |
|
609 | adding a | |
610 | $ hg branch B |
|
610 | $ hg branch B | |
611 | marked working directory as branch B |
|
611 | marked working directory as branch B | |
612 | $ echo b >b |
|
612 | $ echo b >b | |
613 | $ hg ci -Amb |
|
613 | $ hg ci -Amb | |
614 | adding b |
|
614 | adding b | |
615 |
|
615 | |||
616 | b is now branch head of B, and a topological head |
|
616 | b is now branch head of B, and a topological head | |
617 |
|
617 | |||
618 | $ hg up 0 |
|
618 | $ hg up 0 | |
619 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
619 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
620 | $ echo a1 >a1 |
|
620 | $ echo a1 >a1 | |
621 | $ hg ci -Ama1 |
|
621 | $ hg ci -Ama1 | |
622 | adding a1 |
|
622 | adding a1 | |
623 |
|
623 | |||
624 | a1 is now branch head of A, and a topological head |
|
624 | a1 is now branch head of A, and a topological head | |
625 |
|
625 | |||
626 | $ hg clone . inner |
|
626 | $ hg clone . inner | |
627 | updating to branch A |
|
627 | updating to branch A | |
628 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
628 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
629 | $ cd inner |
|
629 | $ cd inner | |
630 | $ hg up B |
|
630 | $ hg up B | |
631 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
631 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
632 | $ echo b1 >b1 |
|
632 | $ echo b1 >b1 | |
633 | $ hg ci -Amb1 |
|
633 | $ hg ci -Amb1 | |
634 | adding b1 |
|
634 | adding b1 | |
635 |
|
635 | |||
636 | in the clone b1 is now the head of B |
|
636 | in the clone b1 is now the head of B | |
637 |
|
637 | |||
638 | $ cd .. |
|
638 | $ cd .. | |
639 | $ echo a2 >a2 |
|
639 | $ echo a2 >a2 | |
640 | $ hg ci -Ama2 |
|
640 | $ hg ci -Ama2 | |
641 | adding a2 |
|
641 | adding a2 | |
642 |
|
642 | |||
643 | a2 is now the new branch head of A, and a topological head |
|
643 | a2 is now the new branch head of A, and a topological head | |
644 | it replaces a former topological and branch head, so this should not warn |
|
644 | it replaces a former topological and branch head, so this should not warn | |
645 |
|
645 | |||
646 | glog of local: |
|
646 | glog of local: | |
647 |
|
647 | |||
648 | $ hg log -G --template "{rev}: {branches} {desc}\n" |
|
648 | $ hg log -G --template "{rev}: {branches} {desc}\n" | |
649 | @ 3: A a2 |
|
649 | @ 3: A a2 | |
650 | | |
|
650 | | | |
651 | o 2: A a1 |
|
651 | o 2: A a1 | |
652 | | |
|
652 | | | |
653 | | o 1: B b |
|
653 | | o 1: B b | |
654 | |/ |
|
654 | |/ | |
655 | o 0: A a |
|
655 | o 0: A a | |
656 |
|
656 | |||
657 | glog of remote: |
|
657 | glog of remote: | |
658 |
|
658 | |||
659 | $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" |
|
659 | $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" | |
660 | @ 3: B b1 |
|
660 | @ 3: B b1 | |
661 | | |
|
661 | | | |
662 | | o 2: A a1 |
|
662 | | o 2: A a1 | |
663 | | | |
|
663 | | | | |
664 | o | 1: B b |
|
664 | o | 1: B b | |
665 | |/ |
|
665 | |/ | |
666 | o 0: A a |
|
666 | o 0: A a | |
667 |
|
667 | |||
668 | outgoing: |
|
668 | outgoing: | |
669 |
|
669 | |||
670 | $ hg out inner --template "{rev}: {branches} {desc}\n" |
|
670 | $ hg out inner --template "{rev}: {branches} {desc}\n" | |
671 | comparing with inner |
|
671 | comparing with inner | |
672 | searching for changes |
|
672 | searching for changes | |
673 | 3: A a2 |
|
673 | 3: A a2 | |
674 |
|
674 | |||
675 | $ hg push inner |
|
675 | $ hg push inner | |
676 | pushing to inner |
|
676 | pushing to inner | |
677 | searching for changes |
|
677 | searching for changes | |
678 | adding changesets |
|
678 | adding changesets | |
679 | adding manifests |
|
679 | adding manifests | |
680 | adding file changes |
|
680 | adding file changes | |
681 | added 1 changesets with 1 changes to 1 files |
|
681 | added 1 changesets with 1 changes to 1 files | |
682 |
|
682 | |||
683 | $ cd .. |
|
683 | $ cd .. | |
684 |
|
684 | |||
685 |
|
685 | |||
686 | Check prepush with new branch head and new child of former branch head |
|
686 | Check prepush with new branch head and new child of former branch head | |
687 | but child is on different branch: |
|
687 | but child is on different branch: | |
688 |
|
688 | |||
689 | $ hg init p |
|
689 | $ hg init p | |
690 | $ cd p |
|
690 | $ cd p | |
691 | $ hg branch A |
|
691 | $ hg branch A | |
692 | marked working directory as branch A |
|
692 | marked working directory as branch A | |
693 | (branches are permanent and global, did you want a bookmark?) |
|
693 | (branches are permanent and global, did you want a bookmark?) | |
694 | $ echo a0 >a |
|
694 | $ echo a0 >a | |
695 | $ hg ci -Ama0 |
|
695 | $ hg ci -Ama0 | |
696 | adding a |
|
696 | adding a | |
697 | $ echo a1 >a |
|
697 | $ echo a1 >a | |
698 | $ hg ci -ma1 |
|
698 | $ hg ci -ma1 | |
699 | $ hg up null |
|
699 | $ hg up null | |
700 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
700 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
701 | $ hg branch B |
|
701 | $ hg branch B | |
702 | marked working directory as branch B |
|
702 | marked working directory as branch B | |
703 | $ echo b0 >b |
|
703 | $ echo b0 >b | |
704 | $ hg ci -Amb0 |
|
704 | $ hg ci -Amb0 | |
705 | adding b |
|
705 | adding b | |
706 | $ echo b1 >b |
|
706 | $ echo b1 >b | |
707 | $ hg ci -mb1 |
|
707 | $ hg ci -mb1 | |
708 |
|
708 | |||
709 | $ hg clone . inner |
|
709 | $ hg clone . inner | |
710 | updating to branch B |
|
710 | updating to branch B | |
711 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
711 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
712 |
|
712 | |||
713 | $ hg up A |
|
713 | $ hg up A | |
714 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
714 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
715 | $ hg branch -f B |
|
715 | $ hg branch -f B | |
716 | marked working directory as branch B |
|
716 | marked working directory as branch B | |
717 | $ echo a3 >a |
|
717 | $ echo a3 >a | |
718 | $ hg ci -ma3 |
|
718 | $ hg ci -ma3 | |
719 | created new head |
|
719 | created new head | |
720 | $ hg up 3 |
|
720 | $ hg up 3 | |
721 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
721 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
722 | $ hg branch -f A |
|
722 | $ hg branch -f A | |
723 | marked working directory as branch A |
|
723 | marked working directory as branch A | |
724 | $ echo b3 >b |
|
724 | $ echo b3 >b | |
725 | $ hg ci -mb3 |
|
725 | $ hg ci -mb3 | |
726 | created new head |
|
726 | created new head | |
727 |
|
727 | |||
728 | glog of local: |
|
728 | glog of local: | |
729 |
|
729 | |||
730 | $ hg log -G --template "{rev}: {branches} {desc}\n" |
|
730 | $ hg log -G --template "{rev}: {branches} {desc}\n" | |
731 | @ 5: A b3 |
|
731 | @ 5: A b3 | |
732 | | |
|
732 | | | |
733 | | o 4: B a3 |
|
733 | | o 4: B a3 | |
734 | | | |
|
734 | | | | |
735 | o | 3: B b1 |
|
735 | o | 3: B b1 | |
736 | | | |
|
736 | | | | |
737 | o | 2: B b0 |
|
737 | o | 2: B b0 | |
738 | / |
|
738 | / | |
739 | o 1: A a1 |
|
739 | o 1: A a1 | |
740 | | |
|
740 | | | |
741 | o 0: A a0 |
|
741 | o 0: A a0 | |
742 |
|
742 | |||
743 | glog of remote: |
|
743 | glog of remote: | |
744 |
|
744 | |||
745 | $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" |
|
745 | $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" | |
746 | @ 3: B b1 |
|
746 | @ 3: B b1 | |
747 | | |
|
747 | | | |
748 | o 2: B b0 |
|
748 | o 2: B b0 | |
749 |
|
749 | |||
750 | o 1: A a1 |
|
750 | o 1: A a1 | |
751 | | |
|
751 | | | |
752 | o 0: A a0 |
|
752 | o 0: A a0 | |
753 |
|
753 | |||
754 | outgoing: |
|
754 | outgoing: | |
755 |
|
755 | |||
756 | $ hg out inner --template "{rev}: {branches} {desc}\n" |
|
756 | $ hg out inner --template "{rev}: {branches} {desc}\n" | |
757 | comparing with inner |
|
757 | comparing with inner | |
758 | searching for changes |
|
758 | searching for changes | |
759 | 4: B a3 |
|
759 | 4: B a3 | |
760 | 5: A b3 |
|
760 | 5: A b3 | |
761 |
|
761 | |||
762 | $ hg push inner |
|
762 | $ hg push inner | |
763 | pushing to inner |
|
763 | pushing to inner | |
764 | searching for changes |
|
764 | searching for changes | |
765 | abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'! |
|
765 | abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'! | |
766 | (merge or see 'hg help push' for details about pushing new heads) |
|
766 | (merge or see 'hg help push' for details about pushing new heads) | |
767 | [255] |
|
767 | [255] | |
768 |
|
768 | |||
769 | $ hg push inner -r4 -r5 |
|
769 | $ hg push inner -r4 -r5 | |
770 | pushing to inner |
|
770 | pushing to inner | |
771 | searching for changes |
|
771 | searching for changes | |
772 | abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'! |
|
772 | abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'! | |
773 | (merge or see 'hg help push' for details about pushing new heads) |
|
773 | (merge or see 'hg help push' for details about pushing new heads) | |
774 | [255] |
|
774 | [255] | |
775 |
|
775 | |||
776 | $ hg in inner |
|
776 | $ hg in inner | |
777 | comparing with inner |
|
777 | comparing with inner | |
778 | searching for changes |
|
778 | searching for changes | |
779 | no changes found |
|
779 | no changes found | |
780 | [1] |
|
780 | [1] | |
781 |
|
781 | |||
782 | Test fail hook |
|
782 | Test fail hook | |
783 |
|
783 | |||
784 | $ hg push inner --config hooks.fail-push="echo running fail-push hook" |
|
784 | $ hg push inner --config hooks.fail-push="echo running fail-push hook" | |
785 | pushing to inner |
|
785 | pushing to inner | |
786 | searching for changes |
|
786 | searching for changes | |
787 | running fail-push hook |
|
787 | running fail-push hook | |
788 | abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'! |
|
788 | abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'! | |
789 | (merge or see 'hg help push' for details about pushing new heads) |
|
789 | (merge or see 'hg help push' for details about pushing new heads) | |
790 | [255] |
|
790 | [255] | |
791 |
|
791 | |||
792 | $ cd .. |
|
792 | $ cd .. |
@@ -1,406 +1,405 b'' | |||||
1 |
|
1 | |||
2 | Function to test discovery between two repos in both directions, using both the local shortcut |
|
2 | Function to test discovery between two repos in both directions, using both the local shortcut | |
3 | (which is currently not activated by default) and the full remotable protocol: |
|
3 | (which is currently not activated by default) and the full remotable protocol: | |
4 |
|
4 | |||
5 | $ testdesc() { # revs_a, revs_b, dagdesc |
|
5 | $ testdesc() { # revs_a, revs_b, dagdesc | |
6 | > if [ -d foo ]; then rm -rf foo; fi |
|
6 | > if [ -d foo ]; then rm -rf foo; fi | |
7 | > hg init foo |
|
7 | > hg init foo | |
8 | > cd foo |
|
8 | > cd foo | |
9 | > hg debugbuilddag "$3" |
|
9 | > hg debugbuilddag "$3" | |
10 | > hg clone . a $1 --quiet |
|
10 | > hg clone . a $1 --quiet | |
11 | > hg clone . b $2 --quiet |
|
11 | > hg clone . b $2 --quiet | |
12 | > echo |
|
12 | > echo | |
13 | > echo "% -- a -> b tree" |
|
13 | > echo "% -- a -> b tree" | |
14 | > hg -R a debugdiscovery b --verbose --old |
|
14 | > hg -R a debugdiscovery b --verbose --old | |
15 | > echo |
|
15 | > echo | |
16 | > echo "% -- a -> b set" |
|
16 | > echo "% -- a -> b set" | |
17 | > hg -R a debugdiscovery b --verbose --debug --config progress.debug=true |
|
17 | > hg -R a debugdiscovery b --verbose --debug --config progress.debug=true | |
18 | > echo |
|
18 | > echo | |
19 | > echo "% -- b -> a tree" |
|
19 | > echo "% -- b -> a tree" | |
20 | > hg -R b debugdiscovery a --verbose --old --config |
|
20 | > hg -R b debugdiscovery a --verbose --old --config | |
21 | > echo |
|
21 | > echo | |
22 | > echo "% -- b -> a set" |
|
22 | > echo "% -- b -> a set" | |
23 | > hg -R b debugdiscovery a --verbose --debug --config progress.debug=true |
|
23 | > hg -R b debugdiscovery a --verbose --debug --config progress.debug=true | |
24 | > cd .. |
|
24 | > cd .. | |
25 | > } |
|
25 | > } | |
26 |
|
26 | |||
27 |
|
27 | |||
28 | Small superset: |
|
28 | Small superset: | |
29 |
|
29 | |||
30 | $ testdesc '-ra1 -ra2' '-rb1 -rb2 -rb3' ' |
|
30 | $ testdesc '-ra1 -ra2' '-rb1 -rb2 -rb3' ' | |
31 | > +2:f +1:a1:b1 |
|
31 | > +2:f +1:a1:b1 | |
32 | > <f +4 :a2 |
|
32 | > <f +4 :a2 | |
33 | > +5 :b2 |
|
33 | > +5 :b2 | |
34 | > <f +3 :b3' |
|
34 | > <f +3 :b3' | |
35 |
|
35 | |||
36 | % -- a -> b tree |
|
36 | % -- a -> b tree | |
37 | comparing with b |
|
37 | comparing with b | |
38 | searching for changes |
|
38 | searching for changes | |
39 | unpruned common: 01241442b3c2 66f7d451a68b b5714e113bc0 |
|
39 | unpruned common: 01241442b3c2 66f7d451a68b b5714e113bc0 | |
40 | common heads: 01241442b3c2 b5714e113bc0 |
|
40 | common heads: 01241442b3c2 b5714e113bc0 | |
41 | local is subset |
|
41 | local is subset | |
42 |
|
42 | |||
43 | % -- a -> b set |
|
43 | % -- a -> b set | |
44 | comparing with b |
|
44 | comparing with b | |
45 | query 1; heads |
|
45 | query 1; heads | |
46 | searching for changes |
|
46 | searching for changes | |
47 | all local heads known remotely |
|
47 | all local heads known remotely | |
48 | common heads: 01241442b3c2 b5714e113bc0 |
|
48 | common heads: 01241442b3c2 b5714e113bc0 | |
49 | local is subset |
|
49 | local is subset | |
50 |
|
50 | |||
51 | % -- b -> a tree |
|
51 | % -- b -> a tree | |
52 | comparing with a |
|
52 | comparing with a | |
53 | searching for changes |
|
53 | searching for changes | |
54 | unpruned common: 01241442b3c2 b5714e113bc0 |
|
54 | unpruned common: 01241442b3c2 b5714e113bc0 | |
55 | common heads: 01241442b3c2 b5714e113bc0 |
|
55 | common heads: 01241442b3c2 b5714e113bc0 | |
56 | remote is subset |
|
56 | remote is subset | |
57 |
|
57 | |||
58 | % -- b -> a set |
|
58 | % -- b -> a set | |
59 | comparing with a |
|
59 | comparing with a | |
60 | query 1; heads |
|
60 | query 1; heads | |
61 | searching for changes |
|
61 | searching for changes | |
62 | all remote heads known locally |
|
62 | all remote heads known locally | |
63 | common heads: 01241442b3c2 b5714e113bc0 |
|
63 | common heads: 01241442b3c2 b5714e113bc0 | |
64 | remote is subset |
|
64 | remote is subset | |
65 |
|
65 | |||
66 |
|
66 | |||
67 | Many new: |
|
67 | Many new: | |
68 |
|
68 | |||
69 | $ testdesc '-ra1 -ra2' '-rb' ' |
|
69 | $ testdesc '-ra1 -ra2' '-rb' ' | |
70 | > +2:f +3:a1 +3:b |
|
70 | > +2:f +3:a1 +3:b | |
71 | > <f +30 :a2' |
|
71 | > <f +30 :a2' | |
72 |
|
72 | |||
73 | % -- a -> b tree |
|
73 | % -- a -> b tree | |
74 | comparing with b |
|
74 | comparing with b | |
75 | searching for changes |
|
75 | searching for changes | |
76 | unpruned common: bebd167eb94d |
|
76 | unpruned common: bebd167eb94d | |
77 | common heads: bebd167eb94d |
|
77 | common heads: bebd167eb94d | |
78 |
|
78 | |||
79 | % -- a -> b set |
|
79 | % -- a -> b set | |
80 | comparing with b |
|
80 | comparing with b | |
81 | query 1; heads |
|
81 | query 1; heads | |
82 | searching for changes |
|
82 | searching for changes | |
83 | taking initial sample |
|
83 | taking initial sample | |
84 | searching: 2 queries |
|
84 | searching: 2 queries | |
85 | query 2; still undecided: 29, sample size is: 29 |
|
85 | query 2; still undecided: 29, sample size is: 29 | |
86 | 2 total queries |
|
86 | 2 total queries in *.????s (glob) | |
87 | common heads: bebd167eb94d |
|
87 | common heads: bebd167eb94d | |
88 |
|
88 | |||
89 | % -- b -> a tree |
|
89 | % -- b -> a tree | |
90 | comparing with a |
|
90 | comparing with a | |
91 | searching for changes |
|
91 | searching for changes | |
92 | unpruned common: 66f7d451a68b bebd167eb94d |
|
92 | unpruned common: 66f7d451a68b bebd167eb94d | |
93 | common heads: bebd167eb94d |
|
93 | common heads: bebd167eb94d | |
94 |
|
94 | |||
95 | % -- b -> a set |
|
95 | % -- b -> a set | |
96 | comparing with a |
|
96 | comparing with a | |
97 | query 1; heads |
|
97 | query 1; heads | |
98 | searching for changes |
|
98 | searching for changes | |
99 | taking initial sample |
|
99 | taking initial sample | |
100 | searching: 2 queries |
|
100 | searching: 2 queries | |
101 | query 2; still undecided: 2, sample size is: 2 |
|
101 | query 2; still undecided: 2, sample size is: 2 | |
102 | 2 total queries |
|
102 | 2 total queries in *.????s (glob) | |
103 | common heads: bebd167eb94d |
|
103 | common heads: bebd167eb94d | |
104 |
|
104 | |||
105 |
|
||||
106 | Both sides many new with stub: |
|
105 | Both sides many new with stub: | |
107 |
|
106 | |||
108 | $ testdesc '-ra1 -ra2' '-rb' ' |
|
107 | $ testdesc '-ra1 -ra2' '-rb' ' | |
109 | > +2:f +2:a1 +30 :b |
|
108 | > +2:f +2:a1 +30 :b | |
110 | > <f +30 :a2' |
|
109 | > <f +30 :a2' | |
111 |
|
110 | |||
112 | % -- a -> b tree |
|
111 | % -- a -> b tree | |
113 | comparing with b |
|
112 | comparing with b | |
114 | searching for changes |
|
113 | searching for changes | |
115 | unpruned common: 2dc09a01254d |
|
114 | unpruned common: 2dc09a01254d | |
116 | common heads: 2dc09a01254d |
|
115 | common heads: 2dc09a01254d | |
117 |
|
116 | |||
118 | % -- a -> b set |
|
117 | % -- a -> b set | |
119 | comparing with b |
|
118 | comparing with b | |
120 | query 1; heads |
|
119 | query 1; heads | |
121 | searching for changes |
|
120 | searching for changes | |
122 | taking initial sample |
|
121 | taking initial sample | |
123 | searching: 2 queries |
|
122 | searching: 2 queries | |
124 | query 2; still undecided: 29, sample size is: 29 |
|
123 | query 2; still undecided: 29, sample size is: 29 | |
125 | 2 total queries |
|
124 | 2 total queries in *.????s (glob) | |
126 | common heads: 2dc09a01254d |
|
125 | common heads: 2dc09a01254d | |
127 |
|
126 | |||
128 | % -- b -> a tree |
|
127 | % -- b -> a tree | |
129 | comparing with a |
|
128 | comparing with a | |
130 | searching for changes |
|
129 | searching for changes | |
131 | unpruned common: 2dc09a01254d 66f7d451a68b |
|
130 | unpruned common: 2dc09a01254d 66f7d451a68b | |
132 | common heads: 2dc09a01254d |
|
131 | common heads: 2dc09a01254d | |
133 |
|
132 | |||
134 | % -- b -> a set |
|
133 | % -- b -> a set | |
135 | comparing with a |
|
134 | comparing with a | |
136 | query 1; heads |
|
135 | query 1; heads | |
137 | searching for changes |
|
136 | searching for changes | |
138 | taking initial sample |
|
137 | taking initial sample | |
139 | searching: 2 queries |
|
138 | searching: 2 queries | |
140 | query 2; still undecided: 29, sample size is: 29 |
|
139 | query 2; still undecided: 29, sample size is: 29 | |
141 | 2 total queries |
|
140 | 2 total queries in *.????s (glob) | |
142 | common heads: 2dc09a01254d |
|
141 | common heads: 2dc09a01254d | |
143 |
|
142 | |||
144 |
|
143 | |||
145 | Both many new: |
|
144 | Both many new: | |
146 |
|
145 | |||
147 | $ testdesc '-ra' '-rb' ' |
|
146 | $ testdesc '-ra' '-rb' ' | |
148 | > +2:f +30 :b |
|
147 | > +2:f +30 :b | |
149 | > <f +30 :a' |
|
148 | > <f +30 :a' | |
150 |
|
149 | |||
151 | % -- a -> b tree |
|
150 | % -- a -> b tree | |
152 | comparing with b |
|
151 | comparing with b | |
153 | searching for changes |
|
152 | searching for changes | |
154 | unpruned common: 66f7d451a68b |
|
153 | unpruned common: 66f7d451a68b | |
155 | common heads: 66f7d451a68b |
|
154 | common heads: 66f7d451a68b | |
156 |
|
155 | |||
157 | % -- a -> b set |
|
156 | % -- a -> b set | |
158 | comparing with b |
|
157 | comparing with b | |
159 | query 1; heads |
|
158 | query 1; heads | |
160 | searching for changes |
|
159 | searching for changes | |
161 | taking quick initial sample |
|
160 | taking quick initial sample | |
162 | searching: 2 queries |
|
161 | searching: 2 queries | |
163 | query 2; still undecided: 31, sample size is: 31 |
|
162 | query 2; still undecided: 31, sample size is: 31 | |
164 | 2 total queries |
|
163 | 2 total queries in *.????s (glob) | |
165 | common heads: 66f7d451a68b |
|
164 | common heads: 66f7d451a68b | |
166 |
|
165 | |||
167 | % -- b -> a tree |
|
166 | % -- b -> a tree | |
168 | comparing with a |
|
167 | comparing with a | |
169 | searching for changes |
|
168 | searching for changes | |
170 | unpruned common: 66f7d451a68b |
|
169 | unpruned common: 66f7d451a68b | |
171 | common heads: 66f7d451a68b |
|
170 | common heads: 66f7d451a68b | |
172 |
|
171 | |||
173 | % -- b -> a set |
|
172 | % -- b -> a set | |
174 | comparing with a |
|
173 | comparing with a | |
175 | query 1; heads |
|
174 | query 1; heads | |
176 | searching for changes |
|
175 | searching for changes | |
177 | taking quick initial sample |
|
176 | taking quick initial sample | |
178 | searching: 2 queries |
|
177 | searching: 2 queries | |
179 | query 2; still undecided: 31, sample size is: 31 |
|
178 | query 2; still undecided: 31, sample size is: 31 | |
180 | 2 total queries |
|
179 | 2 total queries in *.????s (glob) | |
181 | common heads: 66f7d451a68b |
|
180 | common heads: 66f7d451a68b | |
182 |
|
181 | |||
183 |
|
182 | |||
184 | Both many new skewed: |
|
183 | Both many new skewed: | |
185 |
|
184 | |||
186 | $ testdesc '-ra' '-rb' ' |
|
185 | $ testdesc '-ra' '-rb' ' | |
187 | > +2:f +30 :b |
|
186 | > +2:f +30 :b | |
188 | > <f +50 :a' |
|
187 | > <f +50 :a' | |
189 |
|
188 | |||
190 | % -- a -> b tree |
|
189 | % -- a -> b tree | |
191 | comparing with b |
|
190 | comparing with b | |
192 | searching for changes |
|
191 | searching for changes | |
193 | unpruned common: 66f7d451a68b |
|
192 | unpruned common: 66f7d451a68b | |
194 | common heads: 66f7d451a68b |
|
193 | common heads: 66f7d451a68b | |
195 |
|
194 | |||
196 | % -- a -> b set |
|
195 | % -- a -> b set | |
197 | comparing with b |
|
196 | comparing with b | |
198 | query 1; heads |
|
197 | query 1; heads | |
199 | searching for changes |
|
198 | searching for changes | |
200 | taking quick initial sample |
|
199 | taking quick initial sample | |
201 | searching: 2 queries |
|
200 | searching: 2 queries | |
202 | query 2; still undecided: 51, sample size is: 51 |
|
201 | query 2; still undecided: 51, sample size is: 51 | |
203 | 2 total queries |
|
202 | 2 total queries in *.????s (glob) | |
204 | common heads: 66f7d451a68b |
|
203 | common heads: 66f7d451a68b | |
205 |
|
204 | |||
206 | % -- b -> a tree |
|
205 | % -- b -> a tree | |
207 | comparing with a |
|
206 | comparing with a | |
208 | searching for changes |
|
207 | searching for changes | |
209 | unpruned common: 66f7d451a68b |
|
208 | unpruned common: 66f7d451a68b | |
210 | common heads: 66f7d451a68b |
|
209 | common heads: 66f7d451a68b | |
211 |
|
210 | |||
212 | % -- b -> a set |
|
211 | % -- b -> a set | |
213 | comparing with a |
|
212 | comparing with a | |
214 | query 1; heads |
|
213 | query 1; heads | |
215 | searching for changes |
|
214 | searching for changes | |
216 | taking quick initial sample |
|
215 | taking quick initial sample | |
217 | searching: 2 queries |
|
216 | searching: 2 queries | |
218 | query 2; still undecided: 31, sample size is: 31 |
|
217 | query 2; still undecided: 31, sample size is: 31 | |
219 | 2 total queries |
|
218 | 2 total queries in *.????s (glob) | |
220 | common heads: 66f7d451a68b |
|
219 | common heads: 66f7d451a68b | |
221 |
|
220 | |||
222 |
|
221 | |||
223 | Both many new on top of long history: |
|
222 | Both many new on top of long history: | |
224 |
|
223 | |||
225 | $ testdesc '-ra' '-rb' ' |
|
224 | $ testdesc '-ra' '-rb' ' | |
226 | > +1000:f +30 :b |
|
225 | > +1000:f +30 :b | |
227 | > <f +50 :a' |
|
226 | > <f +50 :a' | |
228 |
|
227 | |||
229 | % -- a -> b tree |
|
228 | % -- a -> b tree | |
230 | comparing with b |
|
229 | comparing with b | |
231 | searching for changes |
|
230 | searching for changes | |
232 | unpruned common: 7ead0cba2838 |
|
231 | unpruned common: 7ead0cba2838 | |
233 | common heads: 7ead0cba2838 |
|
232 | common heads: 7ead0cba2838 | |
234 |
|
233 | |||
235 | % -- a -> b set |
|
234 | % -- a -> b set | |
236 | comparing with b |
|
235 | comparing with b | |
237 | query 1; heads |
|
236 | query 1; heads | |
238 | searching for changes |
|
237 | searching for changes | |
239 | taking quick initial sample |
|
238 | taking quick initial sample | |
240 | searching: 2 queries |
|
239 | searching: 2 queries | |
241 | query 2; still undecided: 1049, sample size is: 11 |
|
240 | query 2; still undecided: 1049, sample size is: 11 | |
242 | sampling from both directions |
|
241 | sampling from both directions | |
243 | searching: 3 queries |
|
242 | searching: 3 queries | |
244 | query 3; still undecided: 31, sample size is: 31 |
|
243 | query 3; still undecided: 31, sample size is: 31 | |
245 | 3 total queries |
|
244 | 3 total queries in *.????s (glob) | |
246 | common heads: 7ead0cba2838 |
|
245 | common heads: 7ead0cba2838 | |
247 |
|
246 | |||
248 | % -- b -> a tree |
|
247 | % -- b -> a tree | |
249 | comparing with a |
|
248 | comparing with a | |
250 | searching for changes |
|
249 | searching for changes | |
251 | unpruned common: 7ead0cba2838 |
|
250 | unpruned common: 7ead0cba2838 | |
252 | common heads: 7ead0cba2838 |
|
251 | common heads: 7ead0cba2838 | |
253 |
|
252 | |||
254 | % -- b -> a set |
|
253 | % -- b -> a set | |
255 | comparing with a |
|
254 | comparing with a | |
256 | query 1; heads |
|
255 | query 1; heads | |
257 | searching for changes |
|
256 | searching for changes | |
258 | taking quick initial sample |
|
257 | taking quick initial sample | |
259 | searching: 2 queries |
|
258 | searching: 2 queries | |
260 | query 2; still undecided: 1029, sample size is: 11 |
|
259 | query 2; still undecided: 1029, sample size is: 11 | |
261 | sampling from both directions |
|
260 | sampling from both directions | |
262 | searching: 3 queries |
|
261 | searching: 3 queries | |
263 | query 3; still undecided: 15, sample size is: 15 |
|
262 | query 3; still undecided: 15, sample size is: 15 | |
264 | 3 total queries |
|
263 | 3 total queries in *.????s (glob) | |
265 | common heads: 7ead0cba2838 |
|
264 | common heads: 7ead0cba2838 | |
266 |
|
265 | |||
267 |
|
266 | |||
268 | One with >200 heads, which used to use up all of the sample: |
|
267 | One with >200 heads, which used to use up all of the sample: | |
269 |
|
268 | |||
270 | $ hg init manyheads |
|
269 | $ hg init manyheads | |
271 | $ cd manyheads |
|
270 | $ cd manyheads | |
272 | $ echo "+300:r @a" >dagdesc |
|
271 | $ echo "+300:r @a" >dagdesc | |
273 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
272 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads | |
274 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
273 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads | |
275 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
274 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads | |
276 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
275 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads | |
277 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
276 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads | |
278 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
277 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads | |
279 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
278 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads | |
280 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
279 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads | |
281 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
280 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads | |
282 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
281 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads | |
283 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
282 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads | |
284 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
283 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads | |
285 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
284 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads | |
286 | $ echo "@b *r+3" >>dagdesc # one more head |
|
285 | $ echo "@b *r+3" >>dagdesc # one more head | |
287 | $ hg debugbuilddag <dagdesc |
|
286 | $ hg debugbuilddag <dagdesc | |
288 | reading DAG from stdin |
|
287 | reading DAG from stdin | |
289 |
|
288 | |||
290 | $ hg heads -t --template . | wc -c |
|
289 | $ hg heads -t --template . | wc -c | |
291 | \s*261 (re) |
|
290 | \s*261 (re) | |
292 |
|
291 | |||
293 | $ hg clone -b a . a |
|
292 | $ hg clone -b a . a | |
294 | adding changesets |
|
293 | adding changesets | |
295 | adding manifests |
|
294 | adding manifests | |
296 | adding file changes |
|
295 | adding file changes | |
297 | added 1340 changesets with 0 changes to 0 files (+259 heads) |
|
296 | added 1340 changesets with 0 changes to 0 files (+259 heads) | |
298 | updating to branch a |
|
297 | updating to branch a | |
299 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
298 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
300 | $ hg clone -b b . b |
|
299 | $ hg clone -b b . b | |
301 | adding changesets |
|
300 | adding changesets | |
302 | adding manifests |
|
301 | adding manifests | |
303 | adding file changes |
|
302 | adding file changes | |
304 | added 304 changesets with 0 changes to 0 files |
|
303 | added 304 changesets with 0 changes to 0 files | |
305 | updating to branch b |
|
304 | updating to branch b | |
306 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
305 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
307 |
|
306 | |||
308 | $ hg -R a debugdiscovery b --debug --verbose --config progress.debug=true |
|
307 | $ hg -R a debugdiscovery b --debug --verbose --config progress.debug=true | |
309 | comparing with b |
|
308 | comparing with b | |
310 | query 1; heads |
|
309 | query 1; heads | |
311 | searching for changes |
|
310 | searching for changes | |
312 | taking quick initial sample |
|
311 | taking quick initial sample | |
313 | searching: 2 queries |
|
312 | searching: 2 queries | |
314 | query 2; still undecided: 1240, sample size is: 100 |
|
313 | query 2; still undecided: 1240, sample size is: 100 | |
315 | sampling from both directions |
|
314 | sampling from both directions | |
316 | searching: 3 queries |
|
315 | searching: 3 queries | |
317 | query 3; still undecided: 1140, sample size is: 200 |
|
316 | query 3; still undecided: 1140, sample size is: 200 | |
318 | sampling from both directions |
|
317 | sampling from both directions | |
319 | searching: 4 queries |
|
318 | searching: 4 queries | |
320 | query 4; still undecided: \d+, sample size is: 200 (re) |
|
319 | query 4; still undecided: \d+, sample size is: 200 (re) | |
321 | sampling from both directions |
|
320 | sampling from both directions | |
322 | searching: 5 queries |
|
321 | searching: 5 queries | |
323 | query 5; still undecided: \d+, sample size is: 200 (re) |
|
322 | query 5; still undecided: \d+, sample size is: 200 (re) | |
324 | sampling from both directions |
|
323 | sampling from both directions | |
325 | searching: 6 queries |
|
324 | searching: 6 queries | |
326 | query 6; still undecided: \d+, sample size is: \d+ (re) |
|
325 | query 6; still undecided: \d+, sample size is: \d+ (re) | |
327 | 6 total queries |
|
326 | 6 total queries in *.????s (glob) | |
328 | common heads: 3ee37d65064a |
|
327 | common heads: 3ee37d65064a | |
329 |
|
328 | |||
330 | Test actual protocol when pulling one new head in addition to common heads |
|
329 | Test actual protocol when pulling one new head in addition to common heads | |
331 |
|
330 | |||
332 | $ hg clone -U b c |
|
331 | $ hg clone -U b c | |
333 | $ hg -R c id -ir tip |
|
332 | $ hg -R c id -ir tip | |
334 | 513314ca8b3a |
|
333 | 513314ca8b3a | |
335 | $ hg -R c up -qr default |
|
334 | $ hg -R c up -qr default | |
336 | $ touch c/f |
|
335 | $ touch c/f | |
337 | $ hg -R c ci -Aqm "extra head" |
|
336 | $ hg -R c ci -Aqm "extra head" | |
338 | $ hg -R c id -i |
|
337 | $ hg -R c id -i | |
339 | e64a39e7da8b |
|
338 | e64a39e7da8b | |
340 |
|
339 | |||
341 | $ hg serve -R c -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
340 | $ hg serve -R c -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
342 | $ cat hg.pid >> $DAEMON_PIDS |
|
341 | $ cat hg.pid >> $DAEMON_PIDS | |
343 |
|
342 | |||
344 | $ hg -R b incoming http://localhost:$HGPORT/ -T '{node|short}\n' |
|
343 | $ hg -R b incoming http://localhost:$HGPORT/ -T '{node|short}\n' | |
345 | comparing with http://localhost:$HGPORT/ |
|
344 | comparing with http://localhost:$HGPORT/ | |
346 | searching for changes |
|
345 | searching for changes | |
347 | e64a39e7da8b |
|
346 | e64a39e7da8b | |
348 |
|
347 | |||
349 | $ killdaemons.py |
|
348 | $ killdaemons.py | |
350 | $ cut -d' ' -f6- access.log | grep -v cmd=known # cmd=known uses random sampling |
|
349 | $ cut -d' ' -f6- access.log | grep -v cmd=known # cmd=known uses random sampling | |
351 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
350 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
352 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D513314ca8b3ae4dac8eec56966265b00fcf866db x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) |
|
351 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D513314ca8b3ae4dac8eec56966265b00fcf866db x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
353 | "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=513314ca8b3ae4dac8eec56966265b00fcf866db&heads=e64a39e7da8b0d54bc63e81169aff001c13b3477 x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) |
|
352 | "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=513314ca8b3ae4dac8eec56966265b00fcf866db&heads=e64a39e7da8b0d54bc63e81169aff001c13b3477 x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
354 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) |
|
353 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
355 | $ cat errors.log |
|
354 | $ cat errors.log | |
356 |
|
355 | |||
357 | $ cd .. |
|
356 | $ cd .. | |
358 |
|
357 | |||
359 |
|
358 | |||
360 | Issue 4438 - test coverage for 3ef893520a85 issues. |
|
359 | Issue 4438 - test coverage for 3ef893520a85 issues. | |
361 |
|
360 | |||
362 | $ mkdir issue4438 |
|
361 | $ mkdir issue4438 | |
363 | $ cd issue4438 |
|
362 | $ cd issue4438 | |
364 | #if false |
|
363 | #if false | |
365 | generate new bundles: |
|
364 | generate new bundles: | |
366 | $ hg init r1 |
|
365 | $ hg init r1 | |
367 | $ for i in `python $TESTDIR/seq.py 101`; do hg -R r1 up -qr null && hg -R r1 branch -q b$i && hg -R r1 ci -qmb$i; done |
|
366 | $ for i in `python $TESTDIR/seq.py 101`; do hg -R r1 up -qr null && hg -R r1 branch -q b$i && hg -R r1 ci -qmb$i; done | |
368 | $ hg clone -q r1 r2 |
|
367 | $ hg clone -q r1 r2 | |
369 | $ for i in `python $TESTDIR/seq.py 10`; do hg -R r1 up -qr null && hg -R r1 branch -q c$i && hg -R r1 ci -qmc$i; done |
|
368 | $ for i in `python $TESTDIR/seq.py 10`; do hg -R r1 up -qr null && hg -R r1 branch -q c$i && hg -R r1 ci -qmc$i; done | |
370 | $ hg -R r2 branch -q r2change && hg -R r2 ci -qmr2change |
|
369 | $ hg -R r2 branch -q r2change && hg -R r2 ci -qmr2change | |
371 | $ hg -R r1 bundle -qa $TESTDIR/bundles/issue4438-r1.hg |
|
370 | $ hg -R r1 bundle -qa $TESTDIR/bundles/issue4438-r1.hg | |
372 | $ hg -R r2 bundle -qa $TESTDIR/bundles/issue4438-r2.hg |
|
371 | $ hg -R r2 bundle -qa $TESTDIR/bundles/issue4438-r2.hg | |
373 | #else |
|
372 | #else | |
374 | use existing bundles: |
|
373 | use existing bundles: | |
375 | $ hg clone -q $TESTDIR/bundles/issue4438-r1.hg r1 |
|
374 | $ hg clone -q $TESTDIR/bundles/issue4438-r1.hg r1 | |
376 | $ hg clone -q $TESTDIR/bundles/issue4438-r2.hg r2 |
|
375 | $ hg clone -q $TESTDIR/bundles/issue4438-r2.hg r2 | |
377 | #endif |
|
376 | #endif | |
378 |
|
377 | |||
379 | Set iteration order could cause wrong and unstable results - fixed in 73cfaa348650: |
|
378 | Set iteration order could cause wrong and unstable results - fixed in 73cfaa348650: | |
380 |
|
379 | |||
381 | $ hg -R r1 outgoing r2 -T'{rev} ' |
|
380 | $ hg -R r1 outgoing r2 -T'{rev} ' | |
382 | comparing with r2 |
|
381 | comparing with r2 | |
383 | searching for changes |
|
382 | searching for changes | |
384 | 101 102 103 104 105 106 107 108 109 110 (no-eol) |
|
383 | 101 102 103 104 105 106 107 108 109 110 (no-eol) | |
385 |
|
384 | |||
386 | The case where all the 'initialsamplesize' samples already were common would |
|
385 | The case where all the 'initialsamplesize' samples already were common would | |
387 | give 'all remote heads known locally' without checking the remaining heads - |
|
386 | give 'all remote heads known locally' without checking the remaining heads - | |
388 | fixed in 86c35b7ae300: |
|
387 | fixed in 86c35b7ae300: | |
389 |
|
388 | |||
390 | $ cat >> $TESTTMP/unrandomsample.py << EOF |
|
389 | $ cat >> $TESTTMP/unrandomsample.py << EOF | |
391 | > import random |
|
390 | > import random | |
392 | > def sample(population, k): |
|
391 | > def sample(population, k): | |
393 | > return sorted(population)[:k] |
|
392 | > return sorted(population)[:k] | |
394 | > random.sample = sample |
|
393 | > random.sample = sample | |
395 | > EOF |
|
394 | > EOF | |
396 |
|
395 | |||
397 | $ cat >> r1/.hg/hgrc << EOF |
|
396 | $ cat >> r1/.hg/hgrc << EOF | |
398 | > [extensions] |
|
397 | > [extensions] | |
399 | > unrandomsample = $TESTTMP/unrandomsample.py |
|
398 | > unrandomsample = $TESTTMP/unrandomsample.py | |
400 | > EOF |
|
399 | > EOF | |
401 |
|
400 | |||
402 | $ hg -R r1 outgoing r2 -T'{rev} ' |
|
401 | $ hg -R r1 outgoing r2 -T'{rev} ' | |
403 | comparing with r2 |
|
402 | comparing with r2 | |
404 | searching for changes |
|
403 | searching for changes | |
405 | 101 102 103 104 105 106 107 108 109 110 (no-eol) |
|
404 | 101 102 103 104 105 106 107 108 109 110 (no-eol) | |
406 | $ cd .. |
|
405 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now