##// END OF EJS Templates
phases: remove excessive optimization from newheads() (issue5939)...
Yuya Nishihara -
r38941:88efb7d6 default
parent child Browse files
Show More
@@ -1,700 +1,699 b''
1 """ Mercurial phases support code
1 """ Mercurial phases support code
2
2
3 ---
3 ---
4
4
5 Copyright 2011 Pierre-Yves David <pierre-yves.david@ens-lyon.org>
5 Copyright 2011 Pierre-Yves David <pierre-yves.david@ens-lyon.org>
6 Logilab SA <contact@logilab.fr>
6 Logilab SA <contact@logilab.fr>
7 Augie Fackler <durin42@gmail.com>
7 Augie Fackler <durin42@gmail.com>
8
8
9 This software may be used and distributed according to the terms
9 This software may be used and distributed according to the terms
10 of the GNU General Public License version 2 or any later version.
10 of the GNU General Public License version 2 or any later version.
11
11
12 ---
12 ---
13
13
14 This module implements most phase logic in mercurial.
14 This module implements most phase logic in mercurial.
15
15
16
16
17 Basic Concept
17 Basic Concept
18 =============
18 =============
19
19
20 A 'changeset phase' is an indicator that tells us how a changeset is
20 A 'changeset phase' is an indicator that tells us how a changeset is
21 manipulated and communicated. The details of each phase is described
21 manipulated and communicated. The details of each phase is described
22 below, here we describe the properties they have in common.
22 below, here we describe the properties they have in common.
23
23
24 Like bookmarks, phases are not stored in history and thus are not
24 Like bookmarks, phases are not stored in history and thus are not
25 permanent and leave no audit trail.
25 permanent and leave no audit trail.
26
26
27 First, no changeset can be in two phases at once. Phases are ordered,
27 First, no changeset can be in two phases at once. Phases are ordered,
28 so they can be considered from lowest to highest. The default, lowest
28 so they can be considered from lowest to highest. The default, lowest
29 phase is 'public' - this is the normal phase of existing changesets. A
29 phase is 'public' - this is the normal phase of existing changesets. A
30 child changeset can not be in a lower phase than its parents.
30 child changeset can not be in a lower phase than its parents.
31
31
32 These phases share a hierarchy of traits:
32 These phases share a hierarchy of traits:
33
33
34 immutable shared
34 immutable shared
35 public: X X
35 public: X X
36 draft: X
36 draft: X
37 secret:
37 secret:
38
38
39 Local commits are draft by default.
39 Local commits are draft by default.
40
40
41 Phase Movement and Exchange
41 Phase Movement and Exchange
42 ===========================
42 ===========================
43
43
44 Phase data is exchanged by pushkey on pull and push. Some servers have
44 Phase data is exchanged by pushkey on pull and push. Some servers have
45 a publish option set, we call such a server a "publishing server".
45 a publish option set, we call such a server a "publishing server".
46 Pushing a draft changeset to a publishing server changes the phase to
46 Pushing a draft changeset to a publishing server changes the phase to
47 public.
47 public.
48
48
49 A small list of fact/rules define the exchange of phase:
49 A small list of fact/rules define the exchange of phase:
50
50
51 * old client never changes server states
51 * old client never changes server states
52 * pull never changes server states
52 * pull never changes server states
53 * publish and old server changesets are seen as public by client
53 * publish and old server changesets are seen as public by client
54 * any secret changeset seen in another repository is lowered to at
54 * any secret changeset seen in another repository is lowered to at
55 least draft
55 least draft
56
56
57 Here is the final table summing up the 49 possible use cases of phase
57 Here is the final table summing up the 49 possible use cases of phase
58 exchange:
58 exchange:
59
59
60 server
60 server
61 old publish non-publish
61 old publish non-publish
62 N X N D P N D P
62 N X N D P N D P
63 old client
63 old client
64 pull
64 pull
65 N - X/X - X/D X/P - X/D X/P
65 N - X/X - X/D X/P - X/D X/P
66 X - X/X - X/D X/P - X/D X/P
66 X - X/X - X/D X/P - X/D X/P
67 push
67 push
68 X X/X X/X X/P X/P X/P X/D X/D X/P
68 X X/X X/X X/P X/P X/P X/D X/D X/P
69 new client
69 new client
70 pull
70 pull
71 N - P/X - P/D P/P - D/D P/P
71 N - P/X - P/D P/P - D/D P/P
72 D - P/X - P/D P/P - D/D P/P
72 D - P/X - P/D P/P - D/D P/P
73 P - P/X - P/D P/P - P/D P/P
73 P - P/X - P/D P/P - P/D P/P
74 push
74 push
75 D P/X P/X P/P P/P P/P D/D D/D P/P
75 D P/X P/X P/P P/P P/P D/D D/D P/P
76 P P/X P/X P/P P/P P/P P/P P/P P/P
76 P P/X P/X P/P P/P P/P P/P P/P P/P
77
77
78 Legend:
78 Legend:
79
79
80 A/B = final state on client / state on server
80 A/B = final state on client / state on server
81
81
82 * N = new/not present,
82 * N = new/not present,
83 * P = public,
83 * P = public,
84 * D = draft,
84 * D = draft,
85 * X = not tracked (i.e., the old client or server has no internal
85 * X = not tracked (i.e., the old client or server has no internal
86 way of recording the phase.)
86 way of recording the phase.)
87
87
88 passive = only pushes
88 passive = only pushes
89
89
90
90
91 A cell here can be read like this:
91 A cell here can be read like this:
92
92
93 "When a new client pushes a draft changeset (D) to a publishing
93 "When a new client pushes a draft changeset (D) to a publishing
94 server where it's not present (N), it's marked public on both
94 server where it's not present (N), it's marked public on both
95 sides (P/P)."
95 sides (P/P)."
96
96
97 Note: old client behave as a publishing server with draft only content
97 Note: old client behave as a publishing server with draft only content
98 - other people see it as public
98 - other people see it as public
99 - content is pushed as draft
99 - content is pushed as draft
100
100
101 """
101 """
102
102
103 from __future__ import absolute_import
103 from __future__ import absolute_import
104
104
105 import errno
105 import errno
106 import struct
106 import struct
107
107
108 from .i18n import _
108 from .i18n import _
109 from .node import (
109 from .node import (
110 bin,
110 bin,
111 hex,
111 hex,
112 nullid,
112 nullid,
113 nullrev,
113 nullrev,
114 short,
114 short,
115 )
115 )
116 from . import (
116 from . import (
117 error,
117 error,
118 pycompat,
118 pycompat,
119 smartset,
119 smartset,
120 txnutil,
120 txnutil,
121 util,
121 util,
122 )
122 )
123
123
124 _fphasesentry = struct.Struct('>i20s')
124 _fphasesentry = struct.Struct('>i20s')
125
125
126 allphases = public, draft, secret = range(3)
126 allphases = public, draft, secret = range(3)
127 trackedphases = allphases[1:]
127 trackedphases = allphases[1:]
128 phasenames = ['public', 'draft', 'secret']
128 phasenames = ['public', 'draft', 'secret']
129 mutablephases = tuple(allphases[1:])
129 mutablephases = tuple(allphases[1:])
130 remotehiddenphases = tuple(allphases[2:])
130 remotehiddenphases = tuple(allphases[2:])
131
131
132 def _readroots(repo, phasedefaults=None):
132 def _readroots(repo, phasedefaults=None):
133 """Read phase roots from disk
133 """Read phase roots from disk
134
134
135 phasedefaults is a list of fn(repo, roots) callable, which are
135 phasedefaults is a list of fn(repo, roots) callable, which are
136 executed if the phase roots file does not exist. When phases are
136 executed if the phase roots file does not exist. When phases are
137 being initialized on an existing repository, this could be used to
137 being initialized on an existing repository, this could be used to
138 set selected changesets phase to something else than public.
138 set selected changesets phase to something else than public.
139
139
140 Return (roots, dirty) where dirty is true if roots differ from
140 Return (roots, dirty) where dirty is true if roots differ from
141 what is being stored.
141 what is being stored.
142 """
142 """
143 repo = repo.unfiltered()
143 repo = repo.unfiltered()
144 dirty = False
144 dirty = False
145 roots = [set() for i in allphases]
145 roots = [set() for i in allphases]
146 try:
146 try:
147 f, pending = txnutil.trypending(repo.root, repo.svfs, 'phaseroots')
147 f, pending = txnutil.trypending(repo.root, repo.svfs, 'phaseroots')
148 try:
148 try:
149 for line in f:
149 for line in f:
150 phase, nh = line.split()
150 phase, nh = line.split()
151 roots[int(phase)].add(bin(nh))
151 roots[int(phase)].add(bin(nh))
152 finally:
152 finally:
153 f.close()
153 f.close()
154 except IOError as inst:
154 except IOError as inst:
155 if inst.errno != errno.ENOENT:
155 if inst.errno != errno.ENOENT:
156 raise
156 raise
157 if phasedefaults:
157 if phasedefaults:
158 for f in phasedefaults:
158 for f in phasedefaults:
159 roots = f(repo, roots)
159 roots = f(repo, roots)
160 dirty = True
160 dirty = True
161 return roots, dirty
161 return roots, dirty
162
162
163 def binaryencode(phasemapping):
163 def binaryencode(phasemapping):
164 """encode a 'phase -> nodes' mapping into a binary stream
164 """encode a 'phase -> nodes' mapping into a binary stream
165
165
166 Since phases are integer the mapping is actually a python list:
166 Since phases are integer the mapping is actually a python list:
167 [[PUBLIC_HEADS], [DRAFTS_HEADS], [SECRET_HEADS]]
167 [[PUBLIC_HEADS], [DRAFTS_HEADS], [SECRET_HEADS]]
168 """
168 """
169 binarydata = []
169 binarydata = []
170 for phase, nodes in enumerate(phasemapping):
170 for phase, nodes in enumerate(phasemapping):
171 for head in nodes:
171 for head in nodes:
172 binarydata.append(_fphasesentry.pack(phase, head))
172 binarydata.append(_fphasesentry.pack(phase, head))
173 return ''.join(binarydata)
173 return ''.join(binarydata)
174
174
175 def binarydecode(stream):
175 def binarydecode(stream):
176 """decode a binary stream into a 'phase -> nodes' mapping
176 """decode a binary stream into a 'phase -> nodes' mapping
177
177
178 Since phases are integer the mapping is actually a python list."""
178 Since phases are integer the mapping is actually a python list."""
179 headsbyphase = [[] for i in allphases]
179 headsbyphase = [[] for i in allphases]
180 entrysize = _fphasesentry.size
180 entrysize = _fphasesentry.size
181 while True:
181 while True:
182 entry = stream.read(entrysize)
182 entry = stream.read(entrysize)
183 if len(entry) < entrysize:
183 if len(entry) < entrysize:
184 if entry:
184 if entry:
185 raise error.Abort(_('bad phase-heads stream'))
185 raise error.Abort(_('bad phase-heads stream'))
186 break
186 break
187 phase, node = _fphasesentry.unpack(entry)
187 phase, node = _fphasesentry.unpack(entry)
188 headsbyphase[phase].append(node)
188 headsbyphase[phase].append(node)
189 return headsbyphase
189 return headsbyphase
190
190
191 def _trackphasechange(data, rev, old, new):
191 def _trackphasechange(data, rev, old, new):
192 """add a phase move the <data> dictionnary
192 """add a phase move the <data> dictionnary
193
193
194 If data is None, nothing happens.
194 If data is None, nothing happens.
195 """
195 """
196 if data is None:
196 if data is None:
197 return
197 return
198 existing = data.get(rev)
198 existing = data.get(rev)
199 if existing is not None:
199 if existing is not None:
200 old = existing[0]
200 old = existing[0]
201 data[rev] = (old, new)
201 data[rev] = (old, new)
202
202
203 class phasecache(object):
203 class phasecache(object):
204 def __init__(self, repo, phasedefaults, _load=True):
204 def __init__(self, repo, phasedefaults, _load=True):
205 if _load:
205 if _load:
206 # Cheap trick to allow shallow-copy without copy module
206 # Cheap trick to allow shallow-copy without copy module
207 self.phaseroots, self.dirty = _readroots(repo, phasedefaults)
207 self.phaseroots, self.dirty = _readroots(repo, phasedefaults)
208 self._loadedrevslen = 0
208 self._loadedrevslen = 0
209 self._phasesets = None
209 self._phasesets = None
210 self.filterunknown(repo)
210 self.filterunknown(repo)
211 self.opener = repo.svfs
211 self.opener = repo.svfs
212
212
213 def getrevset(self, repo, phases, subset=None):
213 def getrevset(self, repo, phases, subset=None):
214 """return a smartset for the given phases"""
214 """return a smartset for the given phases"""
215 self.loadphaserevs(repo) # ensure phase's sets are loaded
215 self.loadphaserevs(repo) # ensure phase's sets are loaded
216 phases = set(phases)
216 phases = set(phases)
217 if public not in phases:
217 if public not in phases:
218 # fast path: _phasesets contains the interesting sets,
218 # fast path: _phasesets contains the interesting sets,
219 # might only need a union and post-filtering.
219 # might only need a union and post-filtering.
220 if len(phases) == 1:
220 if len(phases) == 1:
221 [p] = phases
221 [p] = phases
222 revs = self._phasesets[p]
222 revs = self._phasesets[p]
223 else:
223 else:
224 revs = set.union(*[self._phasesets[p] for p in phases])
224 revs = set.union(*[self._phasesets[p] for p in phases])
225 if repo.changelog.filteredrevs:
225 if repo.changelog.filteredrevs:
226 revs = revs - repo.changelog.filteredrevs
226 revs = revs - repo.changelog.filteredrevs
227 if subset is None:
227 if subset is None:
228 return smartset.baseset(revs)
228 return smartset.baseset(revs)
229 else:
229 else:
230 return subset & smartset.baseset(revs)
230 return subset & smartset.baseset(revs)
231 else:
231 else:
232 phases = set(allphases).difference(phases)
232 phases = set(allphases).difference(phases)
233 if not phases:
233 if not phases:
234 return smartset.fullreposet(repo)
234 return smartset.fullreposet(repo)
235 if len(phases) == 1:
235 if len(phases) == 1:
236 [p] = phases
236 [p] = phases
237 revs = self._phasesets[p]
237 revs = self._phasesets[p]
238 else:
238 else:
239 revs = set.union(*[self._phasesets[p] for p in phases])
239 revs = set.union(*[self._phasesets[p] for p in phases])
240 if subset is None:
240 if subset is None:
241 subset = smartset.fullreposet(repo)
241 subset = smartset.fullreposet(repo)
242 if not revs:
242 if not revs:
243 return subset
243 return subset
244 return subset.filter(lambda r: r not in revs)
244 return subset.filter(lambda r: r not in revs)
245
245
246 def copy(self):
246 def copy(self):
247 # Shallow copy meant to ensure isolation in
247 # Shallow copy meant to ensure isolation in
248 # advance/retractboundary(), nothing more.
248 # advance/retractboundary(), nothing more.
249 ph = self.__class__(None, None, _load=False)
249 ph = self.__class__(None, None, _load=False)
250 ph.phaseroots = self.phaseroots[:]
250 ph.phaseroots = self.phaseroots[:]
251 ph.dirty = self.dirty
251 ph.dirty = self.dirty
252 ph.opener = self.opener
252 ph.opener = self.opener
253 ph._loadedrevslen = self._loadedrevslen
253 ph._loadedrevslen = self._loadedrevslen
254 ph._phasesets = self._phasesets
254 ph._phasesets = self._phasesets
255 return ph
255 return ph
256
256
257 def replace(self, phcache):
257 def replace(self, phcache):
258 """replace all values in 'self' with content of phcache"""
258 """replace all values in 'self' with content of phcache"""
259 for a in ('phaseroots', 'dirty', 'opener', '_loadedrevslen',
259 for a in ('phaseroots', 'dirty', 'opener', '_loadedrevslen',
260 '_phasesets'):
260 '_phasesets'):
261 setattr(self, a, getattr(phcache, a))
261 setattr(self, a, getattr(phcache, a))
262
262
263 def _getphaserevsnative(self, repo):
263 def _getphaserevsnative(self, repo):
264 repo = repo.unfiltered()
264 repo = repo.unfiltered()
265 nativeroots = []
265 nativeroots = []
266 for phase in trackedphases:
266 for phase in trackedphases:
267 nativeroots.append(pycompat.maplist(repo.changelog.rev,
267 nativeroots.append(pycompat.maplist(repo.changelog.rev,
268 self.phaseroots[phase]))
268 self.phaseroots[phase]))
269 return repo.changelog.computephases(nativeroots)
269 return repo.changelog.computephases(nativeroots)
270
270
271 def _computephaserevspure(self, repo):
271 def _computephaserevspure(self, repo):
272 repo = repo.unfiltered()
272 repo = repo.unfiltered()
273 cl = repo.changelog
273 cl = repo.changelog
274 self._phasesets = [set() for phase in allphases]
274 self._phasesets = [set() for phase in allphases]
275 roots = pycompat.maplist(cl.rev, self.phaseroots[secret])
275 roots = pycompat.maplist(cl.rev, self.phaseroots[secret])
276 if roots:
276 if roots:
277 ps = set(cl.descendants(roots))
277 ps = set(cl.descendants(roots))
278 for root in roots:
278 for root in roots:
279 ps.add(root)
279 ps.add(root)
280 self._phasesets[secret] = ps
280 self._phasesets[secret] = ps
281 roots = pycompat.maplist(cl.rev, self.phaseroots[draft])
281 roots = pycompat.maplist(cl.rev, self.phaseroots[draft])
282 if roots:
282 if roots:
283 ps = set(cl.descendants(roots))
283 ps = set(cl.descendants(roots))
284 for root in roots:
284 for root in roots:
285 ps.add(root)
285 ps.add(root)
286 ps.difference_update(self._phasesets[secret])
286 ps.difference_update(self._phasesets[secret])
287 self._phasesets[draft] = ps
287 self._phasesets[draft] = ps
288 self._loadedrevslen = len(cl)
288 self._loadedrevslen = len(cl)
289
289
290 def loadphaserevs(self, repo):
290 def loadphaserevs(self, repo):
291 """ensure phase information is loaded in the object"""
291 """ensure phase information is loaded in the object"""
292 if self._phasesets is None:
292 if self._phasesets is None:
293 try:
293 try:
294 res = self._getphaserevsnative(repo)
294 res = self._getphaserevsnative(repo)
295 self._loadedrevslen, self._phasesets = res
295 self._loadedrevslen, self._phasesets = res
296 except AttributeError:
296 except AttributeError:
297 self._computephaserevspure(repo)
297 self._computephaserevspure(repo)
298
298
299 def invalidate(self):
299 def invalidate(self):
300 self._loadedrevslen = 0
300 self._loadedrevslen = 0
301 self._phasesets = None
301 self._phasesets = None
302
302
303 def phase(self, repo, rev):
303 def phase(self, repo, rev):
304 # We need a repo argument here to be able to build _phasesets
304 # We need a repo argument here to be able to build _phasesets
305 # if necessary. The repository instance is not stored in
305 # if necessary. The repository instance is not stored in
306 # phasecache to avoid reference cycles. The changelog instance
306 # phasecache to avoid reference cycles. The changelog instance
307 # is not stored because it is a filecache() property and can
307 # is not stored because it is a filecache() property and can
308 # be replaced without us being notified.
308 # be replaced without us being notified.
309 if rev == nullrev:
309 if rev == nullrev:
310 return public
310 return public
311 if rev < nullrev:
311 if rev < nullrev:
312 raise ValueError(_('cannot lookup negative revision'))
312 raise ValueError(_('cannot lookup negative revision'))
313 if rev >= self._loadedrevslen:
313 if rev >= self._loadedrevslen:
314 self.invalidate()
314 self.invalidate()
315 self.loadphaserevs(repo)
315 self.loadphaserevs(repo)
316 for phase in trackedphases:
316 for phase in trackedphases:
317 if rev in self._phasesets[phase]:
317 if rev in self._phasesets[phase]:
318 return phase
318 return phase
319 return public
319 return public
320
320
321 def write(self):
321 def write(self):
322 if not self.dirty:
322 if not self.dirty:
323 return
323 return
324 f = self.opener('phaseroots', 'w', atomictemp=True, checkambig=True)
324 f = self.opener('phaseroots', 'w', atomictemp=True, checkambig=True)
325 try:
325 try:
326 self._write(f)
326 self._write(f)
327 finally:
327 finally:
328 f.close()
328 f.close()
329
329
330 def _write(self, fp):
330 def _write(self, fp):
331 for phase, roots in enumerate(self.phaseroots):
331 for phase, roots in enumerate(self.phaseroots):
332 for h in sorted(roots):
332 for h in sorted(roots):
333 fp.write('%i %s\n' % (phase, hex(h)))
333 fp.write('%i %s\n' % (phase, hex(h)))
334 self.dirty = False
334 self.dirty = False
335
335
336 def _updateroots(self, phase, newroots, tr):
336 def _updateroots(self, phase, newroots, tr):
337 self.phaseroots[phase] = newroots
337 self.phaseroots[phase] = newroots
338 self.invalidate()
338 self.invalidate()
339 self.dirty = True
339 self.dirty = True
340
340
341 tr.addfilegenerator('phase', ('phaseroots',), self._write)
341 tr.addfilegenerator('phase', ('phaseroots',), self._write)
342 tr.hookargs['phases_moved'] = '1'
342 tr.hookargs['phases_moved'] = '1'
343
343
344 def registernew(self, repo, tr, targetphase, nodes):
344 def registernew(self, repo, tr, targetphase, nodes):
345 repo = repo.unfiltered()
345 repo = repo.unfiltered()
346 self._retractboundary(repo, tr, targetphase, nodes)
346 self._retractboundary(repo, tr, targetphase, nodes)
347 if tr is not None and 'phases' in tr.changes:
347 if tr is not None and 'phases' in tr.changes:
348 phasetracking = tr.changes['phases']
348 phasetracking = tr.changes['phases']
349 torev = repo.changelog.rev
349 torev = repo.changelog.rev
350 phase = self.phase
350 phase = self.phase
351 for n in nodes:
351 for n in nodes:
352 rev = torev(n)
352 rev = torev(n)
353 revphase = phase(repo, rev)
353 revphase = phase(repo, rev)
354 _trackphasechange(phasetracking, rev, None, revphase)
354 _trackphasechange(phasetracking, rev, None, revphase)
355 repo.invalidatevolatilesets()
355 repo.invalidatevolatilesets()
356
356
357 def advanceboundary(self, repo, tr, targetphase, nodes, dryrun=None):
357 def advanceboundary(self, repo, tr, targetphase, nodes, dryrun=None):
358 """Set all 'nodes' to phase 'targetphase'
358 """Set all 'nodes' to phase 'targetphase'
359
359
360 Nodes with a phase lower than 'targetphase' are not affected.
360 Nodes with a phase lower than 'targetphase' are not affected.
361
361
362 If dryrun is True, no actions will be performed
362 If dryrun is True, no actions will be performed
363
363
364 Returns a set of revs whose phase is changed or should be changed
364 Returns a set of revs whose phase is changed or should be changed
365 """
365 """
366 # Be careful to preserve shallow-copied values: do not update
366 # Be careful to preserve shallow-copied values: do not update
367 # phaseroots values, replace them.
367 # phaseroots values, replace them.
368 if tr is None:
368 if tr is None:
369 phasetracking = None
369 phasetracking = None
370 else:
370 else:
371 phasetracking = tr.changes.get('phases')
371 phasetracking = tr.changes.get('phases')
372
372
373 repo = repo.unfiltered()
373 repo = repo.unfiltered()
374
374
375 changes = set() # set of revisions to be changed
375 changes = set() # set of revisions to be changed
376 delroots = [] # set of root deleted by this path
376 delroots = [] # set of root deleted by this path
377 for phase in xrange(targetphase + 1, len(allphases)):
377 for phase in xrange(targetphase + 1, len(allphases)):
378 # filter nodes that are not in a compatible phase already
378 # filter nodes that are not in a compatible phase already
379 nodes = [n for n in nodes
379 nodes = [n for n in nodes
380 if self.phase(repo, repo[n].rev()) >= phase]
380 if self.phase(repo, repo[n].rev()) >= phase]
381 if not nodes:
381 if not nodes:
382 break # no roots to move anymore
382 break # no roots to move anymore
383
383
384 olds = self.phaseroots[phase]
384 olds = self.phaseroots[phase]
385
385
386 affected = repo.revs('%ln::%ln', olds, nodes)
386 affected = repo.revs('%ln::%ln', olds, nodes)
387 changes.update(affected)
387 changes.update(affected)
388 if dryrun:
388 if dryrun:
389 continue
389 continue
390 for r in affected:
390 for r in affected:
391 _trackphasechange(phasetracking, r, self.phase(repo, r),
391 _trackphasechange(phasetracking, r, self.phase(repo, r),
392 targetphase)
392 targetphase)
393
393
394 roots = set(ctx.node() for ctx in repo.set(
394 roots = set(ctx.node() for ctx in repo.set(
395 'roots((%ln::) - %ld)', olds, affected))
395 'roots((%ln::) - %ld)', olds, affected))
396 if olds != roots:
396 if olds != roots:
397 self._updateroots(phase, roots, tr)
397 self._updateroots(phase, roots, tr)
398 # some roots may need to be declared for lower phases
398 # some roots may need to be declared for lower phases
399 delroots.extend(olds - roots)
399 delroots.extend(olds - roots)
400 if not dryrun:
400 if not dryrun:
401 # declare deleted root in the target phase
401 # declare deleted root in the target phase
402 if targetphase != 0:
402 if targetphase != 0:
403 self._retractboundary(repo, tr, targetphase, delroots)
403 self._retractboundary(repo, tr, targetphase, delroots)
404 repo.invalidatevolatilesets()
404 repo.invalidatevolatilesets()
405 return changes
405 return changes
406
406
407 def retractboundary(self, repo, tr, targetphase, nodes):
407 def retractboundary(self, repo, tr, targetphase, nodes):
408 oldroots = self.phaseroots[:targetphase + 1]
408 oldroots = self.phaseroots[:targetphase + 1]
409 if tr is None:
409 if tr is None:
410 phasetracking = None
410 phasetracking = None
411 else:
411 else:
412 phasetracking = tr.changes.get('phases')
412 phasetracking = tr.changes.get('phases')
413 repo = repo.unfiltered()
413 repo = repo.unfiltered()
414 if (self._retractboundary(repo, tr, targetphase, nodes)
414 if (self._retractboundary(repo, tr, targetphase, nodes)
415 and phasetracking is not None):
415 and phasetracking is not None):
416
416
417 # find the affected revisions
417 # find the affected revisions
418 new = self.phaseroots[targetphase]
418 new = self.phaseroots[targetphase]
419 old = oldroots[targetphase]
419 old = oldroots[targetphase]
420 affected = set(repo.revs('(%ln::) - (%ln::)', new, old))
420 affected = set(repo.revs('(%ln::) - (%ln::)', new, old))
421
421
422 # find the phase of the affected revision
422 # find the phase of the affected revision
423 for phase in xrange(targetphase, -1, -1):
423 for phase in xrange(targetphase, -1, -1):
424 if phase:
424 if phase:
425 roots = oldroots[phase]
425 roots = oldroots[phase]
426 revs = set(repo.revs('%ln::%ld', roots, affected))
426 revs = set(repo.revs('%ln::%ld', roots, affected))
427 affected -= revs
427 affected -= revs
428 else: # public phase
428 else: # public phase
429 revs = affected
429 revs = affected
430 for r in revs:
430 for r in revs:
431 _trackphasechange(phasetracking, r, phase, targetphase)
431 _trackphasechange(phasetracking, r, phase, targetphase)
432 repo.invalidatevolatilesets()
432 repo.invalidatevolatilesets()
433
433
434 def _retractboundary(self, repo, tr, targetphase, nodes):
434 def _retractboundary(self, repo, tr, targetphase, nodes):
435 # Be careful to preserve shallow-copied values: do not update
435 # Be careful to preserve shallow-copied values: do not update
436 # phaseroots values, replace them.
436 # phaseroots values, replace them.
437
437
438 repo = repo.unfiltered()
438 repo = repo.unfiltered()
439 currentroots = self.phaseroots[targetphase]
439 currentroots = self.phaseroots[targetphase]
440 finalroots = oldroots = set(currentroots)
440 finalroots = oldroots = set(currentroots)
441 newroots = [n for n in nodes
441 newroots = [n for n in nodes
442 if self.phase(repo, repo[n].rev()) < targetphase]
442 if self.phase(repo, repo[n].rev()) < targetphase]
443 if newroots:
443 if newroots:
444
444
445 if nullid in newroots:
445 if nullid in newroots:
446 raise error.Abort(_('cannot change null revision phase'))
446 raise error.Abort(_('cannot change null revision phase'))
447 currentroots = currentroots.copy()
447 currentroots = currentroots.copy()
448 currentroots.update(newroots)
448 currentroots.update(newroots)
449
449
450 # Only compute new roots for revs above the roots that are being
450 # Only compute new roots for revs above the roots that are being
451 # retracted.
451 # retracted.
452 minnewroot = min(repo[n].rev() for n in newroots)
452 minnewroot = min(repo[n].rev() for n in newroots)
453 aboveroots = [n for n in currentroots
453 aboveroots = [n for n in currentroots
454 if repo[n].rev() >= minnewroot]
454 if repo[n].rev() >= minnewroot]
455 updatedroots = repo.set('roots(%ln::)', aboveroots)
455 updatedroots = repo.set('roots(%ln::)', aboveroots)
456
456
457 finalroots = set(n for n in currentroots if repo[n].rev() <
457 finalroots = set(n for n in currentroots if repo[n].rev() <
458 minnewroot)
458 minnewroot)
459 finalroots.update(ctx.node() for ctx in updatedroots)
459 finalroots.update(ctx.node() for ctx in updatedroots)
460 if finalroots != oldroots:
460 if finalroots != oldroots:
461 self._updateroots(targetphase, finalroots, tr)
461 self._updateroots(targetphase, finalroots, tr)
462 return True
462 return True
463 return False
463 return False
464
464
465 def filterunknown(self, repo):
465 def filterunknown(self, repo):
466 """remove unknown nodes from the phase boundary
466 """remove unknown nodes from the phase boundary
467
467
468 Nothing is lost as unknown nodes only hold data for their descendants.
468 Nothing is lost as unknown nodes only hold data for their descendants.
469 """
469 """
470 filtered = False
470 filtered = False
471 nodemap = repo.changelog.nodemap # to filter unknown nodes
471 nodemap = repo.changelog.nodemap # to filter unknown nodes
472 for phase, nodes in enumerate(self.phaseroots):
472 for phase, nodes in enumerate(self.phaseroots):
473 missing = sorted(node for node in nodes if node not in nodemap)
473 missing = sorted(node for node in nodes if node not in nodemap)
474 if missing:
474 if missing:
475 for mnode in missing:
475 for mnode in missing:
476 repo.ui.debug(
476 repo.ui.debug(
477 'removing unknown node %s from %i-phase boundary\n'
477 'removing unknown node %s from %i-phase boundary\n'
478 % (short(mnode), phase))
478 % (short(mnode), phase))
479 nodes.symmetric_difference_update(missing)
479 nodes.symmetric_difference_update(missing)
480 filtered = True
480 filtered = True
481 if filtered:
481 if filtered:
482 self.dirty = True
482 self.dirty = True
483 # filterunknown is called by repo.destroyed, we may have no changes in
483 # filterunknown is called by repo.destroyed, we may have no changes in
484 # root but _phasesets contents is certainly invalid (or at least we
484 # root but _phasesets contents is certainly invalid (or at least we
485 # have not proper way to check that). related to issue 3858.
485 # have not proper way to check that). related to issue 3858.
486 #
486 #
487 # The other caller is __init__ that have no _phasesets initialized
487 # The other caller is __init__ that have no _phasesets initialized
488 # anyway. If this change we should consider adding a dedicated
488 # anyway. If this change we should consider adding a dedicated
489 # "destroyed" function to phasecache or a proper cache key mechanism
489 # "destroyed" function to phasecache or a proper cache key mechanism
490 # (see branchmap one)
490 # (see branchmap one)
491 self.invalidate()
491 self.invalidate()
492
492
493 def advanceboundary(repo, tr, targetphase, nodes, dryrun=None):
493 def advanceboundary(repo, tr, targetphase, nodes, dryrun=None):
494 """Add nodes to a phase changing other nodes phases if necessary.
494 """Add nodes to a phase changing other nodes phases if necessary.
495
495
496 This function move boundary *forward* this means that all nodes
496 This function move boundary *forward* this means that all nodes
497 are set in the target phase or kept in a *lower* phase.
497 are set in the target phase or kept in a *lower* phase.
498
498
499 Simplify boundary to contains phase roots only.
499 Simplify boundary to contains phase roots only.
500
500
501 If dryrun is True, no actions will be performed
501 If dryrun is True, no actions will be performed
502
502
503 Returns a set of revs whose phase is changed or should be changed
503 Returns a set of revs whose phase is changed or should be changed
504 """
504 """
505 phcache = repo._phasecache.copy()
505 phcache = repo._phasecache.copy()
506 changes = phcache.advanceboundary(repo, tr, targetphase, nodes,
506 changes = phcache.advanceboundary(repo, tr, targetphase, nodes,
507 dryrun=dryrun)
507 dryrun=dryrun)
508 if not dryrun:
508 if not dryrun:
509 repo._phasecache.replace(phcache)
509 repo._phasecache.replace(phcache)
510 return changes
510 return changes
511
511
512 def retractboundary(repo, tr, targetphase, nodes):
512 def retractboundary(repo, tr, targetphase, nodes):
513 """Set nodes back to a phase changing other nodes phases if
513 """Set nodes back to a phase changing other nodes phases if
514 necessary.
514 necessary.
515
515
516 This function move boundary *backward* this means that all nodes
516 This function move boundary *backward* this means that all nodes
517 are set in the target phase or kept in a *higher* phase.
517 are set in the target phase or kept in a *higher* phase.
518
518
519 Simplify boundary to contains phase roots only."""
519 Simplify boundary to contains phase roots only."""
520 phcache = repo._phasecache.copy()
520 phcache = repo._phasecache.copy()
521 phcache.retractboundary(repo, tr, targetphase, nodes)
521 phcache.retractboundary(repo, tr, targetphase, nodes)
522 repo._phasecache.replace(phcache)
522 repo._phasecache.replace(phcache)
523
523
524 def registernew(repo, tr, targetphase, nodes):
524 def registernew(repo, tr, targetphase, nodes):
525 """register a new revision and its phase
525 """register a new revision and its phase
526
526
527 Code adding revisions to the repository should use this function to
527 Code adding revisions to the repository should use this function to
528 set new changeset in their target phase (or higher).
528 set new changeset in their target phase (or higher).
529 """
529 """
530 phcache = repo._phasecache.copy()
530 phcache = repo._phasecache.copy()
531 phcache.registernew(repo, tr, targetphase, nodes)
531 phcache.registernew(repo, tr, targetphase, nodes)
532 repo._phasecache.replace(phcache)
532 repo._phasecache.replace(phcache)
533
533
534 def listphases(repo):
534 def listphases(repo):
535 """List phases root for serialization over pushkey"""
535 """List phases root for serialization over pushkey"""
536 # Use ordered dictionary so behavior is deterministic.
536 # Use ordered dictionary so behavior is deterministic.
537 keys = util.sortdict()
537 keys = util.sortdict()
538 value = '%i' % draft
538 value = '%i' % draft
539 cl = repo.unfiltered().changelog
539 cl = repo.unfiltered().changelog
540 for root in repo._phasecache.phaseroots[draft]:
540 for root in repo._phasecache.phaseroots[draft]:
541 if repo._phasecache.phase(repo, cl.rev(root)) <= draft:
541 if repo._phasecache.phase(repo, cl.rev(root)) <= draft:
542 keys[hex(root)] = value
542 keys[hex(root)] = value
543
543
544 if repo.publishing():
544 if repo.publishing():
545 # Add an extra data to let remote know we are a publishing
545 # Add an extra data to let remote know we are a publishing
546 # repo. Publishing repo can't just pretend they are old repo.
546 # repo. Publishing repo can't just pretend they are old repo.
547 # When pushing to a publishing repo, the client still need to
547 # When pushing to a publishing repo, the client still need to
548 # push phase boundary
548 # push phase boundary
549 #
549 #
550 # Push do not only push changeset. It also push phase data.
550 # Push do not only push changeset. It also push phase data.
551 # New phase data may apply to common changeset which won't be
551 # New phase data may apply to common changeset which won't be
552 # push (as they are common). Here is a very simple example:
552 # push (as they are common). Here is a very simple example:
553 #
553 #
554 # 1) repo A push changeset X as draft to repo B
554 # 1) repo A push changeset X as draft to repo B
555 # 2) repo B make changeset X public
555 # 2) repo B make changeset X public
556 # 3) repo B push to repo A. X is not pushed but the data that
556 # 3) repo B push to repo A. X is not pushed but the data that
557 # X as now public should
557 # X as now public should
558 #
558 #
559 # The server can't handle it on it's own as it has no idea of
559 # The server can't handle it on it's own as it has no idea of
560 # client phase data.
560 # client phase data.
561 keys['publishing'] = 'True'
561 keys['publishing'] = 'True'
562 return keys
562 return keys
563
563
564 def pushphase(repo, nhex, oldphasestr, newphasestr):
564 def pushphase(repo, nhex, oldphasestr, newphasestr):
565 """List phases root for serialization over pushkey"""
565 """List phases root for serialization over pushkey"""
566 repo = repo.unfiltered()
566 repo = repo.unfiltered()
567 with repo.lock():
567 with repo.lock():
568 currentphase = repo[nhex].phase()
568 currentphase = repo[nhex].phase()
569 newphase = abs(int(newphasestr)) # let's avoid negative index surprise
569 newphase = abs(int(newphasestr)) # let's avoid negative index surprise
570 oldphase = abs(int(oldphasestr)) # let's avoid negative index surprise
570 oldphase = abs(int(oldphasestr)) # let's avoid negative index surprise
571 if currentphase == oldphase and newphase < oldphase:
571 if currentphase == oldphase and newphase < oldphase:
572 with repo.transaction('pushkey-phase') as tr:
572 with repo.transaction('pushkey-phase') as tr:
573 advanceboundary(repo, tr, newphase, [bin(nhex)])
573 advanceboundary(repo, tr, newphase, [bin(nhex)])
574 return True
574 return True
575 elif currentphase == newphase:
575 elif currentphase == newphase:
576 # raced, but got correct result
576 # raced, but got correct result
577 return True
577 return True
578 else:
578 else:
579 return False
579 return False
580
580
581 def subsetphaseheads(repo, subset):
581 def subsetphaseheads(repo, subset):
582 """Finds the phase heads for a subset of a history
582 """Finds the phase heads for a subset of a history
583
583
584 Returns a list indexed by phase number where each item is a list of phase
584 Returns a list indexed by phase number where each item is a list of phase
585 head nodes.
585 head nodes.
586 """
586 """
587 cl = repo.changelog
587 cl = repo.changelog
588
588
589 headsbyphase = [[] for i in allphases]
589 headsbyphase = [[] for i in allphases]
590 # No need to keep track of secret phase; any heads in the subset that
590 # No need to keep track of secret phase; any heads in the subset that
591 # are not mentioned are implicitly secret.
591 # are not mentioned are implicitly secret.
592 for phase in allphases[:-1]:
592 for phase in allphases[:-1]:
593 revset = "heads(%%ln & %s())" % phasenames[phase]
593 revset = "heads(%%ln & %s())" % phasenames[phase]
594 headsbyphase[phase] = [cl.node(r) for r in repo.revs(revset, subset)]
594 headsbyphase[phase] = [cl.node(r) for r in repo.revs(revset, subset)]
595 return headsbyphase
595 return headsbyphase
596
596
597 def updatephases(repo, trgetter, headsbyphase):
597 def updatephases(repo, trgetter, headsbyphase):
598 """Updates the repo with the given phase heads"""
598 """Updates the repo with the given phase heads"""
599 # Now advance phase boundaries of all but secret phase
599 # Now advance phase boundaries of all but secret phase
600 #
600 #
601 # run the update (and fetch transaction) only if there are actually things
601 # run the update (and fetch transaction) only if there are actually things
602 # to update. This avoid creating empty transaction during no-op operation.
602 # to update. This avoid creating empty transaction during no-op operation.
603
603
604 for phase in allphases[:-1]:
604 for phase in allphases[:-1]:
605 revset = '%%ln - %s()' % phasenames[phase]
605 revset = '%%ln - %s()' % phasenames[phase]
606 heads = [c.node() for c in repo.set(revset, headsbyphase[phase])]
606 heads = [c.node() for c in repo.set(revset, headsbyphase[phase])]
607 if heads:
607 if heads:
608 advanceboundary(repo, trgetter(), phase, heads)
608 advanceboundary(repo, trgetter(), phase, heads)
609
609
610 def analyzeremotephases(repo, subset, roots):
610 def analyzeremotephases(repo, subset, roots):
611 """Compute phases heads and root in a subset of node from root dict
611 """Compute phases heads and root in a subset of node from root dict
612
612
613 * subset is heads of the subset
613 * subset is heads of the subset
614 * roots is {<nodeid> => phase} mapping. key and value are string.
614 * roots is {<nodeid> => phase} mapping. key and value are string.
615
615
616 Accept unknown element input
616 Accept unknown element input
617 """
617 """
618 repo = repo.unfiltered()
618 repo = repo.unfiltered()
619 # build list from dictionary
619 # build list from dictionary
620 draftroots = []
620 draftroots = []
621 nodemap = repo.changelog.nodemap # to filter unknown nodes
621 nodemap = repo.changelog.nodemap # to filter unknown nodes
622 for nhex, phase in roots.iteritems():
622 for nhex, phase in roots.iteritems():
623 if nhex == 'publishing': # ignore data related to publish option
623 if nhex == 'publishing': # ignore data related to publish option
624 continue
624 continue
625 node = bin(nhex)
625 node = bin(nhex)
626 phase = int(phase)
626 phase = int(phase)
627 if phase == public:
627 if phase == public:
628 if node != nullid:
628 if node != nullid:
629 repo.ui.warn(_('ignoring inconsistent public root'
629 repo.ui.warn(_('ignoring inconsistent public root'
630 ' from remote: %s\n') % nhex)
630 ' from remote: %s\n') % nhex)
631 elif phase == draft:
631 elif phase == draft:
632 if node in nodemap:
632 if node in nodemap:
633 draftroots.append(node)
633 draftroots.append(node)
634 else:
634 else:
635 repo.ui.warn(_('ignoring unexpected root from remote: %i %s\n')
635 repo.ui.warn(_('ignoring unexpected root from remote: %i %s\n')
636 % (phase, nhex))
636 % (phase, nhex))
637 # compute heads
637 # compute heads
638 publicheads = newheads(repo, subset, draftroots)
638 publicheads = newheads(repo, subset, draftroots)
639 return publicheads, draftroots
639 return publicheads, draftroots
640
640
641 class remotephasessummary(object):
641 class remotephasessummary(object):
642 """summarize phase information on the remote side
642 """summarize phase information on the remote side
643
643
644 :publishing: True is the remote is publishing
644 :publishing: True is the remote is publishing
645 :publicheads: list of remote public phase heads (nodes)
645 :publicheads: list of remote public phase heads (nodes)
646 :draftheads: list of remote draft phase heads (nodes)
646 :draftheads: list of remote draft phase heads (nodes)
647 :draftroots: list of remote draft phase root (nodes)
647 :draftroots: list of remote draft phase root (nodes)
648 """
648 """
649
649
650 def __init__(self, repo, remotesubset, remoteroots):
650 def __init__(self, repo, remotesubset, remoteroots):
651 unfi = repo.unfiltered()
651 unfi = repo.unfiltered()
652 self._allremoteroots = remoteroots
652 self._allremoteroots = remoteroots
653
653
654 self.publishing = remoteroots.get('publishing', False)
654 self.publishing = remoteroots.get('publishing', False)
655
655
656 ana = analyzeremotephases(repo, remotesubset, remoteroots)
656 ana = analyzeremotephases(repo, remotesubset, remoteroots)
657 self.publicheads, self.draftroots = ana
657 self.publicheads, self.draftroots = ana
658 # Get the list of all "heads" revs draft on remote
658 # Get the list of all "heads" revs draft on remote
659 dheads = unfi.set('heads(%ln::%ln)', self.draftroots, remotesubset)
659 dheads = unfi.set('heads(%ln::%ln)', self.draftroots, remotesubset)
660 self.draftheads = [c.node() for c in dheads]
660 self.draftheads = [c.node() for c in dheads]
661
661
662 def newheads(repo, heads, roots):
662 def newheads(repo, heads, roots):
663 """compute new head of a subset minus another
663 """compute new head of a subset minus another
664
664
665 * `heads`: define the first subset
665 * `heads`: define the first subset
666 * `roots`: define the second we subtract from the first"""
666 * `roots`: define the second we subtract from the first"""
667 repo = repo.unfiltered()
667 repo = repo.unfiltered()
668 revset = repo.set('heads((%ln + parents(%ln)) - (%ln::%ln))',
668 revset = repo.set('heads(::%ln - (%ln::%ln))', heads, roots, heads)
669 heads, roots, roots, heads)
670 return [c.node() for c in revset]
669 return [c.node() for c in revset]
671
670
672
671
673 def newcommitphase(ui):
672 def newcommitphase(ui):
674 """helper to get the target phase of new commit
673 """helper to get the target phase of new commit
675
674
676 Handle all possible values for the phases.new-commit options.
675 Handle all possible values for the phases.new-commit options.
677
676
678 """
677 """
679 v = ui.config('phases', 'new-commit')
678 v = ui.config('phases', 'new-commit')
680 try:
679 try:
681 return phasenames.index(v)
680 return phasenames.index(v)
682 except ValueError:
681 except ValueError:
683 try:
682 try:
684 return int(v)
683 return int(v)
685 except ValueError:
684 except ValueError:
686 msg = _("phases.new-commit: not a valid phase name ('%s')")
685 msg = _("phases.new-commit: not a valid phase name ('%s')")
687 raise error.ConfigError(msg % v)
686 raise error.ConfigError(msg % v)
688
687
689 def hassecret(repo):
688 def hassecret(repo):
690 """utility function that check if a repo have any secret changeset."""
689 """utility function that check if a repo have any secret changeset."""
691 return bool(repo._phasecache.phaseroots[2])
690 return bool(repo._phasecache.phaseroots[2])
692
691
693 def preparehookargs(node, old, new):
692 def preparehookargs(node, old, new):
694 if old is None:
693 if old is None:
695 old = ''
694 old = ''
696 else:
695 else:
697 old = phasenames[old]
696 old = phasenames[old]
698 return {'node': node,
697 return {'node': node,
699 'oldphase': old,
698 'oldphase': old,
700 'phase': phasenames[new]}
699 'phase': phasenames[new]}
@@ -1,1559 +1,1561 b''
1 $ cat >> $HGRCPATH << EOF
1 $ cat >> $HGRCPATH << EOF
2 > [extensions]
2 > [extensions]
3 > drawdag=$TESTDIR/drawdag.py
3 > drawdag=$TESTDIR/drawdag.py
4 > phasereport=$TESTDIR/testlib/ext-phase-report.py
4 > phasereport=$TESTDIR/testlib/ext-phase-report.py
5 > EOF
5 > EOF
6
6
7 $ hgph() { hg log -G --template "{rev} {phase} {desc} - {node|short}\n" $*; }
7 $ hgph() { hg log -G --template "{rev} {phase} {desc} - {node|short}\n" $*; }
8
8
9 $ mkcommit() {
9 $ mkcommit() {
10 > echo "$1" > "$1"
10 > echo "$1" > "$1"
11 > hg add "$1"
11 > hg add "$1"
12 > message="$1"
12 > message="$1"
13 > shift
13 > shift
14 > hg ci -m "$message" $*
14 > hg ci -m "$message" $*
15 > }
15 > }
16
16
17 $ hg init alpha
17 $ hg init alpha
18 $ cd alpha
18 $ cd alpha
19 $ mkcommit a-A
19 $ mkcommit a-A
20 test-debug-phase: new rev 0: x -> 1
20 test-debug-phase: new rev 0: x -> 1
21 $ mkcommit a-B
21 $ mkcommit a-B
22 test-debug-phase: new rev 1: x -> 1
22 test-debug-phase: new rev 1: x -> 1
23 $ mkcommit a-C
23 $ mkcommit a-C
24 test-debug-phase: new rev 2: x -> 1
24 test-debug-phase: new rev 2: x -> 1
25 $ mkcommit a-D
25 $ mkcommit a-D
26 test-debug-phase: new rev 3: x -> 1
26 test-debug-phase: new rev 3: x -> 1
27 $ hgph
27 $ hgph
28 @ 3 draft a-D - b555f63b6063
28 @ 3 draft a-D - b555f63b6063
29 |
29 |
30 o 2 draft a-C - 54acac6f23ab
30 o 2 draft a-C - 54acac6f23ab
31 |
31 |
32 o 1 draft a-B - 548a3d25dbf0
32 o 1 draft a-B - 548a3d25dbf0
33 |
33 |
34 o 0 draft a-A - 054250a37db4
34 o 0 draft a-A - 054250a37db4
35
35
36
36
37 $ hg init ../beta
37 $ hg init ../beta
38 $ hg push -r 1 ../beta
38 $ hg push -r 1 ../beta
39 pushing to ../beta
39 pushing to ../beta
40 searching for changes
40 searching for changes
41 adding changesets
41 adding changesets
42 adding manifests
42 adding manifests
43 adding file changes
43 adding file changes
44 added 2 changesets with 2 changes to 2 files
44 added 2 changesets with 2 changes to 2 files
45 test-debug-phase: new rev 0: x -> 0
45 test-debug-phase: new rev 0: x -> 0
46 test-debug-phase: new rev 1: x -> 0
46 test-debug-phase: new rev 1: x -> 0
47 test-debug-phase: move rev 0: 1 -> 0
47 test-debug-phase: move rev 0: 1 -> 0
48 test-debug-phase: move rev 1: 1 -> 0
48 test-debug-phase: move rev 1: 1 -> 0
49 $ hgph
49 $ hgph
50 @ 3 draft a-D - b555f63b6063
50 @ 3 draft a-D - b555f63b6063
51 |
51 |
52 o 2 draft a-C - 54acac6f23ab
52 o 2 draft a-C - 54acac6f23ab
53 |
53 |
54 o 1 public a-B - 548a3d25dbf0
54 o 1 public a-B - 548a3d25dbf0
55 |
55 |
56 o 0 public a-A - 054250a37db4
56 o 0 public a-A - 054250a37db4
57
57
58
58
59 $ cd ../beta
59 $ cd ../beta
60 $ hgph
60 $ hgph
61 o 1 public a-B - 548a3d25dbf0
61 o 1 public a-B - 548a3d25dbf0
62 |
62 |
63 o 0 public a-A - 054250a37db4
63 o 0 public a-A - 054250a37db4
64
64
65 $ hg up -q
65 $ hg up -q
66 $ mkcommit b-A
66 $ mkcommit b-A
67 test-debug-phase: new rev 2: x -> 1
67 test-debug-phase: new rev 2: x -> 1
68 $ hgph
68 $ hgph
69 @ 2 draft b-A - f54f1bb90ff3
69 @ 2 draft b-A - f54f1bb90ff3
70 |
70 |
71 o 1 public a-B - 548a3d25dbf0
71 o 1 public a-B - 548a3d25dbf0
72 |
72 |
73 o 0 public a-A - 054250a37db4
73 o 0 public a-A - 054250a37db4
74
74
75 $ hg pull ../alpha
75 $ hg pull ../alpha
76 pulling from ../alpha
76 pulling from ../alpha
77 searching for changes
77 searching for changes
78 adding changesets
78 adding changesets
79 adding manifests
79 adding manifests
80 adding file changes
80 adding file changes
81 added 2 changesets with 2 changes to 2 files (+1 heads)
81 added 2 changesets with 2 changes to 2 files (+1 heads)
82 new changesets 54acac6f23ab:b555f63b6063
82 new changesets 54acac6f23ab:b555f63b6063
83 test-debug-phase: new rev 3: x -> 0
83 test-debug-phase: new rev 3: x -> 0
84 test-debug-phase: new rev 4: x -> 0
84 test-debug-phase: new rev 4: x -> 0
85 (run 'hg heads' to see heads, 'hg merge' to merge)
85 (run 'hg heads' to see heads, 'hg merge' to merge)
86 $ hgph
86 $ hgph
87 o 4 public a-D - b555f63b6063
87 o 4 public a-D - b555f63b6063
88 |
88 |
89 o 3 public a-C - 54acac6f23ab
89 o 3 public a-C - 54acac6f23ab
90 |
90 |
91 | @ 2 draft b-A - f54f1bb90ff3
91 | @ 2 draft b-A - f54f1bb90ff3
92 |/
92 |/
93 o 1 public a-B - 548a3d25dbf0
93 o 1 public a-B - 548a3d25dbf0
94 |
94 |
95 o 0 public a-A - 054250a37db4
95 o 0 public a-A - 054250a37db4
96
96
97
97
98 pull did not updated ../alpha state.
98 pull did not updated ../alpha state.
99 push from alpha to beta should update phase even if nothing is transferred
99 push from alpha to beta should update phase even if nothing is transferred
100
100
101 $ cd ../alpha
101 $ cd ../alpha
102 $ hgph # not updated by remote pull
102 $ hgph # not updated by remote pull
103 @ 3 draft a-D - b555f63b6063
103 @ 3 draft a-D - b555f63b6063
104 |
104 |
105 o 2 draft a-C - 54acac6f23ab
105 o 2 draft a-C - 54acac6f23ab
106 |
106 |
107 o 1 public a-B - 548a3d25dbf0
107 o 1 public a-B - 548a3d25dbf0
108 |
108 |
109 o 0 public a-A - 054250a37db4
109 o 0 public a-A - 054250a37db4
110
110
111 $ hg push -r 2 ../beta
111 $ hg push -r 2 ../beta
112 pushing to ../beta
112 pushing to ../beta
113 searching for changes
113 searching for changes
114 no changes found
114 no changes found
115 test-debug-phase: move rev 2: 1 -> 0
115 test-debug-phase: move rev 2: 1 -> 0
116 [1]
116 [1]
117 $ hgph
117 $ hgph
118 @ 3 draft a-D - b555f63b6063
118 @ 3 draft a-D - b555f63b6063
119 |
119 |
120 o 2 public a-C - 54acac6f23ab
120 o 2 public a-C - 54acac6f23ab
121 |
121 |
122 o 1 public a-B - 548a3d25dbf0
122 o 1 public a-B - 548a3d25dbf0
123 |
123 |
124 o 0 public a-A - 054250a37db4
124 o 0 public a-A - 054250a37db4
125
125
126 $ hg push ../beta
126 $ hg push ../beta
127 pushing to ../beta
127 pushing to ../beta
128 searching for changes
128 searching for changes
129 no changes found
129 no changes found
130 test-debug-phase: move rev 3: 1 -> 0
130 test-debug-phase: move rev 3: 1 -> 0
131 [1]
131 [1]
132 $ hgph
132 $ hgph
133 @ 3 public a-D - b555f63b6063
133 @ 3 public a-D - b555f63b6063
134 |
134 |
135 o 2 public a-C - 54acac6f23ab
135 o 2 public a-C - 54acac6f23ab
136 |
136 |
137 o 1 public a-B - 548a3d25dbf0
137 o 1 public a-B - 548a3d25dbf0
138 |
138 |
139 o 0 public a-A - 054250a37db4
139 o 0 public a-A - 054250a37db4
140
140
141
141
142 update must update phase of common changeset too
142 update must update phase of common changeset too
143
143
144 $ hg pull ../beta # getting b-A
144 $ hg pull ../beta # getting b-A
145 pulling from ../beta
145 pulling from ../beta
146 searching for changes
146 searching for changes
147 adding changesets
147 adding changesets
148 adding manifests
148 adding manifests
149 adding file changes
149 adding file changes
150 added 1 changesets with 1 changes to 1 files (+1 heads)
150 added 1 changesets with 1 changes to 1 files (+1 heads)
151 new changesets f54f1bb90ff3
151 new changesets f54f1bb90ff3
152 test-debug-phase: new rev 4: x -> 0
152 test-debug-phase: new rev 4: x -> 0
153 (run 'hg heads' to see heads, 'hg merge' to merge)
153 (run 'hg heads' to see heads, 'hg merge' to merge)
154
154
155 $ cd ../beta
155 $ cd ../beta
156 $ hgph # not updated by remote pull
156 $ hgph # not updated by remote pull
157 o 4 public a-D - b555f63b6063
157 o 4 public a-D - b555f63b6063
158 |
158 |
159 o 3 public a-C - 54acac6f23ab
159 o 3 public a-C - 54acac6f23ab
160 |
160 |
161 | @ 2 draft b-A - f54f1bb90ff3
161 | @ 2 draft b-A - f54f1bb90ff3
162 |/
162 |/
163 o 1 public a-B - 548a3d25dbf0
163 o 1 public a-B - 548a3d25dbf0
164 |
164 |
165 o 0 public a-A - 054250a37db4
165 o 0 public a-A - 054250a37db4
166
166
167 $ hg pull ../alpha
167 $ hg pull ../alpha
168 pulling from ../alpha
168 pulling from ../alpha
169 searching for changes
169 searching for changes
170 no changes found
170 no changes found
171 1 local changesets published
171 1 local changesets published
172 test-debug-phase: move rev 2: 1 -> 0
172 test-debug-phase: move rev 2: 1 -> 0
173 $ hgph
173 $ hgph
174 o 4 public a-D - b555f63b6063
174 o 4 public a-D - b555f63b6063
175 |
175 |
176 o 3 public a-C - 54acac6f23ab
176 o 3 public a-C - 54acac6f23ab
177 |
177 |
178 | @ 2 public b-A - f54f1bb90ff3
178 | @ 2 public b-A - f54f1bb90ff3
179 |/
179 |/
180 o 1 public a-B - 548a3d25dbf0
180 o 1 public a-B - 548a3d25dbf0
181 |
181 |
182 o 0 public a-A - 054250a37db4
182 o 0 public a-A - 054250a37db4
183
183
184
184
185 Publish configuration option
185 Publish configuration option
186 ----------------------------
186 ----------------------------
187
187
188 Pull
188 Pull
189 ````
189 ````
190
190
191 changegroup are added without phase movement
191 changegroup are added without phase movement
192
192
193 $ hg bundle -a ../base.bundle
193 $ hg bundle -a ../base.bundle
194 5 changesets found
194 5 changesets found
195 $ cd ..
195 $ cd ..
196 $ hg init mu
196 $ hg init mu
197 $ cd mu
197 $ cd mu
198 $ cat > .hg/hgrc << EOF
198 $ cat > .hg/hgrc << EOF
199 > [phases]
199 > [phases]
200 > publish=0
200 > publish=0
201 > EOF
201 > EOF
202 $ hg unbundle ../base.bundle
202 $ hg unbundle ../base.bundle
203 adding changesets
203 adding changesets
204 adding manifests
204 adding manifests
205 adding file changes
205 adding file changes
206 added 5 changesets with 5 changes to 5 files (+1 heads)
206 added 5 changesets with 5 changes to 5 files (+1 heads)
207 new changesets 054250a37db4:b555f63b6063
207 new changesets 054250a37db4:b555f63b6063
208 test-debug-phase: new rev 0: x -> 1
208 test-debug-phase: new rev 0: x -> 1
209 test-debug-phase: new rev 1: x -> 1
209 test-debug-phase: new rev 1: x -> 1
210 test-debug-phase: new rev 2: x -> 1
210 test-debug-phase: new rev 2: x -> 1
211 test-debug-phase: new rev 3: x -> 1
211 test-debug-phase: new rev 3: x -> 1
212 test-debug-phase: new rev 4: x -> 1
212 test-debug-phase: new rev 4: x -> 1
213 (run 'hg heads' to see heads, 'hg merge' to merge)
213 (run 'hg heads' to see heads, 'hg merge' to merge)
214 $ hgph
214 $ hgph
215 o 4 draft a-D - b555f63b6063
215 o 4 draft a-D - b555f63b6063
216 |
216 |
217 o 3 draft a-C - 54acac6f23ab
217 o 3 draft a-C - 54acac6f23ab
218 |
218 |
219 | o 2 draft b-A - f54f1bb90ff3
219 | o 2 draft b-A - f54f1bb90ff3
220 |/
220 |/
221 o 1 draft a-B - 548a3d25dbf0
221 o 1 draft a-B - 548a3d25dbf0
222 |
222 |
223 o 0 draft a-A - 054250a37db4
223 o 0 draft a-A - 054250a37db4
224
224
225 $ cd ..
225 $ cd ..
226
226
227 Pulling from publish=False to publish=False does not move boundary.
227 Pulling from publish=False to publish=False does not move boundary.
228
228
229 $ hg init nu
229 $ hg init nu
230 $ cd nu
230 $ cd nu
231 $ cat > .hg/hgrc << EOF
231 $ cat > .hg/hgrc << EOF
232 > [phases]
232 > [phases]
233 > publish=0
233 > publish=0
234 > EOF
234 > EOF
235 $ hg pull ../mu -r 54acac6f23ab
235 $ hg pull ../mu -r 54acac6f23ab
236 pulling from ../mu
236 pulling from ../mu
237 adding changesets
237 adding changesets
238 adding manifests
238 adding manifests
239 adding file changes
239 adding file changes
240 added 3 changesets with 3 changes to 3 files
240 added 3 changesets with 3 changes to 3 files
241 new changesets 054250a37db4:54acac6f23ab
241 new changesets 054250a37db4:54acac6f23ab
242 test-debug-phase: new rev 0: x -> 1
242 test-debug-phase: new rev 0: x -> 1
243 test-debug-phase: new rev 1: x -> 1
243 test-debug-phase: new rev 1: x -> 1
244 test-debug-phase: new rev 2: x -> 1
244 test-debug-phase: new rev 2: x -> 1
245 (run 'hg update' to get a working copy)
245 (run 'hg update' to get a working copy)
246 $ hgph
246 $ hgph
247 o 2 draft a-C - 54acac6f23ab
247 o 2 draft a-C - 54acac6f23ab
248 |
248 |
249 o 1 draft a-B - 548a3d25dbf0
249 o 1 draft a-B - 548a3d25dbf0
250 |
250 |
251 o 0 draft a-A - 054250a37db4
251 o 0 draft a-A - 054250a37db4
252
252
253
253
254 Even for common
254 Even for common
255
255
256 $ hg pull ../mu -r f54f1bb90ff3
256 $ hg pull ../mu -r f54f1bb90ff3
257 pulling from ../mu
257 pulling from ../mu
258 searching for changes
258 searching for changes
259 adding changesets
259 adding changesets
260 adding manifests
260 adding manifests
261 adding file changes
261 adding file changes
262 added 1 changesets with 1 changes to 1 files (+1 heads)
262 added 1 changesets with 1 changes to 1 files (+1 heads)
263 new changesets f54f1bb90ff3
263 new changesets f54f1bb90ff3
264 test-debug-phase: new rev 3: x -> 1
264 test-debug-phase: new rev 3: x -> 1
265 (run 'hg heads' to see heads, 'hg merge' to merge)
265 (run 'hg heads' to see heads, 'hg merge' to merge)
266 $ hgph
266 $ hgph
267 o 3 draft b-A - f54f1bb90ff3
267 o 3 draft b-A - f54f1bb90ff3
268 |
268 |
269 | o 2 draft a-C - 54acac6f23ab
269 | o 2 draft a-C - 54acac6f23ab
270 |/
270 |/
271 o 1 draft a-B - 548a3d25dbf0
271 o 1 draft a-B - 548a3d25dbf0
272 |
272 |
273 o 0 draft a-A - 054250a37db4
273 o 0 draft a-A - 054250a37db4
274
274
275
275
276
276
277 Pulling from Publish=True to Publish=False move boundary in common set.
277 Pulling from Publish=True to Publish=False move boundary in common set.
278 we are in nu
278 we are in nu
279
279
280 $ hg pull ../alpha -r b555f63b6063
280 $ hg pull ../alpha -r b555f63b6063
281 pulling from ../alpha
281 pulling from ../alpha
282 searching for changes
282 searching for changes
283 adding changesets
283 adding changesets
284 adding manifests
284 adding manifests
285 adding file changes
285 adding file changes
286 added 1 changesets with 1 changes to 1 files
286 added 1 changesets with 1 changes to 1 files
287 new changesets b555f63b6063
287 new changesets b555f63b6063
288 3 local changesets published
288 3 local changesets published
289 test-debug-phase: move rev 0: 1 -> 0
289 test-debug-phase: move rev 0: 1 -> 0
290 test-debug-phase: move rev 1: 1 -> 0
290 test-debug-phase: move rev 1: 1 -> 0
291 test-debug-phase: move rev 2: 1 -> 0
291 test-debug-phase: move rev 2: 1 -> 0
292 test-debug-phase: new rev 4: x -> 0
292 test-debug-phase: new rev 4: x -> 0
293 (run 'hg update' to get a working copy)
293 (run 'hg update' to get a working copy)
294 $ hgph # f54f1bb90ff3 stay draft, not ancestor of -r
294 $ hgph # f54f1bb90ff3 stay draft, not ancestor of -r
295 o 4 public a-D - b555f63b6063
295 o 4 public a-D - b555f63b6063
296 |
296 |
297 | o 3 draft b-A - f54f1bb90ff3
297 | o 3 draft b-A - f54f1bb90ff3
298 | |
298 | |
299 o | 2 public a-C - 54acac6f23ab
299 o | 2 public a-C - 54acac6f23ab
300 |/
300 |/
301 o 1 public a-B - 548a3d25dbf0
301 o 1 public a-B - 548a3d25dbf0
302 |
302 |
303 o 0 public a-A - 054250a37db4
303 o 0 public a-A - 054250a37db4
304
304
305
305
306 pulling from Publish=False to publish=False with some public
306 pulling from Publish=False to publish=False with some public
307
307
308 $ hg up -q f54f1bb90ff3
308 $ hg up -q f54f1bb90ff3
309 $ mkcommit n-A
309 $ mkcommit n-A
310 test-debug-phase: new rev 5: x -> 1
310 test-debug-phase: new rev 5: x -> 1
311 $ mkcommit n-B
311 $ mkcommit n-B
312 test-debug-phase: new rev 6: x -> 1
312 test-debug-phase: new rev 6: x -> 1
313 $ hgph
313 $ hgph
314 @ 6 draft n-B - 145e75495359
314 @ 6 draft n-B - 145e75495359
315 |
315 |
316 o 5 draft n-A - d6bcb4f74035
316 o 5 draft n-A - d6bcb4f74035
317 |
317 |
318 | o 4 public a-D - b555f63b6063
318 | o 4 public a-D - b555f63b6063
319 | |
319 | |
320 o | 3 draft b-A - f54f1bb90ff3
320 o | 3 draft b-A - f54f1bb90ff3
321 | |
321 | |
322 | o 2 public a-C - 54acac6f23ab
322 | o 2 public a-C - 54acac6f23ab
323 |/
323 |/
324 o 1 public a-B - 548a3d25dbf0
324 o 1 public a-B - 548a3d25dbf0
325 |
325 |
326 o 0 public a-A - 054250a37db4
326 o 0 public a-A - 054250a37db4
327
327
328 $ cd ../mu
328 $ cd ../mu
329 $ hg pull ../nu
329 $ hg pull ../nu
330 pulling from ../nu
330 pulling from ../nu
331 searching for changes
331 searching for changes
332 adding changesets
332 adding changesets
333 adding manifests
333 adding manifests
334 adding file changes
334 adding file changes
335 added 2 changesets with 2 changes to 2 files
335 added 2 changesets with 2 changes to 2 files
336 new changesets d6bcb4f74035:145e75495359
336 new changesets d6bcb4f74035:145e75495359
337 4 local changesets published
337 4 local changesets published
338 test-debug-phase: move rev 0: 1 -> 0
338 test-debug-phase: move rev 0: 1 -> 0
339 test-debug-phase: move rev 1: 1 -> 0
339 test-debug-phase: move rev 1: 1 -> 0
340 test-debug-phase: move rev 3: 1 -> 0
340 test-debug-phase: move rev 3: 1 -> 0
341 test-debug-phase: move rev 4: 1 -> 0
341 test-debug-phase: move rev 4: 1 -> 0
342 test-debug-phase: new rev 5: x -> 1
342 test-debug-phase: new rev 5: x -> 1
343 test-debug-phase: new rev 6: x -> 1
343 test-debug-phase: new rev 6: x -> 1
344 (run 'hg update' to get a working copy)
344 (run 'hg update' to get a working copy)
345 $ hgph
345 $ hgph
346 o 6 draft n-B - 145e75495359
346 o 6 draft n-B - 145e75495359
347 |
347 |
348 o 5 draft n-A - d6bcb4f74035
348 o 5 draft n-A - d6bcb4f74035
349 |
349 |
350 | o 4 public a-D - b555f63b6063
350 | o 4 public a-D - b555f63b6063
351 | |
351 | |
352 | o 3 public a-C - 54acac6f23ab
352 | o 3 public a-C - 54acac6f23ab
353 | |
353 | |
354 o | 2 draft b-A - f54f1bb90ff3
354 o | 2 draft b-A - f54f1bb90ff3
355 |/
355 |/
356 o 1 public a-B - 548a3d25dbf0
356 o 1 public a-B - 548a3d25dbf0
357 |
357 |
358 o 0 public a-A - 054250a37db4
358 o 0 public a-A - 054250a37db4
359
359
360 $ cd ..
360 $ cd ..
361
361
362 pulling into publish=True
362 pulling into publish=True
363
363
364 $ cd alpha
364 $ cd alpha
365 $ hgph
365 $ hgph
366 o 4 public b-A - f54f1bb90ff3
366 o 4 public b-A - f54f1bb90ff3
367 |
367 |
368 | @ 3 public a-D - b555f63b6063
368 | @ 3 public a-D - b555f63b6063
369 | |
369 | |
370 | o 2 public a-C - 54acac6f23ab
370 | o 2 public a-C - 54acac6f23ab
371 |/
371 |/
372 o 1 public a-B - 548a3d25dbf0
372 o 1 public a-B - 548a3d25dbf0
373 |
373 |
374 o 0 public a-A - 054250a37db4
374 o 0 public a-A - 054250a37db4
375
375
376 $ hg pull ../mu
376 $ hg pull ../mu
377 pulling from ../mu
377 pulling from ../mu
378 searching for changes
378 searching for changes
379 adding changesets
379 adding changesets
380 adding manifests
380 adding manifests
381 adding file changes
381 adding file changes
382 added 2 changesets with 2 changes to 2 files
382 added 2 changesets with 2 changes to 2 files
383 new changesets d6bcb4f74035:145e75495359
383 new changesets d6bcb4f74035:145e75495359
384 test-debug-phase: new rev 5: x -> 1
384 test-debug-phase: new rev 5: x -> 1
385 test-debug-phase: new rev 6: x -> 1
385 test-debug-phase: new rev 6: x -> 1
386 (run 'hg update' to get a working copy)
386 (run 'hg update' to get a working copy)
387 $ hgph
387 $ hgph
388 o 6 draft n-B - 145e75495359
388 o 6 draft n-B - 145e75495359
389 |
389 |
390 o 5 draft n-A - d6bcb4f74035
390 o 5 draft n-A - d6bcb4f74035
391 |
391 |
392 o 4 public b-A - f54f1bb90ff3
392 o 4 public b-A - f54f1bb90ff3
393 |
393 |
394 | @ 3 public a-D - b555f63b6063
394 | @ 3 public a-D - b555f63b6063
395 | |
395 | |
396 | o 2 public a-C - 54acac6f23ab
396 | o 2 public a-C - 54acac6f23ab
397 |/
397 |/
398 o 1 public a-B - 548a3d25dbf0
398 o 1 public a-B - 548a3d25dbf0
399 |
399 |
400 o 0 public a-A - 054250a37db4
400 o 0 public a-A - 054250a37db4
401
401
402 $ cd ..
402 $ cd ..
403
403
404 pulling back into original repo
404 pulling back into original repo
405
405
406 $ cd nu
406 $ cd nu
407 $ hg pull ../alpha
407 $ hg pull ../alpha
408 pulling from ../alpha
408 pulling from ../alpha
409 searching for changes
409 searching for changes
410 no changes found
410 no changes found
411 3 local changesets published
411 3 local changesets published
412 test-debug-phase: move rev 3: 1 -> 0
412 test-debug-phase: move rev 3: 1 -> 0
413 test-debug-phase: move rev 5: 1 -> 0
413 test-debug-phase: move rev 5: 1 -> 0
414 test-debug-phase: move rev 6: 1 -> 0
414 test-debug-phase: move rev 6: 1 -> 0
415 $ hgph
415 $ hgph
416 @ 6 public n-B - 145e75495359
416 @ 6 public n-B - 145e75495359
417 |
417 |
418 o 5 public n-A - d6bcb4f74035
418 o 5 public n-A - d6bcb4f74035
419 |
419 |
420 | o 4 public a-D - b555f63b6063
420 | o 4 public a-D - b555f63b6063
421 | |
421 | |
422 o | 3 public b-A - f54f1bb90ff3
422 o | 3 public b-A - f54f1bb90ff3
423 | |
423 | |
424 | o 2 public a-C - 54acac6f23ab
424 | o 2 public a-C - 54acac6f23ab
425 |/
425 |/
426 o 1 public a-B - 548a3d25dbf0
426 o 1 public a-B - 548a3d25dbf0
427 |
427 |
428 o 0 public a-A - 054250a37db4
428 o 0 public a-A - 054250a37db4
429
429
430
430
431 Push
431 Push
432 ````
432 ````
433
433
434 (inserted)
434 (inserted)
435
435
436 Test that phase are pushed even when they are nothing to pus
436 Test that phase are pushed even when they are nothing to pus
437 (this might be tested later bu are very convenient to not alter too much test)
437 (this might be tested later bu are very convenient to not alter too much test)
438
438
439 Push back to alpha
439 Push back to alpha
440
440
441 $ hg push ../alpha # from nu
441 $ hg push ../alpha # from nu
442 pushing to ../alpha
442 pushing to ../alpha
443 searching for changes
443 searching for changes
444 no changes found
444 no changes found
445 test-debug-phase: move rev 5: 1 -> 0
445 test-debug-phase: move rev 5: 1 -> 0
446 test-debug-phase: move rev 6: 1 -> 0
446 test-debug-phase: move rev 6: 1 -> 0
447 [1]
447 [1]
448 $ cd ..
448 $ cd ..
449 $ cd alpha
449 $ cd alpha
450 $ hgph
450 $ hgph
451 o 6 public n-B - 145e75495359
451 o 6 public n-B - 145e75495359
452 |
452 |
453 o 5 public n-A - d6bcb4f74035
453 o 5 public n-A - d6bcb4f74035
454 |
454 |
455 o 4 public b-A - f54f1bb90ff3
455 o 4 public b-A - f54f1bb90ff3
456 |
456 |
457 | @ 3 public a-D - b555f63b6063
457 | @ 3 public a-D - b555f63b6063
458 | |
458 | |
459 | o 2 public a-C - 54acac6f23ab
459 | o 2 public a-C - 54acac6f23ab
460 |/
460 |/
461 o 1 public a-B - 548a3d25dbf0
461 o 1 public a-B - 548a3d25dbf0
462 |
462 |
463 o 0 public a-A - 054250a37db4
463 o 0 public a-A - 054250a37db4
464
464
465
465
466 (end insertion)
466 (end insertion)
467
467
468
468
469 initial setup
469 initial setup
470
470
471 $ hg log -G # of alpha
471 $ hg log -G # of alpha
472 o changeset: 6:145e75495359
472 o changeset: 6:145e75495359
473 | tag: tip
473 | tag: tip
474 | user: test
474 | user: test
475 | date: Thu Jan 01 00:00:00 1970 +0000
475 | date: Thu Jan 01 00:00:00 1970 +0000
476 | summary: n-B
476 | summary: n-B
477 |
477 |
478 o changeset: 5:d6bcb4f74035
478 o changeset: 5:d6bcb4f74035
479 | user: test
479 | user: test
480 | date: Thu Jan 01 00:00:00 1970 +0000
480 | date: Thu Jan 01 00:00:00 1970 +0000
481 | summary: n-A
481 | summary: n-A
482 |
482 |
483 o changeset: 4:f54f1bb90ff3
483 o changeset: 4:f54f1bb90ff3
484 | parent: 1:548a3d25dbf0
484 | parent: 1:548a3d25dbf0
485 | user: test
485 | user: test
486 | date: Thu Jan 01 00:00:00 1970 +0000
486 | date: Thu Jan 01 00:00:00 1970 +0000
487 | summary: b-A
487 | summary: b-A
488 |
488 |
489 | @ changeset: 3:b555f63b6063
489 | @ changeset: 3:b555f63b6063
490 | | user: test
490 | | user: test
491 | | date: Thu Jan 01 00:00:00 1970 +0000
491 | | date: Thu Jan 01 00:00:00 1970 +0000
492 | | summary: a-D
492 | | summary: a-D
493 | |
493 | |
494 | o changeset: 2:54acac6f23ab
494 | o changeset: 2:54acac6f23ab
495 |/ user: test
495 |/ user: test
496 | date: Thu Jan 01 00:00:00 1970 +0000
496 | date: Thu Jan 01 00:00:00 1970 +0000
497 | summary: a-C
497 | summary: a-C
498 |
498 |
499 o changeset: 1:548a3d25dbf0
499 o changeset: 1:548a3d25dbf0
500 | user: test
500 | user: test
501 | date: Thu Jan 01 00:00:00 1970 +0000
501 | date: Thu Jan 01 00:00:00 1970 +0000
502 | summary: a-B
502 | summary: a-B
503 |
503 |
504 o changeset: 0:054250a37db4
504 o changeset: 0:054250a37db4
505 user: test
505 user: test
506 date: Thu Jan 01 00:00:00 1970 +0000
506 date: Thu Jan 01 00:00:00 1970 +0000
507 summary: a-A
507 summary: a-A
508
508
509 $ mkcommit a-E
509 $ mkcommit a-E
510 test-debug-phase: new rev 7: x -> 1
510 test-debug-phase: new rev 7: x -> 1
511 $ mkcommit a-F
511 $ mkcommit a-F
512 test-debug-phase: new rev 8: x -> 1
512 test-debug-phase: new rev 8: x -> 1
513 $ mkcommit a-G
513 $ mkcommit a-G
514 test-debug-phase: new rev 9: x -> 1
514 test-debug-phase: new rev 9: x -> 1
515 $ hg up d6bcb4f74035 -q
515 $ hg up d6bcb4f74035 -q
516 $ mkcommit a-H
516 $ mkcommit a-H
517 test-debug-phase: new rev 10: x -> 1
517 test-debug-phase: new rev 10: x -> 1
518 created new head
518 created new head
519 $ hgph
519 $ hgph
520 @ 10 draft a-H - 967b449fbc94
520 @ 10 draft a-H - 967b449fbc94
521 |
521 |
522 | o 9 draft a-G - 3e27b6f1eee1
522 | o 9 draft a-G - 3e27b6f1eee1
523 | |
523 | |
524 | o 8 draft a-F - b740e3e5c05d
524 | o 8 draft a-F - b740e3e5c05d
525 | |
525 | |
526 | o 7 draft a-E - e9f537e46dea
526 | o 7 draft a-E - e9f537e46dea
527 | |
527 | |
528 +---o 6 public n-B - 145e75495359
528 +---o 6 public n-B - 145e75495359
529 | |
529 | |
530 o | 5 public n-A - d6bcb4f74035
530 o | 5 public n-A - d6bcb4f74035
531 | |
531 | |
532 o | 4 public b-A - f54f1bb90ff3
532 o | 4 public b-A - f54f1bb90ff3
533 | |
533 | |
534 | o 3 public a-D - b555f63b6063
534 | o 3 public a-D - b555f63b6063
535 | |
535 | |
536 | o 2 public a-C - 54acac6f23ab
536 | o 2 public a-C - 54acac6f23ab
537 |/
537 |/
538 o 1 public a-B - 548a3d25dbf0
538 o 1 public a-B - 548a3d25dbf0
539 |
539 |
540 o 0 public a-A - 054250a37db4
540 o 0 public a-A - 054250a37db4
541
541
542
542
543 Pulling from bundle does not alter phases of changeset not present in the bundle
543 Pulling from bundle does not alter phases of changeset not present in the bundle
544
544
545 #if repobundlerepo
545 #if repobundlerepo
546 $ hg bundle --base 1 -r 6 -r 3 ../partial-bundle.hg
546 $ hg bundle --base 1 -r 6 -r 3 ../partial-bundle.hg
547 5 changesets found
547 5 changesets found
548 $ hg pull ../partial-bundle.hg
548 $ hg pull ../partial-bundle.hg
549 pulling from ../partial-bundle.hg
549 pulling from ../partial-bundle.hg
550 searching for changes
550 searching for changes
551 no changes found
551 no changes found
552 $ hgph
552 $ hgph
553 @ 10 draft a-H - 967b449fbc94
553 @ 10 draft a-H - 967b449fbc94
554 |
554 |
555 | o 9 draft a-G - 3e27b6f1eee1
555 | o 9 draft a-G - 3e27b6f1eee1
556 | |
556 | |
557 | o 8 draft a-F - b740e3e5c05d
557 | o 8 draft a-F - b740e3e5c05d
558 | |
558 | |
559 | o 7 draft a-E - e9f537e46dea
559 | o 7 draft a-E - e9f537e46dea
560 | |
560 | |
561 +---o 6 public n-B - 145e75495359
561 +---o 6 public n-B - 145e75495359
562 | |
562 | |
563 o | 5 public n-A - d6bcb4f74035
563 o | 5 public n-A - d6bcb4f74035
564 | |
564 | |
565 o | 4 public b-A - f54f1bb90ff3
565 o | 4 public b-A - f54f1bb90ff3
566 | |
566 | |
567 | o 3 public a-D - b555f63b6063
567 | o 3 public a-D - b555f63b6063
568 | |
568 | |
569 | o 2 public a-C - 54acac6f23ab
569 | o 2 public a-C - 54acac6f23ab
570 |/
570 |/
571 o 1 public a-B - 548a3d25dbf0
571 o 1 public a-B - 548a3d25dbf0
572 |
572 |
573 o 0 public a-A - 054250a37db4
573 o 0 public a-A - 054250a37db4
574
574
575 #endif
575 #endif
576
576
577 Pushing to Publish=False (unknown changeset)
577 Pushing to Publish=False (unknown changeset)
578
578
579 $ hg push ../mu -r b740e3e5c05d # a-F
579 $ hg push ../mu -r b740e3e5c05d # a-F
580 pushing to ../mu
580 pushing to ../mu
581 searching for changes
581 searching for changes
582 adding changesets
582 adding changesets
583 adding manifests
583 adding manifests
584 adding file changes
584 adding file changes
585 added 2 changesets with 2 changes to 2 files
585 added 2 changesets with 2 changes to 2 files
586 test-debug-phase: new rev 7: x -> 1
586 test-debug-phase: new rev 7: x -> 1
587 test-debug-phase: new rev 8: x -> 1
587 test-debug-phase: new rev 8: x -> 1
588 $ hgph
588 $ hgph
589 @ 10 draft a-H - 967b449fbc94
589 @ 10 draft a-H - 967b449fbc94
590 |
590 |
591 | o 9 draft a-G - 3e27b6f1eee1
591 | o 9 draft a-G - 3e27b6f1eee1
592 | |
592 | |
593 | o 8 draft a-F - b740e3e5c05d
593 | o 8 draft a-F - b740e3e5c05d
594 | |
594 | |
595 | o 7 draft a-E - e9f537e46dea
595 | o 7 draft a-E - e9f537e46dea
596 | |
596 | |
597 +---o 6 public n-B - 145e75495359
597 +---o 6 public n-B - 145e75495359
598 | |
598 | |
599 o | 5 public n-A - d6bcb4f74035
599 o | 5 public n-A - d6bcb4f74035
600 | |
600 | |
601 o | 4 public b-A - f54f1bb90ff3
601 o | 4 public b-A - f54f1bb90ff3
602 | |
602 | |
603 | o 3 public a-D - b555f63b6063
603 | o 3 public a-D - b555f63b6063
604 | |
604 | |
605 | o 2 public a-C - 54acac6f23ab
605 | o 2 public a-C - 54acac6f23ab
606 |/
606 |/
607 o 1 public a-B - 548a3d25dbf0
607 o 1 public a-B - 548a3d25dbf0
608 |
608 |
609 o 0 public a-A - 054250a37db4
609 o 0 public a-A - 054250a37db4
610
610
611
611
612 $ cd ../mu
612 $ cd ../mu
613 $ hgph # again f54f1bb90ff3, d6bcb4f74035 and 145e75495359 stay draft,
613 $ hgph # again f54f1bb90ff3, d6bcb4f74035 and 145e75495359 stay draft,
614 > # not ancestor of -r
614 > # not ancestor of -r
615 o 8 draft a-F - b740e3e5c05d
615 o 8 draft a-F - b740e3e5c05d
616 |
616 |
617 o 7 draft a-E - e9f537e46dea
617 o 7 draft a-E - e9f537e46dea
618 |
618 |
619 | o 6 draft n-B - 145e75495359
619 | o 6 draft n-B - 145e75495359
620 | |
620 | |
621 | o 5 draft n-A - d6bcb4f74035
621 | o 5 draft n-A - d6bcb4f74035
622 | |
622 | |
623 o | 4 public a-D - b555f63b6063
623 o | 4 public a-D - b555f63b6063
624 | |
624 | |
625 o | 3 public a-C - 54acac6f23ab
625 o | 3 public a-C - 54acac6f23ab
626 | |
626 | |
627 | o 2 draft b-A - f54f1bb90ff3
627 | o 2 draft b-A - f54f1bb90ff3
628 |/
628 |/
629 o 1 public a-B - 548a3d25dbf0
629 o 1 public a-B - 548a3d25dbf0
630 |
630 |
631 o 0 public a-A - 054250a37db4
631 o 0 public a-A - 054250a37db4
632
632
633
633
634 Pushing to Publish=True (unknown changeset)
634 Pushing to Publish=True (unknown changeset)
635
635
636 $ hg push ../beta -r b740e3e5c05d
636 $ hg push ../beta -r b740e3e5c05d
637 pushing to ../beta
637 pushing to ../beta
638 searching for changes
638 searching for changes
639 adding changesets
639 adding changesets
640 adding manifests
640 adding manifests
641 adding file changes
641 adding file changes
642 added 2 changesets with 2 changes to 2 files
642 added 2 changesets with 2 changes to 2 files
643 test-debug-phase: new rev 5: x -> 0
643 test-debug-phase: new rev 5: x -> 0
644 test-debug-phase: new rev 6: x -> 0
644 test-debug-phase: new rev 6: x -> 0
645 test-debug-phase: move rev 7: 1 -> 0
645 test-debug-phase: move rev 7: 1 -> 0
646 test-debug-phase: move rev 8: 1 -> 0
646 test-debug-phase: move rev 8: 1 -> 0
647 $ hgph # again f54f1bb90ff3, d6bcb4f74035 and 145e75495359 stay draft,
647 $ hgph # again f54f1bb90ff3, d6bcb4f74035 and 145e75495359 stay draft,
648 > # not ancestor of -r
648 > # not ancestor of -r
649 o 8 public a-F - b740e3e5c05d
649 o 8 public a-F - b740e3e5c05d
650 |
650 |
651 o 7 public a-E - e9f537e46dea
651 o 7 public a-E - e9f537e46dea
652 |
652 |
653 | o 6 draft n-B - 145e75495359
653 | o 6 draft n-B - 145e75495359
654 | |
654 | |
655 | o 5 draft n-A - d6bcb4f74035
655 | o 5 draft n-A - d6bcb4f74035
656 | |
656 | |
657 o | 4 public a-D - b555f63b6063
657 o | 4 public a-D - b555f63b6063
658 | |
658 | |
659 o | 3 public a-C - 54acac6f23ab
659 o | 3 public a-C - 54acac6f23ab
660 | |
660 | |
661 | o 2 draft b-A - f54f1bb90ff3
661 | o 2 draft b-A - f54f1bb90ff3
662 |/
662 |/
663 o 1 public a-B - 548a3d25dbf0
663 o 1 public a-B - 548a3d25dbf0
664 |
664 |
665 o 0 public a-A - 054250a37db4
665 o 0 public a-A - 054250a37db4
666
666
667
667
668 Pushing to Publish=True (common changeset)
668 Pushing to Publish=True (common changeset)
669
669
670 $ cd ../beta
670 $ cd ../beta
671 $ hg push ../alpha
671 $ hg push ../alpha
672 pushing to ../alpha
672 pushing to ../alpha
673 searching for changes
673 searching for changes
674 no changes found
674 no changes found
675 test-debug-phase: move rev 7: 1 -> 0
675 test-debug-phase: move rev 7: 1 -> 0
676 test-debug-phase: move rev 8: 1 -> 0
676 test-debug-phase: move rev 8: 1 -> 0
677 [1]
677 [1]
678 $ hgph
678 $ hgph
679 o 6 public a-F - b740e3e5c05d
679 o 6 public a-F - b740e3e5c05d
680 |
680 |
681 o 5 public a-E - e9f537e46dea
681 o 5 public a-E - e9f537e46dea
682 |
682 |
683 o 4 public a-D - b555f63b6063
683 o 4 public a-D - b555f63b6063
684 |
684 |
685 o 3 public a-C - 54acac6f23ab
685 o 3 public a-C - 54acac6f23ab
686 |
686 |
687 | @ 2 public b-A - f54f1bb90ff3
687 | @ 2 public b-A - f54f1bb90ff3
688 |/
688 |/
689 o 1 public a-B - 548a3d25dbf0
689 o 1 public a-B - 548a3d25dbf0
690 |
690 |
691 o 0 public a-A - 054250a37db4
691 o 0 public a-A - 054250a37db4
692
692
693 $ cd ../alpha
693 $ cd ../alpha
694 $ hgph
694 $ hgph
695 @ 10 draft a-H - 967b449fbc94
695 @ 10 draft a-H - 967b449fbc94
696 |
696 |
697 | o 9 draft a-G - 3e27b6f1eee1
697 | o 9 draft a-G - 3e27b6f1eee1
698 | |
698 | |
699 | o 8 public a-F - b740e3e5c05d
699 | o 8 public a-F - b740e3e5c05d
700 | |
700 | |
701 | o 7 public a-E - e9f537e46dea
701 | o 7 public a-E - e9f537e46dea
702 | |
702 | |
703 +---o 6 public n-B - 145e75495359
703 +---o 6 public n-B - 145e75495359
704 | |
704 | |
705 o | 5 public n-A - d6bcb4f74035
705 o | 5 public n-A - d6bcb4f74035
706 | |
706 | |
707 o | 4 public b-A - f54f1bb90ff3
707 o | 4 public b-A - f54f1bb90ff3
708 | |
708 | |
709 | o 3 public a-D - b555f63b6063
709 | o 3 public a-D - b555f63b6063
710 | |
710 | |
711 | o 2 public a-C - 54acac6f23ab
711 | o 2 public a-C - 54acac6f23ab
712 |/
712 |/
713 o 1 public a-B - 548a3d25dbf0
713 o 1 public a-B - 548a3d25dbf0
714 |
714 |
715 o 0 public a-A - 054250a37db4
715 o 0 public a-A - 054250a37db4
716
716
717
717
718 Pushing to Publish=False (common changeset that change phase + unknown one)
718 Pushing to Publish=False (common changeset that change phase + unknown one)
719
719
720 $ hg push ../mu -r 967b449fbc94 -f
720 $ hg push ../mu -r 967b449fbc94 -f
721 pushing to ../mu
721 pushing to ../mu
722 searching for changes
722 searching for changes
723 adding changesets
723 adding changesets
724 adding manifests
724 adding manifests
725 adding file changes
725 adding file changes
726 added 1 changesets with 1 changes to 1 files (+1 heads)
726 added 1 changesets with 1 changes to 1 files (+1 heads)
727 test-debug-phase: move rev 2: 1 -> 0
727 test-debug-phase: move rev 2: 1 -> 0
728 test-debug-phase: move rev 5: 1 -> 0
728 test-debug-phase: move rev 5: 1 -> 0
729 test-debug-phase: new rev 9: x -> 1
729 test-debug-phase: new rev 9: x -> 1
730 $ hgph
730 $ hgph
731 @ 10 draft a-H - 967b449fbc94
731 @ 10 draft a-H - 967b449fbc94
732 |
732 |
733 | o 9 draft a-G - 3e27b6f1eee1
733 | o 9 draft a-G - 3e27b6f1eee1
734 | |
734 | |
735 | o 8 public a-F - b740e3e5c05d
735 | o 8 public a-F - b740e3e5c05d
736 | |
736 | |
737 | o 7 public a-E - e9f537e46dea
737 | o 7 public a-E - e9f537e46dea
738 | |
738 | |
739 +---o 6 public n-B - 145e75495359
739 +---o 6 public n-B - 145e75495359
740 | |
740 | |
741 o | 5 public n-A - d6bcb4f74035
741 o | 5 public n-A - d6bcb4f74035
742 | |
742 | |
743 o | 4 public b-A - f54f1bb90ff3
743 o | 4 public b-A - f54f1bb90ff3
744 | |
744 | |
745 | o 3 public a-D - b555f63b6063
745 | o 3 public a-D - b555f63b6063
746 | |
746 | |
747 | o 2 public a-C - 54acac6f23ab
747 | o 2 public a-C - 54acac6f23ab
748 |/
748 |/
749 o 1 public a-B - 548a3d25dbf0
749 o 1 public a-B - 548a3d25dbf0
750 |
750 |
751 o 0 public a-A - 054250a37db4
751 o 0 public a-A - 054250a37db4
752
752
753 $ cd ../mu
753 $ cd ../mu
754 $ hgph # d6bcb4f74035 should have changed phase
754 $ hgph # d6bcb4f74035 should have changed phase
755 > # 145e75495359 is still draft. not ancestor of -r
755 > # 145e75495359 is still draft. not ancestor of -r
756 o 9 draft a-H - 967b449fbc94
756 o 9 draft a-H - 967b449fbc94
757 |
757 |
758 | o 8 public a-F - b740e3e5c05d
758 | o 8 public a-F - b740e3e5c05d
759 | |
759 | |
760 | o 7 public a-E - e9f537e46dea
760 | o 7 public a-E - e9f537e46dea
761 | |
761 | |
762 +---o 6 draft n-B - 145e75495359
762 +---o 6 draft n-B - 145e75495359
763 | |
763 | |
764 o | 5 public n-A - d6bcb4f74035
764 o | 5 public n-A - d6bcb4f74035
765 | |
765 | |
766 | o 4 public a-D - b555f63b6063
766 | o 4 public a-D - b555f63b6063
767 | |
767 | |
768 | o 3 public a-C - 54acac6f23ab
768 | o 3 public a-C - 54acac6f23ab
769 | |
769 | |
770 o | 2 public b-A - f54f1bb90ff3
770 o | 2 public b-A - f54f1bb90ff3
771 |/
771 |/
772 o 1 public a-B - 548a3d25dbf0
772 o 1 public a-B - 548a3d25dbf0
773 |
773 |
774 o 0 public a-A - 054250a37db4
774 o 0 public a-A - 054250a37db4
775
775
776
776
777
777
778 Pushing to Publish=True (common changeset from publish=False)
778 Pushing to Publish=True (common changeset from publish=False)
779
779
780 (in mu)
780 (in mu)
781 $ hg push ../alpha
781 $ hg push ../alpha
782 pushing to ../alpha
782 pushing to ../alpha
783 searching for changes
783 searching for changes
784 no changes found
784 no changes found
785 test-debug-phase: move rev 10: 1 -> 0
785 test-debug-phase: move rev 10: 1 -> 0
786 test-debug-phase: move rev 6: 1 -> 0
786 test-debug-phase: move rev 6: 1 -> 0
787 test-debug-phase: move rev 9: 1 -> 0
787 test-debug-phase: move rev 9: 1 -> 0
788 [1]
788 [1]
789 $ hgph
789 $ hgph
790 o 9 public a-H - 967b449fbc94
790 o 9 public a-H - 967b449fbc94
791 |
791 |
792 | o 8 public a-F - b740e3e5c05d
792 | o 8 public a-F - b740e3e5c05d
793 | |
793 | |
794 | o 7 public a-E - e9f537e46dea
794 | o 7 public a-E - e9f537e46dea
795 | |
795 | |
796 +---o 6 public n-B - 145e75495359
796 +---o 6 public n-B - 145e75495359
797 | |
797 | |
798 o | 5 public n-A - d6bcb4f74035
798 o | 5 public n-A - d6bcb4f74035
799 | |
799 | |
800 | o 4 public a-D - b555f63b6063
800 | o 4 public a-D - b555f63b6063
801 | |
801 | |
802 | o 3 public a-C - 54acac6f23ab
802 | o 3 public a-C - 54acac6f23ab
803 | |
803 | |
804 o | 2 public b-A - f54f1bb90ff3
804 o | 2 public b-A - f54f1bb90ff3
805 |/
805 |/
806 o 1 public a-B - 548a3d25dbf0
806 o 1 public a-B - 548a3d25dbf0
807 |
807 |
808 o 0 public a-A - 054250a37db4
808 o 0 public a-A - 054250a37db4
809
809
810 $ hgph -R ../alpha # a-H should have been synced to 0
810 $ hgph -R ../alpha # a-H should have been synced to 0
811 @ 10 public a-H - 967b449fbc94
811 @ 10 public a-H - 967b449fbc94
812 |
812 |
813 | o 9 draft a-G - 3e27b6f1eee1
813 | o 9 draft a-G - 3e27b6f1eee1
814 | |
814 | |
815 | o 8 public a-F - b740e3e5c05d
815 | o 8 public a-F - b740e3e5c05d
816 | |
816 | |
817 | o 7 public a-E - e9f537e46dea
817 | o 7 public a-E - e9f537e46dea
818 | |
818 | |
819 +---o 6 public n-B - 145e75495359
819 +---o 6 public n-B - 145e75495359
820 | |
820 | |
821 o | 5 public n-A - d6bcb4f74035
821 o | 5 public n-A - d6bcb4f74035
822 | |
822 | |
823 o | 4 public b-A - f54f1bb90ff3
823 o | 4 public b-A - f54f1bb90ff3
824 | |
824 | |
825 | o 3 public a-D - b555f63b6063
825 | o 3 public a-D - b555f63b6063
826 | |
826 | |
827 | o 2 public a-C - 54acac6f23ab
827 | o 2 public a-C - 54acac6f23ab
828 |/
828 |/
829 o 1 public a-B - 548a3d25dbf0
829 o 1 public a-B - 548a3d25dbf0
830 |
830 |
831 o 0 public a-A - 054250a37db4
831 o 0 public a-A - 054250a37db4
832
832
833
833
834
834
835 Bare push with next changeset and common changeset needing sync (issue3575)
835 Bare push with next changeset and common changeset needing sync (issue3575)
836
836
837 (reset some stat on remote repo to avoid confusing other tests)
837 (reset some stat on remote repo to avoid confusing other tests)
838
838
839 $ hg -R ../alpha --config extensions.strip= strip --no-backup 967b449fbc94
839 $ hg -R ../alpha --config extensions.strip= strip --no-backup 967b449fbc94
840 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
840 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
841 $ hg phase --force --draft b740e3e5c05d 967b449fbc94
841 $ hg phase --force --draft b740e3e5c05d 967b449fbc94
842 test-debug-phase: move rev 8: 0 -> 1
842 test-debug-phase: move rev 8: 0 -> 1
843 test-debug-phase: move rev 9: 0 -> 1
843 test-debug-phase: move rev 9: 0 -> 1
844 $ hg push -fv ../alpha
844 $ hg push -fv ../alpha
845 pushing to ../alpha
845 pushing to ../alpha
846 searching for changes
846 searching for changes
847 1 changesets found
847 1 changesets found
848 uncompressed size of bundle content:
848 uncompressed size of bundle content:
849 178 (changelog)
849 178 (changelog)
850 165 (manifests)
850 165 (manifests)
851 131 a-H
851 131 a-H
852 adding changesets
852 adding changesets
853 adding manifests
853 adding manifests
854 adding file changes
854 adding file changes
855 added 1 changesets with 1 changes to 1 files (+1 heads)
855 added 1 changesets with 1 changes to 1 files (+1 heads)
856 test-debug-phase: new rev 10: x -> 0
856 test-debug-phase: new rev 10: x -> 0
857 test-debug-phase: move rev 8: 1 -> 0
857 test-debug-phase: move rev 8: 1 -> 0
858 test-debug-phase: move rev 9: 1 -> 0
858 test-debug-phase: move rev 9: 1 -> 0
859 $ hgph
859 $ hgph
860 o 9 public a-H - 967b449fbc94
860 o 9 public a-H - 967b449fbc94
861 |
861 |
862 | o 8 public a-F - b740e3e5c05d
862 | o 8 public a-F - b740e3e5c05d
863 | |
863 | |
864 | o 7 public a-E - e9f537e46dea
864 | o 7 public a-E - e9f537e46dea
865 | |
865 | |
866 +---o 6 public n-B - 145e75495359
866 +---o 6 public n-B - 145e75495359
867 | |
867 | |
868 o | 5 public n-A - d6bcb4f74035
868 o | 5 public n-A - d6bcb4f74035
869 | |
869 | |
870 | o 4 public a-D - b555f63b6063
870 | o 4 public a-D - b555f63b6063
871 | |
871 | |
872 | o 3 public a-C - 54acac6f23ab
872 | o 3 public a-C - 54acac6f23ab
873 | |
873 | |
874 o | 2 public b-A - f54f1bb90ff3
874 o | 2 public b-A - f54f1bb90ff3
875 |/
875 |/
876 o 1 public a-B - 548a3d25dbf0
876 o 1 public a-B - 548a3d25dbf0
877 |
877 |
878 o 0 public a-A - 054250a37db4
878 o 0 public a-A - 054250a37db4
879
879
880
880
881 $ hg -R ../alpha update 967b449fbc94 #for latter test consistency
881 $ hg -R ../alpha update 967b449fbc94 #for latter test consistency
882 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
882 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
883 $ hgph -R ../alpha
883 $ hgph -R ../alpha
884 @ 10 public a-H - 967b449fbc94
884 @ 10 public a-H - 967b449fbc94
885 |
885 |
886 | o 9 draft a-G - 3e27b6f1eee1
886 | o 9 draft a-G - 3e27b6f1eee1
887 | |
887 | |
888 | o 8 public a-F - b740e3e5c05d
888 | o 8 public a-F - b740e3e5c05d
889 | |
889 | |
890 | o 7 public a-E - e9f537e46dea
890 | o 7 public a-E - e9f537e46dea
891 | |
891 | |
892 +---o 6 public n-B - 145e75495359
892 +---o 6 public n-B - 145e75495359
893 | |
893 | |
894 o | 5 public n-A - d6bcb4f74035
894 o | 5 public n-A - d6bcb4f74035
895 | |
895 | |
896 o | 4 public b-A - f54f1bb90ff3
896 o | 4 public b-A - f54f1bb90ff3
897 | |
897 | |
898 | o 3 public a-D - b555f63b6063
898 | o 3 public a-D - b555f63b6063
899 | |
899 | |
900 | o 2 public a-C - 54acac6f23ab
900 | o 2 public a-C - 54acac6f23ab
901 |/
901 |/
902 o 1 public a-B - 548a3d25dbf0
902 o 1 public a-B - 548a3d25dbf0
903 |
903 |
904 o 0 public a-A - 054250a37db4
904 o 0 public a-A - 054250a37db4
905
905
906
906
907 Discovery locally secret changeset on a remote repository:
907 Discovery locally secret changeset on a remote repository:
908
908
909 - should make it non-secret
909 - should make it non-secret
910
910
911 $ cd ../alpha
911 $ cd ../alpha
912 $ mkcommit A-secret --config phases.new-commit=2
912 $ mkcommit A-secret --config phases.new-commit=2
913 test-debug-phase: new rev 11: x -> 2
913 test-debug-phase: new rev 11: x -> 2
914 $ hgph
914 $ hgph
915 @ 11 secret A-secret - 435b5d83910c
915 @ 11 secret A-secret - 435b5d83910c
916 |
916 |
917 o 10 public a-H - 967b449fbc94
917 o 10 public a-H - 967b449fbc94
918 |
918 |
919 | o 9 draft a-G - 3e27b6f1eee1
919 | o 9 draft a-G - 3e27b6f1eee1
920 | |
920 | |
921 | o 8 public a-F - b740e3e5c05d
921 | o 8 public a-F - b740e3e5c05d
922 | |
922 | |
923 | o 7 public a-E - e9f537e46dea
923 | o 7 public a-E - e9f537e46dea
924 | |
924 | |
925 +---o 6 public n-B - 145e75495359
925 +---o 6 public n-B - 145e75495359
926 | |
926 | |
927 o | 5 public n-A - d6bcb4f74035
927 o | 5 public n-A - d6bcb4f74035
928 | |
928 | |
929 o | 4 public b-A - f54f1bb90ff3
929 o | 4 public b-A - f54f1bb90ff3
930 | |
930 | |
931 | o 3 public a-D - b555f63b6063
931 | o 3 public a-D - b555f63b6063
932 | |
932 | |
933 | o 2 public a-C - 54acac6f23ab
933 | o 2 public a-C - 54acac6f23ab
934 |/
934 |/
935 o 1 public a-B - 548a3d25dbf0
935 o 1 public a-B - 548a3d25dbf0
936 |
936 |
937 o 0 public a-A - 054250a37db4
937 o 0 public a-A - 054250a37db4
938
938
939 $ hg bundle --base 'parents(.)' -r . ../secret-bundle.hg
939 $ hg bundle --base 'parents(.)' -r . ../secret-bundle.hg
940 1 changesets found
940 1 changesets found
941 $ hg -R ../mu unbundle ../secret-bundle.hg
941 $ hg -R ../mu unbundle ../secret-bundle.hg
942 adding changesets
942 adding changesets
943 adding manifests
943 adding manifests
944 adding file changes
944 adding file changes
945 added 1 changesets with 1 changes to 1 files
945 added 1 changesets with 1 changes to 1 files
946 new changesets 435b5d83910c
946 new changesets 435b5d83910c
947 test-debug-phase: new rev 10: x -> 1
947 test-debug-phase: new rev 10: x -> 1
948 (run 'hg update' to get a working copy)
948 (run 'hg update' to get a working copy)
949 $ hgph -R ../mu
949 $ hgph -R ../mu
950 o 10 draft A-secret - 435b5d83910c
950 o 10 draft A-secret - 435b5d83910c
951 |
951 |
952 o 9 public a-H - 967b449fbc94
952 o 9 public a-H - 967b449fbc94
953 |
953 |
954 | o 8 public a-F - b740e3e5c05d
954 | o 8 public a-F - b740e3e5c05d
955 | |
955 | |
956 | o 7 public a-E - e9f537e46dea
956 | o 7 public a-E - e9f537e46dea
957 | |
957 | |
958 +---o 6 public n-B - 145e75495359
958 +---o 6 public n-B - 145e75495359
959 | |
959 | |
960 o | 5 public n-A - d6bcb4f74035
960 o | 5 public n-A - d6bcb4f74035
961 | |
961 | |
962 | o 4 public a-D - b555f63b6063
962 | o 4 public a-D - b555f63b6063
963 | |
963 | |
964 | o 3 public a-C - 54acac6f23ab
964 | o 3 public a-C - 54acac6f23ab
965 | |
965 | |
966 o | 2 public b-A - f54f1bb90ff3
966 o | 2 public b-A - f54f1bb90ff3
967 |/
967 |/
968 o 1 public a-B - 548a3d25dbf0
968 o 1 public a-B - 548a3d25dbf0
969 |
969 |
970 o 0 public a-A - 054250a37db4
970 o 0 public a-A - 054250a37db4
971
971
972 $ hg pull ../mu
972 $ hg pull ../mu
973 pulling from ../mu
973 pulling from ../mu
974 searching for changes
974 searching for changes
975 no changes found
975 no changes found
976 test-debug-phase: move rev 11: 2 -> 1
976 test-debug-phase: move rev 11: 2 -> 1
977 $ hgph
977 $ hgph
978 @ 11 draft A-secret - 435b5d83910c
978 @ 11 draft A-secret - 435b5d83910c
979 |
979 |
980 o 10 public a-H - 967b449fbc94
980 o 10 public a-H - 967b449fbc94
981 |
981 |
982 | o 9 draft a-G - 3e27b6f1eee1
982 | o 9 draft a-G - 3e27b6f1eee1
983 | |
983 | |
984 | o 8 public a-F - b740e3e5c05d
984 | o 8 public a-F - b740e3e5c05d
985 | |
985 | |
986 | o 7 public a-E - e9f537e46dea
986 | o 7 public a-E - e9f537e46dea
987 | |
987 | |
988 +---o 6 public n-B - 145e75495359
988 +---o 6 public n-B - 145e75495359
989 | |
989 | |
990 o | 5 public n-A - d6bcb4f74035
990 o | 5 public n-A - d6bcb4f74035
991 | |
991 | |
992 o | 4 public b-A - f54f1bb90ff3
992 o | 4 public b-A - f54f1bb90ff3
993 | |
993 | |
994 | o 3 public a-D - b555f63b6063
994 | o 3 public a-D - b555f63b6063
995 | |
995 | |
996 | o 2 public a-C - 54acac6f23ab
996 | o 2 public a-C - 54acac6f23ab
997 |/
997 |/
998 o 1 public a-B - 548a3d25dbf0
998 o 1 public a-B - 548a3d25dbf0
999 |
999 |
1000 o 0 public a-A - 054250a37db4
1000 o 0 public a-A - 054250a37db4
1001
1001
1002
1002
1003 pushing a locally public and draft changesets remotely secret should make them
1003 pushing a locally public and draft changesets remotely secret should make them
1004 appear on the remote side.
1004 appear on the remote side.
1005
1005
1006 $ hg -R ../mu phase --secret --force 967b449fbc94
1006 $ hg -R ../mu phase --secret --force 967b449fbc94
1007 test-debug-phase: move rev 9: 0 -> 2
1007 test-debug-phase: move rev 9: 0 -> 2
1008 test-debug-phase: move rev 10: 1 -> 2
1008 test-debug-phase: move rev 10: 1 -> 2
1009 $ hg push -r 435b5d83910c ../mu
1009 $ hg push -r 435b5d83910c ../mu
1010 pushing to ../mu
1010 pushing to ../mu
1011 searching for changes
1011 searching for changes
1012 abort: push creates new remote head 435b5d83910c!
1012 abort: push creates new remote head 435b5d83910c!
1013 (merge or see 'hg help push' for details about pushing new heads)
1013 (merge or see 'hg help push' for details about pushing new heads)
1014 [255]
1014 [255]
1015 $ hg push -fr 435b5d83910c ../mu # because the push will create new visible head
1015 $ hg push -fr 435b5d83910c ../mu # because the push will create new visible head
1016 pushing to ../mu
1016 pushing to ../mu
1017 searching for changes
1017 searching for changes
1018 adding changesets
1018 adding changesets
1019 adding manifests
1019 adding manifests
1020 adding file changes
1020 adding file changes
1021 added 0 changesets with 0 changes to 2 files
1021 added 0 changesets with 0 changes to 2 files
1022 test-debug-phase: move rev 9: 2 -> 0
1022 test-debug-phase: move rev 9: 2 -> 0
1023 test-debug-phase: move rev 10: 2 -> 1
1023 test-debug-phase: move rev 10: 2 -> 1
1024 $ hgph -R ../mu
1024 $ hgph -R ../mu
1025 o 10 draft A-secret - 435b5d83910c
1025 o 10 draft A-secret - 435b5d83910c
1026 |
1026 |
1027 o 9 public a-H - 967b449fbc94
1027 o 9 public a-H - 967b449fbc94
1028 |
1028 |
1029 | o 8 public a-F - b740e3e5c05d
1029 | o 8 public a-F - b740e3e5c05d
1030 | |
1030 | |
1031 | o 7 public a-E - e9f537e46dea
1031 | o 7 public a-E - e9f537e46dea
1032 | |
1032 | |
1033 +---o 6 public n-B - 145e75495359
1033 +---o 6 public n-B - 145e75495359
1034 | |
1034 | |
1035 o | 5 public n-A - d6bcb4f74035
1035 o | 5 public n-A - d6bcb4f74035
1036 | |
1036 | |
1037 | o 4 public a-D - b555f63b6063
1037 | o 4 public a-D - b555f63b6063
1038 | |
1038 | |
1039 | o 3 public a-C - 54acac6f23ab
1039 | o 3 public a-C - 54acac6f23ab
1040 | |
1040 | |
1041 o | 2 public b-A - f54f1bb90ff3
1041 o | 2 public b-A - f54f1bb90ff3
1042 |/
1042 |/
1043 o 1 public a-B - 548a3d25dbf0
1043 o 1 public a-B - 548a3d25dbf0
1044 |
1044 |
1045 o 0 public a-A - 054250a37db4
1045 o 0 public a-A - 054250a37db4
1046
1046
1047
1047
1048 pull new changeset with common draft locally
1048 pull new changeset with common draft locally
1049
1049
1050 $ hg up -q 967b449fbc94 # create a new root for draft
1050 $ hg up -q 967b449fbc94 # create a new root for draft
1051 $ mkcommit 'alpha-more'
1051 $ mkcommit 'alpha-more'
1052 test-debug-phase: new rev 12: x -> 1
1052 test-debug-phase: new rev 12: x -> 1
1053 created new head
1053 created new head
1054 $ hg push -fr . ../mu
1054 $ hg push -fr . ../mu
1055 pushing to ../mu
1055 pushing to ../mu
1056 searching for changes
1056 searching for changes
1057 adding changesets
1057 adding changesets
1058 adding manifests
1058 adding manifests
1059 adding file changes
1059 adding file changes
1060 added 1 changesets with 1 changes to 1 files (+1 heads)
1060 added 1 changesets with 1 changes to 1 files (+1 heads)
1061 test-debug-phase: new rev 11: x -> 1
1061 test-debug-phase: new rev 11: x -> 1
1062 $ cd ../mu
1062 $ cd ../mu
1063 $ hg phase --secret --force 1c5cfd894796
1063 $ hg phase --secret --force 1c5cfd894796
1064 test-debug-phase: move rev 11: 1 -> 2
1064 test-debug-phase: move rev 11: 1 -> 2
1065 $ hg up -q 435b5d83910c
1065 $ hg up -q 435b5d83910c
1066 $ mkcommit 'mu-more'
1066 $ mkcommit 'mu-more'
1067 test-debug-phase: new rev 12: x -> 1
1067 test-debug-phase: new rev 12: x -> 1
1068 $ cd ../alpha
1068 $ cd ../alpha
1069 $ hg pull ../mu
1069 $ hg pull ../mu
1070 pulling from ../mu
1070 pulling from ../mu
1071 searching for changes
1071 searching for changes
1072 adding changesets
1072 adding changesets
1073 adding manifests
1073 adding manifests
1074 adding file changes
1074 adding file changes
1075 added 1 changesets with 1 changes to 1 files
1075 added 1 changesets with 1 changes to 1 files
1076 new changesets 5237fb433fc8
1076 new changesets 5237fb433fc8
1077 test-debug-phase: new rev 13: x -> 1
1077 test-debug-phase: new rev 13: x -> 1
1078 (run 'hg update' to get a working copy)
1078 (run 'hg update' to get a working copy)
1079 $ hgph
1079 $ hgph
1080 o 13 draft mu-more - 5237fb433fc8
1080 o 13 draft mu-more - 5237fb433fc8
1081 |
1081 |
1082 | @ 12 draft alpha-more - 1c5cfd894796
1082 | @ 12 draft alpha-more - 1c5cfd894796
1083 | |
1083 | |
1084 o | 11 draft A-secret - 435b5d83910c
1084 o | 11 draft A-secret - 435b5d83910c
1085 |/
1085 |/
1086 o 10 public a-H - 967b449fbc94
1086 o 10 public a-H - 967b449fbc94
1087 |
1087 |
1088 | o 9 draft a-G - 3e27b6f1eee1
1088 | o 9 draft a-G - 3e27b6f1eee1
1089 | |
1089 | |
1090 | o 8 public a-F - b740e3e5c05d
1090 | o 8 public a-F - b740e3e5c05d
1091 | |
1091 | |
1092 | o 7 public a-E - e9f537e46dea
1092 | o 7 public a-E - e9f537e46dea
1093 | |
1093 | |
1094 +---o 6 public n-B - 145e75495359
1094 +---o 6 public n-B - 145e75495359
1095 | |
1095 | |
1096 o | 5 public n-A - d6bcb4f74035
1096 o | 5 public n-A - d6bcb4f74035
1097 | |
1097 | |
1098 o | 4 public b-A - f54f1bb90ff3
1098 o | 4 public b-A - f54f1bb90ff3
1099 | |
1099 | |
1100 | o 3 public a-D - b555f63b6063
1100 | o 3 public a-D - b555f63b6063
1101 | |
1101 | |
1102 | o 2 public a-C - 54acac6f23ab
1102 | o 2 public a-C - 54acac6f23ab
1103 |/
1103 |/
1104 o 1 public a-B - 548a3d25dbf0
1104 o 1 public a-B - 548a3d25dbf0
1105 |
1105 |
1106 o 0 public a-A - 054250a37db4
1106 o 0 public a-A - 054250a37db4
1107
1107
1108
1108
1109 Test that test are properly ignored on remote event when existing locally
1109 Test that test are properly ignored on remote event when existing locally
1110
1110
1111 $ cd ..
1111 $ cd ..
1112 $ hg clone -qU -r b555f63b6063 -r f54f1bb90ff3 beta gamma
1112 $ hg clone -qU -r b555f63b6063 -r f54f1bb90ff3 beta gamma
1113 test-debug-phase: new rev 0: x -> 0
1113 test-debug-phase: new rev 0: x -> 0
1114 test-debug-phase: new rev 1: x -> 0
1114 test-debug-phase: new rev 1: x -> 0
1115 test-debug-phase: new rev 2: x -> 0
1115 test-debug-phase: new rev 2: x -> 0
1116 test-debug-phase: new rev 3: x -> 0
1116 test-debug-phase: new rev 3: x -> 0
1117 test-debug-phase: new rev 4: x -> 0
1117 test-debug-phase: new rev 4: x -> 0
1118
1118
1119 # pathological case are
1119 # pathological case are
1120 #
1120 #
1121 # * secret remotely
1121 # * secret remotely
1122 # * known locally
1122 # * known locally
1123 # * repo have uncommon changeset
1123 # * repo have uncommon changeset
1124
1124
1125 $ hg -R beta phase --secret --force f54f1bb90ff3
1125 $ hg -R beta phase --secret --force f54f1bb90ff3
1126 test-debug-phase: move rev 2: 0 -> 2
1126 test-debug-phase: move rev 2: 0 -> 2
1127 $ hg -R gamma phase --draft --force f54f1bb90ff3
1127 $ hg -R gamma phase --draft --force f54f1bb90ff3
1128 test-debug-phase: move rev 2: 0 -> 1
1128 test-debug-phase: move rev 2: 0 -> 1
1129
1129
1130 $ cd gamma
1130 $ cd gamma
1131 $ hg pull ../beta
1131 $ hg pull ../beta
1132 pulling from ../beta
1132 pulling from ../beta
1133 searching for changes
1133 searching for changes
1134 adding changesets
1134 adding changesets
1135 adding manifests
1135 adding manifests
1136 adding file changes
1136 adding file changes
1137 added 2 changesets with 2 changes to 2 files
1137 added 2 changesets with 2 changes to 2 files
1138 new changesets e9f537e46dea:b740e3e5c05d
1138 new changesets e9f537e46dea:b740e3e5c05d
1139 test-debug-phase: new rev 5: x -> 0
1139 test-debug-phase: new rev 5: x -> 0
1140 test-debug-phase: new rev 6: x -> 0
1140 test-debug-phase: new rev 6: x -> 0
1141 (run 'hg update' to get a working copy)
1141 (run 'hg update' to get a working copy)
1142 $ hg phase f54f1bb90ff3
1142 $ hg phase f54f1bb90ff3
1143 2: draft
1143 2: draft
1144
1144
1145 same over the wire
1145 same over the wire
1146
1146
1147 $ cd ../beta
1147 $ cd ../beta
1148 $ hg serve -p $HGPORT -d --pid-file=../beta.pid -E ../beta-error.log
1148 $ hg serve -p $HGPORT -d --pid-file=../beta.pid -E ../beta-error.log
1149 $ cat ../beta.pid >> $DAEMON_PIDS
1149 $ cat ../beta.pid >> $DAEMON_PIDS
1150 $ cd ../gamma
1150 $ cd ../gamma
1151
1151
1152 $ hg pull http://localhost:$HGPORT/ # bundle2+
1152 $ hg pull http://localhost:$HGPORT/ # bundle2+
1153 pulling from http://localhost:$HGPORT/
1153 pulling from http://localhost:$HGPORT/
1154 searching for changes
1154 searching for changes
1155 no changes found
1155 no changes found
1156 $ hg phase f54f1bb90ff3
1156 $ hg phase f54f1bb90ff3
1157 2: draft
1157 2: draft
1158
1158
1159 enforce bundle1
1159 enforce bundle1
1160
1160
1161 $ hg pull http://localhost:$HGPORT/ --config devel.legacy.exchange=bundle1
1161 $ hg pull http://localhost:$HGPORT/ --config devel.legacy.exchange=bundle1
1162 pulling from http://localhost:$HGPORT/
1162 pulling from http://localhost:$HGPORT/
1163 searching for changes
1163 searching for changes
1164 no changes found
1164 no changes found
1165 $ hg phase f54f1bb90ff3
1165 $ hg phase f54f1bb90ff3
1166 2: draft
1166 2: draft
1167
1167
1168 check that secret local on both side are not synced to public
1168 check that secret local on both side are not synced to public
1169
1169
1170 $ hg push -r b555f63b6063 http://localhost:$HGPORT/
1170 $ hg push -r b555f63b6063 http://localhost:$HGPORT/
1171 pushing to http://localhost:$HGPORT/
1171 pushing to http://localhost:$HGPORT/
1172 searching for changes
1172 searching for changes
1173 no changes found
1173 no changes found
1174 [1]
1174 [1]
1175 $ hg phase f54f1bb90ff3
1175 $ hg phase f54f1bb90ff3
1176 2: draft
1176 2: draft
1177
1177
1178 $ killdaemons.py
1178 $ killdaemons.py
1179
1179
1180 put the changeset in the draft state again
1180 put the changeset in the draft state again
1181 (first test after this one expect to be able to copy)
1181 (first test after this one expect to be able to copy)
1182
1182
1183 $ cd ..
1183 $ cd ..
1184
1184
1185
1185
1186 Test Clone behavior
1186 Test Clone behavior
1187
1187
1188 A. Clone without secret changeset
1188 A. Clone without secret changeset
1189
1189
1190 1. cloning non-publishing repository
1190 1. cloning non-publishing repository
1191 (Phase should be preserved)
1191 (Phase should be preserved)
1192
1192
1193 # make sure there is no secret so we can use a copy clone
1193 # make sure there is no secret so we can use a copy clone
1194
1194
1195 $ hg -R mu phase --draft 'secret()'
1195 $ hg -R mu phase --draft 'secret()'
1196 test-debug-phase: move rev 11: 2 -> 1
1196 test-debug-phase: move rev 11: 2 -> 1
1197
1197
1198 $ hg clone -U mu Tau
1198 $ hg clone -U mu Tau
1199 $ hgph -R Tau
1199 $ hgph -R Tau
1200 o 12 draft mu-more - 5237fb433fc8
1200 o 12 draft mu-more - 5237fb433fc8
1201 |
1201 |
1202 | o 11 draft alpha-more - 1c5cfd894796
1202 | o 11 draft alpha-more - 1c5cfd894796
1203 | |
1203 | |
1204 o | 10 draft A-secret - 435b5d83910c
1204 o | 10 draft A-secret - 435b5d83910c
1205 |/
1205 |/
1206 o 9 public a-H - 967b449fbc94
1206 o 9 public a-H - 967b449fbc94
1207 |
1207 |
1208 | o 8 public a-F - b740e3e5c05d
1208 | o 8 public a-F - b740e3e5c05d
1209 | |
1209 | |
1210 | o 7 public a-E - e9f537e46dea
1210 | o 7 public a-E - e9f537e46dea
1211 | |
1211 | |
1212 +---o 6 public n-B - 145e75495359
1212 +---o 6 public n-B - 145e75495359
1213 | |
1213 | |
1214 o | 5 public n-A - d6bcb4f74035
1214 o | 5 public n-A - d6bcb4f74035
1215 | |
1215 | |
1216 | o 4 public a-D - b555f63b6063
1216 | o 4 public a-D - b555f63b6063
1217 | |
1217 | |
1218 | o 3 public a-C - 54acac6f23ab
1218 | o 3 public a-C - 54acac6f23ab
1219 | |
1219 | |
1220 o | 2 public b-A - f54f1bb90ff3
1220 o | 2 public b-A - f54f1bb90ff3
1221 |/
1221 |/
1222 o 1 public a-B - 548a3d25dbf0
1222 o 1 public a-B - 548a3d25dbf0
1223 |
1223 |
1224 o 0 public a-A - 054250a37db4
1224 o 0 public a-A - 054250a37db4
1225
1225
1226
1226
1227 2. cloning publishing repository
1227 2. cloning publishing repository
1228
1228
1229 (everything should be public)
1229 (everything should be public)
1230
1230
1231 $ hg clone -U alpha Upsilon
1231 $ hg clone -U alpha Upsilon
1232 $ hgph -R Upsilon
1232 $ hgph -R Upsilon
1233 o 13 public mu-more - 5237fb433fc8
1233 o 13 public mu-more - 5237fb433fc8
1234 |
1234 |
1235 | o 12 public alpha-more - 1c5cfd894796
1235 | o 12 public alpha-more - 1c5cfd894796
1236 | |
1236 | |
1237 o | 11 public A-secret - 435b5d83910c
1237 o | 11 public A-secret - 435b5d83910c
1238 |/
1238 |/
1239 o 10 public a-H - 967b449fbc94
1239 o 10 public a-H - 967b449fbc94
1240 |
1240 |
1241 | o 9 public a-G - 3e27b6f1eee1
1241 | o 9 public a-G - 3e27b6f1eee1
1242 | |
1242 | |
1243 | o 8 public a-F - b740e3e5c05d
1243 | o 8 public a-F - b740e3e5c05d
1244 | |
1244 | |
1245 | o 7 public a-E - e9f537e46dea
1245 | o 7 public a-E - e9f537e46dea
1246 | |
1246 | |
1247 +---o 6 public n-B - 145e75495359
1247 +---o 6 public n-B - 145e75495359
1248 | |
1248 | |
1249 o | 5 public n-A - d6bcb4f74035
1249 o | 5 public n-A - d6bcb4f74035
1250 | |
1250 | |
1251 o | 4 public b-A - f54f1bb90ff3
1251 o | 4 public b-A - f54f1bb90ff3
1252 | |
1252 | |
1253 | o 3 public a-D - b555f63b6063
1253 | o 3 public a-D - b555f63b6063
1254 | |
1254 | |
1255 | o 2 public a-C - 54acac6f23ab
1255 | o 2 public a-C - 54acac6f23ab
1256 |/
1256 |/
1257 o 1 public a-B - 548a3d25dbf0
1257 o 1 public a-B - 548a3d25dbf0
1258 |
1258 |
1259 o 0 public a-A - 054250a37db4
1259 o 0 public a-A - 054250a37db4
1260
1260
1261 #if unix-permissions no-root
1261 #if unix-permissions no-root
1262
1262
1263 Pushing From an unlockable repo
1263 Pushing From an unlockable repo
1264 --------------------------------
1264 --------------------------------
1265 (issue3684)
1265 (issue3684)
1266
1266
1267 Unability to lock the source repo should not prevent the push. It will prevent
1267 Unability to lock the source repo should not prevent the push. It will prevent
1268 the retrieval of remote phase during push. For example, pushing to a publishing
1268 the retrieval of remote phase during push. For example, pushing to a publishing
1269 server won't turn changeset public.
1269 server won't turn changeset public.
1270
1270
1271 1. Test that push is not prevented
1271 1. Test that push is not prevented
1272
1272
1273 $ hg init Phi
1273 $ hg init Phi
1274 $ cd Upsilon
1274 $ cd Upsilon
1275 $ chmod -R -w .hg
1275 $ chmod -R -w .hg
1276 $ hg push ../Phi
1276 $ hg push ../Phi
1277 pushing to ../Phi
1277 pushing to ../Phi
1278 searching for changes
1278 searching for changes
1279 adding changesets
1279 adding changesets
1280 adding manifests
1280 adding manifests
1281 adding file changes
1281 adding file changes
1282 added 14 changesets with 14 changes to 14 files (+3 heads)
1282 added 14 changesets with 14 changes to 14 files (+3 heads)
1283 test-debug-phase: new rev 0: x -> 0
1283 test-debug-phase: new rev 0: x -> 0
1284 test-debug-phase: new rev 1: x -> 0
1284 test-debug-phase: new rev 1: x -> 0
1285 test-debug-phase: new rev 2: x -> 0
1285 test-debug-phase: new rev 2: x -> 0
1286 test-debug-phase: new rev 3: x -> 0
1286 test-debug-phase: new rev 3: x -> 0
1287 test-debug-phase: new rev 4: x -> 0
1287 test-debug-phase: new rev 4: x -> 0
1288 test-debug-phase: new rev 5: x -> 0
1288 test-debug-phase: new rev 5: x -> 0
1289 test-debug-phase: new rev 6: x -> 0
1289 test-debug-phase: new rev 6: x -> 0
1290 test-debug-phase: new rev 7: x -> 0
1290 test-debug-phase: new rev 7: x -> 0
1291 test-debug-phase: new rev 8: x -> 0
1291 test-debug-phase: new rev 8: x -> 0
1292 test-debug-phase: new rev 9: x -> 0
1292 test-debug-phase: new rev 9: x -> 0
1293 test-debug-phase: new rev 10: x -> 0
1293 test-debug-phase: new rev 10: x -> 0
1294 test-debug-phase: new rev 11: x -> 0
1294 test-debug-phase: new rev 11: x -> 0
1295 test-debug-phase: new rev 12: x -> 0
1295 test-debug-phase: new rev 12: x -> 0
1296 test-debug-phase: new rev 13: x -> 0
1296 test-debug-phase: new rev 13: x -> 0
1297 $ chmod -R +w .hg
1297 $ chmod -R +w .hg
1298
1298
1299 2. Test that failed phases movement are reported
1299 2. Test that failed phases movement are reported
1300
1300
1301 $ hg phase --force --draft 3
1301 $ hg phase --force --draft 3
1302 test-debug-phase: move rev 3: 0 -> 1
1302 test-debug-phase: move rev 3: 0 -> 1
1303 test-debug-phase: move rev 7: 0 -> 1
1303 test-debug-phase: move rev 7: 0 -> 1
1304 test-debug-phase: move rev 8: 0 -> 1
1304 test-debug-phase: move rev 8: 0 -> 1
1305 test-debug-phase: move rev 9: 0 -> 1
1305 test-debug-phase: move rev 9: 0 -> 1
1306 $ chmod -R -w .hg
1306 $ chmod -R -w .hg
1307 $ hg push ../Phi
1307 $ hg push ../Phi
1308 pushing to ../Phi
1308 pushing to ../Phi
1309 searching for changes
1309 searching for changes
1310 no changes found
1310 no changes found
1311 cannot lock source repo, skipping local public phase update
1311 cannot lock source repo, skipping local public phase update
1312 [1]
1312 [1]
1313 $ chmod -R +w .hg
1313 $ chmod -R +w .hg
1314
1314
1315 3. Test that push is prevented if lock was already acquired (not a permission
1315 3. Test that push is prevented if lock was already acquired (not a permission
1316 error, but EEXIST)
1316 error, but EEXIST)
1317
1317
1318 $ touch .hg/store/lock
1318 $ touch .hg/store/lock
1319 $ hg push ../Phi --config ui.timeout=1
1319 $ hg push ../Phi --config ui.timeout=1
1320 pushing to ../Phi
1320 pushing to ../Phi
1321 waiting for lock on repository $TESTTMP/Upsilon held by ''
1321 waiting for lock on repository $TESTTMP/Upsilon held by ''
1322 abort: repository $TESTTMP/Upsilon: timed out waiting for lock held by ''
1322 abort: repository $TESTTMP/Upsilon: timed out waiting for lock held by ''
1323 (lock might be very busy)
1323 (lock might be very busy)
1324 [255]
1324 [255]
1325 $ rm .hg/store/lock
1325 $ rm .hg/store/lock
1326
1326
1327 $ cd ..
1327 $ cd ..
1328
1328
1329 #endif
1329 #endif
1330
1330
1331 Test that clone behaves like pull and doesn't publish changesets as plain push
1331 Test that clone behaves like pull and doesn't publish changesets as plain push
1332 does. The conditional output accounts for changes in the conditional block
1332 does. The conditional output accounts for changes in the conditional block
1333 above.
1333 above.
1334
1334
1335 #if unix-permissions no-root
1335 #if unix-permissions no-root
1336 $ hg -R Upsilon phase -q --force --draft 2
1336 $ hg -R Upsilon phase -q --force --draft 2
1337 test-debug-phase: move rev 2: 0 -> 1
1337 test-debug-phase: move rev 2: 0 -> 1
1338 #else
1338 #else
1339 $ hg -R Upsilon phase -q --force --draft 2
1339 $ hg -R Upsilon phase -q --force --draft 2
1340 test-debug-phase: move rev 2: 0 -> 1
1340 test-debug-phase: move rev 2: 0 -> 1
1341 test-debug-phase: move rev 3: 0 -> 1
1341 test-debug-phase: move rev 3: 0 -> 1
1342 test-debug-phase: move rev 7: 0 -> 1
1342 test-debug-phase: move rev 7: 0 -> 1
1343 test-debug-phase: move rev 8: 0 -> 1
1343 test-debug-phase: move rev 8: 0 -> 1
1344 test-debug-phase: move rev 9: 0 -> 1
1344 test-debug-phase: move rev 9: 0 -> 1
1345 #endif
1345 #endif
1346
1346
1347 $ hg clone -q Upsilon Pi -r 7
1347 $ hg clone -q Upsilon Pi -r 7
1348 test-debug-phase: new rev 0: x -> 0
1348 test-debug-phase: new rev 0: x -> 0
1349 test-debug-phase: new rev 1: x -> 0
1349 test-debug-phase: new rev 1: x -> 0
1350 test-debug-phase: new rev 2: x -> 0
1350 test-debug-phase: new rev 2: x -> 0
1351 test-debug-phase: new rev 3: x -> 0
1351 test-debug-phase: new rev 3: x -> 0
1352 test-debug-phase: new rev 4: x -> 0
1352 test-debug-phase: new rev 4: x -> 0
1353 $ hgph Upsilon -r 'min(draft())'
1353 $ hgph Upsilon -r 'min(draft())'
1354 o 2 draft a-C - 54acac6f23ab
1354 o 2 draft a-C - 54acac6f23ab
1355 |
1355 |
1356 ~
1356 ~
1357
1357
1358 $ hg -R Upsilon push Pi -r 7
1358 $ hg -R Upsilon push Pi -r 7
1359 pushing to Pi
1359 pushing to Pi
1360 searching for changes
1360 searching for changes
1361 no changes found
1361 no changes found
1362 test-debug-phase: move rev 2: 1 -> 0
1362 test-debug-phase: move rev 2: 1 -> 0
1363 test-debug-phase: move rev 3: 1 -> 0
1363 test-debug-phase: move rev 3: 1 -> 0
1364 test-debug-phase: move rev 7: 1 -> 0
1364 test-debug-phase: move rev 7: 1 -> 0
1365 [1]
1365 [1]
1366 $ hgph Upsilon -r 'min(draft())'
1366 $ hgph Upsilon -r 'min(draft())'
1367 o 8 draft a-F - b740e3e5c05d
1367 o 8 draft a-F - b740e3e5c05d
1368 |
1368 |
1369 ~
1369 ~
1370
1370
1371 $ hg -R Upsilon push Pi -r 8
1371 $ hg -R Upsilon push Pi -r 8
1372 pushing to Pi
1372 pushing to Pi
1373 searching for changes
1373 searching for changes
1374 adding changesets
1374 adding changesets
1375 adding manifests
1375 adding manifests
1376 adding file changes
1376 adding file changes
1377 added 1 changesets with 1 changes to 1 files
1377 added 1 changesets with 1 changes to 1 files
1378 test-debug-phase: new rev 5: x -> 0
1378 test-debug-phase: new rev 5: x -> 0
1379 test-debug-phase: move rev 8: 1 -> 0
1379 test-debug-phase: move rev 8: 1 -> 0
1380
1380
1381 $ hgph Upsilon -r 'min(draft())'
1381 $ hgph Upsilon -r 'min(draft())'
1382 o 9 draft a-G - 3e27b6f1eee1
1382 o 9 draft a-G - 3e27b6f1eee1
1383 |
1383 |
1384 ~
1384 ~
1385
1385
1386 Test phases exchange when a phaseroot is on a merge
1386 Test phases exchange when a phaseroot is on a merge
1387
1387
1388 $ hg init mergetest
1388 $ hg init mergetest
1389 $ cd mergetest
1389 $ cd mergetest
1390 > cat > .hg/hgrc << EOF
1390 > cat > .hg/hgrc << EOF
1391 > [phases]
1391 > [phases]
1392 > publish = false
1392 > publish = false
1393 > EOF
1393 > EOF
1394
1394
1395 $ hg debugdrawdag << EOF
1395 $ hg debugdrawdag << EOF
1396 > E Z
1396 > E Z
1397 > |\|
1397 > |\|
1398 > D Y
1398 > D Y
1399 > | |
1399 > | |
1400 > C X
1400 > C X
1401 > |/
1401 > |/
1402 > B
1402 > B
1403 > |
1403 > |
1404 > A
1404 > A
1405 > EOF
1405 > EOF
1406 test-debug-phase: new rev 0: x -> 1
1406 test-debug-phase: new rev 0: x -> 1
1407 test-debug-phase: new rev 1: x -> 1
1407 test-debug-phase: new rev 1: x -> 1
1408 test-debug-phase: new rev 2: x -> 1
1408 test-debug-phase: new rev 2: x -> 1
1409 test-debug-phase: new rev 3: x -> 1
1409 test-debug-phase: new rev 3: x -> 1
1410 test-debug-phase: new rev 4: x -> 1
1410 test-debug-phase: new rev 4: x -> 1
1411 test-debug-phase: new rev 5: x -> 1
1411 test-debug-phase: new rev 5: x -> 1
1412 test-debug-phase: new rev 6: x -> 1
1412 test-debug-phase: new rev 6: x -> 1
1413 test-debug-phase: new rev 7: x -> 1
1413 test-debug-phase: new rev 7: x -> 1
1414
1414
1415 $ hg phase --public -r D
1415 $ hg phase --public -r D
1416 test-debug-phase: move rev 0: 1 -> 0
1416 test-debug-phase: move rev 0: 1 -> 0
1417 test-debug-phase: move rev 1: 1 -> 0
1417 test-debug-phase: move rev 1: 1 -> 0
1418 test-debug-phase: move rev 2: 1 -> 0
1418 test-debug-phase: move rev 2: 1 -> 0
1419 test-debug-phase: move rev 4: 1 -> 0
1419 test-debug-phase: move rev 4: 1 -> 0
1420
1420
1421 $ hg log -G -T '{shortest(node, 5)} {phase}'
1421 $ hg log -G -T '{shortest(node, 5)} {phase}'
1422 o bb947 draft
1422 o bb947 draft
1423 |
1423 |
1424 | o 5ac28 draft
1424 | o 5ac28 draft
1425 |/|
1425 |/|
1426 o | 13b7b draft
1426 o | 13b7b draft
1427 | |
1427 | |
1428 | o f5853 public
1428 | o f5853 public
1429 | |
1429 | |
1430 o | c67c4 draft
1430 o | c67c4 draft
1431 | |
1431 | |
1432 | o 26805 public
1432 | o 26805 public
1433 |/
1433 |/
1434 o 11247 public
1434 o 11247 public
1435 |
1435 |
1436 o 426ba public
1436 o 426ba public
1437
1437
1438 $ cd ..
1438 $ cd ..
1439
1439
1440 Works with default settings
1440 Works with default settings
1441
1441
1442 $ hg -R mergetest serve -p $HGPORT -d --pid-file=hg.pid
1442 $ hg -R mergetest serve -p $HGPORT -d --pid-file=hg.pid
1443 $ cat hg.pid >> $DAEMON_PIDS
1443 $ cat hg.pid >> $DAEMON_PIDS
1444
1444
1445 $ hg clone -U http://localhost:$HGPORT mergetest-normal
1445 $ hg clone -U http://localhost:$HGPORT mergetest-normal
1446 requesting all changes
1446 requesting all changes
1447 adding changesets
1447 adding changesets
1448 adding manifests
1448 adding manifests
1449 adding file changes
1449 adding file changes
1450 added 8 changesets with 7 changes to 7 files (+1 heads)
1450 added 8 changesets with 7 changes to 7 files (+1 heads)
1451 new changesets 426bada5c675:bb94757e651a
1451 new changesets 426bada5c675:bb94757e651a
1452 test-debug-phase: new rev 0: x -> 0
1452 test-debug-phase: new rev 0: x -> 0
1453 test-debug-phase: new rev 1: x -> 0
1453 test-debug-phase: new rev 1: x -> 0
1454 test-debug-phase: new rev 2: x -> 0
1454 test-debug-phase: new rev 2: x -> 0
1455 test-debug-phase: new rev 3: x -> 1
1455 test-debug-phase: new rev 3: x -> 1
1456 test-debug-phase: new rev 4: x -> 0
1456 test-debug-phase: new rev 4: x -> 0
1457 test-debug-phase: new rev 5: x -> 1
1457 test-debug-phase: new rev 5: x -> 1
1458 test-debug-phase: new rev 6: x -> 1
1458 test-debug-phase: new rev 6: x -> 1
1459 test-debug-phase: new rev 7: x -> 1
1459 test-debug-phase: new rev 7: x -> 1
1460
1460
1461 $ hg -R mergetest-normal log -G -T '{shortest(node, 5)} {phase}'
1461 $ hg -R mergetest-normal log -G -T '{shortest(node, 5)} {phase}'
1462 o bb947 draft
1462 o bb947 draft
1463 |
1463 |
1464 | o 5ac28 draft
1464 | o 5ac28 draft
1465 |/|
1465 |/|
1466 o | 13b7b draft
1466 o | 13b7b draft
1467 | |
1467 | |
1468 | o f5853 public
1468 | o f5853 public
1469 | |
1469 | |
1470 o | c67c4 draft
1470 o | c67c4 draft
1471 | |
1471 | |
1472 | o 26805 public
1472 | o 26805 public
1473 |/
1473 |/
1474 o 11247 public
1474 o 11247 public
1475 |
1475 |
1476 o 426ba public
1476 o 426ba public
1477
1477
1478 $ killdaemons.py
1478 $ killdaemons.py
1479
1479
1480 With legacy listkeys over bundle2
1480 With legacy listkeys over bundle2
1481 TODO issue 5939: public phase lost on 26805 and f5853
1481 (issue 5939: public phase was lost on 26805 and f5853 before, due to a bug
1482 of phase heads computation)
1482
1483
1483 $ hg -R mergetest --config devel.legacy.exchange=phases serve -p $HGPORT -d --pid-file=hg.pid
1484 $ hg -R mergetest --config devel.legacy.exchange=phases serve -p $HGPORT -d --pid-file=hg.pid
1484 $ cat hg.pid >> $DAEMON_PIDS
1485 $ cat hg.pid >> $DAEMON_PIDS
1485
1486
1486 $ hg clone -U http://localhost:$HGPORT mergetest-nobinarypart
1487 $ hg clone -U http://localhost:$HGPORT mergetest-nobinarypart
1487 requesting all changes
1488 requesting all changes
1488 adding changesets
1489 adding changesets
1489 adding manifests
1490 adding manifests
1490 adding file changes
1491 adding file changes
1491 added 8 changesets with 7 changes to 7 files (+1 heads)
1492 added 8 changesets with 7 changes to 7 files (+1 heads)
1492 new changesets 426bada5c675:bb94757e651a
1493 new changesets 426bada5c675:bb94757e651a
1493 test-debug-phase: new rev 0: x -> 0
1494 test-debug-phase: new rev 0: x -> 0
1494 test-debug-phase: new rev 1: x -> 0
1495 test-debug-phase: new rev 1: x -> 0
1495 test-debug-phase: new rev 2: x -> 1
1496 test-debug-phase: new rev 2: x -> 0
1496 test-debug-phase: new rev 3: x -> 1
1497 test-debug-phase: new rev 3: x -> 1
1497 test-debug-phase: new rev 4: x -> 1
1498 test-debug-phase: new rev 4: x -> 0
1498 test-debug-phase: new rev 5: x -> 1
1499 test-debug-phase: new rev 5: x -> 1
1499 test-debug-phase: new rev 6: x -> 1
1500 test-debug-phase: new rev 6: x -> 1
1500 test-debug-phase: new rev 7: x -> 1
1501 test-debug-phase: new rev 7: x -> 1
1501
1502
1502 $ hg -R mergetest-nobinarypart log -G -T '{shortest(node, 5)} {phase}'
1503 $ hg -R mergetest-nobinarypart log -G -T '{shortest(node, 5)} {phase}'
1503 o bb947 draft
1504 o bb947 draft
1504 |
1505 |
1505 | o 5ac28 draft
1506 | o 5ac28 draft
1506 |/|
1507 |/|
1507 o | 13b7b draft
1508 o | 13b7b draft
1508 | |
1509 | |
1509 | o f5853 draft
1510 | o f5853 public
1510 | |
1511 | |
1511 o | c67c4 draft
1512 o | c67c4 draft
1512 | |
1513 | |
1513 | o 26805 draft
1514 | o 26805 public
1514 |/
1515 |/
1515 o 11247 public
1516 o 11247 public
1516 |
1517 |
1517 o 426ba public
1518 o 426ba public
1518
1519
1519 $ killdaemons.py
1520 $ killdaemons.py
1520
1521
1521 Without bundle2
1522 Without bundle2
1522 TODO issue 5939: public phase lost on 26805 and f5853
1523 (issue 5939: public phase was lost on 26805 and f5853 before, due to a bug
1524 of phase heads computation)
1523
1525
1524 $ hg -R mergetest serve -p $HGPORT -d --pid-file=hg.pid
1526 $ hg -R mergetest serve -p $HGPORT -d --pid-file=hg.pid
1525 $ cat hg.pid >> $DAEMON_PIDS
1527 $ cat hg.pid >> $DAEMON_PIDS
1526
1528
1527 $ hg --config devel.legacy.exchange=bundle1 clone -U http://localhost:$HGPORT mergetest-bundle1
1529 $ hg --config devel.legacy.exchange=bundle1 clone -U http://localhost:$HGPORT mergetest-bundle1
1528 requesting all changes
1530 requesting all changes
1529 adding changesets
1531 adding changesets
1530 adding manifests
1532 adding manifests
1531 adding file changes
1533 adding file changes
1532 added 8 changesets with 7 changes to 7 files (+1 heads)
1534 added 8 changesets with 7 changes to 7 files (+1 heads)
1533 new changesets 426bada5c675:bb94757e651a
1535 new changesets 426bada5c675:bb94757e651a
1534 test-debug-phase: new rev 0: x -> 0
1536 test-debug-phase: new rev 0: x -> 0
1535 test-debug-phase: new rev 1: x -> 0
1537 test-debug-phase: new rev 1: x -> 0
1536 test-debug-phase: new rev 2: x -> 1
1538 test-debug-phase: new rev 2: x -> 0
1537 test-debug-phase: new rev 3: x -> 1
1539 test-debug-phase: new rev 3: x -> 1
1538 test-debug-phase: new rev 4: x -> 1
1540 test-debug-phase: new rev 4: x -> 0
1539 test-debug-phase: new rev 5: x -> 1
1541 test-debug-phase: new rev 5: x -> 1
1540 test-debug-phase: new rev 6: x -> 1
1542 test-debug-phase: new rev 6: x -> 1
1541 test-debug-phase: new rev 7: x -> 1
1543 test-debug-phase: new rev 7: x -> 1
1542
1544
1543 $ hg -R mergetest-bundle1 log -G -T '{shortest(node, 5)} {phase}'
1545 $ hg -R mergetest-bundle1 log -G -T '{shortest(node, 5)} {phase}'
1544 o bb947 draft
1546 o bb947 draft
1545 |
1547 |
1546 | o 5ac28 draft
1548 | o 5ac28 draft
1547 |/|
1549 |/|
1548 o | 13b7b draft
1550 o | 13b7b draft
1549 | |
1551 | |
1550 | o f5853 draft
1552 | o f5853 public
1551 | |
1553 | |
1552 o | c67c4 draft
1554 o | c67c4 draft
1553 | |
1555 | |
1554 | o 26805 draft
1556 | o 26805 public
1555 |/
1557 |/
1556 o 11247 public
1558 o 11247 public
1557 |
1559 |
1558 o 426ba public
1560 o 426ba public
1559
1561
General Comments 0
You need to be logged in to leave comments. Login now