##// END OF EJS Templates
setdiscovery: batch heads and known(ownheads)...
Peter Arrenbrecht -
r14624:f03c82d1 default
parent child Browse files
Show More
@@ -1,178 +1,193
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 from node import nullid
9 from node import nullid
10 from i18n import _
10 from i18n import _
11 import random, collections, util, dagutil
11 import random, collections, util, dagutil
12
12
13 def _updatesample(dag, nodes, sample, always, quicksamplesize=0):
13 def _updatesample(dag, nodes, sample, always, quicksamplesize=0):
14 # if nodes is empty we scan the entire graph
14 # if nodes is empty we scan the entire graph
15 if nodes:
15 if nodes:
16 heads = dag.headsetofconnecteds(nodes)
16 heads = dag.headsetofconnecteds(nodes)
17 else:
17 else:
18 heads = dag.heads()
18 heads = dag.heads()
19 dist = {}
19 dist = {}
20 visit = collections.deque(heads)
20 visit = collections.deque(heads)
21 seen = set()
21 seen = set()
22 factor = 1
22 factor = 1
23 while visit:
23 while visit:
24 curr = visit.popleft()
24 curr = visit.popleft()
25 if curr in seen:
25 if curr in seen:
26 continue
26 continue
27 d = dist.setdefault(curr, 1)
27 d = dist.setdefault(curr, 1)
28 if d > factor:
28 if d > factor:
29 factor *= 2
29 factor *= 2
30 if d == factor:
30 if d == factor:
31 if curr not in always: # need this check for the early exit below
31 if curr not in always: # need this check for the early exit below
32 sample.add(curr)
32 sample.add(curr)
33 if quicksamplesize and (len(sample) >= quicksamplesize):
33 if quicksamplesize and (len(sample) >= quicksamplesize):
34 return
34 return
35 seen.add(curr)
35 seen.add(curr)
36 for p in dag.parents(curr):
36 for p in dag.parents(curr):
37 if not nodes or p in nodes:
37 if not nodes or p in nodes:
38 dist.setdefault(p, d + 1)
38 dist.setdefault(p, d + 1)
39 visit.append(p)
39 visit.append(p)
40
40
41 def _setupsample(dag, nodes, size):
41 def _setupsample(dag, nodes, size):
42 if len(nodes) <= size:
42 if len(nodes) <= size:
43 return set(nodes), None, 0
43 return set(nodes), None, 0
44 always = set(dag.heads())
44 always = set(dag.heads())
45 desiredlen = size - len(always)
45 desiredlen = size - len(always)
46 if desiredlen <= 0:
46 if desiredlen <= 0:
47 # This could be bad if there are very many heads, all unknown to the
47 # This could be bad if there are very many heads, all unknown to the
48 # server. We're counting on long request support here.
48 # server. We're counting on long request support here.
49 return always, None, desiredlen
49 return always, None, desiredlen
50 return always, set(), desiredlen
50 return always, set(), desiredlen
51
51
52 def _takequicksample(dag, nodes, size, initial):
52 def _takequicksample(dag, nodes, size, initial):
53 always, sample, desiredlen = _setupsample(dag, nodes, size)
53 always, sample, desiredlen = _setupsample(dag, nodes, size)
54 if sample is None:
54 if sample is None:
55 return always
55 return always
56 if initial:
56 if initial:
57 fromset = None
57 fromset = None
58 else:
58 else:
59 fromset = nodes
59 fromset = nodes
60 _updatesample(dag, fromset, sample, always, quicksamplesize=desiredlen)
60 _updatesample(dag, fromset, sample, always, quicksamplesize=desiredlen)
61 sample.update(always)
61 sample.update(always)
62 return sample
62 return sample
63
63
64 def _takefullsample(dag, nodes, size):
64 def _takefullsample(dag, nodes, size):
65 always, sample, desiredlen = _setupsample(dag, nodes, size)
65 always, sample, desiredlen = _setupsample(dag, nodes, size)
66 if sample is None:
66 if sample is None:
67 return always
67 return always
68 # update from heads
68 # update from heads
69 _updatesample(dag, nodes, sample, always)
69 _updatesample(dag, nodes, sample, always)
70 # update from roots
70 # update from roots
71 _updatesample(dag.inverse(), nodes, sample, always)
71 _updatesample(dag.inverse(), nodes, sample, always)
72 assert sample
72 assert sample
73 if len(sample) > desiredlen:
73 if len(sample) > desiredlen:
74 sample = set(random.sample(sample, desiredlen))
74 sample = set(random.sample(sample, desiredlen))
75 elif len(sample) < desiredlen:
75 elif len(sample) < desiredlen:
76 more = desiredlen - len(sample)
76 more = desiredlen - len(sample)
77 sample.update(random.sample(list(nodes - sample - always), more))
77 sample.update(random.sample(list(nodes - sample - always), more))
78 sample.update(always)
78 sample.update(always)
79 return sample
79 return sample
80
80
81 def findcommonheads(ui, local, remote,
81 def findcommonheads(ui, local, remote,
82 initialsamplesize=100,
82 initialsamplesize=100,
83 fullsamplesize=200,
83 fullsamplesize=200,
84 abortwhenunrelated=True):
84 abortwhenunrelated=True):
85 '''Return a tuple (common, anyincoming, remoteheads) used to identify
85 '''Return a tuple (common, anyincoming, remoteheads) used to identify
86 missing nodes from or in remote.
86 missing nodes from or in remote.
87
87
88 shortcutlocal determines whether we try use direct access to localrepo if
88 shortcutlocal determines whether we try use direct access to localrepo if
89 remote is actually local.
89 remote is actually local.
90 '''
90 '''
91 roundtrips = 0
91 roundtrips = 0
92 cl = local.changelog
92 cl = local.changelog
93 dag = dagutil.revlogdag(cl)
93 dag = dagutil.revlogdag(cl)
94 nodes = dag.nodeset()
95
94
96 # early exit if we know all the specified server heads already
95 # early exit if we know all the specified remote heads already
97 ui.debug("query 1; heads\n")
96 ui.debug("query 1; heads\n")
98 roundtrips += 1
97 roundtrips += 1
98 ownheads = dag.heads()
99 sample = ownheads
100 if remote.local():
101 # stopgap until we have a proper localpeer that supports batch()
99 srvheadhashes = remote.heads()
102 srvheadhashes = remote.heads()
100
103 yesno = remote.known(dag.externalizeall(sample))
101 ## TODO We might want to request an additional random sample of the server's
104 elif remote.capable('batch'):
102 ## nodes batched with the heads query here.
105 batch = remote.batch()
106 srvheadhashesref = batch.heads()
107 yesnoref = batch.known(dag.externalizeall(sample))
108 batch.submit()
109 srvheadhashes = srvheadhashesref.value
110 yesno = yesnoref.value
111 else:
112 # compatibitity with pre-batch, but post-known remotes during 1.9 devel
113 srvheadhashes = remote.heads()
114 sample = []
103
115
104 if cl.tip() == nullid:
116 if cl.tip() == nullid:
105 if srvheadhashes != [nullid]:
117 if srvheadhashes != [nullid]:
106 return [nullid], True, srvheadhashes
118 return [nullid], True, srvheadhashes
107 return [nullid], False, []
119 return [nullid], False, []
108
120
109 # start actual discovery (we note this before the next "if" for
121 # start actual discovery (we note this before the next "if" for
110 # compatibility reasons)
122 # compatibility reasons)
111 ui.status(_("searching for changes\n"))
123 ui.status(_("searching for changes\n"))
112
124
113 srvheads = dag.internalizeall(srvheadhashes, filterunknown=True)
125 srvheads = dag.internalizeall(srvheadhashes, filterunknown=True)
114 if len(srvheads) == len(srvheadhashes):
126 if len(srvheads) == len(srvheadhashes):
115 ui.note("all remote heads known locally\n")
127 ui.note("all remote heads known locally\n")
116 return (srvheadhashes, False, srvheadhashes,)
128 return (srvheadhashes, False, srvheadhashes,)
117
129
130 if sample and util.all(yesno):
131 ui.note("all local heads known remotely\n")
132 ownheadhashes = dag.externalizeall(ownheads)
133 return (ownheadhashes, True, srvheadhashes,)
134
118 # full blown discovery
135 # full blown discovery
119 undecided = nodes # own nodes where I don't know if the server knows them
136 undecided = dag.nodeset() # own nodes where I don't know if remote knows them
120 common = set() # own nodes I know we both know
137 common = set() # own nodes I know we both know
121 missing = set() # own nodes I know the server lacks
138 missing = set() # own nodes I know remote lacks
122
139
123 # treat remote heads as a first implicit sample response
140 # treat remote heads (and maybe own heads) as a first implicit sample response
124 common.update(dag.ancestorset(srvheads))
141 common.update(dag.ancestorset(srvheads))
125 undecided.difference_update(common)
142 undecided.difference_update(common)
126 # use cheapish initial sample
127 if common:
128 ui.debug("taking initial sample\n")
129 sample = _takefullsample(dag, undecided, size=fullsamplesize)
130 else:
131 ui.debug("taking quick initial sample\n")
132 sample = _takequicksample(dag, nodes, size=initialsamplesize,
133 initial=True)
134
143
135 roundtrips += 1
144 full = False
136 ui.progress(_('searching'), roundtrips, unit=_('queries'))
145 while undecided:
137 ui.debug("query %i; still undecided: %i, sample size is: %i\n"
138 % (roundtrips, len(undecided), len(sample)))
139 # indices between sample and externalized version must match
140 sample = list(sample)
141 yesno = remote.known(dag.externalizeall(sample))
142
146
143 while undecided:
147 if sample:
144 commoninsample = set(n for i, n in enumerate(sample) if yesno[i])
148 commoninsample = set(n for i, n in enumerate(sample) if yesno[i])
145 common.update(dag.ancestorset(commoninsample, common))
149 common.update(dag.ancestorset(commoninsample, common))
146
150
147 missinginsample = [n for i, n in enumerate(sample) if not yesno[i]]
151 missinginsample = [n for i, n in enumerate(sample) if not yesno[i]]
148 missing.update(dag.descendantset(missinginsample, missing))
152 missing.update(dag.descendantset(missinginsample, missing))
149
153
150 undecided.difference_update(missing)
154 undecided.difference_update(missing)
151 undecided.difference_update(common)
155 undecided.difference_update(common)
152
156
153 if not undecided:
157 if not undecided:
154 break
158 break
155
159
160 if full:
156 ui.note("sampling from both directions\n")
161 ui.note("sampling from both directions\n")
157 sample = _takefullsample(dag, undecided, size=fullsamplesize)
162 sample = _takefullsample(dag, undecided, size=fullsamplesize)
163 elif common:
164 # use cheapish initial sample
165 ui.debug("taking initial sample\n")
166 sample = _takefullsample(dag, undecided, size=fullsamplesize)
167 else:
168 # use even cheaper initial sample
169 ui.debug("taking quick initial sample\n")
170 sample = _takequicksample(dag, undecided, size=initialsamplesize,
171 initial=True)
158
172
159 roundtrips += 1
173 roundtrips += 1
160 ui.progress(_('searching'), roundtrips, unit=_('queries'))
174 ui.progress(_('searching'), roundtrips, unit=_('queries'))
161 ui.debug("query %i; still undecided: %i, sample size is: %i\n"
175 ui.debug("query %i; still undecided: %i, sample size is: %i\n"
162 % (roundtrips, len(undecided), len(sample)))
176 % (roundtrips, len(undecided), len(sample)))
163 # indices between sample and externalized version must match
177 # indices between sample and externalized version must match
164 sample = list(sample)
178 sample = list(sample)
165 yesno = remote.known(dag.externalizeall(sample))
179 yesno = remote.known(dag.externalizeall(sample))
180 full = True
166
181
167 result = dag.headsetofconnecteds(common)
182 result = dag.headsetofconnecteds(common)
168 ui.progress(_('searching'), None)
183 ui.progress(_('searching'), None)
169 ui.debug("%d total queries\n" % roundtrips)
184 ui.debug("%d total queries\n" % roundtrips)
170
185
171 if not result and srvheadhashes != [nullid]:
186 if not result and srvheadhashes != [nullid]:
172 if abortwhenunrelated:
187 if abortwhenunrelated:
173 raise util.Abort(_("repository is unrelated"))
188 raise util.Abort(_("repository is unrelated"))
174 else:
189 else:
175 ui.warn(_("warning: repository is unrelated\n"))
190 ui.warn(_("warning: repository is unrelated\n"))
176 return (set([nullid]), True, srvheadhashes,)
191 return (set([nullid]), True, srvheadhashes,)
177
192
178 return (dag.externalizeall(result), True, srvheadhashes,)
193 return (dag.externalizeall(result), True, srvheadhashes,)
@@ -1,120 +1,120
1
1
2 $ hg init a
2 $ hg init a
3 $ cd a
3 $ cd a
4 $ echo a > a
4 $ echo a > a
5 $ hg ci -Ama -d '1123456789 0'
5 $ hg ci -Ama -d '1123456789 0'
6 adding a
6 adding a
7 $ hg --config server.uncompressed=True serve -p $HGPORT -d --pid-file=hg.pid
7 $ hg --config server.uncompressed=True serve -p $HGPORT -d --pid-file=hg.pid
8 $ cat hg.pid >> $DAEMON_PIDS
8 $ cat hg.pid >> $DAEMON_PIDS
9 $ cd ..
9 $ cd ..
10 $ ("$TESTDIR/tinyproxy.py" $HGPORT1 localhost >proxy.log 2>&1 </dev/null &
10 $ ("$TESTDIR/tinyproxy.py" $HGPORT1 localhost >proxy.log 2>&1 </dev/null &
11 $ echo $! > proxy.pid)
11 $ echo $! > proxy.pid)
12 $ cat proxy.pid >> $DAEMON_PIDS
12 $ cat proxy.pid >> $DAEMON_PIDS
13 $ sleep 2
13 $ sleep 2
14
14
15 url for proxy, stream
15 url for proxy, stream
16
16
17 $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone --uncompressed http://localhost:$HGPORT/ b
17 $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone --uncompressed http://localhost:$HGPORT/ b
18 streaming all changes
18 streaming all changes
19 3 files to transfer, 303 bytes of data
19 3 files to transfer, 303 bytes of data
20 transferred * bytes in * seconds (*/sec) (glob)
20 transferred * bytes in * seconds (*/sec) (glob)
21 updating to branch default
21 updating to branch default
22 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
22 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
23 $ cd b
23 $ cd b
24 $ hg verify
24 $ hg verify
25 checking changesets
25 checking changesets
26 checking manifests
26 checking manifests
27 crosschecking files in changesets and manifests
27 crosschecking files in changesets and manifests
28 checking files
28 checking files
29 1 files, 1 changesets, 1 total revisions
29 1 files, 1 changesets, 1 total revisions
30 $ cd ..
30 $ cd ..
31
31
32 url for proxy, pull
32 url for proxy, pull
33
33
34 $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone http://localhost:$HGPORT/ b-pull
34 $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone http://localhost:$HGPORT/ b-pull
35 requesting all changes
35 requesting all changes
36 adding changesets
36 adding changesets
37 adding manifests
37 adding manifests
38 adding file changes
38 adding file changes
39 added 1 changesets with 1 changes to 1 files
39 added 1 changesets with 1 changes to 1 files
40 updating to branch default
40 updating to branch default
41 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
41 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
42 $ cd b-pull
42 $ cd b-pull
43 $ hg verify
43 $ hg verify
44 checking changesets
44 checking changesets
45 checking manifests
45 checking manifests
46 crosschecking files in changesets and manifests
46 crosschecking files in changesets and manifests
47 checking files
47 checking files
48 1 files, 1 changesets, 1 total revisions
48 1 files, 1 changesets, 1 total revisions
49 $ cd ..
49 $ cd ..
50
50
51 host:port for proxy
51 host:port for proxy
52
52
53 $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ c
53 $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ c
54 requesting all changes
54 requesting all changes
55 adding changesets
55 adding changesets
56 adding manifests
56 adding manifests
57 adding file changes
57 adding file changes
58 added 1 changesets with 1 changes to 1 files
58 added 1 changesets with 1 changes to 1 files
59 updating to branch default
59 updating to branch default
60 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
60 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
61
61
62 proxy url with user name and password
62 proxy url with user name and password
63
63
64 $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ d
64 $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ d
65 requesting all changes
65 requesting all changes
66 adding changesets
66 adding changesets
67 adding manifests
67 adding manifests
68 adding file changes
68 adding file changes
69 added 1 changesets with 1 changes to 1 files
69 added 1 changesets with 1 changes to 1 files
70 updating to branch default
70 updating to branch default
71 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
71 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
72
72
73 url with user name and password
73 url with user name and password
74
74
75 $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://user:passwd@localhost:$HGPORT/ e
75 $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://user:passwd@localhost:$HGPORT/ e
76 requesting all changes
76 requesting all changes
77 adding changesets
77 adding changesets
78 adding manifests
78 adding manifests
79 adding file changes
79 adding file changes
80 added 1 changesets with 1 changes to 1 files
80 added 1 changesets with 1 changes to 1 files
81 updating to branch default
81 updating to branch default
82 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
82 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
83
83
84 bad host:port for proxy
84 bad host:port for proxy
85
85
86 $ http_proxy=localhost:$HGPORT2 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ f
86 $ http_proxy=localhost:$HGPORT2 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ f
87 abort: error: Connection refused
87 abort: error: Connection refused
88 [255]
88 [255]
89
89
90 do not use the proxy if it is in the no list
90 do not use the proxy if it is in the no list
91
91
92 $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.no=localhost http://localhost:$HGPORT/ g
92 $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.no=localhost http://localhost:$HGPORT/ g
93 requesting all changes
93 requesting all changes
94 adding changesets
94 adding changesets
95 adding manifests
95 adding manifests
96 adding file changes
96 adding file changes
97 added 1 changesets with 1 changes to 1 files
97 added 1 changesets with 1 changes to 1 files
98 updating to branch default
98 updating to branch default
99 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
99 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
100 $ cat proxy.log
100 $ cat proxy.log
101 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
101 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
102 * - - [*] "GET http://localhost:$HGPORT/?cmd=stream_out HTTP/1.1" - - (glob)
102 * - - [*] "GET http://localhost:$HGPORT/?cmd=stream_out HTTP/1.1" - - (glob)
103 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
103 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
104 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
104 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
105 * - - [*] "GET http://localhost:$HGPORT/?cmd=heads HTTP/1.1" - - (glob)
105 * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob)
106 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
106 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
107 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
107 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
108 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
108 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
109 * - - [*] "GET http://localhost:$HGPORT/?cmd=heads HTTP/1.1" - - (glob)
109 * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob)
110 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
110 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
111 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
111 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
112 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
112 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
113 * - - [*] "GET http://localhost:$HGPORT/?cmd=heads HTTP/1.1" - - (glob)
113 * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob)
114 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
114 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
115 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
115 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
116 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
116 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
117 * - - [*] "GET http://localhost:$HGPORT/?cmd=heads HTTP/1.1" - - (glob)
117 * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob)
118 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
118 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
119 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
119 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
120
120
@@ -1,720 +1,720
1 $ echo "[extensions]" >> $HGRCPATH
1 $ echo "[extensions]" >> $HGRCPATH
2 $ echo "graphlog=" >> $HGRCPATH
2 $ echo "graphlog=" >> $HGRCPATH
3
3
4 $ hg init a
4 $ hg init a
5 $ cd a
5 $ cd a
6 $ echo foo > t1
6 $ echo foo > t1
7 $ hg add t1
7 $ hg add t1
8 $ hg commit -m "1"
8 $ hg commit -m "1"
9
9
10 $ cd ..
10 $ cd ..
11 $ hg clone a b
11 $ hg clone a b
12 updating to branch default
12 updating to branch default
13 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
13 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
14
14
15 $ cd a
15 $ cd a
16 $ echo foo > t2
16 $ echo foo > t2
17 $ hg add t2
17 $ hg add t2
18 $ hg commit -m "2"
18 $ hg commit -m "2"
19
19
20 $ cd ../b
20 $ cd ../b
21 $ echo foo > t3
21 $ echo foo > t3
22 $ hg add t3
22 $ hg add t3
23 $ hg commit -m "3"
23 $ hg commit -m "3"
24
24
25 $ hg push ../a
25 $ hg push ../a
26 pushing to ../a
26 pushing to ../a
27 searching for changes
27 searching for changes
28 abort: push creates new remote head 1e108cc5548c!
28 abort: push creates new remote head 1e108cc5548c!
29 (you should pull and merge or use push -f to force)
29 (you should pull and merge or use push -f to force)
30 [255]
30 [255]
31
31
32 $ hg push --debug ../a
32 $ hg push --debug ../a
33 pushing to ../a
33 pushing to ../a
34 query 1; heads
34 query 1; heads
35 searching for changes
35 searching for changes
36 taking quick initial sample
36 taking quick initial sample
37 searching: 2 queries
37 searching: 2 queries
38 query 2; still undecided: 2, sample size is: 2
38 query 2; still undecided: 1, sample size is: 1
39 2 total queries
39 2 total queries
40 new remote heads on branch 'default'
40 new remote heads on branch 'default'
41 new remote head 1e108cc5548c
41 new remote head 1e108cc5548c
42 abort: push creates new remote head 1e108cc5548c!
42 abort: push creates new remote head 1e108cc5548c!
43 (you should pull and merge or use push -f to force)
43 (you should pull and merge or use push -f to force)
44 [255]
44 [255]
45
45
46 $ hg pull ../a
46 $ hg pull ../a
47 pulling from ../a
47 pulling from ../a
48 searching for changes
48 searching for changes
49 adding changesets
49 adding changesets
50 adding manifests
50 adding manifests
51 adding file changes
51 adding file changes
52 added 1 changesets with 1 changes to 1 files (+1 heads)
52 added 1 changesets with 1 changes to 1 files (+1 heads)
53 (run 'hg heads' to see heads, 'hg merge' to merge)
53 (run 'hg heads' to see heads, 'hg merge' to merge)
54
54
55 $ hg push ../a
55 $ hg push ../a
56 pushing to ../a
56 pushing to ../a
57 searching for changes
57 searching for changes
58 abort: push creates new remote head 1e108cc5548c!
58 abort: push creates new remote head 1e108cc5548c!
59 (did you forget to merge? use push -f to force)
59 (did you forget to merge? use push -f to force)
60 [255]
60 [255]
61
61
62 $ hg merge
62 $ hg merge
63 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
63 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
64 (branch merge, don't forget to commit)
64 (branch merge, don't forget to commit)
65
65
66 $ hg commit -m "4"
66 $ hg commit -m "4"
67 $ hg push ../a
67 $ hg push ../a
68 pushing to ../a
68 pushing to ../a
69 searching for changes
69 searching for changes
70 adding changesets
70 adding changesets
71 adding manifests
71 adding manifests
72 adding file changes
72 adding file changes
73 added 2 changesets with 1 changes to 1 files
73 added 2 changesets with 1 changes to 1 files
74
74
75 $ cd ..
75 $ cd ..
76
76
77 $ hg init c
77 $ hg init c
78 $ cd c
78 $ cd c
79 $ for i in 0 1 2; do
79 $ for i in 0 1 2; do
80 > echo $i >> foo
80 > echo $i >> foo
81 > hg ci -Am $i
81 > hg ci -Am $i
82 > done
82 > done
83 adding foo
83 adding foo
84 $ cd ..
84 $ cd ..
85
85
86 $ hg clone c d
86 $ hg clone c d
87 updating to branch default
87 updating to branch default
88 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
88 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
89
89
90 $ cd d
90 $ cd d
91 $ for i in 0 1; do
91 $ for i in 0 1; do
92 > hg co -C $i
92 > hg co -C $i
93 > echo d-$i >> foo
93 > echo d-$i >> foo
94 > hg ci -m d-$i
94 > hg ci -m d-$i
95 > done
95 > done
96 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
96 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
97 created new head
97 created new head
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 created new head
99 created new head
100
100
101 $ HGMERGE=true hg merge 3
101 $ HGMERGE=true hg merge 3
102 merging foo
102 merging foo
103 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
103 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
104 (branch merge, don't forget to commit)
104 (branch merge, don't forget to commit)
105
105
106 $ hg ci -m c-d
106 $ hg ci -m c-d
107
107
108 $ hg push ../c
108 $ hg push ../c
109 pushing to ../c
109 pushing to ../c
110 searching for changes
110 searching for changes
111 abort: push creates new remote head 6346d66eb9f5!
111 abort: push creates new remote head 6346d66eb9f5!
112 (did you forget to merge? use push -f to force)
112 (did you forget to merge? use push -f to force)
113 [255]
113 [255]
114
114
115 $ hg push -r 2 ../c
115 $ hg push -r 2 ../c
116 pushing to ../c
116 pushing to ../c
117 searching for changes
117 searching for changes
118 no changes found
118 no changes found
119
119
120 $ hg push -r 3 ../c
120 $ hg push -r 3 ../c
121 pushing to ../c
121 pushing to ../c
122 searching for changes
122 searching for changes
123 abort: push creates new remote head a5dda829a167!
123 abort: push creates new remote head a5dda829a167!
124 (did you forget to merge? use push -f to force)
124 (did you forget to merge? use push -f to force)
125 [255]
125 [255]
126
126
127 $ hg push -v -r 3 -r 4 ../c
127 $ hg push -v -r 3 -r 4 ../c
128 pushing to ../c
128 pushing to ../c
129 searching for changes
129 searching for changes
130 all remote heads known locally
130 all remote heads known locally
131 new remote heads on branch 'default'
131 new remote heads on branch 'default'
132 new remote head a5dda829a167
132 new remote head a5dda829a167
133 new remote head ee8fbc7a0295
133 new remote head ee8fbc7a0295
134 abort: push creates new remote head a5dda829a167!
134 abort: push creates new remote head a5dda829a167!
135 (did you forget to merge? use push -f to force)
135 (did you forget to merge? use push -f to force)
136 [255]
136 [255]
137
137
138 $ hg push -v -f -r 3 -r 4 ../c
138 $ hg push -v -f -r 3 -r 4 ../c
139 pushing to ../c
139 pushing to ../c
140 searching for changes
140 searching for changes
141 all remote heads known locally
141 all remote heads known locally
142 2 changesets found
142 2 changesets found
143 adding changesets
143 adding changesets
144 adding manifests
144 adding manifests
145 adding file changes
145 adding file changes
146 added 2 changesets with 2 changes to 1 files (+2 heads)
146 added 2 changesets with 2 changes to 1 files (+2 heads)
147
147
148 $ hg push -r 5 ../c
148 $ hg push -r 5 ../c
149 pushing to ../c
149 pushing to ../c
150 searching for changes
150 searching for changes
151 adding changesets
151 adding changesets
152 adding manifests
152 adding manifests
153 adding file changes
153 adding file changes
154 added 1 changesets with 1 changes to 1 files (-1 heads)
154 added 1 changesets with 1 changes to 1 files (-1 heads)
155
155
156 $ hg in ../c
156 $ hg in ../c
157 comparing with ../c
157 comparing with ../c
158 searching for changes
158 searching for changes
159 no changes found
159 no changes found
160 [1]
160 [1]
161
161
162
162
163 Issue450: push -r warns about remote head creation even if no heads
163 Issue450: push -r warns about remote head creation even if no heads
164 will be created
164 will be created
165
165
166 $ hg init ../e
166 $ hg init ../e
167 $ hg push -r 0 ../e
167 $ hg push -r 0 ../e
168 pushing to ../e
168 pushing to ../e
169 searching for changes
169 searching for changes
170 adding changesets
170 adding changesets
171 adding manifests
171 adding manifests
172 adding file changes
172 adding file changes
173 added 1 changesets with 1 changes to 1 files
173 added 1 changesets with 1 changes to 1 files
174
174
175 $ hg push -r 1 ../e
175 $ hg push -r 1 ../e
176 pushing to ../e
176 pushing to ../e
177 searching for changes
177 searching for changes
178 adding changesets
178 adding changesets
179 adding manifests
179 adding manifests
180 adding file changes
180 adding file changes
181 added 1 changesets with 1 changes to 1 files
181 added 1 changesets with 1 changes to 1 files
182
182
183 $ cd ..
183 $ cd ..
184
184
185
185
186 Issue736: named branches are not considered for detection of
186 Issue736: named branches are not considered for detection of
187 unmerged heads in "hg push"
187 unmerged heads in "hg push"
188
188
189 $ hg init f
189 $ hg init f
190 $ cd f
190 $ cd f
191 $ hg -q branch a
191 $ hg -q branch a
192 $ echo 0 > foo
192 $ echo 0 > foo
193 $ hg -q ci -Am 0
193 $ hg -q ci -Am 0
194 $ echo 1 > foo
194 $ echo 1 > foo
195 $ hg -q ci -m 1
195 $ hg -q ci -m 1
196 $ hg -q up 0
196 $ hg -q up 0
197 $ echo 2 > foo
197 $ echo 2 > foo
198 $ hg -q ci -m 2
198 $ hg -q ci -m 2
199 $ hg -q up 0
199 $ hg -q up 0
200 $ hg -q branch b
200 $ hg -q branch b
201 $ echo 3 > foo
201 $ echo 3 > foo
202 $ hg -q ci -m 3
202 $ hg -q ci -m 3
203 $ cd ..
203 $ cd ..
204
204
205 $ hg -q clone f g
205 $ hg -q clone f g
206 $ cd g
206 $ cd g
207
207
208 Push on existing branch and new branch:
208 Push on existing branch and new branch:
209
209
210 $ hg -q up 1
210 $ hg -q up 1
211 $ echo 4 > foo
211 $ echo 4 > foo
212 $ hg -q ci -m 4
212 $ hg -q ci -m 4
213 $ hg -q up 0
213 $ hg -q up 0
214 $ echo 5 > foo
214 $ echo 5 > foo
215 $ hg -q branch c
215 $ hg -q branch c
216 $ hg -q ci -m 5
216 $ hg -q ci -m 5
217
217
218 $ hg push ../f
218 $ hg push ../f
219 pushing to ../f
219 pushing to ../f
220 searching for changes
220 searching for changes
221 abort: push creates new remote branches: c!
221 abort: push creates new remote branches: c!
222 (use 'hg push --new-branch' to create new remote branches)
222 (use 'hg push --new-branch' to create new remote branches)
223 [255]
223 [255]
224
224
225 $ hg push -r 4 -r 5 ../f
225 $ hg push -r 4 -r 5 ../f
226 pushing to ../f
226 pushing to ../f
227 searching for changes
227 searching for changes
228 abort: push creates new remote branches: c!
228 abort: push creates new remote branches: c!
229 (use 'hg push --new-branch' to create new remote branches)
229 (use 'hg push --new-branch' to create new remote branches)
230 [255]
230 [255]
231
231
232
232
233 Multiple new branches:
233 Multiple new branches:
234
234
235 $ hg -q branch d
235 $ hg -q branch d
236 $ echo 6 > foo
236 $ echo 6 > foo
237 $ hg -q ci -m 6
237 $ hg -q ci -m 6
238
238
239 $ hg push ../f
239 $ hg push ../f
240 pushing to ../f
240 pushing to ../f
241 searching for changes
241 searching for changes
242 abort: push creates new remote branches: c, d!
242 abort: push creates new remote branches: c, d!
243 (use 'hg push --new-branch' to create new remote branches)
243 (use 'hg push --new-branch' to create new remote branches)
244 [255]
244 [255]
245
245
246 $ hg push -r 4 -r 6 ../f
246 $ hg push -r 4 -r 6 ../f
247 pushing to ../f
247 pushing to ../f
248 searching for changes
248 searching for changes
249 abort: push creates new remote branches: c, d!
249 abort: push creates new remote branches: c, d!
250 (use 'hg push --new-branch' to create new remote branches)
250 (use 'hg push --new-branch' to create new remote branches)
251 [255]
251 [255]
252
252
253 $ cd ../g
253 $ cd ../g
254
254
255
255
256 Fail on multiple head push:
256 Fail on multiple head push:
257
257
258 $ hg -q up 1
258 $ hg -q up 1
259 $ echo 7 > foo
259 $ echo 7 > foo
260 $ hg -q ci -m 7
260 $ hg -q ci -m 7
261
261
262 $ hg push -r 4 -r 7 ../f
262 $ hg push -r 4 -r 7 ../f
263 pushing to ../f
263 pushing to ../f
264 searching for changes
264 searching for changes
265 abort: push creates new remote head 0b715ef6ff8f on branch 'a'!
265 abort: push creates new remote head 0b715ef6ff8f on branch 'a'!
266 (did you forget to merge? use push -f to force)
266 (did you forget to merge? use push -f to force)
267 [255]
267 [255]
268
268
269 Push replacement head on existing branches:
269 Push replacement head on existing branches:
270
270
271 $ hg -q up 3
271 $ hg -q up 3
272 $ echo 8 > foo
272 $ echo 8 > foo
273 $ hg -q ci -m 8
273 $ hg -q ci -m 8
274
274
275 $ hg push -r 7 -r 8 ../f
275 $ hg push -r 7 -r 8 ../f
276 pushing to ../f
276 pushing to ../f
277 searching for changes
277 searching for changes
278 adding changesets
278 adding changesets
279 adding manifests
279 adding manifests
280 adding file changes
280 adding file changes
281 added 2 changesets with 2 changes to 1 files
281 added 2 changesets with 2 changes to 1 files
282
282
283
283
284 Merge of branch a to other branch b followed by unrelated push
284 Merge of branch a to other branch b followed by unrelated push
285 on branch a:
285 on branch a:
286
286
287 $ hg -q up 7
287 $ hg -q up 7
288 $ HGMERGE=true hg -q merge 8
288 $ HGMERGE=true hg -q merge 8
289 $ hg -q ci -m 9
289 $ hg -q ci -m 9
290 $ hg -q up 8
290 $ hg -q up 8
291 $ echo 10 > foo
291 $ echo 10 > foo
292 $ hg -q ci -m 10
292 $ hg -q ci -m 10
293
293
294 $ hg push -r 9 ../f
294 $ hg push -r 9 ../f
295 pushing to ../f
295 pushing to ../f
296 searching for changes
296 searching for changes
297 adding changesets
297 adding changesets
298 adding manifests
298 adding manifests
299 adding file changes
299 adding file changes
300 added 1 changesets with 1 changes to 1 files (-1 heads)
300 added 1 changesets with 1 changes to 1 files (-1 heads)
301
301
302 $ hg push -r 10 ../f
302 $ hg push -r 10 ../f
303 pushing to ../f
303 pushing to ../f
304 searching for changes
304 searching for changes
305 adding changesets
305 adding changesets
306 adding manifests
306 adding manifests
307 adding file changes
307 adding file changes
308 added 1 changesets with 1 changes to 1 files (+1 heads)
308 added 1 changesets with 1 changes to 1 files (+1 heads)
309
309
310
310
311 Cheating the counting algorithm:
311 Cheating the counting algorithm:
312
312
313 $ hg -q up 9
313 $ hg -q up 9
314 $ HGMERGE=true hg -q merge 2
314 $ HGMERGE=true hg -q merge 2
315 $ hg -q ci -m 11
315 $ hg -q ci -m 11
316 $ hg -q up 1
316 $ hg -q up 1
317 $ echo 12 > foo
317 $ echo 12 > foo
318 $ hg -q ci -m 12
318 $ hg -q ci -m 12
319
319
320 $ hg push -r 11 -r 12 ../f
320 $ hg push -r 11 -r 12 ../f
321 pushing to ../f
321 pushing to ../f
322 searching for changes
322 searching for changes
323 adding changesets
323 adding changesets
324 adding manifests
324 adding manifests
325 adding file changes
325 adding file changes
326 added 2 changesets with 2 changes to 1 files
326 added 2 changesets with 2 changes to 1 files
327
327
328
328
329 Failed push of new named branch:
329 Failed push of new named branch:
330
330
331 $ echo 12 > foo
331 $ echo 12 > foo
332 $ hg -q ci -m 12a
332 $ hg -q ci -m 12a
333 [1]
333 [1]
334 $ hg -q up 11
334 $ hg -q up 11
335 $ echo 13 > foo
335 $ echo 13 > foo
336 $ hg -q branch e
336 $ hg -q branch e
337 $ hg -q ci -m 13d
337 $ hg -q ci -m 13d
338
338
339 $ hg push -r 12 -r 13 ../f
339 $ hg push -r 12 -r 13 ../f
340 pushing to ../f
340 pushing to ../f
341 searching for changes
341 searching for changes
342 abort: push creates new remote branches: e!
342 abort: push creates new remote branches: e!
343 (use 'hg push --new-branch' to create new remote branches)
343 (use 'hg push --new-branch' to create new remote branches)
344 [255]
344 [255]
345
345
346
346
347 Using --new-branch to push new named branch:
347 Using --new-branch to push new named branch:
348
348
349 $ hg push --new-branch -r 12 -r 13 ../f
349 $ hg push --new-branch -r 12 -r 13 ../f
350 pushing to ../f
350 pushing to ../f
351 searching for changes
351 searching for changes
352 adding changesets
352 adding changesets
353 adding manifests
353 adding manifests
354 adding file changes
354 adding file changes
355 added 1 changesets with 1 changes to 1 files
355 added 1 changesets with 1 changes to 1 files
356
356
357
357
358 Checking prepush logic does not allow silently pushing
358 Checking prepush logic does not allow silently pushing
359 multiple new heads:
359 multiple new heads:
360
360
361 $ cd ..
361 $ cd ..
362 $ hg init h
362 $ hg init h
363 $ echo init > h/init
363 $ echo init > h/init
364 $ hg -R h ci -Am init
364 $ hg -R h ci -Am init
365 adding init
365 adding init
366 $ echo a > h/a
366 $ echo a > h/a
367 $ hg -R h ci -Am a
367 $ hg -R h ci -Am a
368 adding a
368 adding a
369 $ hg clone h i
369 $ hg clone h i
370 updating to branch default
370 updating to branch default
371 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
371 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
372 $ hg -R h up 0
372 $ hg -R h up 0
373 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
373 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
374 $ echo b > h/b
374 $ echo b > h/b
375 $ hg -R h ci -Am b
375 $ hg -R h ci -Am b
376 adding b
376 adding b
377 created new head
377 created new head
378 $ hg -R i up 0
378 $ hg -R i up 0
379 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
379 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
380 $ echo c > i/c
380 $ echo c > i/c
381 $ hg -R i ci -Am c
381 $ hg -R i ci -Am c
382 adding c
382 adding c
383 created new head
383 created new head
384
384
385 $ hg -R i push h
385 $ hg -R i push h
386 pushing to h
386 pushing to h
387 searching for changes
387 searching for changes
388 abort: push creates new remote head 97bd0c84d346!
388 abort: push creates new remote head 97bd0c84d346!
389 (you should pull and merge or use push -f to force)
389 (you should pull and merge or use push -f to force)
390 [255]
390 [255]
391
391
392
392
393 Check prepush logic with merged branches:
393 Check prepush logic with merged branches:
394
394
395 $ hg init j
395 $ hg init j
396 $ hg -R j branch a
396 $ hg -R j branch a
397 marked working directory as branch a
397 marked working directory as branch a
398 $ echo init > j/foo
398 $ echo init > j/foo
399 $ hg -R j ci -Am init
399 $ hg -R j ci -Am init
400 adding foo
400 adding foo
401 $ hg clone j k
401 $ hg clone j k
402 updating to branch a
402 updating to branch a
403 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
403 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
404 $ echo a1 > j/foo
404 $ echo a1 > j/foo
405 $ hg -R j ci -m a1
405 $ hg -R j ci -m a1
406 $ hg -R k branch b
406 $ hg -R k branch b
407 marked working directory as branch b
407 marked working directory as branch b
408 $ echo b > k/foo
408 $ echo b > k/foo
409 $ hg -R k ci -m b
409 $ hg -R k ci -m b
410 $ hg -R k up 0
410 $ hg -R k up 0
411 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
411 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
412
412
413 $ hg -R k merge b
413 $ hg -R k merge b
414 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
414 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
415 (branch merge, don't forget to commit)
415 (branch merge, don't forget to commit)
416
416
417 $ hg -R k ci -m merge
417 $ hg -R k ci -m merge
418
418
419 $ hg -R k push -r a j
419 $ hg -R k push -r a j
420 pushing to j
420 pushing to j
421 searching for changes
421 searching for changes
422 abort: push creates new remote branches: b!
422 abort: push creates new remote branches: b!
423 (use 'hg push --new-branch' to create new remote branches)
423 (use 'hg push --new-branch' to create new remote branches)
424 [255]
424 [255]
425
425
426
426
427 Prepush -r should not allow you to sneak in new heads:
427 Prepush -r should not allow you to sneak in new heads:
428
428
429 $ hg init l
429 $ hg init l
430 $ cd l
430 $ cd l
431 $ echo a >> foo
431 $ echo a >> foo
432 $ hg -q add foo
432 $ hg -q add foo
433 $ hg -q branch a
433 $ hg -q branch a
434 $ hg -q ci -ma
434 $ hg -q ci -ma
435 $ hg -q up null
435 $ hg -q up null
436 $ echo a >> foo
436 $ echo a >> foo
437 $ hg -q add foo
437 $ hg -q add foo
438 $ hg -q branch b
438 $ hg -q branch b
439 $ hg -q ci -mb
439 $ hg -q ci -mb
440 $ cd ..
440 $ cd ..
441 $ hg -q clone l m -u a
441 $ hg -q clone l m -u a
442 $ cd m
442 $ cd m
443 $ hg -q merge b
443 $ hg -q merge b
444 $ hg -q ci -mmb
444 $ hg -q ci -mmb
445 $ hg -q up 0
445 $ hg -q up 0
446 $ echo a >> foo
446 $ echo a >> foo
447 $ hg -q ci -ma2
447 $ hg -q ci -ma2
448 $ hg -q up 2
448 $ hg -q up 2
449 $ echo a >> foo
449 $ echo a >> foo
450 $ hg -q branch -f b
450 $ hg -q branch -f b
451 $ hg -q ci -mb2
451 $ hg -q ci -mb2
452 $ hg -q merge 3
452 $ hg -q merge 3
453 $ hg -q ci -mma
453 $ hg -q ci -mma
454
454
455 $ hg push ../l -b b
455 $ hg push ../l -b b
456 pushing to ../l
456 pushing to ../l
457 searching for changes
457 searching for changes
458 abort: push creates new remote head e7e31d71180f on branch 'a'!
458 abort: push creates new remote head e7e31d71180f on branch 'a'!
459 (did you forget to merge? use push -f to force)
459 (did you forget to merge? use push -f to force)
460 [255]
460 [255]
461
461
462 $ cd ..
462 $ cd ..
463
463
464
464
465 Check prepush with new branch head on former topo non-head:
465 Check prepush with new branch head on former topo non-head:
466
466
467 $ hg init n
467 $ hg init n
468 $ cd n
468 $ cd n
469 $ hg branch A
469 $ hg branch A
470 marked working directory as branch A
470 marked working directory as branch A
471 $ echo a >a
471 $ echo a >a
472 $ hg ci -Ama
472 $ hg ci -Ama
473 adding a
473 adding a
474 $ hg branch B
474 $ hg branch B
475 marked working directory as branch B
475 marked working directory as branch B
476 $ echo b >b
476 $ echo b >b
477 $ hg ci -Amb
477 $ hg ci -Amb
478 adding b
478 adding b
479
479
480 b is now branch head of B, and a topological head
480 b is now branch head of B, and a topological head
481 a is now branch head of A, but not a topological head
481 a is now branch head of A, but not a topological head
482
482
483 $ hg clone . inner
483 $ hg clone . inner
484 updating to branch B
484 updating to branch B
485 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
485 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
486 $ cd inner
486 $ cd inner
487 $ hg up B
487 $ hg up B
488 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
488 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
489 $ echo b1 >b1
489 $ echo b1 >b1
490 $ hg ci -Amb1
490 $ hg ci -Amb1
491 adding b1
491 adding b1
492
492
493 in the clone b1 is now the head of B
493 in the clone b1 is now the head of B
494
494
495 $ cd ..
495 $ cd ..
496 $ hg up 0
496 $ hg up 0
497 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
497 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
498 $ echo a2 >a2
498 $ echo a2 >a2
499 $ hg ci -Ama2
499 $ hg ci -Ama2
500 adding a2
500 adding a2
501
501
502 a2 is now the new branch head of A, and a new topological head
502 a2 is now the new branch head of A, and a new topological head
503 it replaces a former inner branch head, so it should at most warn about
503 it replaces a former inner branch head, so it should at most warn about
504 A, not B
504 A, not B
505
505
506 glog of local:
506 glog of local:
507
507
508 $ hg glog --template "{rev}: {branches} {desc}\n"
508 $ hg glog --template "{rev}: {branches} {desc}\n"
509 @ 2: A a2
509 @ 2: A a2
510 |
510 |
511 | o 1: B b
511 | o 1: B b
512 |/
512 |/
513 o 0: A a
513 o 0: A a
514
514
515 glog of remote:
515 glog of remote:
516
516
517 $ hg glog -R inner --template "{rev}: {branches} {desc}\n"
517 $ hg glog -R inner --template "{rev}: {branches} {desc}\n"
518 @ 2: B b1
518 @ 2: B b1
519 |
519 |
520 o 1: B b
520 o 1: B b
521 |
521 |
522 o 0: A a
522 o 0: A a
523
523
524 outgoing:
524 outgoing:
525
525
526 $ hg out inner --template "{rev}: {branches} {desc}\n"
526 $ hg out inner --template "{rev}: {branches} {desc}\n"
527 comparing with inner
527 comparing with inner
528 searching for changes
528 searching for changes
529 2: A a2
529 2: A a2
530
530
531 $ hg push inner
531 $ hg push inner
532 pushing to inner
532 pushing to inner
533 searching for changes
533 searching for changes
534 adding changesets
534 adding changesets
535 adding manifests
535 adding manifests
536 adding file changes
536 adding file changes
537 added 1 changesets with 1 changes to 1 files (+1 heads)
537 added 1 changesets with 1 changes to 1 files (+1 heads)
538
538
539 $ cd ..
539 $ cd ..
540
540
541
541
542 Check prepush with new branch head on former topo head:
542 Check prepush with new branch head on former topo head:
543
543
544 $ hg init o
544 $ hg init o
545 $ cd o
545 $ cd o
546 $ hg branch A
546 $ hg branch A
547 marked working directory as branch A
547 marked working directory as branch A
548 $ echo a >a
548 $ echo a >a
549 $ hg ci -Ama
549 $ hg ci -Ama
550 adding a
550 adding a
551 $ hg branch B
551 $ hg branch B
552 marked working directory as branch B
552 marked working directory as branch B
553 $ echo b >b
553 $ echo b >b
554 $ hg ci -Amb
554 $ hg ci -Amb
555 adding b
555 adding b
556
556
557 b is now branch head of B, and a topological head
557 b is now branch head of B, and a topological head
558
558
559 $ hg up 0
559 $ hg up 0
560 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
560 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
561 $ echo a1 >a1
561 $ echo a1 >a1
562 $ hg ci -Ama1
562 $ hg ci -Ama1
563 adding a1
563 adding a1
564
564
565 a1 is now branch head of A, and a topological head
565 a1 is now branch head of A, and a topological head
566
566
567 $ hg clone . inner
567 $ hg clone . inner
568 updating to branch A
568 updating to branch A
569 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
569 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
570 $ cd inner
570 $ cd inner
571 $ hg up B
571 $ hg up B
572 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
572 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
573 $ echo b1 >b1
573 $ echo b1 >b1
574 $ hg ci -Amb1
574 $ hg ci -Amb1
575 adding b1
575 adding b1
576
576
577 in the clone b1 is now the head of B
577 in the clone b1 is now the head of B
578
578
579 $ cd ..
579 $ cd ..
580 $ echo a2 >a2
580 $ echo a2 >a2
581 $ hg ci -Ama2
581 $ hg ci -Ama2
582 adding a2
582 adding a2
583
583
584 a2 is now the new branch head of A, and a topological head
584 a2 is now the new branch head of A, and a topological head
585 it replaces a former topological and branch head, so this should not warn
585 it replaces a former topological and branch head, so this should not warn
586
586
587 glog of local:
587 glog of local:
588
588
589 $ hg glog --template "{rev}: {branches} {desc}\n"
589 $ hg glog --template "{rev}: {branches} {desc}\n"
590 @ 3: A a2
590 @ 3: A a2
591 |
591 |
592 o 2: A a1
592 o 2: A a1
593 |
593 |
594 | o 1: B b
594 | o 1: B b
595 |/
595 |/
596 o 0: A a
596 o 0: A a
597
597
598 glog of remote:
598 glog of remote:
599
599
600 $ hg glog -R inner --template "{rev}: {branches} {desc}\n"
600 $ hg glog -R inner --template "{rev}: {branches} {desc}\n"
601 @ 3: B b1
601 @ 3: B b1
602 |
602 |
603 | o 2: A a1
603 | o 2: A a1
604 | |
604 | |
605 o | 1: B b
605 o | 1: B b
606 |/
606 |/
607 o 0: A a
607 o 0: A a
608
608
609 outgoing:
609 outgoing:
610
610
611 $ hg out inner --template "{rev}: {branches} {desc}\n"
611 $ hg out inner --template "{rev}: {branches} {desc}\n"
612 comparing with inner
612 comparing with inner
613 searching for changes
613 searching for changes
614 3: A a2
614 3: A a2
615
615
616 $ hg push inner
616 $ hg push inner
617 pushing to inner
617 pushing to inner
618 searching for changes
618 searching for changes
619 adding changesets
619 adding changesets
620 adding manifests
620 adding manifests
621 adding file changes
621 adding file changes
622 added 1 changesets with 1 changes to 1 files
622 added 1 changesets with 1 changes to 1 files
623
623
624 $ cd ..
624 $ cd ..
625
625
626
626
627 Check prepush with new branch head and new child of former branch head
627 Check prepush with new branch head and new child of former branch head
628 but child is on different branch:
628 but child is on different branch:
629
629
630 $ hg init p
630 $ hg init p
631 $ cd p
631 $ cd p
632 $ hg branch A
632 $ hg branch A
633 marked working directory as branch A
633 marked working directory as branch A
634 $ echo a0 >a
634 $ echo a0 >a
635 $ hg ci -Ama0
635 $ hg ci -Ama0
636 adding a
636 adding a
637 $ echo a1 >a
637 $ echo a1 >a
638 $ hg ci -ma1
638 $ hg ci -ma1
639 $ hg up null
639 $ hg up null
640 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
640 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
641 $ hg branch B
641 $ hg branch B
642 marked working directory as branch B
642 marked working directory as branch B
643 $ echo b0 >b
643 $ echo b0 >b
644 $ hg ci -Amb0
644 $ hg ci -Amb0
645 adding b
645 adding b
646 $ echo b1 >b
646 $ echo b1 >b
647 $ hg ci -mb1
647 $ hg ci -mb1
648
648
649 $ hg clone . inner
649 $ hg clone . inner
650 updating to branch B
650 updating to branch B
651 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
651 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
652
652
653 $ hg up A
653 $ hg up A
654 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
654 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
655 $ hg branch -f B
655 $ hg branch -f B
656 marked working directory as branch B
656 marked working directory as branch B
657 $ echo a3 >a
657 $ echo a3 >a
658 $ hg ci -ma3
658 $ hg ci -ma3
659 created new head
659 created new head
660 $ hg up 3
660 $ hg up 3
661 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
661 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
662 $ hg branch -f A
662 $ hg branch -f A
663 marked working directory as branch A
663 marked working directory as branch A
664 $ echo b3 >b
664 $ echo b3 >b
665 $ hg ci -mb3
665 $ hg ci -mb3
666 created new head
666 created new head
667
667
668 glog of local:
668 glog of local:
669
669
670 $ hg glog --template "{rev}: {branches} {desc}\n"
670 $ hg glog --template "{rev}: {branches} {desc}\n"
671 @ 5: A b3
671 @ 5: A b3
672 |
672 |
673 | o 4: B a3
673 | o 4: B a3
674 | |
674 | |
675 o | 3: B b1
675 o | 3: B b1
676 | |
676 | |
677 o | 2: B b0
677 o | 2: B b0
678 /
678 /
679 o 1: A a1
679 o 1: A a1
680 |
680 |
681 o 0: A a0
681 o 0: A a0
682
682
683 glog of remote:
683 glog of remote:
684
684
685 $ hg glog -R inner --template "{rev}: {branches} {desc}\n"
685 $ hg glog -R inner --template "{rev}: {branches} {desc}\n"
686 @ 3: B b1
686 @ 3: B b1
687 |
687 |
688 o 2: B b0
688 o 2: B b0
689
689
690 o 1: A a1
690 o 1: A a1
691 |
691 |
692 o 0: A a0
692 o 0: A a0
693
693
694 outgoing:
694 outgoing:
695
695
696 $ hg out inner --template "{rev}: {branches} {desc}\n"
696 $ hg out inner --template "{rev}: {branches} {desc}\n"
697 comparing with inner
697 comparing with inner
698 searching for changes
698 searching for changes
699 4: B a3
699 4: B a3
700 5: A b3
700 5: A b3
701
701
702 $ hg push inner
702 $ hg push inner
703 pushing to inner
703 pushing to inner
704 searching for changes
704 searching for changes
705 abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'!
705 abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'!
706 (did you forget to merge? use push -f to force)
706 (did you forget to merge? use push -f to force)
707 [255]
707 [255]
708
708
709 $ hg push inner -r4 -r5
709 $ hg push inner -r4 -r5
710 pushing to inner
710 pushing to inner
711 searching for changes
711 searching for changes
712 abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'!
712 abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'!
713 (did you forget to merge? use push -f to force)
713 (did you forget to merge? use push -f to force)
714 [255]
714 [255]
715
715
716 $ hg in inner
716 $ hg in inner
717 comparing with inner
717 comparing with inner
718 searching for changes
718 searching for changes
719 no changes found
719 no changes found
720 [1]
720 [1]
@@ -1,47 +1,47
1
1
2 $ cat <<EOF >> $HGRCPATH
2 $ cat <<EOF >> $HGRCPATH
3 > [extensions]
3 > [extensions]
4 > schemes=
4 > schemes=
5 >
5 >
6 > [schemes]
6 > [schemes]
7 > l = http://localhost:$HGPORT/
7 > l = http://localhost:$HGPORT/
8 > parts = http://{1}:$HGPORT/
8 > parts = http://{1}:$HGPORT/
9 > z = file:\$PWD/
9 > z = file:\$PWD/
10 > EOF
10 > EOF
11 $ hg init test
11 $ hg init test
12 $ cd test
12 $ cd test
13 $ echo a > a
13 $ echo a > a
14 $ hg ci -Am initial
14 $ hg ci -Am initial
15 adding a
15 adding a
16 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
16 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
17 $ cat hg.pid >> $DAEMON_PIDS
17 $ cat hg.pid >> $DAEMON_PIDS
18 $ hg incoming l://
18 $ hg incoming l://
19 comparing with l://
19 comparing with l://
20 searching for changes
20 searching for changes
21 no changes found
21 no changes found
22 [1]
22 [1]
23
23
24 check that {1} syntax works
24 check that {1} syntax works
25
25
26 $ hg incoming --debug parts://localhost
26 $ hg incoming --debug parts://localhost
27 using http://localhost:$HGPORT/
27 using http://localhost:$HGPORT/
28 sending capabilities command
28 sending capabilities command
29 comparing with parts://localhost/
29 comparing with parts://localhost/
30 query 1; heads
30 query 1; heads
31 sending heads command
31 sending batch command
32 searching for changes
32 searching for changes
33 all remote heads known locally
33 all remote heads known locally
34 no changes found
34 no changes found
35 [1]
35 [1]
36
36
37 check that paths are expanded
37 check that paths are expanded
38
38
39 $ PWD=`pwd` hg incoming z://
39 $ PWD=`pwd` hg incoming z://
40 comparing with z://
40 comparing with z://
41 searching for changes
41 searching for changes
42 no changes found
42 no changes found
43 [1]
43 [1]
44
44
45 errors
45 errors
46
46
47 $ cat errors.log
47 $ cat errors.log
@@ -1,271 +1,268
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 [ -e foo ]; then rm -rf foo; fi
6 > if [ -e 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
17 > hg -R a debugdiscovery b --verbose --debug
18 > echo
18 > echo
19 > echo "% -- b -> a tree"
19 > echo "% -- b -> a tree"
20 > hg -R b debugdiscovery a --verbose --old
20 > hg -R b debugdiscovery a --verbose --old
21 > echo
21 > echo
22 > echo "% -- b -> a set"
22 > echo "% -- b -> a set"
23 > hg -R b debugdiscovery a --verbose --debug
23 > hg -R b debugdiscovery a --verbose --debug
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: b5714e113bc0 66f7d451a68b 01241442b3c2
39 unpruned common: b5714e113bc0 66f7d451a68b 01241442b3c2
40 common heads: b5714e113bc0 01241442b3c2
40 common heads: b5714e113bc0 01241442b3c2
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 taking initial sample
47 all local heads known remotely
48 searching: 2 queries
49 query 2; still undecided: 4, sample size is: 4
50 2 total queries
51 common heads: b5714e113bc0 01241442b3c2
48 common heads: b5714e113bc0 01241442b3c2
52 local is subset
49 local is subset
53
50
54 % -- b -> a tree
51 % -- b -> a tree
55 comparing with a
52 comparing with a
56 searching for changes
53 searching for changes
57 unpruned common: b5714e113bc0 01241442b3c2
54 unpruned common: b5714e113bc0 01241442b3c2
58 common heads: b5714e113bc0 01241442b3c2
55 common heads: b5714e113bc0 01241442b3c2
59 remote is subset
56 remote is subset
60
57
61 % -- b -> a set
58 % -- b -> a set
62 comparing with a
59 comparing with a
63 query 1; heads
60 query 1; heads
64 searching for changes
61 searching for changes
65 all remote heads known locally
62 all remote heads known locally
66 common heads: b5714e113bc0 01241442b3c2
63 common heads: b5714e113bc0 01241442b3c2
67 remote is subset
64 remote is subset
68
65
69
66
70 Many new:
67 Many new:
71
68
72 $ testdesc '-ra1 -ra2' '-rb' '
69 $ testdesc '-ra1 -ra2' '-rb' '
73 > +2:f +3:a1 +3:b
70 > +2:f +3:a1 +3:b
74 > <f +30 :a2'
71 > <f +30 :a2'
75
72
76 % -- a -> b tree
73 % -- a -> b tree
77 comparing with b
74 comparing with b
78 searching for changes
75 searching for changes
79 unpruned common: bebd167eb94d
76 unpruned common: bebd167eb94d
80 common heads: bebd167eb94d
77 common heads: bebd167eb94d
81
78
82 % -- a -> b set
79 % -- a -> b set
83 comparing with b
80 comparing with b
84 query 1; heads
81 query 1; heads
85 searching for changes
82 searching for changes
86 taking quick initial sample
83 taking initial sample
87 searching: 2 queries
84 searching: 2 queries
88 query 2; still undecided: 35, sample size is: 35
85 query 2; still undecided: 29, sample size is: 29
89 2 total queries
86 2 total queries
90 common heads: bebd167eb94d
87 common heads: bebd167eb94d
91
88
92 % -- b -> a tree
89 % -- b -> a tree
93 comparing with a
90 comparing with a
94 searching for changes
91 searching for changes
95 unpruned common: bebd167eb94d 66f7d451a68b
92 unpruned common: bebd167eb94d 66f7d451a68b
96 common heads: bebd167eb94d
93 common heads: bebd167eb94d
97
94
98 % -- b -> a set
95 % -- b -> a set
99 comparing with a
96 comparing with a
100 query 1; heads
97 query 1; heads
101 searching for changes
98 searching for changes
102 taking initial sample
99 taking initial sample
103 searching: 2 queries
100 searching: 2 queries
104 query 2; still undecided: 3, sample size is: 3
101 query 2; still undecided: 2, sample size is: 2
105 2 total queries
102 2 total queries
106 common heads: bebd167eb94d
103 common heads: bebd167eb94d
107
104
108
105
109 Both sides many new with stub:
106 Both sides many new with stub:
110
107
111 $ testdesc '-ra1 -ra2' '-rb' '
108 $ testdesc '-ra1 -ra2' '-rb' '
112 > +2:f +2:a1 +30 :b
109 > +2:f +2:a1 +30 :b
113 > <f +30 :a2'
110 > <f +30 :a2'
114
111
115 % -- a -> b tree
112 % -- a -> b tree
116 comparing with b
113 comparing with b
117 searching for changes
114 searching for changes
118 unpruned common: 2dc09a01254d
115 unpruned common: 2dc09a01254d
119 common heads: 2dc09a01254d
116 common heads: 2dc09a01254d
120
117
121 % -- a -> b set
118 % -- a -> b set
122 comparing with b
119 comparing with b
123 query 1; heads
120 query 1; heads
124 searching for changes
121 searching for changes
125 taking quick initial sample
122 taking initial sample
126 searching: 2 queries
123 searching: 2 queries
127 query 2; still undecided: 34, sample size is: 34
124 query 2; still undecided: 29, sample size is: 29
128 2 total queries
125 2 total queries
129 common heads: 2dc09a01254d
126 common heads: 2dc09a01254d
130
127
131 % -- b -> a tree
128 % -- b -> a tree
132 comparing with a
129 comparing with a
133 searching for changes
130 searching for changes
134 unpruned common: 66f7d451a68b 2dc09a01254d
131 unpruned common: 66f7d451a68b 2dc09a01254d
135 common heads: 2dc09a01254d
132 common heads: 2dc09a01254d
136
133
137 % -- b -> a set
134 % -- b -> a set
138 comparing with a
135 comparing with a
139 query 1; heads
136 query 1; heads
140 searching for changes
137 searching for changes
141 taking initial sample
138 taking initial sample
142 searching: 2 queries
139 searching: 2 queries
143 query 2; still undecided: 30, sample size is: 30
140 query 2; still undecided: 29, sample size is: 29
144 2 total queries
141 2 total queries
145 common heads: 2dc09a01254d
142 common heads: 2dc09a01254d
146
143
147
144
148 Both many new:
145 Both many new:
149
146
150 $ testdesc '-ra' '-rb' '
147 $ testdesc '-ra' '-rb' '
151 > +2:f +30 :b
148 > +2:f +30 :b
152 > <f +30 :a'
149 > <f +30 :a'
153
150
154 % -- a -> b tree
151 % -- a -> b tree
155 comparing with b
152 comparing with b
156 searching for changes
153 searching for changes
157 unpruned common: 66f7d451a68b
154 unpruned common: 66f7d451a68b
158 common heads: 66f7d451a68b
155 common heads: 66f7d451a68b
159
156
160 % -- a -> b set
157 % -- a -> b set
161 comparing with b
158 comparing with b
162 query 1; heads
159 query 1; heads
163 searching for changes
160 searching for changes
164 taking quick initial sample
161 taking quick initial sample
165 searching: 2 queries
162 searching: 2 queries
166 query 2; still undecided: 32, sample size is: 32
163 query 2; still undecided: 31, sample size is: 31
167 2 total queries
164 2 total queries
168 common heads: 66f7d451a68b
165 common heads: 66f7d451a68b
169
166
170 % -- b -> a tree
167 % -- b -> a tree
171 comparing with a
168 comparing with a
172 searching for changes
169 searching for changes
173 unpruned common: 66f7d451a68b
170 unpruned common: 66f7d451a68b
174 common heads: 66f7d451a68b
171 common heads: 66f7d451a68b
175
172
176 % -- b -> a set
173 % -- b -> a set
177 comparing with a
174 comparing with a
178 query 1; heads
175 query 1; heads
179 searching for changes
176 searching for changes
180 taking quick initial sample
177 taking quick initial sample
181 searching: 2 queries
178 searching: 2 queries
182 query 2; still undecided: 32, sample size is: 32
179 query 2; still undecided: 31, sample size is: 31
183 2 total queries
180 2 total queries
184 common heads: 66f7d451a68b
181 common heads: 66f7d451a68b
185
182
186
183
187 Both many new skewed:
184 Both many new skewed:
188
185
189 $ testdesc '-ra' '-rb' '
186 $ testdesc '-ra' '-rb' '
190 > +2:f +30 :b
187 > +2:f +30 :b
191 > <f +50 :a'
188 > <f +50 :a'
192
189
193 % -- a -> b tree
190 % -- a -> b tree
194 comparing with b
191 comparing with b
195 searching for changes
192 searching for changes
196 unpruned common: 66f7d451a68b
193 unpruned common: 66f7d451a68b
197 common heads: 66f7d451a68b
194 common heads: 66f7d451a68b
198
195
199 % -- a -> b set
196 % -- a -> b set
200 comparing with b
197 comparing with b
201 query 1; heads
198 query 1; heads
202 searching for changes
199 searching for changes
203 taking quick initial sample
200 taking quick initial sample
204 searching: 2 queries
201 searching: 2 queries
205 query 2; still undecided: 52, sample size is: 52
202 query 2; still undecided: 51, sample size is: 51
206 2 total queries
203 2 total queries
207 common heads: 66f7d451a68b
204 common heads: 66f7d451a68b
208
205
209 % -- b -> a tree
206 % -- b -> a tree
210 comparing with a
207 comparing with a
211 searching for changes
208 searching for changes
212 unpruned common: 66f7d451a68b
209 unpruned common: 66f7d451a68b
213 common heads: 66f7d451a68b
210 common heads: 66f7d451a68b
214
211
215 % -- b -> a set
212 % -- b -> a set
216 comparing with a
213 comparing with a
217 query 1; heads
214 query 1; heads
218 searching for changes
215 searching for changes
219 taking quick initial sample
216 taking quick initial sample
220 searching: 2 queries
217 searching: 2 queries
221 query 2; still undecided: 32, sample size is: 32
218 query 2; still undecided: 31, sample size is: 31
222 2 total queries
219 2 total queries
223 common heads: 66f7d451a68b
220 common heads: 66f7d451a68b
224
221
225
222
226 Both many new on top of long history:
223 Both many new on top of long history:
227
224
228 $ testdesc '-ra' '-rb' '
225 $ testdesc '-ra' '-rb' '
229 > +1000:f +30 :b
226 > +1000:f +30 :b
230 > <f +50 :a'
227 > <f +50 :a'
231
228
232 % -- a -> b tree
229 % -- a -> b tree
233 comparing with b
230 comparing with b
234 searching for changes
231 searching for changes
235 unpruned common: 7ead0cba2838
232 unpruned common: 7ead0cba2838
236 common heads: 7ead0cba2838
233 common heads: 7ead0cba2838
237
234
238 % -- a -> b set
235 % -- a -> b set
239 comparing with b
236 comparing with b
240 query 1; heads
237 query 1; heads
241 searching for changes
238 searching for changes
242 taking quick initial sample
239 taking quick initial sample
243 searching: 2 queries
240 searching: 2 queries
244 query 2; still undecided: 1050, sample size is: 11
241 query 2; still undecided: 1049, sample size is: 11
245 sampling from both directions
242 sampling from both directions
246 searching: 3 queries
243 searching: 3 queries
247 query 3; still undecided: 31, sample size is: 31
244 query 3; still undecided: 31, sample size is: 31
248 3 total queries
245 3 total queries
249 common heads: 7ead0cba2838
246 common heads: 7ead0cba2838
250
247
251 % -- b -> a tree
248 % -- b -> a tree
252 comparing with a
249 comparing with a
253 searching for changes
250 searching for changes
254 unpruned common: 7ead0cba2838
251 unpruned common: 7ead0cba2838
255 common heads: 7ead0cba2838
252 common heads: 7ead0cba2838
256
253
257 % -- b -> a set
254 % -- b -> a set
258 comparing with a
255 comparing with a
259 query 1; heads
256 query 1; heads
260 searching for changes
257 searching for changes
261 taking quick initial sample
258 taking quick initial sample
262 searching: 2 queries
259 searching: 2 queries
263 query 2; still undecided: 1030, sample size is: 11
260 query 2; still undecided: 1029, sample size is: 11
264 sampling from both directions
261 sampling from both directions
265 searching: 3 queries
262 searching: 3 queries
266 query 3; still undecided: 16, sample size is: 16
263 query 3; still undecided: 16, sample size is: 16
267 3 total queries
264 3 total queries
268 common heads: 7ead0cba2838
265 common heads: 7ead0cba2838
269
266
270
267
271
268
General Comments 0
You need to be logged in to leave comments. Login now