Show More
@@ -1,469 +1,480 b'' | |||||
1 | # repoview.py - Filtered view of a localrepo object |
|
1 | # repoview.py - Filtered view of a localrepo object | |
2 | # |
|
2 | # | |
3 | # Copyright 2012 Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
|
3 | # Copyright 2012 Pierre-Yves David <pierre-yves.david@ens-lyon.org> | |
4 | # Logilab SA <contact@logilab.fr> |
|
4 | # Logilab SA <contact@logilab.fr> | |
5 | # |
|
5 | # | |
6 | # This software may be used and distributed according to the terms of the |
|
6 | # This software may be used and distributed according to the terms of the | |
7 | # GNU General Public License version 2 or any later version. |
|
7 | # GNU General Public License version 2 or any later version. | |
8 |
|
8 | |||
9 | from __future__ import absolute_import |
|
9 | from __future__ import absolute_import | |
10 |
|
10 | |||
11 | import copy |
|
11 | import copy | |
12 | import weakref |
|
12 | import weakref | |
13 |
|
13 | |||
14 | from .i18n import _ |
|
14 | from .i18n import _ | |
15 | from .node import ( |
|
15 | from .node import ( | |
16 | hex, |
|
16 | hex, | |
17 | nullrev, |
|
17 | nullrev, | |
18 | ) |
|
18 | ) | |
19 | from .pycompat import ( |
|
19 | from .pycompat import ( | |
20 | delattr, |
|
20 | delattr, | |
21 | getattr, |
|
21 | getattr, | |
22 | setattr, |
|
22 | setattr, | |
23 | ) |
|
23 | ) | |
24 | from . import ( |
|
24 | from . import ( | |
25 | error, |
|
25 | error, | |
26 | obsolete, |
|
26 | obsolete, | |
27 | phases, |
|
27 | phases, | |
28 | pycompat, |
|
28 | pycompat, | |
29 | tags as tagsmod, |
|
29 | tags as tagsmod, | |
30 | util, |
|
30 | util, | |
31 | ) |
|
31 | ) | |
32 | from .utils import repoviewutil |
|
32 | from .utils import repoviewutil | |
33 |
|
33 | |||
34 |
|
34 | |||
35 | def hideablerevs(repo): |
|
35 | def hideablerevs(repo): | |
36 | """Revision candidates to be hidden |
|
36 | """Revision candidates to be hidden | |
37 |
|
37 | |||
38 | This is a standalone function to allow extensions to wrap it. |
|
38 | This is a standalone function to allow extensions to wrap it. | |
39 |
|
39 | |||
40 | Because we use the set of immutable changesets as a fallback subset in |
|
40 | Because we use the set of immutable changesets as a fallback subset in | |
41 | branchmap (see mercurial.utils.repoviewutils.subsettable), you cannot set |
|
41 | branchmap (see mercurial.utils.repoviewutils.subsettable), you cannot set | |
42 | "public" changesets as "hideable". Doing so would break multiple code |
|
42 | "public" changesets as "hideable". Doing so would break multiple code | |
43 | assertions and lead to crashes.""" |
|
43 | assertions and lead to crashes.""" | |
44 | obsoletes = obsolete.getrevs(repo, b'obsolete') |
|
44 | obsoletes = obsolete.getrevs(repo, b'obsolete') | |
45 | internals = repo._phasecache.getrevset(repo, phases.localhiddenphases) |
|
45 | internals = repo._phasecache.getrevset(repo, phases.localhiddenphases) | |
46 | internals = frozenset(internals) |
|
46 | internals = frozenset(internals) | |
47 | return obsoletes | internals |
|
47 | return obsoletes | internals | |
48 |
|
48 | |||
49 |
|
49 | |||
50 | def pinnedrevs(repo): |
|
50 | def pinnedrevs(repo): | |
51 | """revisions blocking hidden changesets from being filtered |
|
51 | """revisions blocking hidden changesets from being filtered | |
52 | """ |
|
52 | """ | |
53 |
|
53 | |||
54 | cl = repo.changelog |
|
54 | cl = repo.changelog | |
55 | pinned = set() |
|
55 | pinned = set() | |
56 | pinned.update([par.rev() for par in repo[None].parents()]) |
|
56 | pinned.update([par.rev() for par in repo[None].parents()]) | |
57 | pinned.update([cl.rev(bm) for bm in repo._bookmarks.values()]) |
|
57 | pinned.update([cl.rev(bm) for bm in repo._bookmarks.values()]) | |
58 |
|
58 | |||
59 | tags = {} |
|
59 | tags = {} | |
60 | tagsmod.readlocaltags(repo.ui, repo, tags, {}) |
|
60 | tagsmod.readlocaltags(repo.ui, repo, tags, {}) | |
61 | if tags: |
|
61 | if tags: | |
62 | rev = cl.index.get_rev |
|
62 | rev = cl.index.get_rev | |
63 | pinned.update(rev(t[0]) for t in tags.values()) |
|
63 | pinned.update(rev(t[0]) for t in tags.values()) | |
64 | pinned.discard(None) |
|
64 | pinned.discard(None) | |
|
65 | ||||
|
66 | # Avoid cycle: mercurial.filemerge -> mercurial.templater -> | |||
|
67 | # mercurial.templatefuncs -> mercurial.revset -> mercurial.repoview -> | |||
|
68 | # mercurial.mergestate -> mercurial.filemerge | |||
|
69 | from . import mergestate | |||
|
70 | ||||
|
71 | ms = mergestate.mergestate.read(repo) | |||
|
72 | if ms.active(): | |||
|
73 | pinned.add(ms.localctx.rev()) | |||
|
74 | pinned.add(ms.otherctx.rev()) | |||
|
75 | ||||
65 | return pinned |
|
76 | return pinned | |
66 |
|
77 | |||
67 |
|
78 | |||
68 | def _revealancestors(pfunc, hidden, revs): |
|
79 | def _revealancestors(pfunc, hidden, revs): | |
69 | """reveals contiguous chains of hidden ancestors of 'revs' by removing them |
|
80 | """reveals contiguous chains of hidden ancestors of 'revs' by removing them | |
70 | from 'hidden' |
|
81 | from 'hidden' | |
71 |
|
82 | |||
72 | - pfunc(r): a funtion returning parent of 'r', |
|
83 | - pfunc(r): a funtion returning parent of 'r', | |
73 | - hidden: the (preliminary) hidden revisions, to be updated |
|
84 | - hidden: the (preliminary) hidden revisions, to be updated | |
74 | - revs: iterable of revnum, |
|
85 | - revs: iterable of revnum, | |
75 |
|
86 | |||
76 | (Ancestors are revealed exclusively, i.e. the elements in 'revs' are |
|
87 | (Ancestors are revealed exclusively, i.e. the elements in 'revs' are | |
77 | *not* revealed) |
|
88 | *not* revealed) | |
78 | """ |
|
89 | """ | |
79 | stack = list(revs) |
|
90 | stack = list(revs) | |
80 | while stack: |
|
91 | while stack: | |
81 | for p in pfunc(stack.pop()): |
|
92 | for p in pfunc(stack.pop()): | |
82 | if p != nullrev and p in hidden: |
|
93 | if p != nullrev and p in hidden: | |
83 | hidden.remove(p) |
|
94 | hidden.remove(p) | |
84 | stack.append(p) |
|
95 | stack.append(p) | |
85 |
|
96 | |||
86 |
|
97 | |||
87 | def computehidden(repo, visibilityexceptions=None): |
|
98 | def computehidden(repo, visibilityexceptions=None): | |
88 | """compute the set of hidden revision to filter |
|
99 | """compute the set of hidden revision to filter | |
89 |
|
100 | |||
90 | During most operation hidden should be filtered.""" |
|
101 | During most operation hidden should be filtered.""" | |
91 | assert not repo.changelog.filteredrevs |
|
102 | assert not repo.changelog.filteredrevs | |
92 |
|
103 | |||
93 | hidden = hideablerevs(repo) |
|
104 | hidden = hideablerevs(repo) | |
94 | if hidden: |
|
105 | if hidden: | |
95 | hidden = set(hidden - pinnedrevs(repo)) |
|
106 | hidden = set(hidden - pinnedrevs(repo)) | |
96 | if visibilityexceptions: |
|
107 | if visibilityexceptions: | |
97 | hidden -= visibilityexceptions |
|
108 | hidden -= visibilityexceptions | |
98 | pfunc = repo.changelog.parentrevs |
|
109 | pfunc = repo.changelog.parentrevs | |
99 | mutable = repo._phasecache.getrevset(repo, phases.mutablephases) |
|
110 | mutable = repo._phasecache.getrevset(repo, phases.mutablephases) | |
100 |
|
111 | |||
101 | visible = mutable - hidden |
|
112 | visible = mutable - hidden | |
102 | _revealancestors(pfunc, hidden, visible) |
|
113 | _revealancestors(pfunc, hidden, visible) | |
103 | return frozenset(hidden) |
|
114 | return frozenset(hidden) | |
104 |
|
115 | |||
105 |
|
116 | |||
106 | def computesecret(repo, visibilityexceptions=None): |
|
117 | def computesecret(repo, visibilityexceptions=None): | |
107 | """compute the set of revision that can never be exposed through hgweb |
|
118 | """compute the set of revision that can never be exposed through hgweb | |
108 |
|
119 | |||
109 | Changeset in the secret phase (or above) should stay unaccessible.""" |
|
120 | Changeset in the secret phase (or above) should stay unaccessible.""" | |
110 | assert not repo.changelog.filteredrevs |
|
121 | assert not repo.changelog.filteredrevs | |
111 | secrets = repo._phasecache.getrevset(repo, phases.remotehiddenphases) |
|
122 | secrets = repo._phasecache.getrevset(repo, phases.remotehiddenphases) | |
112 | return frozenset(secrets) |
|
123 | return frozenset(secrets) | |
113 |
|
124 | |||
114 |
|
125 | |||
115 | def computeunserved(repo, visibilityexceptions=None): |
|
126 | def computeunserved(repo, visibilityexceptions=None): | |
116 | """compute the set of revision that should be filtered when used a server |
|
127 | """compute the set of revision that should be filtered when used a server | |
117 |
|
128 | |||
118 | Secret and hidden changeset should not pretend to be here.""" |
|
129 | Secret and hidden changeset should not pretend to be here.""" | |
119 | assert not repo.changelog.filteredrevs |
|
130 | assert not repo.changelog.filteredrevs | |
120 | # fast path in simple case to avoid impact of non optimised code |
|
131 | # fast path in simple case to avoid impact of non optimised code | |
121 | hiddens = filterrevs(repo, b'visible') |
|
132 | hiddens = filterrevs(repo, b'visible') | |
122 | secrets = filterrevs(repo, b'served.hidden') |
|
133 | secrets = filterrevs(repo, b'served.hidden') | |
123 | if secrets: |
|
134 | if secrets: | |
124 | return frozenset(hiddens | secrets) |
|
135 | return frozenset(hiddens | secrets) | |
125 | else: |
|
136 | else: | |
126 | return hiddens |
|
137 | return hiddens | |
127 |
|
138 | |||
128 |
|
139 | |||
129 | def computemutable(repo, visibilityexceptions=None): |
|
140 | def computemutable(repo, visibilityexceptions=None): | |
130 | assert not repo.changelog.filteredrevs |
|
141 | assert not repo.changelog.filteredrevs | |
131 | # fast check to avoid revset call on huge repo |
|
142 | # fast check to avoid revset call on huge repo | |
132 | if repo._phasecache.hasnonpublicphases(repo): |
|
143 | if repo._phasecache.hasnonpublicphases(repo): | |
133 | return frozenset(repo._phasecache.getrevset(repo, phases.mutablephases)) |
|
144 | return frozenset(repo._phasecache.getrevset(repo, phases.mutablephases)) | |
134 | return frozenset() |
|
145 | return frozenset() | |
135 |
|
146 | |||
136 |
|
147 | |||
137 | def computeimpactable(repo, visibilityexceptions=None): |
|
148 | def computeimpactable(repo, visibilityexceptions=None): | |
138 | """Everything impactable by mutable revision |
|
149 | """Everything impactable by mutable revision | |
139 |
|
150 | |||
140 | The immutable filter still have some chance to get invalidated. This will |
|
151 | The immutable filter still have some chance to get invalidated. This will | |
141 | happen when: |
|
152 | happen when: | |
142 |
|
153 | |||
143 | - you garbage collect hidden changeset, |
|
154 | - you garbage collect hidden changeset, | |
144 | - public phase is moved backward, |
|
155 | - public phase is moved backward, | |
145 | - something is changed in the filtering (this could be fixed) |
|
156 | - something is changed in the filtering (this could be fixed) | |
146 |
|
157 | |||
147 | This filter out any mutable changeset and any public changeset that may be |
|
158 | This filter out any mutable changeset and any public changeset that may be | |
148 | impacted by something happening to a mutable revision. |
|
159 | impacted by something happening to a mutable revision. | |
149 |
|
160 | |||
150 | This is achieved by filtered everything with a revision number egal or |
|
161 | This is achieved by filtered everything with a revision number egal or | |
151 | higher than the first mutable changeset is filtered.""" |
|
162 | higher than the first mutable changeset is filtered.""" | |
152 | assert not repo.changelog.filteredrevs |
|
163 | assert not repo.changelog.filteredrevs | |
153 | cl = repo.changelog |
|
164 | cl = repo.changelog | |
154 | firstmutable = len(cl) |
|
165 | firstmutable = len(cl) | |
155 | roots = repo._phasecache.nonpublicphaseroots(repo) |
|
166 | roots = repo._phasecache.nonpublicphaseroots(repo) | |
156 | if roots: |
|
167 | if roots: | |
157 | firstmutable = min(firstmutable, min(cl.rev(r) for r in roots)) |
|
168 | firstmutable = min(firstmutable, min(cl.rev(r) for r in roots)) | |
158 | # protect from nullrev root |
|
169 | # protect from nullrev root | |
159 | firstmutable = max(0, firstmutable) |
|
170 | firstmutable = max(0, firstmutable) | |
160 | return frozenset(pycompat.xrange(firstmutable, len(cl))) |
|
171 | return frozenset(pycompat.xrange(firstmutable, len(cl))) | |
161 |
|
172 | |||
162 |
|
173 | |||
163 | # function to compute filtered set |
|
174 | # function to compute filtered set | |
164 | # |
|
175 | # | |
165 | # When adding a new filter you MUST update the table at: |
|
176 | # When adding a new filter you MUST update the table at: | |
166 | # mercurial.utils.repoviewutil.subsettable |
|
177 | # mercurial.utils.repoviewutil.subsettable | |
167 | # Otherwise your filter will have to recompute all its branches cache |
|
178 | # Otherwise your filter will have to recompute all its branches cache | |
168 | # from scratch (very slow). |
|
179 | # from scratch (very slow). | |
169 | filtertable = { |
|
180 | filtertable = { | |
170 | b'visible': computehidden, |
|
181 | b'visible': computehidden, | |
171 | b'visible-hidden': computehidden, |
|
182 | b'visible-hidden': computehidden, | |
172 | b'served.hidden': computesecret, |
|
183 | b'served.hidden': computesecret, | |
173 | b'served': computeunserved, |
|
184 | b'served': computeunserved, | |
174 | b'immutable': computemutable, |
|
185 | b'immutable': computemutable, | |
175 | b'base': computeimpactable, |
|
186 | b'base': computeimpactable, | |
176 | } |
|
187 | } | |
177 |
|
188 | |||
178 | # set of filter level that will include the working copy parent no matter what. |
|
189 | # set of filter level that will include the working copy parent no matter what. | |
179 | filter_has_wc = {b'visible', b'visible-hidden'} |
|
190 | filter_has_wc = {b'visible', b'visible-hidden'} | |
180 |
|
191 | |||
181 | _basefiltername = list(filtertable) |
|
192 | _basefiltername = list(filtertable) | |
182 |
|
193 | |||
183 |
|
194 | |||
184 | def extrafilter(ui): |
|
195 | def extrafilter(ui): | |
185 | """initialize extra filter and return its id |
|
196 | """initialize extra filter and return its id | |
186 |
|
197 | |||
187 | If extra filtering is configured, we make sure the associated filtered view |
|
198 | If extra filtering is configured, we make sure the associated filtered view | |
188 | are declared and return the associated id. |
|
199 | are declared and return the associated id. | |
189 | """ |
|
200 | """ | |
190 | frevs = ui.config(b'experimental', b'extra-filter-revs') |
|
201 | frevs = ui.config(b'experimental', b'extra-filter-revs') | |
191 | if frevs is None: |
|
202 | if frevs is None: | |
192 | return None |
|
203 | return None | |
193 |
|
204 | |||
194 | fid = pycompat.sysbytes(util.DIGESTS[b'sha1'](frevs).hexdigest())[:12] |
|
205 | fid = pycompat.sysbytes(util.DIGESTS[b'sha1'](frevs).hexdigest())[:12] | |
195 |
|
206 | |||
196 | combine = lambda fname: fname + b'%' + fid |
|
207 | combine = lambda fname: fname + b'%' + fid | |
197 |
|
208 | |||
198 | subsettable = repoviewutil.subsettable |
|
209 | subsettable = repoviewutil.subsettable | |
199 |
|
210 | |||
200 | if combine(b'base') not in filtertable: |
|
211 | if combine(b'base') not in filtertable: | |
201 | for name in _basefiltername: |
|
212 | for name in _basefiltername: | |
202 |
|
213 | |||
203 | def extrafilteredrevs(repo, *args, **kwargs): |
|
214 | def extrafilteredrevs(repo, *args, **kwargs): | |
204 | baserevs = filtertable[name](repo, *args, **kwargs) |
|
215 | baserevs = filtertable[name](repo, *args, **kwargs) | |
205 | extrarevs = frozenset(repo.revs(frevs)) |
|
216 | extrarevs = frozenset(repo.revs(frevs)) | |
206 | return baserevs | extrarevs |
|
217 | return baserevs | extrarevs | |
207 |
|
218 | |||
208 | filtertable[combine(name)] = extrafilteredrevs |
|
219 | filtertable[combine(name)] = extrafilteredrevs | |
209 | if name in subsettable: |
|
220 | if name in subsettable: | |
210 | subsettable[combine(name)] = combine(subsettable[name]) |
|
221 | subsettable[combine(name)] = combine(subsettable[name]) | |
211 | return fid |
|
222 | return fid | |
212 |
|
223 | |||
213 |
|
224 | |||
214 | def filterrevs(repo, filtername, visibilityexceptions=None): |
|
225 | def filterrevs(repo, filtername, visibilityexceptions=None): | |
215 | """returns set of filtered revision for this filter name |
|
226 | """returns set of filtered revision for this filter name | |
216 |
|
227 | |||
217 | visibilityexceptions is a set of revs which must are exceptions for |
|
228 | visibilityexceptions is a set of revs which must are exceptions for | |
218 | hidden-state and must be visible. They are dynamic and hence we should not |
|
229 | hidden-state and must be visible. They are dynamic and hence we should not | |
219 | cache it's result""" |
|
230 | cache it's result""" | |
220 | if filtername not in repo.filteredrevcache: |
|
231 | if filtername not in repo.filteredrevcache: | |
221 | if repo.ui.configbool(b'devel', b'debug.repo-filters'): |
|
232 | if repo.ui.configbool(b'devel', b'debug.repo-filters'): | |
222 | msg = b'computing revision filter for "%s"' |
|
233 | msg = b'computing revision filter for "%s"' | |
223 | msg %= filtername |
|
234 | msg %= filtername | |
224 | if repo.ui.tracebackflag and repo.ui.debugflag: |
|
235 | if repo.ui.tracebackflag and repo.ui.debugflag: | |
225 | # XXX use ui.write_err |
|
236 | # XXX use ui.write_err | |
226 | util.debugstacktrace( |
|
237 | util.debugstacktrace( | |
227 | msg, |
|
238 | msg, | |
228 | f=repo.ui._fout, |
|
239 | f=repo.ui._fout, | |
229 | otherf=repo.ui._ferr, |
|
240 | otherf=repo.ui._ferr, | |
230 | prefix=b'debug.filters: ', |
|
241 | prefix=b'debug.filters: ', | |
231 | ) |
|
242 | ) | |
232 | else: |
|
243 | else: | |
233 | repo.ui.debug(b'debug.filters: %s\n' % msg) |
|
244 | repo.ui.debug(b'debug.filters: %s\n' % msg) | |
234 | func = filtertable[filtername] |
|
245 | func = filtertable[filtername] | |
235 | if visibilityexceptions: |
|
246 | if visibilityexceptions: | |
236 | return func(repo.unfiltered, visibilityexceptions) |
|
247 | return func(repo.unfiltered, visibilityexceptions) | |
237 | repo.filteredrevcache[filtername] = func(repo.unfiltered()) |
|
248 | repo.filteredrevcache[filtername] = func(repo.unfiltered()) | |
238 | return repo.filteredrevcache[filtername] |
|
249 | return repo.filteredrevcache[filtername] | |
239 |
|
250 | |||
240 |
|
251 | |||
241 | def wrapchangelog(unfichangelog, filteredrevs): |
|
252 | def wrapchangelog(unfichangelog, filteredrevs): | |
242 | cl = copy.copy(unfichangelog) |
|
253 | cl = copy.copy(unfichangelog) | |
243 | cl.filteredrevs = filteredrevs |
|
254 | cl.filteredrevs = filteredrevs | |
244 |
|
255 | |||
245 | class filteredchangelog(filteredchangelogmixin, cl.__class__): |
|
256 | class filteredchangelog(filteredchangelogmixin, cl.__class__): | |
246 | pass |
|
257 | pass | |
247 |
|
258 | |||
248 | cl.__class__ = filteredchangelog |
|
259 | cl.__class__ = filteredchangelog | |
249 |
|
260 | |||
250 | return cl |
|
261 | return cl | |
251 |
|
262 | |||
252 |
|
263 | |||
253 | class filteredchangelogmixin(object): |
|
264 | class filteredchangelogmixin(object): | |
254 | def tiprev(self): |
|
265 | def tiprev(self): | |
255 | """filtered version of revlog.tiprev""" |
|
266 | """filtered version of revlog.tiprev""" | |
256 | for i in pycompat.xrange(len(self) - 1, -2, -1): |
|
267 | for i in pycompat.xrange(len(self) - 1, -2, -1): | |
257 | if i not in self.filteredrevs: |
|
268 | if i not in self.filteredrevs: | |
258 | return i |
|
269 | return i | |
259 |
|
270 | |||
260 | def __contains__(self, rev): |
|
271 | def __contains__(self, rev): | |
261 | """filtered version of revlog.__contains__""" |
|
272 | """filtered version of revlog.__contains__""" | |
262 | return 0 <= rev < len(self) and rev not in self.filteredrevs |
|
273 | return 0 <= rev < len(self) and rev not in self.filteredrevs | |
263 |
|
274 | |||
264 | def __iter__(self): |
|
275 | def __iter__(self): | |
265 | """filtered version of revlog.__iter__""" |
|
276 | """filtered version of revlog.__iter__""" | |
266 |
|
277 | |||
267 | def filterediter(): |
|
278 | def filterediter(): | |
268 | for i in pycompat.xrange(len(self)): |
|
279 | for i in pycompat.xrange(len(self)): | |
269 | if i not in self.filteredrevs: |
|
280 | if i not in self.filteredrevs: | |
270 | yield i |
|
281 | yield i | |
271 |
|
282 | |||
272 | return filterediter() |
|
283 | return filterediter() | |
273 |
|
284 | |||
274 | def revs(self, start=0, stop=None): |
|
285 | def revs(self, start=0, stop=None): | |
275 | """filtered version of revlog.revs""" |
|
286 | """filtered version of revlog.revs""" | |
276 | for i in super(filteredchangelogmixin, self).revs(start, stop): |
|
287 | for i in super(filteredchangelogmixin, self).revs(start, stop): | |
277 | if i not in self.filteredrevs: |
|
288 | if i not in self.filteredrevs: | |
278 | yield i |
|
289 | yield i | |
279 |
|
290 | |||
280 | def _checknofilteredinrevs(self, revs): |
|
291 | def _checknofilteredinrevs(self, revs): | |
281 | """raise the appropriate error if 'revs' contains a filtered revision |
|
292 | """raise the appropriate error if 'revs' contains a filtered revision | |
282 |
|
293 | |||
283 | This returns a version of 'revs' to be used thereafter by the caller. |
|
294 | This returns a version of 'revs' to be used thereafter by the caller. | |
284 | In particular, if revs is an iterator, it is converted into a set. |
|
295 | In particular, if revs is an iterator, it is converted into a set. | |
285 | """ |
|
296 | """ | |
286 | safehasattr = util.safehasattr |
|
297 | safehasattr = util.safehasattr | |
287 | if safehasattr(revs, '__next__'): |
|
298 | if safehasattr(revs, '__next__'): | |
288 | # Note that inspect.isgenerator() is not true for iterators, |
|
299 | # Note that inspect.isgenerator() is not true for iterators, | |
289 | revs = set(revs) |
|
300 | revs = set(revs) | |
290 |
|
301 | |||
291 | filteredrevs = self.filteredrevs |
|
302 | filteredrevs = self.filteredrevs | |
292 | if safehasattr(revs, 'first'): # smartset |
|
303 | if safehasattr(revs, 'first'): # smartset | |
293 | offenders = revs & filteredrevs |
|
304 | offenders = revs & filteredrevs | |
294 | else: |
|
305 | else: | |
295 | offenders = filteredrevs.intersection(revs) |
|
306 | offenders = filteredrevs.intersection(revs) | |
296 |
|
307 | |||
297 | for rev in offenders: |
|
308 | for rev in offenders: | |
298 | raise error.FilteredIndexError(rev) |
|
309 | raise error.FilteredIndexError(rev) | |
299 | return revs |
|
310 | return revs | |
300 |
|
311 | |||
301 | def headrevs(self, revs=None): |
|
312 | def headrevs(self, revs=None): | |
302 | if revs is None: |
|
313 | if revs is None: | |
303 | try: |
|
314 | try: | |
304 | return self.index.headrevsfiltered(self.filteredrevs) |
|
315 | return self.index.headrevsfiltered(self.filteredrevs) | |
305 | # AttributeError covers non-c-extension environments and |
|
316 | # AttributeError covers non-c-extension environments and | |
306 | # old c extensions without filter handling. |
|
317 | # old c extensions without filter handling. | |
307 | except AttributeError: |
|
318 | except AttributeError: | |
308 | return self._headrevs() |
|
319 | return self._headrevs() | |
309 |
|
320 | |||
310 | revs = self._checknofilteredinrevs(revs) |
|
321 | revs = self._checknofilteredinrevs(revs) | |
311 | return super(filteredchangelogmixin, self).headrevs(revs) |
|
322 | return super(filteredchangelogmixin, self).headrevs(revs) | |
312 |
|
323 | |||
313 | def strip(self, *args, **kwargs): |
|
324 | def strip(self, *args, **kwargs): | |
314 | # XXX make something better than assert |
|
325 | # XXX make something better than assert | |
315 | # We can't expect proper strip behavior if we are filtered. |
|
326 | # We can't expect proper strip behavior if we are filtered. | |
316 | assert not self.filteredrevs |
|
327 | assert not self.filteredrevs | |
317 | super(filteredchangelogmixin, self).strip(*args, **kwargs) |
|
328 | super(filteredchangelogmixin, self).strip(*args, **kwargs) | |
318 |
|
329 | |||
319 | def rev(self, node): |
|
330 | def rev(self, node): | |
320 | """filtered version of revlog.rev""" |
|
331 | """filtered version of revlog.rev""" | |
321 | r = super(filteredchangelogmixin, self).rev(node) |
|
332 | r = super(filteredchangelogmixin, self).rev(node) | |
322 | if r in self.filteredrevs: |
|
333 | if r in self.filteredrevs: | |
323 | raise error.FilteredLookupError( |
|
334 | raise error.FilteredLookupError( | |
324 | hex(node), self.indexfile, _(b'filtered node') |
|
335 | hex(node), self.indexfile, _(b'filtered node') | |
325 | ) |
|
336 | ) | |
326 | return r |
|
337 | return r | |
327 |
|
338 | |||
328 | def node(self, rev): |
|
339 | def node(self, rev): | |
329 | """filtered version of revlog.node""" |
|
340 | """filtered version of revlog.node""" | |
330 | if rev in self.filteredrevs: |
|
341 | if rev in self.filteredrevs: | |
331 | raise error.FilteredIndexError(rev) |
|
342 | raise error.FilteredIndexError(rev) | |
332 | return super(filteredchangelogmixin, self).node(rev) |
|
343 | return super(filteredchangelogmixin, self).node(rev) | |
333 |
|
344 | |||
334 | def linkrev(self, rev): |
|
345 | def linkrev(self, rev): | |
335 | """filtered version of revlog.linkrev""" |
|
346 | """filtered version of revlog.linkrev""" | |
336 | if rev in self.filteredrevs: |
|
347 | if rev in self.filteredrevs: | |
337 | raise error.FilteredIndexError(rev) |
|
348 | raise error.FilteredIndexError(rev) | |
338 | return super(filteredchangelogmixin, self).linkrev(rev) |
|
349 | return super(filteredchangelogmixin, self).linkrev(rev) | |
339 |
|
350 | |||
340 | def parentrevs(self, rev): |
|
351 | def parentrevs(self, rev): | |
341 | """filtered version of revlog.parentrevs""" |
|
352 | """filtered version of revlog.parentrevs""" | |
342 | if rev in self.filteredrevs: |
|
353 | if rev in self.filteredrevs: | |
343 | raise error.FilteredIndexError(rev) |
|
354 | raise error.FilteredIndexError(rev) | |
344 | return super(filteredchangelogmixin, self).parentrevs(rev) |
|
355 | return super(filteredchangelogmixin, self).parentrevs(rev) | |
345 |
|
356 | |||
346 | def flags(self, rev): |
|
357 | def flags(self, rev): | |
347 | """filtered version of revlog.flags""" |
|
358 | """filtered version of revlog.flags""" | |
348 | if rev in self.filteredrevs: |
|
359 | if rev in self.filteredrevs: | |
349 | raise error.FilteredIndexError(rev) |
|
360 | raise error.FilteredIndexError(rev) | |
350 | return super(filteredchangelogmixin, self).flags(rev) |
|
361 | return super(filteredchangelogmixin, self).flags(rev) | |
351 |
|
362 | |||
352 |
|
363 | |||
353 | class repoview(object): |
|
364 | class repoview(object): | |
354 | """Provide a read/write view of a repo through a filtered changelog |
|
365 | """Provide a read/write view of a repo through a filtered changelog | |
355 |
|
366 | |||
356 | This object is used to access a filtered version of a repository without |
|
367 | This object is used to access a filtered version of a repository without | |
357 | altering the original repository object itself. We can not alter the |
|
368 | altering the original repository object itself. We can not alter the | |
358 | original object for two main reasons: |
|
369 | original object for two main reasons: | |
359 | - It prevents the use of a repo with multiple filters at the same time. In |
|
370 | - It prevents the use of a repo with multiple filters at the same time. In | |
360 | particular when multiple threads are involved. |
|
371 | particular when multiple threads are involved. | |
361 | - It makes scope of the filtering harder to control. |
|
372 | - It makes scope of the filtering harder to control. | |
362 |
|
373 | |||
363 | This object behaves very closely to the original repository. All attribute |
|
374 | This object behaves very closely to the original repository. All attribute | |
364 | operations are done on the original repository: |
|
375 | operations are done on the original repository: | |
365 | - An access to `repoview.someattr` actually returns `repo.someattr`, |
|
376 | - An access to `repoview.someattr` actually returns `repo.someattr`, | |
366 | - A write to `repoview.someattr` actually sets value of `repo.someattr`, |
|
377 | - A write to `repoview.someattr` actually sets value of `repo.someattr`, | |
367 | - A deletion of `repoview.someattr` actually drops `someattr` |
|
378 | - A deletion of `repoview.someattr` actually drops `someattr` | |
368 | from `repo.__dict__`. |
|
379 | from `repo.__dict__`. | |
369 |
|
380 | |||
370 | The only exception is the `changelog` property. It is overridden to return |
|
381 | The only exception is the `changelog` property. It is overridden to return | |
371 | a (surface) copy of `repo.changelog` with some revisions filtered. The |
|
382 | a (surface) copy of `repo.changelog` with some revisions filtered. The | |
372 | `filtername` attribute of the view control the revisions that need to be |
|
383 | `filtername` attribute of the view control the revisions that need to be | |
373 | filtered. (the fact the changelog is copied is an implementation detail). |
|
384 | filtered. (the fact the changelog is copied is an implementation detail). | |
374 |
|
385 | |||
375 | Unlike attributes, this object intercepts all method calls. This means that |
|
386 | Unlike attributes, this object intercepts all method calls. This means that | |
376 | all methods are run on the `repoview` object with the filtered `changelog` |
|
387 | all methods are run on the `repoview` object with the filtered `changelog` | |
377 | property. For this purpose the simple `repoview` class must be mixed with |
|
388 | property. For this purpose the simple `repoview` class must be mixed with | |
378 | the actual class of the repository. This ensures that the resulting |
|
389 | the actual class of the repository. This ensures that the resulting | |
379 | `repoview` object have the very same methods than the repo object. This |
|
390 | `repoview` object have the very same methods than the repo object. This | |
380 | leads to the property below. |
|
391 | leads to the property below. | |
381 |
|
392 | |||
382 | repoview.method() --> repo.__class__.method(repoview) |
|
393 | repoview.method() --> repo.__class__.method(repoview) | |
383 |
|
394 | |||
384 | The inheritance has to be done dynamically because `repo` can be of any |
|
395 | The inheritance has to be done dynamically because `repo` can be of any | |
385 | subclasses of `localrepo`. Eg: `bundlerepo` or `statichttprepo`. |
|
396 | subclasses of `localrepo`. Eg: `bundlerepo` or `statichttprepo`. | |
386 | """ |
|
397 | """ | |
387 |
|
398 | |||
388 | def __init__(self, repo, filtername, visibilityexceptions=None): |
|
399 | def __init__(self, repo, filtername, visibilityexceptions=None): | |
389 | object.__setattr__(self, '_unfilteredrepo', repo) |
|
400 | object.__setattr__(self, '_unfilteredrepo', repo) | |
390 | object.__setattr__(self, 'filtername', filtername) |
|
401 | object.__setattr__(self, 'filtername', filtername) | |
391 | object.__setattr__(self, '_clcachekey', None) |
|
402 | object.__setattr__(self, '_clcachekey', None) | |
392 | object.__setattr__(self, '_clcache', None) |
|
403 | object.__setattr__(self, '_clcache', None) | |
393 | # revs which are exceptions and must not be hidden |
|
404 | # revs which are exceptions and must not be hidden | |
394 | object.__setattr__(self, '_visibilityexceptions', visibilityexceptions) |
|
405 | object.__setattr__(self, '_visibilityexceptions', visibilityexceptions) | |
395 |
|
406 | |||
396 | # not a propertycache on purpose we shall implement a proper cache later |
|
407 | # not a propertycache on purpose we shall implement a proper cache later | |
397 | @property |
|
408 | @property | |
398 | def changelog(self): |
|
409 | def changelog(self): | |
399 | """return a filtered version of the changeset |
|
410 | """return a filtered version of the changeset | |
400 |
|
411 | |||
401 | this changelog must not be used for writing""" |
|
412 | this changelog must not be used for writing""" | |
402 | # some cache may be implemented later |
|
413 | # some cache may be implemented later | |
403 | unfi = self._unfilteredrepo |
|
414 | unfi = self._unfilteredrepo | |
404 | unfichangelog = unfi.changelog |
|
415 | unfichangelog = unfi.changelog | |
405 | # bypass call to changelog.method |
|
416 | # bypass call to changelog.method | |
406 | unfiindex = unfichangelog.index |
|
417 | unfiindex = unfichangelog.index | |
407 | unfilen = len(unfiindex) |
|
418 | unfilen = len(unfiindex) | |
408 | unfinode = unfiindex[unfilen - 1][7] |
|
419 | unfinode = unfiindex[unfilen - 1][7] | |
409 | with util.timedcm('repo filter for %s', self.filtername): |
|
420 | with util.timedcm('repo filter for %s', self.filtername): | |
410 | revs = filterrevs(unfi, self.filtername, self._visibilityexceptions) |
|
421 | revs = filterrevs(unfi, self.filtername, self._visibilityexceptions) | |
411 | cl = self._clcache |
|
422 | cl = self._clcache | |
412 | newkey = (unfilen, unfinode, hash(revs), unfichangelog._delayed) |
|
423 | newkey = (unfilen, unfinode, hash(revs), unfichangelog._delayed) | |
413 | # if cl.index is not unfiindex, unfi.changelog would be |
|
424 | # if cl.index is not unfiindex, unfi.changelog would be | |
414 | # recreated, and our clcache refers to garbage object |
|
425 | # recreated, and our clcache refers to garbage object | |
415 | if cl is not None and ( |
|
426 | if cl is not None and ( | |
416 | cl.index is not unfiindex or newkey != self._clcachekey |
|
427 | cl.index is not unfiindex or newkey != self._clcachekey | |
417 | ): |
|
428 | ): | |
418 | cl = None |
|
429 | cl = None | |
419 | # could have been made None by the previous if |
|
430 | # could have been made None by the previous if | |
420 | if cl is None: |
|
431 | if cl is None: | |
421 | # Only filter if there's something to filter |
|
432 | # Only filter if there's something to filter | |
422 | cl = wrapchangelog(unfichangelog, revs) if revs else unfichangelog |
|
433 | cl = wrapchangelog(unfichangelog, revs) if revs else unfichangelog | |
423 | object.__setattr__(self, '_clcache', cl) |
|
434 | object.__setattr__(self, '_clcache', cl) | |
424 | object.__setattr__(self, '_clcachekey', newkey) |
|
435 | object.__setattr__(self, '_clcachekey', newkey) | |
425 | return cl |
|
436 | return cl | |
426 |
|
437 | |||
427 | def unfiltered(self): |
|
438 | def unfiltered(self): | |
428 | """Return an unfiltered version of a repo""" |
|
439 | """Return an unfiltered version of a repo""" | |
429 | return self._unfilteredrepo |
|
440 | return self._unfilteredrepo | |
430 |
|
441 | |||
431 | def filtered(self, name, visibilityexceptions=None): |
|
442 | def filtered(self, name, visibilityexceptions=None): | |
432 | """Return a filtered version of a repository""" |
|
443 | """Return a filtered version of a repository""" | |
433 | if name == self.filtername and not visibilityexceptions: |
|
444 | if name == self.filtername and not visibilityexceptions: | |
434 | return self |
|
445 | return self | |
435 | return self.unfiltered().filtered(name, visibilityexceptions) |
|
446 | return self.unfiltered().filtered(name, visibilityexceptions) | |
436 |
|
447 | |||
437 | def __repr__(self): |
|
448 | def __repr__(self): | |
438 | return '<%s:%s %r>' % ( |
|
449 | return '<%s:%s %r>' % ( | |
439 | self.__class__.__name__, |
|
450 | self.__class__.__name__, | |
440 | pycompat.sysstr(self.filtername), |
|
451 | pycompat.sysstr(self.filtername), | |
441 | self.unfiltered(), |
|
452 | self.unfiltered(), | |
442 | ) |
|
453 | ) | |
443 |
|
454 | |||
444 | # everything access are forwarded to the proxied repo |
|
455 | # everything access are forwarded to the proxied repo | |
445 | def __getattr__(self, attr): |
|
456 | def __getattr__(self, attr): | |
446 | return getattr(self._unfilteredrepo, attr) |
|
457 | return getattr(self._unfilteredrepo, attr) | |
447 |
|
458 | |||
448 | def __setattr__(self, attr, value): |
|
459 | def __setattr__(self, attr, value): | |
449 | return setattr(self._unfilteredrepo, attr, value) |
|
460 | return setattr(self._unfilteredrepo, attr, value) | |
450 |
|
461 | |||
451 | def __delattr__(self, attr): |
|
462 | def __delattr__(self, attr): | |
452 | return delattr(self._unfilteredrepo, attr) |
|
463 | return delattr(self._unfilteredrepo, attr) | |
453 |
|
464 | |||
454 |
|
465 | |||
455 | # Python <3.4 easily leaks types via __mro__. See |
|
466 | # Python <3.4 easily leaks types via __mro__. See | |
456 | # https://bugs.python.org/issue17950. We cache dynamically created types |
|
467 | # https://bugs.python.org/issue17950. We cache dynamically created types | |
457 | # so they won't be leaked on every invocation of repo.filtered(). |
|
468 | # so they won't be leaked on every invocation of repo.filtered(). | |
458 | _filteredrepotypes = weakref.WeakKeyDictionary() |
|
469 | _filteredrepotypes = weakref.WeakKeyDictionary() | |
459 |
|
470 | |||
460 |
|
471 | |||
461 | def newtype(base): |
|
472 | def newtype(base): | |
462 | """Create a new type with the repoview mixin and the given base class""" |
|
473 | """Create a new type with the repoview mixin and the given base class""" | |
463 | if base not in _filteredrepotypes: |
|
474 | if base not in _filteredrepotypes: | |
464 |
|
475 | |||
465 | class filteredrepo(repoview, base): |
|
476 | class filteredrepo(repoview, base): | |
466 | pass |
|
477 | pass | |
467 |
|
478 | |||
468 | _filteredrepotypes[base] = filteredrepo |
|
479 | _filteredrepotypes[base] = filteredrepo | |
469 | return _filteredrepotypes[base] |
|
480 | return _filteredrepotypes[base] |
@@ -1,157 +1,181 b'' | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > rebase= |
|
3 | > rebase= | |
4 | > |
|
4 | > | |
5 | > [phases] |
|
5 | > [phases] | |
6 | > publish=False |
|
6 | > publish=False | |
7 | > |
|
7 | > | |
8 | > [alias] |
|
8 | > [alias] | |
9 | > tglog = log -G --template "{rev}:{phase} '{desc}' {branches}\n" |
|
9 | > tglog = log -G --template "{rev}:{phase} '{desc}' {branches}\n" | |
10 | > EOF |
|
10 | > EOF | |
11 |
|
11 | |||
12 |
|
12 | |||
13 | $ hg init a |
|
13 | $ hg init a | |
14 | $ cd a |
|
14 | $ cd a | |
15 |
|
15 | |||
16 | $ echo A > A |
|
16 | $ echo A > A | |
17 | $ hg add A |
|
17 | $ hg add A | |
18 | $ hg ci -m A |
|
18 | $ hg ci -m A | |
19 |
|
19 | |||
20 | $ echo 'B' > B |
|
20 | $ echo 'B' > B | |
21 | $ hg add B |
|
21 | $ hg add B | |
22 | $ hg ci -m B |
|
22 | $ hg ci -m B | |
23 |
|
23 | |||
24 | $ echo C >> A |
|
24 | $ echo C >> A | |
25 | $ hg ci -m C |
|
25 | $ hg ci -m C | |
26 |
|
26 | |||
27 | $ hg up -q -C 0 |
|
27 | $ hg up -q -C 0 | |
28 |
|
28 | |||
29 | $ echo D >> A |
|
29 | $ echo D >> A | |
30 | $ hg ci -m D |
|
30 | $ hg ci -m D | |
31 | created new head |
|
31 | created new head | |
32 |
|
32 | |||
33 | $ echo E > E |
|
33 | $ echo E > E | |
34 | $ hg add E |
|
34 | $ hg add E | |
35 | $ hg ci -m E |
|
35 | $ hg ci -m E | |
36 |
|
36 | |||
37 | $ hg up -q -C 0 |
|
37 | $ hg up -q -C 0 | |
38 |
|
38 | |||
39 | $ hg branch 'notdefault' |
|
39 | $ hg branch 'notdefault' | |
40 | marked working directory as branch notdefault |
|
40 | marked working directory as branch notdefault | |
41 | (branches are permanent and global, did you want a bookmark?) |
|
41 | (branches are permanent and global, did you want a bookmark?) | |
42 | $ echo F >> A |
|
42 | $ echo F >> A | |
43 | $ hg ci -m F |
|
43 | $ hg ci -m F | |
44 |
|
44 | |||
45 | $ cd .. |
|
45 | $ cd .. | |
46 |
|
46 | |||
47 |
|
47 | |||
48 | Rebasing B onto E - check keep: and phases |
|
48 | Rebasing B onto E - check keep: and phases | |
49 |
|
49 | |||
50 | $ hg clone -q -u . a a1 |
|
50 | $ hg clone -q -u . a a1 | |
51 | $ cd a1 |
|
51 | $ cd a1 | |
52 | $ hg phase --force --secret 2 |
|
52 | $ hg phase --force --secret 2 | |
53 |
|
53 | |||
54 | $ hg tglog |
|
54 | $ hg tglog | |
55 | @ 5:draft 'F' notdefault |
|
55 | @ 5:draft 'F' notdefault | |
56 | | |
|
56 | | | |
57 | | o 4:draft 'E' |
|
57 | | o 4:draft 'E' | |
58 | | | |
|
58 | | | | |
59 | | o 3:draft 'D' |
|
59 | | o 3:draft 'D' | |
60 | |/ |
|
60 | |/ | |
61 | | o 2:secret 'C' |
|
61 | | o 2:secret 'C' | |
62 | | | |
|
62 | | | | |
63 | | o 1:draft 'B' |
|
63 | | o 1:draft 'B' | |
64 | |/ |
|
64 | |/ | |
65 | o 0:draft 'A' |
|
65 | o 0:draft 'A' | |
66 |
|
66 | |||
67 | $ hg rebase -s 1 -d 4 --keep |
|
67 | $ hg rebase -s 1 -d 4 --keep | |
68 | rebasing 1:27547f69f254 "B" |
|
68 | rebasing 1:27547f69f254 "B" | |
69 | rebasing 2:965c486023db "C" |
|
69 | rebasing 2:965c486023db "C" | |
70 | merging A |
|
70 | merging A | |
71 | warning: conflicts while merging A! (edit, then use 'hg resolve --mark') |
|
71 | warning: conflicts while merging A! (edit, then use 'hg resolve --mark') | |
72 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') |
|
72 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') | |
73 | [1] |
|
73 | [1] | |
74 |
|
74 | |||
75 | Solve the conflict and go on: |
|
75 | Solve the conflict and go on: | |
76 |
|
76 | |||
77 | $ echo 'conflict solved' > A |
|
77 | $ echo 'conflict solved' > A | |
78 | $ rm A.orig |
|
78 | $ rm A.orig | |
79 | $ hg resolve -m A |
|
79 | $ hg resolve -m A | |
80 | (no more unresolved files) |
|
80 | (no more unresolved files) | |
81 | continue: hg rebase --continue |
|
81 | continue: hg rebase --continue | |
82 | $ hg rebase --continue |
|
82 | $ hg rebase --continue | |
83 | already rebased 1:27547f69f254 "B" as 45396c49d53b |
|
83 | already rebased 1:27547f69f254 "B" as 45396c49d53b | |
84 | rebasing 2:965c486023db "C" |
|
84 | rebasing 2:965c486023db "C" | |
85 |
|
85 | |||
86 | $ hg tglog |
|
86 | $ hg tglog | |
87 | o 7:secret 'C' |
|
87 | o 7:secret 'C' | |
88 | | |
|
88 | | | |
89 | o 6:draft 'B' |
|
89 | o 6:draft 'B' | |
90 | | |
|
90 | | | |
91 | | @ 5:draft 'F' notdefault |
|
91 | | @ 5:draft 'F' notdefault | |
92 | | | |
|
92 | | | | |
93 | o | 4:draft 'E' |
|
93 | o | 4:draft 'E' | |
94 | | | |
|
94 | | | | |
95 | o | 3:draft 'D' |
|
95 | o | 3:draft 'D' | |
96 | |/ |
|
96 | |/ | |
97 | | o 2:secret 'C' |
|
97 | | o 2:secret 'C' | |
98 | | | |
|
98 | | | | |
99 | | o 1:draft 'B' |
|
99 | | o 1:draft 'B' | |
100 | |/ |
|
100 | |/ | |
101 | o 0:draft 'A' |
|
101 | o 0:draft 'A' | |
102 |
|
102 | |||
103 | $ cd .. |
|
103 | $ cd .. | |
104 |
|
104 | |||
105 |
|
105 | |||
106 | Rebase F onto E - check keepbranches: |
|
106 | Rebase F onto E - check keepbranches: | |
107 |
|
107 | |||
108 | $ hg clone -q -u . a a2 |
|
108 | $ hg clone -q -u . a a2 | |
109 | $ cd a2 |
|
109 | $ cd a2 | |
110 | $ hg phase --force --secret 2 |
|
110 | $ hg phase --force --secret 2 | |
111 |
|
111 | |||
112 | $ hg tglog |
|
112 | $ hg tglog | |
113 | @ 5:draft 'F' notdefault |
|
113 | @ 5:draft 'F' notdefault | |
114 | | |
|
114 | | | |
115 | | o 4:draft 'E' |
|
115 | | o 4:draft 'E' | |
116 | | | |
|
116 | | | | |
117 | | o 3:draft 'D' |
|
117 | | o 3:draft 'D' | |
118 | |/ |
|
118 | |/ | |
119 | | o 2:secret 'C' |
|
119 | | o 2:secret 'C' | |
120 | | | |
|
120 | | | | |
121 | | o 1:draft 'B' |
|
121 | | o 1:draft 'B' | |
122 | |/ |
|
122 | |/ | |
123 | o 0:draft 'A' |
|
123 | o 0:draft 'A' | |
124 |
|
124 | |||
125 | $ hg rebase -s 5 -d 4 --keepbranches |
|
125 | $ hg rebase -s 5 -d 4 --keepbranches | |
126 | rebasing 5:01e6ebbd8272 "F" (tip) |
|
126 | rebasing 5:01e6ebbd8272 "F" (tip) | |
127 | merging A |
|
127 | merging A | |
128 | warning: conflicts while merging A! (edit, then use 'hg resolve --mark') |
|
128 | warning: conflicts while merging A! (edit, then use 'hg resolve --mark') | |
129 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') |
|
129 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') | |
130 | [1] |
|
130 | [1] | |
131 |
|
131 | |||
132 | Solve the conflict and go on: |
|
132 | Solve the conflict and go on: | |
133 |
|
133 | |||
134 | $ echo 'conflict solved' > A |
|
134 | $ echo 'conflict solved' > A | |
135 | $ rm A.orig |
|
135 | $ rm A.orig | |
136 | $ hg resolve -m A |
|
136 | $ hg resolve -m A | |
137 | (no more unresolved files) |
|
137 | (no more unresolved files) | |
138 | continue: hg rebase --continue |
|
138 | continue: hg rebase --continue | |
139 | $ hg rebase --continue |
|
139 | $ hg rebase --continue | |
140 | rebasing 5:01e6ebbd8272 "F" (tip) |
|
140 | rebasing 5:01e6ebbd8272 "F" (tip) | |
141 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/01e6ebbd8272-6fd3a015-rebase.hg |
|
141 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/01e6ebbd8272-6fd3a015-rebase.hg | |
142 |
|
142 | |||
143 | $ hg tglog |
|
143 | $ hg tglog | |
144 | @ 5:draft 'F' notdefault |
|
144 | @ 5:draft 'F' notdefault | |
145 | | |
|
145 | | | |
146 | o 4:draft 'E' |
|
146 | o 4:draft 'E' | |
147 | | |
|
147 | | | |
148 | o 3:draft 'D' |
|
148 | o 3:draft 'D' | |
149 | | |
|
149 | | | |
150 | | o 2:secret 'C' |
|
150 | | o 2:secret 'C' | |
151 | | | |
|
151 | | | | |
152 | | o 1:draft 'B' |
|
152 | | o 1:draft 'B' | |
153 | |/ |
|
153 | |/ | |
154 | o 0:draft 'A' |
|
154 | o 0:draft 'A' | |
155 |
|
155 | |||
|
156 | $ cat >> .hg/hgrc << EOF | |||
|
157 | > [experimental] | |||
|
158 | > evolution.createmarkers=True | |||
|
159 | > EOF | |||
|
160 | ||||
|
161 | When updating away from a dirty, obsolete wdir, don't complain that the old p1 | |||
|
162 | is filtered and requires --hidden. | |||
|
163 | ||||
|
164 | $ echo conflict > A | |||
|
165 | $ hg debugobsolete 071d07019675449d53b7e312c65bcf28adbbdb64 965c486023dbfdc9c32c52dc249a231882fd5c17 | |||
|
166 | 1 new obsolescence markers | |||
|
167 | obsoleted 1 changesets | |||
|
168 | $ hg update -r 2 --config ui.merge=internal:merge --merge | |||
|
169 | merging A | |||
|
170 | warning: conflicts while merging A! (edit, then use 'hg resolve --mark') | |||
|
171 | 1 files updated, 0 files merged, 1 files removed, 1 files unresolved | |||
|
172 | use 'hg resolve' to retry unresolved file merges | |||
|
173 | [1] | |||
|
174 | $ hg resolve A | |||
|
175 | merging A | |||
|
176 | warning: conflicts while merging A! (edit, then use 'hg resolve --mark') | |||
|
177 | [1] | |||
|
178 | ||||
|
179 | $ hg up -C -q . | |||
156 |
|
180 | |||
157 | $ cd .. |
|
181 | $ cd .. |
@@ -1,2138 +1,2140 b'' | |||||
1 | ========================== |
|
1 | ========================== | |
2 | Test rebase with obsolete |
|
2 | Test rebase with obsolete | |
3 | ========================== |
|
3 | ========================== | |
4 |
|
4 | |||
5 | Enable obsolete |
|
5 | Enable obsolete | |
6 |
|
6 | |||
7 | $ cat >> $HGRCPATH << EOF |
|
7 | $ cat >> $HGRCPATH << EOF | |
8 | > [ui] |
|
8 | > [ui] | |
9 | > logtemplate= {rev}:{node|short} {desc|firstline}{if(obsolete,' ({obsfate})')} |
|
9 | > logtemplate= {rev}:{node|short} {desc|firstline}{if(obsolete,' ({obsfate})')} | |
10 | > [experimental] |
|
10 | > [experimental] | |
11 | > evolution.createmarkers=True |
|
11 | > evolution.createmarkers=True | |
12 | > evolution.allowunstable=True |
|
12 | > evolution.allowunstable=True | |
13 | > [phases] |
|
13 | > [phases] | |
14 | > publish=False |
|
14 | > publish=False | |
15 | > [extensions] |
|
15 | > [extensions] | |
16 | > rebase= |
|
16 | > rebase= | |
17 | > drawdag=$TESTDIR/drawdag.py |
|
17 | > drawdag=$TESTDIR/drawdag.py | |
18 | > strip= |
|
18 | > strip= | |
19 | > EOF |
|
19 | > EOF | |
20 |
|
20 | |||
21 | Setup rebase canonical repo |
|
21 | Setup rebase canonical repo | |
22 |
|
22 | |||
23 | $ hg init base |
|
23 | $ hg init base | |
24 | $ cd base |
|
24 | $ cd base | |
25 | $ hg unbundle "$TESTDIR/bundles/rebase.hg" |
|
25 | $ hg unbundle "$TESTDIR/bundles/rebase.hg" | |
26 | adding changesets |
|
26 | adding changesets | |
27 | adding manifests |
|
27 | adding manifests | |
28 | adding file changes |
|
28 | adding file changes | |
29 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
29 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
30 | new changesets cd010b8cd998:02de42196ebe (8 drafts) |
|
30 | new changesets cd010b8cd998:02de42196ebe (8 drafts) | |
31 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
31 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
32 | $ hg up tip |
|
32 | $ hg up tip | |
33 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
33 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
34 | $ hg log -G |
|
34 | $ hg log -G | |
35 | @ 7:02de42196ebe H |
|
35 | @ 7:02de42196ebe H | |
36 | | |
|
36 | | | |
37 | | o 6:eea13746799a G |
|
37 | | o 6:eea13746799a G | |
38 | |/| |
|
38 | |/| | |
39 | o | 5:24b6387c8c8c F |
|
39 | o | 5:24b6387c8c8c F | |
40 | | | |
|
40 | | | | |
41 | | o 4:9520eea781bc E |
|
41 | | o 4:9520eea781bc E | |
42 | |/ |
|
42 | |/ | |
43 | | o 3:32af7686d403 D |
|
43 | | o 3:32af7686d403 D | |
44 | | | |
|
44 | | | | |
45 | | o 2:5fddd98957c8 C |
|
45 | | o 2:5fddd98957c8 C | |
46 | | | |
|
46 | | | | |
47 | | o 1:42ccdea3bb16 B |
|
47 | | o 1:42ccdea3bb16 B | |
48 | |/ |
|
48 | |/ | |
49 | o 0:cd010b8cd998 A |
|
49 | o 0:cd010b8cd998 A | |
50 |
|
50 | |||
51 | $ cd .. |
|
51 | $ cd .. | |
52 |
|
52 | |||
53 | simple rebase |
|
53 | simple rebase | |
54 | --------------------------------- |
|
54 | --------------------------------- | |
55 |
|
55 | |||
56 | $ hg clone base simple |
|
56 | $ hg clone base simple | |
57 | updating to branch default |
|
57 | updating to branch default | |
58 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
58 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
59 | $ cd simple |
|
59 | $ cd simple | |
60 | $ hg up 32af7686d403 |
|
60 | $ hg up 32af7686d403 | |
61 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
61 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
62 | $ hg rebase -d eea13746799a |
|
62 | $ hg rebase -d eea13746799a | |
63 | rebasing 1:42ccdea3bb16 "B" |
|
63 | rebasing 1:42ccdea3bb16 "B" | |
64 | rebasing 2:5fddd98957c8 "C" |
|
64 | rebasing 2:5fddd98957c8 "C" | |
65 | rebasing 3:32af7686d403 "D" |
|
65 | rebasing 3:32af7686d403 "D" | |
66 | $ hg log -G |
|
66 | $ hg log -G | |
67 | @ 10:8eeb3c33ad33 D |
|
67 | @ 10:8eeb3c33ad33 D | |
68 | | |
|
68 | | | |
69 | o 9:2327fea05063 C |
|
69 | o 9:2327fea05063 C | |
70 | | |
|
70 | | | |
71 | o 8:e4e5be0395b2 B |
|
71 | o 8:e4e5be0395b2 B | |
72 | | |
|
72 | | | |
73 | | o 7:02de42196ebe H |
|
73 | | o 7:02de42196ebe H | |
74 | | | |
|
74 | | | | |
75 | o | 6:eea13746799a G |
|
75 | o | 6:eea13746799a G | |
76 | |\| |
|
76 | |\| | |
77 | | o 5:24b6387c8c8c F |
|
77 | | o 5:24b6387c8c8c F | |
78 | | | |
|
78 | | | | |
79 | o | 4:9520eea781bc E |
|
79 | o | 4:9520eea781bc E | |
80 | |/ |
|
80 | |/ | |
81 | o 0:cd010b8cd998 A |
|
81 | o 0:cd010b8cd998 A | |
82 |
|
82 | |||
83 | $ hg log --hidden -G |
|
83 | $ hg log --hidden -G | |
84 | @ 10:8eeb3c33ad33 D |
|
84 | @ 10:8eeb3c33ad33 D | |
85 | | |
|
85 | | | |
86 | o 9:2327fea05063 C |
|
86 | o 9:2327fea05063 C | |
87 | | |
|
87 | | | |
88 | o 8:e4e5be0395b2 B |
|
88 | o 8:e4e5be0395b2 B | |
89 | | |
|
89 | | | |
90 | | o 7:02de42196ebe H |
|
90 | | o 7:02de42196ebe H | |
91 | | | |
|
91 | | | | |
92 | o | 6:eea13746799a G |
|
92 | o | 6:eea13746799a G | |
93 | |\| |
|
93 | |\| | |
94 | | o 5:24b6387c8c8c F |
|
94 | | o 5:24b6387c8c8c F | |
95 | | | |
|
95 | | | | |
96 | o | 4:9520eea781bc E |
|
96 | o | 4:9520eea781bc E | |
97 | |/ |
|
97 | |/ | |
98 | | x 3:32af7686d403 D (rewritten using rebase as 10:8eeb3c33ad33) |
|
98 | | x 3:32af7686d403 D (rewritten using rebase as 10:8eeb3c33ad33) | |
99 | | | |
|
99 | | | | |
100 | | x 2:5fddd98957c8 C (rewritten using rebase as 9:2327fea05063) |
|
100 | | x 2:5fddd98957c8 C (rewritten using rebase as 9:2327fea05063) | |
101 | | | |
|
101 | | | | |
102 | | x 1:42ccdea3bb16 B (rewritten using rebase as 8:e4e5be0395b2) |
|
102 | | x 1:42ccdea3bb16 B (rewritten using rebase as 8:e4e5be0395b2) | |
103 | |/ |
|
103 | |/ | |
104 | o 0:cd010b8cd998 A |
|
104 | o 0:cd010b8cd998 A | |
105 |
|
105 | |||
106 | $ hg debugobsolete |
|
106 | $ hg debugobsolete | |
107 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 e4e5be0395b2cbd471ed22a26b1b6a1a0658a794 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
107 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 e4e5be0395b2cbd471ed22a26b1b6a1a0658a794 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
108 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 2327fea05063f39961b14cb69435a9898dc9a245 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
108 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 2327fea05063f39961b14cb69435a9898dc9a245 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
109 | 32af7686d403cf45b5d95f2d70cebea587ac806a 8eeb3c33ad33d452c89e5dcf611c347f978fb42b 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
109 | 32af7686d403cf45b5d95f2d70cebea587ac806a 8eeb3c33ad33d452c89e5dcf611c347f978fb42b 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
110 |
|
110 | |||
111 |
|
111 | |||
112 | $ cd .. |
|
112 | $ cd .. | |
113 |
|
113 | |||
114 | empty changeset |
|
114 | empty changeset | |
115 | --------------------------------- |
|
115 | --------------------------------- | |
116 |
|
116 | |||
117 | $ hg clone base empty |
|
117 | $ hg clone base empty | |
118 | updating to branch default |
|
118 | updating to branch default | |
119 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
119 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
120 | $ cd empty |
|
120 | $ cd empty | |
121 | $ hg up eea13746799a |
|
121 | $ hg up eea13746799a | |
122 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
122 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
123 |
|
123 | |||
124 | We make a copy of both the first changeset in the rebased and some other in the |
|
124 | We make a copy of both the first changeset in the rebased and some other in the | |
125 | set. |
|
125 | set. | |
126 |
|
126 | |||
127 | $ hg graft 42ccdea3bb16 32af7686d403 |
|
127 | $ hg graft 42ccdea3bb16 32af7686d403 | |
128 | grafting 1:42ccdea3bb16 "B" |
|
128 | grafting 1:42ccdea3bb16 "B" | |
129 | grafting 3:32af7686d403 "D" |
|
129 | grafting 3:32af7686d403 "D" | |
130 | $ hg rebase -s 42ccdea3bb16 -d . |
|
130 | $ hg rebase -s 42ccdea3bb16 -d . | |
131 | rebasing 1:42ccdea3bb16 "B" |
|
131 | rebasing 1:42ccdea3bb16 "B" | |
132 | note: not rebasing 1:42ccdea3bb16 "B", its destination already has all its changes |
|
132 | note: not rebasing 1:42ccdea3bb16 "B", its destination already has all its changes | |
133 | rebasing 2:5fddd98957c8 "C" |
|
133 | rebasing 2:5fddd98957c8 "C" | |
134 | rebasing 3:32af7686d403 "D" |
|
134 | rebasing 3:32af7686d403 "D" | |
135 | note: not rebasing 3:32af7686d403 "D", its destination already has all its changes |
|
135 | note: not rebasing 3:32af7686d403 "D", its destination already has all its changes | |
136 | $ hg log -G |
|
136 | $ hg log -G | |
137 | o 10:5ae4c968c6ac C |
|
137 | o 10:5ae4c968c6ac C | |
138 | | |
|
138 | | | |
139 | @ 9:08483444fef9 D |
|
139 | @ 9:08483444fef9 D | |
140 | | |
|
140 | | | |
141 | o 8:8877864f1edb B |
|
141 | o 8:8877864f1edb B | |
142 | | |
|
142 | | | |
143 | | o 7:02de42196ebe H |
|
143 | | o 7:02de42196ebe H | |
144 | | | |
|
144 | | | | |
145 | o | 6:eea13746799a G |
|
145 | o | 6:eea13746799a G | |
146 | |\| |
|
146 | |\| | |
147 | | o 5:24b6387c8c8c F |
|
147 | | o 5:24b6387c8c8c F | |
148 | | | |
|
148 | | | | |
149 | o | 4:9520eea781bc E |
|
149 | o | 4:9520eea781bc E | |
150 | |/ |
|
150 | |/ | |
151 | o 0:cd010b8cd998 A |
|
151 | o 0:cd010b8cd998 A | |
152 |
|
152 | |||
153 | $ hg log --hidden -G |
|
153 | $ hg log --hidden -G | |
154 | o 10:5ae4c968c6ac C |
|
154 | o 10:5ae4c968c6ac C | |
155 | | |
|
155 | | | |
156 | @ 9:08483444fef9 D |
|
156 | @ 9:08483444fef9 D | |
157 | | |
|
157 | | | |
158 | o 8:8877864f1edb B |
|
158 | o 8:8877864f1edb B | |
159 | | |
|
159 | | | |
160 | | o 7:02de42196ebe H |
|
160 | | o 7:02de42196ebe H | |
161 | | | |
|
161 | | | | |
162 | o | 6:eea13746799a G |
|
162 | o | 6:eea13746799a G | |
163 | |\| |
|
163 | |\| | |
164 | | o 5:24b6387c8c8c F |
|
164 | | o 5:24b6387c8c8c F | |
165 | | | |
|
165 | | | | |
166 | o | 4:9520eea781bc E |
|
166 | o | 4:9520eea781bc E | |
167 | |/ |
|
167 | |/ | |
168 | | x 3:32af7686d403 D (pruned using rebase) |
|
168 | | x 3:32af7686d403 D (pruned using rebase) | |
169 | | | |
|
169 | | | | |
170 | | x 2:5fddd98957c8 C (rewritten using rebase as 10:5ae4c968c6ac) |
|
170 | | x 2:5fddd98957c8 C (rewritten using rebase as 10:5ae4c968c6ac) | |
171 | | | |
|
171 | | | | |
172 | | x 1:42ccdea3bb16 B (pruned using rebase) |
|
172 | | x 1:42ccdea3bb16 B (pruned using rebase) | |
173 | |/ |
|
173 | |/ | |
174 | o 0:cd010b8cd998 A |
|
174 | o 0:cd010b8cd998 A | |
175 |
|
175 | |||
176 | $ hg debugobsolete |
|
176 | $ hg debugobsolete | |
177 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} |
|
177 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} | |
178 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
178 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
179 | 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} |
|
179 | 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} | |
180 |
|
180 | |||
181 |
|
181 | |||
182 | More complex case where part of the rebase set were already rebased |
|
182 | More complex case where part of the rebase set were already rebased | |
183 |
|
183 | |||
184 | $ hg rebase --rev 'desc(D)' --dest 'desc(H)' |
|
184 | $ hg rebase --rev 'desc(D)' --dest 'desc(H)' | |
185 | rebasing 9:08483444fef9 "D" |
|
185 | rebasing 9:08483444fef9 "D" | |
186 | 1 new orphan changesets |
|
186 | 1 new orphan changesets | |
187 | $ hg debugobsolete |
|
187 | $ hg debugobsolete | |
188 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} |
|
188 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} | |
189 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
189 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
190 | 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} |
|
190 | 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} | |
191 | 08483444fef91d6224f6655ee586a65d263ad34c 4596109a6a4328c398bde3a4a3b6737cfade3003 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
191 | 08483444fef91d6224f6655ee586a65d263ad34c 4596109a6a4328c398bde3a4a3b6737cfade3003 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
192 | $ hg log -G |
|
192 | $ hg log -G | |
193 | @ 11:4596109a6a43 D |
|
193 | @ 11:4596109a6a43 D | |
194 | | |
|
194 | | | |
195 | | * 10:5ae4c968c6ac C |
|
195 | | * 10:5ae4c968c6ac C | |
196 | | | |
|
196 | | | | |
197 | | x 9:08483444fef9 D (rewritten using rebase as 11:4596109a6a43) |
|
197 | | x 9:08483444fef9 D (rewritten using rebase as 11:4596109a6a43) | |
198 | | | |
|
198 | | | | |
199 | | o 8:8877864f1edb B |
|
199 | | o 8:8877864f1edb B | |
200 | | | |
|
200 | | | | |
201 | o | 7:02de42196ebe H |
|
201 | o | 7:02de42196ebe H | |
202 | | | |
|
202 | | | | |
203 | | o 6:eea13746799a G |
|
203 | | o 6:eea13746799a G | |
204 | |/| |
|
204 | |/| | |
205 | o | 5:24b6387c8c8c F |
|
205 | o | 5:24b6387c8c8c F | |
206 | | | |
|
206 | | | | |
207 | | o 4:9520eea781bc E |
|
207 | | o 4:9520eea781bc E | |
208 | |/ |
|
208 | |/ | |
209 | o 0:cd010b8cd998 A |
|
209 | o 0:cd010b8cd998 A | |
210 |
|
210 | |||
211 | $ hg rebase --source 'desc(B)' --dest 'tip' --config experimental.rebaseskipobsolete=True |
|
211 | $ hg rebase --source 'desc(B)' --dest 'tip' --config experimental.rebaseskipobsolete=True | |
212 | rebasing 8:8877864f1edb "B" |
|
212 | rebasing 8:8877864f1edb "B" | |
213 | note: not rebasing 9:08483444fef9 "D", already in destination as 11:4596109a6a43 "D" (tip) |
|
213 | note: not rebasing 9:08483444fef9 "D", already in destination as 11:4596109a6a43 "D" (tip) | |
214 | rebasing 10:5ae4c968c6ac "C" |
|
214 | rebasing 10:5ae4c968c6ac "C" | |
215 | $ hg debugobsolete |
|
215 | $ hg debugobsolete | |
216 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} |
|
216 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} | |
217 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
217 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
218 | 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} |
|
218 | 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} | |
219 | 08483444fef91d6224f6655ee586a65d263ad34c 4596109a6a4328c398bde3a4a3b6737cfade3003 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
219 | 08483444fef91d6224f6655ee586a65d263ad34c 4596109a6a4328c398bde3a4a3b6737cfade3003 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
220 | 8877864f1edb05d0e07dc4ba77b67a80a7b86672 462a34d07e599b87ea08676a449373fe4e2e1347 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
220 | 8877864f1edb05d0e07dc4ba77b67a80a7b86672 462a34d07e599b87ea08676a449373fe4e2e1347 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
221 | 5ae4c968c6aca831df823664e706c9d4aa34473d 98f6af4ee9539e14da4465128f894c274900b6e5 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
221 | 5ae4c968c6aca831df823664e706c9d4aa34473d 98f6af4ee9539e14da4465128f894c274900b6e5 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
222 | $ hg log --rev 'contentdivergent()' |
|
222 | $ hg log --rev 'contentdivergent()' | |
223 | $ hg log -G |
|
223 | $ hg log -G | |
224 | o 13:98f6af4ee953 C |
|
224 | o 13:98f6af4ee953 C | |
225 | | |
|
225 | | | |
226 | o 12:462a34d07e59 B |
|
226 | o 12:462a34d07e59 B | |
227 | | |
|
227 | | | |
228 | @ 11:4596109a6a43 D |
|
228 | @ 11:4596109a6a43 D | |
229 | | |
|
229 | | | |
230 | o 7:02de42196ebe H |
|
230 | o 7:02de42196ebe H | |
231 | | |
|
231 | | | |
232 | | o 6:eea13746799a G |
|
232 | | o 6:eea13746799a G | |
233 | |/| |
|
233 | |/| | |
234 | o | 5:24b6387c8c8c F |
|
234 | o | 5:24b6387c8c8c F | |
235 | | | |
|
235 | | | | |
236 | | o 4:9520eea781bc E |
|
236 | | o 4:9520eea781bc E | |
237 | |/ |
|
237 | |/ | |
238 | o 0:cd010b8cd998 A |
|
238 | o 0:cd010b8cd998 A | |
239 |
|
239 | |||
240 | $ hg log --style default --debug -r 4596109a6a4328c398bde3a4a3b6737cfade3003 |
|
240 | $ hg log --style default --debug -r 4596109a6a4328c398bde3a4a3b6737cfade3003 | |
241 | changeset: 11:4596109a6a4328c398bde3a4a3b6737cfade3003 |
|
241 | changeset: 11:4596109a6a4328c398bde3a4a3b6737cfade3003 | |
242 | phase: draft |
|
242 | phase: draft | |
243 | parent: 7:02de42196ebee42ef284b6780a87cdc96e8eaab6 |
|
243 | parent: 7:02de42196ebee42ef284b6780a87cdc96e8eaab6 | |
244 | parent: -1:0000000000000000000000000000000000000000 |
|
244 | parent: -1:0000000000000000000000000000000000000000 | |
245 | manifest: 11:a91006e3a02f1edf631f7018e6e5684cf27dd905 |
|
245 | manifest: 11:a91006e3a02f1edf631f7018e6e5684cf27dd905 | |
246 | user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
|
246 | user: Nicolas Dumazet <nicdumz.commits@gmail.com> | |
247 | date: Sat Apr 30 15:24:48 2011 +0200 |
|
247 | date: Sat Apr 30 15:24:48 2011 +0200 | |
248 | files+: D |
|
248 | files+: D | |
249 | extra: branch=default |
|
249 | extra: branch=default | |
250 | extra: rebase_source=08483444fef91d6224f6655ee586a65d263ad34c |
|
250 | extra: rebase_source=08483444fef91d6224f6655ee586a65d263ad34c | |
251 | extra: source=32af7686d403cf45b5d95f2d70cebea587ac806a |
|
251 | extra: source=32af7686d403cf45b5d95f2d70cebea587ac806a | |
252 | description: |
|
252 | description: | |
253 | D |
|
253 | D | |
254 |
|
254 | |||
255 |
|
255 | |||
256 | $ hg up -qr 'desc(G)' |
|
256 | $ hg up -qr 'desc(G)' | |
257 | $ hg graft 4596109a6a4328c398bde3a4a3b6737cfade3003 |
|
257 | $ hg graft 4596109a6a4328c398bde3a4a3b6737cfade3003 | |
258 | grafting 11:4596109a6a43 "D" |
|
258 | grafting 11:4596109a6a43 "D" | |
259 | $ hg up -qr 'desc(E)' |
|
259 | $ hg up -qr 'desc(E)' | |
260 | $ hg rebase -s tip -d . |
|
260 | $ hg rebase -s tip -d . | |
261 | rebasing 14:9e36056a46e3 "D" (tip) |
|
261 | rebasing 14:9e36056a46e3 "D" (tip) | |
262 | $ hg log --style default --debug -r tip |
|
262 | $ hg log --style default --debug -r tip | |
263 | changeset: 15:627d4614809036ba22b9e7cb31638ddc06ab99ab |
|
263 | changeset: 15:627d4614809036ba22b9e7cb31638ddc06ab99ab | |
264 | tag: tip |
|
264 | tag: tip | |
265 | phase: draft |
|
265 | phase: draft | |
266 | parent: 4:9520eea781bcca16c1e15acc0ba14335a0e8e5ba |
|
266 | parent: 4:9520eea781bcca16c1e15acc0ba14335a0e8e5ba | |
267 | parent: -1:0000000000000000000000000000000000000000 |
|
267 | parent: -1:0000000000000000000000000000000000000000 | |
268 | manifest: 15:648e8ede73ae3e497d093d3a4c8fcc2daa864f42 |
|
268 | manifest: 15:648e8ede73ae3e497d093d3a4c8fcc2daa864f42 | |
269 | user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
|
269 | user: Nicolas Dumazet <nicdumz.commits@gmail.com> | |
270 | date: Sat Apr 30 15:24:48 2011 +0200 |
|
270 | date: Sat Apr 30 15:24:48 2011 +0200 | |
271 | files+: D |
|
271 | files+: D | |
272 | extra: branch=default |
|
272 | extra: branch=default | |
273 | extra: intermediate-source=4596109a6a4328c398bde3a4a3b6737cfade3003 |
|
273 | extra: intermediate-source=4596109a6a4328c398bde3a4a3b6737cfade3003 | |
274 | extra: rebase_source=9e36056a46e37c9776168c7375734eebc70e294f |
|
274 | extra: rebase_source=9e36056a46e37c9776168c7375734eebc70e294f | |
275 | extra: source=32af7686d403cf45b5d95f2d70cebea587ac806a |
|
275 | extra: source=32af7686d403cf45b5d95f2d70cebea587ac806a | |
276 | description: |
|
276 | description: | |
277 | D |
|
277 | D | |
278 |
|
278 | |||
279 |
|
279 | |||
280 | Start rebase from a commit that is obsolete but not hidden only because it's |
|
280 | Start rebase from a commit that is obsolete but not hidden only because it's | |
281 | a working copy parent. We should be moved back to the starting commit as usual |
|
281 | a working copy parent. We should be moved back to the starting commit as usual | |
282 | even though it is hidden (until we're moved there). |
|
282 | even though it is hidden (until we're moved there). | |
283 |
|
283 | |||
284 | $ hg --hidden up -qr 'first(hidden())' |
|
284 | $ hg --hidden up -qr 'first(hidden())' | |
285 | updated to hidden changeset 42ccdea3bb16 |
|
285 | updated to hidden changeset 42ccdea3bb16 | |
286 | (hidden revision '42ccdea3bb16' is pruned) |
|
286 | (hidden revision '42ccdea3bb16' is pruned) | |
287 | $ hg rebase --rev 13 --dest 15 |
|
287 | $ hg rebase --rev 13 --dest 15 | |
288 | rebasing 13:98f6af4ee953 "C" |
|
288 | rebasing 13:98f6af4ee953 "C" | |
289 | $ hg log -G |
|
289 | $ hg log -G | |
290 | o 16:294a2b93eb4d C |
|
290 | o 16:294a2b93eb4d C | |
291 | | |
|
291 | | | |
292 | o 15:627d46148090 D |
|
292 | o 15:627d46148090 D | |
293 | | |
|
293 | | | |
294 | | o 12:462a34d07e59 B |
|
294 | | o 12:462a34d07e59 B | |
295 | | | |
|
295 | | | | |
296 | | o 11:4596109a6a43 D |
|
296 | | o 11:4596109a6a43 D | |
297 | | | |
|
297 | | | | |
298 | | o 7:02de42196ebe H |
|
298 | | o 7:02de42196ebe H | |
299 | | | |
|
299 | | | | |
300 | +---o 6:eea13746799a G |
|
300 | +---o 6:eea13746799a G | |
301 | | |/ |
|
301 | | |/ | |
302 | | o 5:24b6387c8c8c F |
|
302 | | o 5:24b6387c8c8c F | |
303 | | | |
|
303 | | | | |
304 | o | 4:9520eea781bc E |
|
304 | o | 4:9520eea781bc E | |
305 | |/ |
|
305 | |/ | |
306 | | @ 1:42ccdea3bb16 B (pruned using rebase) |
|
306 | | @ 1:42ccdea3bb16 B (pruned using rebase) | |
307 | |/ |
|
307 | |/ | |
308 | o 0:cd010b8cd998 A |
|
308 | o 0:cd010b8cd998 A | |
309 |
|
309 | |||
310 |
|
310 | |||
311 | $ cd .. |
|
311 | $ cd .. | |
312 |
|
312 | |||
313 | collapse rebase |
|
313 | collapse rebase | |
314 | --------------------------------- |
|
314 | --------------------------------- | |
315 |
|
315 | |||
316 | $ hg clone base collapse |
|
316 | $ hg clone base collapse | |
317 | updating to branch default |
|
317 | updating to branch default | |
318 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
318 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
319 | $ cd collapse |
|
319 | $ cd collapse | |
320 | $ hg rebase -s 42ccdea3bb16 -d eea13746799a --collapse |
|
320 | $ hg rebase -s 42ccdea3bb16 -d eea13746799a --collapse | |
321 | rebasing 1:42ccdea3bb16 "B" |
|
321 | rebasing 1:42ccdea3bb16 "B" | |
322 | rebasing 2:5fddd98957c8 "C" |
|
322 | rebasing 2:5fddd98957c8 "C" | |
323 | rebasing 3:32af7686d403 "D" |
|
323 | rebasing 3:32af7686d403 "D" | |
324 | $ hg log -G |
|
324 | $ hg log -G | |
325 | o 8:4dc2197e807b Collapsed revision |
|
325 | o 8:4dc2197e807b Collapsed revision | |
326 | | |
|
326 | | | |
327 | | @ 7:02de42196ebe H |
|
327 | | @ 7:02de42196ebe H | |
328 | | | |
|
328 | | | | |
329 | o | 6:eea13746799a G |
|
329 | o | 6:eea13746799a G | |
330 | |\| |
|
330 | |\| | |
331 | | o 5:24b6387c8c8c F |
|
331 | | o 5:24b6387c8c8c F | |
332 | | | |
|
332 | | | | |
333 | o | 4:9520eea781bc E |
|
333 | o | 4:9520eea781bc E | |
334 | |/ |
|
334 | |/ | |
335 | o 0:cd010b8cd998 A |
|
335 | o 0:cd010b8cd998 A | |
336 |
|
336 | |||
337 | $ hg log --hidden -G |
|
337 | $ hg log --hidden -G | |
338 | o 8:4dc2197e807b Collapsed revision |
|
338 | o 8:4dc2197e807b Collapsed revision | |
339 | | |
|
339 | | | |
340 | | @ 7:02de42196ebe H |
|
340 | | @ 7:02de42196ebe H | |
341 | | | |
|
341 | | | | |
342 | o | 6:eea13746799a G |
|
342 | o | 6:eea13746799a G | |
343 | |\| |
|
343 | |\| | |
344 | | o 5:24b6387c8c8c F |
|
344 | | o 5:24b6387c8c8c F | |
345 | | | |
|
345 | | | | |
346 | o | 4:9520eea781bc E |
|
346 | o | 4:9520eea781bc E | |
347 | |/ |
|
347 | |/ | |
348 | | x 3:32af7686d403 D (rewritten using rebase as 8:4dc2197e807b) |
|
348 | | x 3:32af7686d403 D (rewritten using rebase as 8:4dc2197e807b) | |
349 | | | |
|
349 | | | | |
350 | | x 2:5fddd98957c8 C (rewritten using rebase as 8:4dc2197e807b) |
|
350 | | x 2:5fddd98957c8 C (rewritten using rebase as 8:4dc2197e807b) | |
351 | | | |
|
351 | | | | |
352 | | x 1:42ccdea3bb16 B (rewritten using rebase as 8:4dc2197e807b) |
|
352 | | x 1:42ccdea3bb16 B (rewritten using rebase as 8:4dc2197e807b) | |
353 | |/ |
|
353 | |/ | |
354 | o 0:cd010b8cd998 A |
|
354 | o 0:cd010b8cd998 A | |
355 |
|
355 | |||
356 | $ hg id --debug -r tip |
|
356 | $ hg id --debug -r tip | |
357 | 4dc2197e807bae9817f09905b50ab288be2dbbcf tip |
|
357 | 4dc2197e807bae9817f09905b50ab288be2dbbcf tip | |
358 | $ hg debugobsolete |
|
358 | $ hg debugobsolete | |
359 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'fold-id': '6fb65cdc', 'fold-idx': '1', 'fold-size': '3', 'operation': 'rebase', 'user': 'test'} |
|
359 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'fold-id': '6fb65cdc', 'fold-idx': '1', 'fold-size': '3', 'operation': 'rebase', 'user': 'test'} | |
360 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'fold-id': '6fb65cdc', 'fold-idx': '2', 'fold-size': '3', 'operation': 'rebase', 'user': 'test'} |
|
360 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'fold-id': '6fb65cdc', 'fold-idx': '2', 'fold-size': '3', 'operation': 'rebase', 'user': 'test'} | |
361 | 32af7686d403cf45b5d95f2d70cebea587ac806a 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'fold-id': '6fb65cdc', 'fold-idx': '3', 'fold-size': '3', 'operation': 'rebase', 'user': 'test'} |
|
361 | 32af7686d403cf45b5d95f2d70cebea587ac806a 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'fold-id': '6fb65cdc', 'fold-idx': '3', 'fold-size': '3', 'operation': 'rebase', 'user': 'test'} | |
362 |
|
362 | |||
363 | $ cd .. |
|
363 | $ cd .. | |
364 |
|
364 | |||
365 | Rebase set has hidden descendants |
|
365 | Rebase set has hidden descendants | |
366 | --------------------------------- |
|
366 | --------------------------------- | |
367 |
|
367 | |||
368 | We rebase a changeset which has hidden descendants. Hidden changesets must not |
|
368 | We rebase a changeset which has hidden descendants. Hidden changesets must not | |
369 | be rebased. |
|
369 | be rebased. | |
370 |
|
370 | |||
371 | $ hg clone base hidden |
|
371 | $ hg clone base hidden | |
372 | updating to branch default |
|
372 | updating to branch default | |
373 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
373 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
374 | $ cd hidden |
|
374 | $ cd hidden | |
375 | $ hg log -G |
|
375 | $ hg log -G | |
376 | @ 7:02de42196ebe H |
|
376 | @ 7:02de42196ebe H | |
377 | | |
|
377 | | | |
378 | | o 6:eea13746799a G |
|
378 | | o 6:eea13746799a G | |
379 | |/| |
|
379 | |/| | |
380 | o | 5:24b6387c8c8c F |
|
380 | o | 5:24b6387c8c8c F | |
381 | | | |
|
381 | | | | |
382 | | o 4:9520eea781bc E |
|
382 | | o 4:9520eea781bc E | |
383 | |/ |
|
383 | |/ | |
384 | | o 3:32af7686d403 D |
|
384 | | o 3:32af7686d403 D | |
385 | | | |
|
385 | | | | |
386 | | o 2:5fddd98957c8 C |
|
386 | | o 2:5fddd98957c8 C | |
387 | | | |
|
387 | | | | |
388 | | o 1:42ccdea3bb16 B |
|
388 | | o 1:42ccdea3bb16 B | |
389 | |/ |
|
389 | |/ | |
390 | o 0:cd010b8cd998 A |
|
390 | o 0:cd010b8cd998 A | |
391 |
|
391 | |||
392 | $ hg rebase -s 5fddd98957c8 -d eea13746799a |
|
392 | $ hg rebase -s 5fddd98957c8 -d eea13746799a | |
393 | rebasing 2:5fddd98957c8 "C" |
|
393 | rebasing 2:5fddd98957c8 "C" | |
394 | rebasing 3:32af7686d403 "D" |
|
394 | rebasing 3:32af7686d403 "D" | |
395 | $ hg log -G |
|
395 | $ hg log -G | |
396 | o 9:cf44d2f5a9f4 D |
|
396 | o 9:cf44d2f5a9f4 D | |
397 | | |
|
397 | | | |
398 | o 8:e273c5e7d2d2 C |
|
398 | o 8:e273c5e7d2d2 C | |
399 | | |
|
399 | | | |
400 | | @ 7:02de42196ebe H |
|
400 | | @ 7:02de42196ebe H | |
401 | | | |
|
401 | | | | |
402 | o | 6:eea13746799a G |
|
402 | o | 6:eea13746799a G | |
403 | |\| |
|
403 | |\| | |
404 | | o 5:24b6387c8c8c F |
|
404 | | o 5:24b6387c8c8c F | |
405 | | | |
|
405 | | | | |
406 | o | 4:9520eea781bc E |
|
406 | o | 4:9520eea781bc E | |
407 | |/ |
|
407 | |/ | |
408 | | o 1:42ccdea3bb16 B |
|
408 | | o 1:42ccdea3bb16 B | |
409 | |/ |
|
409 | |/ | |
410 | o 0:cd010b8cd998 A |
|
410 | o 0:cd010b8cd998 A | |
411 |
|
411 | |||
412 | $ hg rebase -s 42ccdea3bb16 -d 02de42196ebe |
|
412 | $ hg rebase -s 42ccdea3bb16 -d 02de42196ebe | |
413 | rebasing 1:42ccdea3bb16 "B" |
|
413 | rebasing 1:42ccdea3bb16 "B" | |
414 | $ hg log -G |
|
414 | $ hg log -G | |
415 | o 10:7c6027df6a99 B |
|
415 | o 10:7c6027df6a99 B | |
416 | | |
|
416 | | | |
417 | | o 9:cf44d2f5a9f4 D |
|
417 | | o 9:cf44d2f5a9f4 D | |
418 | | | |
|
418 | | | | |
419 | | o 8:e273c5e7d2d2 C |
|
419 | | o 8:e273c5e7d2d2 C | |
420 | | | |
|
420 | | | | |
421 | @ | 7:02de42196ebe H |
|
421 | @ | 7:02de42196ebe H | |
422 | | | |
|
422 | | | | |
423 | | o 6:eea13746799a G |
|
423 | | o 6:eea13746799a G | |
424 | |/| |
|
424 | |/| | |
425 | o | 5:24b6387c8c8c F |
|
425 | o | 5:24b6387c8c8c F | |
426 | | | |
|
426 | | | | |
427 | | o 4:9520eea781bc E |
|
427 | | o 4:9520eea781bc E | |
428 | |/ |
|
428 | |/ | |
429 | o 0:cd010b8cd998 A |
|
429 | o 0:cd010b8cd998 A | |
430 |
|
430 | |||
431 | $ hg log --hidden -G |
|
431 | $ hg log --hidden -G | |
432 | o 10:7c6027df6a99 B |
|
432 | o 10:7c6027df6a99 B | |
433 | | |
|
433 | | | |
434 | | o 9:cf44d2f5a9f4 D |
|
434 | | o 9:cf44d2f5a9f4 D | |
435 | | | |
|
435 | | | | |
436 | | o 8:e273c5e7d2d2 C |
|
436 | | o 8:e273c5e7d2d2 C | |
437 | | | |
|
437 | | | | |
438 | @ | 7:02de42196ebe H |
|
438 | @ | 7:02de42196ebe H | |
439 | | | |
|
439 | | | | |
440 | | o 6:eea13746799a G |
|
440 | | o 6:eea13746799a G | |
441 | |/| |
|
441 | |/| | |
442 | o | 5:24b6387c8c8c F |
|
442 | o | 5:24b6387c8c8c F | |
443 | | | |
|
443 | | | | |
444 | | o 4:9520eea781bc E |
|
444 | | o 4:9520eea781bc E | |
445 | |/ |
|
445 | |/ | |
446 | | x 3:32af7686d403 D (rewritten using rebase as 9:cf44d2f5a9f4) |
|
446 | | x 3:32af7686d403 D (rewritten using rebase as 9:cf44d2f5a9f4) | |
447 | | | |
|
447 | | | | |
448 | | x 2:5fddd98957c8 C (rewritten using rebase as 8:e273c5e7d2d2) |
|
448 | | x 2:5fddd98957c8 C (rewritten using rebase as 8:e273c5e7d2d2) | |
449 | | | |
|
449 | | | | |
450 | | x 1:42ccdea3bb16 B (rewritten using rebase as 10:7c6027df6a99) |
|
450 | | x 1:42ccdea3bb16 B (rewritten using rebase as 10:7c6027df6a99) | |
451 | |/ |
|
451 | |/ | |
452 | o 0:cd010b8cd998 A |
|
452 | o 0:cd010b8cd998 A | |
453 |
|
453 | |||
454 | $ hg debugobsolete |
|
454 | $ hg debugobsolete | |
455 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b e273c5e7d2d29df783dce9f9eaa3ac4adc69c15d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
455 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b e273c5e7d2d29df783dce9f9eaa3ac4adc69c15d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
456 | 32af7686d403cf45b5d95f2d70cebea587ac806a cf44d2f5a9f4297a62be94cbdd3dff7c7dc54258 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
456 | 32af7686d403cf45b5d95f2d70cebea587ac806a cf44d2f5a9f4297a62be94cbdd3dff7c7dc54258 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
457 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 7c6027df6a99d93f461868e5433f63bde20b6dfb 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
457 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 7c6027df6a99d93f461868e5433f63bde20b6dfb 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
458 |
|
458 | |||
459 | Test that rewriting leaving instability behind is allowed |
|
459 | Test that rewriting leaving instability behind is allowed | |
460 | --------------------------------------------------------------------- |
|
460 | --------------------------------------------------------------------- | |
461 |
|
461 | |||
462 | $ hg log -r 'children(8)' |
|
462 | $ hg log -r 'children(8)' | |
463 | 9:cf44d2f5a9f4 D (no-eol) |
|
463 | 9:cf44d2f5a9f4 D (no-eol) | |
464 | $ hg rebase -r 8 |
|
464 | $ hg rebase -r 8 | |
465 | rebasing 8:e273c5e7d2d2 "C" |
|
465 | rebasing 8:e273c5e7d2d2 "C" | |
466 | 1 new orphan changesets |
|
466 | 1 new orphan changesets | |
467 | $ hg log -G |
|
467 | $ hg log -G | |
468 | o 11:0d8f238b634c C |
|
468 | o 11:0d8f238b634c C | |
469 | | |
|
469 | | | |
470 | o 10:7c6027df6a99 B |
|
470 | o 10:7c6027df6a99 B | |
471 | | |
|
471 | | | |
472 | | * 9:cf44d2f5a9f4 D |
|
472 | | * 9:cf44d2f5a9f4 D | |
473 | | | |
|
473 | | | | |
474 | | x 8:e273c5e7d2d2 C (rewritten using rebase as 11:0d8f238b634c) |
|
474 | | x 8:e273c5e7d2d2 C (rewritten using rebase as 11:0d8f238b634c) | |
475 | | | |
|
475 | | | | |
476 | @ | 7:02de42196ebe H |
|
476 | @ | 7:02de42196ebe H | |
477 | | | |
|
477 | | | | |
478 | | o 6:eea13746799a G |
|
478 | | o 6:eea13746799a G | |
479 | |/| |
|
479 | |/| | |
480 | o | 5:24b6387c8c8c F |
|
480 | o | 5:24b6387c8c8c F | |
481 | | | |
|
481 | | | | |
482 | | o 4:9520eea781bc E |
|
482 | | o 4:9520eea781bc E | |
483 | |/ |
|
483 | |/ | |
484 | o 0:cd010b8cd998 A |
|
484 | o 0:cd010b8cd998 A | |
485 |
|
485 | |||
486 | $ cd .. |
|
486 | $ cd .. | |
487 | $ cp -R hidden stabilize |
|
487 | $ cp -R hidden stabilize | |
488 | $ cd stabilize |
|
488 | $ cd stabilize | |
489 | $ hg rebase --auto-orphans '0::' -d 10 |
|
489 | $ hg rebase --auto-orphans '0::' -d 10 | |
490 | abort: cannot specify both --auto-orphans and --dest |
|
490 | abort: cannot specify both --auto-orphans and --dest | |
491 | [255] |
|
491 | [255] | |
492 | $ hg rebase --auto-orphans '0::' |
|
492 | $ hg rebase --auto-orphans '0::' | |
493 | rebasing 9:cf44d2f5a9f4 "D" |
|
493 | rebasing 9:cf44d2f5a9f4 "D" | |
494 | $ hg log -G |
|
494 | $ hg log -G | |
495 | o 12:7e3935feaa68 D |
|
495 | o 12:7e3935feaa68 D | |
496 | | |
|
496 | | | |
497 | o 11:0d8f238b634c C |
|
497 | o 11:0d8f238b634c C | |
498 | | |
|
498 | | | |
499 | o 10:7c6027df6a99 B |
|
499 | o 10:7c6027df6a99 B | |
500 | | |
|
500 | | | |
501 | @ 7:02de42196ebe H |
|
501 | @ 7:02de42196ebe H | |
502 | | |
|
502 | | | |
503 | | o 6:eea13746799a G |
|
503 | | o 6:eea13746799a G | |
504 | |/| |
|
504 | |/| | |
505 | o | 5:24b6387c8c8c F |
|
505 | o | 5:24b6387c8c8c F | |
506 | | | |
|
506 | | | | |
507 | | o 4:9520eea781bc E |
|
507 | | o 4:9520eea781bc E | |
508 | |/ |
|
508 | |/ | |
509 | o 0:cd010b8cd998 A |
|
509 | o 0:cd010b8cd998 A | |
510 |
|
510 | |||
511 |
|
511 | |||
512 | $ cd ../hidden |
|
512 | $ cd ../hidden | |
513 | $ rm -r ../stabilize |
|
513 | $ rm -r ../stabilize | |
514 |
|
514 | |||
515 | Test multiple root handling |
|
515 | Test multiple root handling | |
516 | ------------------------------------ |
|
516 | ------------------------------------ | |
517 |
|
517 | |||
518 | $ hg rebase --dest 4 --rev '7+11+9' |
|
518 | $ hg rebase --dest 4 --rev '7+11+9' | |
519 | rebasing 9:cf44d2f5a9f4 "D" |
|
519 | rebasing 9:cf44d2f5a9f4 "D" | |
520 | rebasing 7:02de42196ebe "H" |
|
520 | rebasing 7:02de42196ebe "H" | |
521 | rebasing 11:0d8f238b634c "C" (tip) |
|
521 | rebasing 11:0d8f238b634c "C" (tip) | |
522 | $ hg log -G |
|
522 | $ hg log -G | |
523 | o 14:1e8370e38cca C |
|
523 | o 14:1e8370e38cca C | |
524 | | |
|
524 | | | |
525 | @ 13:bfe264faf697 H |
|
525 | @ 13:bfe264faf697 H | |
526 | | |
|
526 | | | |
527 | | o 12:102b4c1d889b D |
|
527 | | o 12:102b4c1d889b D | |
528 | |/ |
|
528 | |/ | |
529 | | * 10:7c6027df6a99 B |
|
529 | | * 10:7c6027df6a99 B | |
530 | | | |
|
530 | | | | |
531 | | x 7:02de42196ebe H (rewritten using rebase as 13:bfe264faf697) |
|
531 | | x 7:02de42196ebe H (rewritten using rebase as 13:bfe264faf697) | |
532 | | | |
|
532 | | | | |
533 | +---o 6:eea13746799a G |
|
533 | +---o 6:eea13746799a G | |
534 | | |/ |
|
534 | | |/ | |
535 | | o 5:24b6387c8c8c F |
|
535 | | o 5:24b6387c8c8c F | |
536 | | | |
|
536 | | | | |
537 | o | 4:9520eea781bc E |
|
537 | o | 4:9520eea781bc E | |
538 | |/ |
|
538 | |/ | |
539 | o 0:cd010b8cd998 A |
|
539 | o 0:cd010b8cd998 A | |
540 |
|
540 | |||
541 | $ cd .. |
|
541 | $ cd .. | |
542 |
|
542 | |||
543 | Detach both parents |
|
543 | Detach both parents | |
544 |
|
544 | |||
545 | $ hg init double-detach |
|
545 | $ hg init double-detach | |
546 | $ cd double-detach |
|
546 | $ cd double-detach | |
547 |
|
547 | |||
548 | $ hg debugdrawdag <<EOF |
|
548 | $ hg debugdrawdag <<EOF | |
549 | > F |
|
549 | > F | |
550 | > /| |
|
550 | > /| | |
551 | > C E |
|
551 | > C E | |
552 | > | | |
|
552 | > | | | |
553 | > B D G |
|
553 | > B D G | |
554 | > \|/ |
|
554 | > \|/ | |
555 | > A |
|
555 | > A | |
556 | > EOF |
|
556 | > EOF | |
557 |
|
557 | |||
558 | $ hg rebase -d G -r 'B + D + F' |
|
558 | $ hg rebase -d G -r 'B + D + F' | |
559 | rebasing 1:112478962961 "B" (B) |
|
559 | rebasing 1:112478962961 "B" (B) | |
560 | rebasing 2:b18e25de2cf5 "D" (D) |
|
560 | rebasing 2:b18e25de2cf5 "D" (D) | |
561 | rebasing 6:f15c3adaf214 "F" (F tip) |
|
561 | rebasing 6:f15c3adaf214 "F" (F tip) | |
562 | abort: cannot rebase 6:f15c3adaf214 without moving at least one of its parents |
|
562 | abort: cannot rebase 6:f15c3adaf214 without moving at least one of its parents | |
563 | [255] |
|
563 | [255] | |
564 |
|
564 | |||
565 | $ cd .. |
|
565 | $ cd .. | |
566 |
|
566 | |||
567 | test on rebase dropping a merge |
|
567 | test on rebase dropping a merge | |
568 |
|
568 | |||
569 | (setup) |
|
569 | (setup) | |
570 |
|
570 | |||
571 | $ hg init dropmerge |
|
571 | $ hg init dropmerge | |
572 | $ cd dropmerge |
|
572 | $ cd dropmerge | |
573 | $ hg unbundle "$TESTDIR/bundles/rebase.hg" |
|
573 | $ hg unbundle "$TESTDIR/bundles/rebase.hg" | |
574 | adding changesets |
|
574 | adding changesets | |
575 | adding manifests |
|
575 | adding manifests | |
576 | adding file changes |
|
576 | adding file changes | |
577 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
577 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
578 | new changesets cd010b8cd998:02de42196ebe (8 drafts) |
|
578 | new changesets cd010b8cd998:02de42196ebe (8 drafts) | |
579 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
579 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
580 | $ hg up 3 |
|
580 | $ hg up 3 | |
581 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
581 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
582 | $ hg merge 7 |
|
582 | $ hg merge 7 | |
583 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
583 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
584 | (branch merge, don't forget to commit) |
|
584 | (branch merge, don't forget to commit) | |
585 | $ hg ci -m 'M' |
|
585 | $ hg ci -m 'M' | |
586 | $ echo I > I |
|
586 | $ echo I > I | |
587 | $ hg add I |
|
587 | $ hg add I | |
588 | $ hg ci -m I |
|
588 | $ hg ci -m I | |
589 | $ hg log -G |
|
589 | $ hg log -G | |
590 | @ 9:4bde274eefcf I |
|
590 | @ 9:4bde274eefcf I | |
591 | | |
|
591 | | | |
592 | o 8:53a6a128b2b7 M |
|
592 | o 8:53a6a128b2b7 M | |
593 | |\ |
|
593 | |\ | |
594 | | o 7:02de42196ebe H |
|
594 | | o 7:02de42196ebe H | |
595 | | | |
|
595 | | | | |
596 | | | o 6:eea13746799a G |
|
596 | | | o 6:eea13746799a G | |
597 | | |/| |
|
597 | | |/| | |
598 | | o | 5:24b6387c8c8c F |
|
598 | | o | 5:24b6387c8c8c F | |
599 | | | | |
|
599 | | | | | |
600 | | | o 4:9520eea781bc E |
|
600 | | | o 4:9520eea781bc E | |
601 | | |/ |
|
601 | | |/ | |
602 | o | 3:32af7686d403 D |
|
602 | o | 3:32af7686d403 D | |
603 | | | |
|
603 | | | | |
604 | o | 2:5fddd98957c8 C |
|
604 | o | 2:5fddd98957c8 C | |
605 | | | |
|
605 | | | | |
606 | o | 1:42ccdea3bb16 B |
|
606 | o | 1:42ccdea3bb16 B | |
607 | |/ |
|
607 | |/ | |
608 | o 0:cd010b8cd998 A |
|
608 | o 0:cd010b8cd998 A | |
609 |
|
609 | |||
610 | (actual test) |
|
610 | (actual test) | |
611 |
|
611 | |||
612 | $ hg rebase --dest 6 --rev '((desc(H) + desc(D))::) - desc(M)' |
|
612 | $ hg rebase --dest 6 --rev '((desc(H) + desc(D))::) - desc(M)' | |
613 | rebasing 3:32af7686d403 "D" |
|
613 | rebasing 3:32af7686d403 "D" | |
614 | rebasing 7:02de42196ebe "H" |
|
614 | rebasing 7:02de42196ebe "H" | |
615 | rebasing 9:4bde274eefcf "I" (tip) |
|
615 | rebasing 9:4bde274eefcf "I" (tip) | |
616 | 1 new orphan changesets |
|
616 | 1 new orphan changesets | |
617 | $ hg log -G |
|
617 | $ hg log -G | |
618 | @ 12:acd174b7ab39 I |
|
618 | @ 12:acd174b7ab39 I | |
619 | | |
|
619 | | | |
620 | o 11:6c11a6218c97 H |
|
620 | o 11:6c11a6218c97 H | |
621 | | |
|
621 | | | |
622 | | o 10:b5313c85b22e D |
|
622 | | o 10:b5313c85b22e D | |
623 | |/ |
|
623 | |/ | |
624 | | * 8:53a6a128b2b7 M |
|
624 | | * 8:53a6a128b2b7 M | |
625 | | |\ |
|
625 | | |\ | |
626 | | | x 7:02de42196ebe H (rewritten using rebase as 11:6c11a6218c97) |
|
626 | | | x 7:02de42196ebe H (rewritten using rebase as 11:6c11a6218c97) | |
627 | | | | |
|
627 | | | | | |
628 | o---+ 6:eea13746799a G |
|
628 | o---+ 6:eea13746799a G | |
629 | | | | |
|
629 | | | | | |
630 | | | o 5:24b6387c8c8c F |
|
630 | | | o 5:24b6387c8c8c F | |
631 | | | | |
|
631 | | | | | |
632 | o---+ 4:9520eea781bc E |
|
632 | o---+ 4:9520eea781bc E | |
633 | / / |
|
633 | / / | |
634 | x | 3:32af7686d403 D (rewritten using rebase as 10:b5313c85b22e) |
|
634 | x | 3:32af7686d403 D (rewritten using rebase as 10:b5313c85b22e) | |
635 | | | |
|
635 | | | | |
636 | o | 2:5fddd98957c8 C |
|
636 | o | 2:5fddd98957c8 C | |
637 | | | |
|
637 | | | | |
638 | o | 1:42ccdea3bb16 B |
|
638 | o | 1:42ccdea3bb16 B | |
639 | |/ |
|
639 | |/ | |
640 | o 0:cd010b8cd998 A |
|
640 | o 0:cd010b8cd998 A | |
641 |
|
641 | |||
642 |
|
642 | |||
643 | Test hidden changesets in the rebase set (issue4504) |
|
643 | Test hidden changesets in the rebase set (issue4504) | |
644 |
|
644 | |||
645 | $ hg up --hidden 9 |
|
645 | $ hg up --hidden 9 | |
646 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
646 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
647 | updated to hidden changeset 4bde274eefcf |
|
647 | updated to hidden changeset 4bde274eefcf | |
648 | (hidden revision '4bde274eefcf' was rewritten as: acd174b7ab39) |
|
648 | (hidden revision '4bde274eefcf' was rewritten as: acd174b7ab39) | |
649 | $ echo J > J |
|
649 | $ echo J > J | |
650 | $ hg add J |
|
650 | $ hg add J | |
651 | $ hg commit -m J |
|
651 | $ hg commit -m J | |
652 | 1 new orphan changesets |
|
652 | 1 new orphan changesets | |
653 | $ hg debugobsolete `hg log --rev . -T '{node}'` |
|
653 | $ hg debugobsolete `hg log --rev . -T '{node}'` | |
654 | 1 new obsolescence markers |
|
654 | 1 new obsolescence markers | |
655 | obsoleted 1 changesets |
|
655 | obsoleted 1 changesets | |
656 |
|
656 | |||
657 | $ hg rebase --rev .~1::. --dest 'max(desc(D))' --traceback --config experimental.rebaseskipobsolete=off |
|
657 | $ hg rebase --rev .~1::. --dest 'max(desc(D))' --traceback --config experimental.rebaseskipobsolete=off | |
658 | rebasing 9:4bde274eefcf "I" |
|
658 | rebasing 9:4bde274eefcf "I" | |
659 | rebasing 13:06edfc82198f "J" (tip) |
|
659 | rebasing 13:06edfc82198f "J" (tip) | |
660 | 2 new content-divergent changesets |
|
660 | 2 new content-divergent changesets | |
661 | $ hg log -G |
|
661 | $ hg log -G | |
662 | @ 15:5ae8a643467b J |
|
662 | @ 15:5ae8a643467b J | |
663 | | |
|
663 | | | |
664 | * 14:9ad579b4a5de I |
|
664 | * 14:9ad579b4a5de I | |
665 | | |
|
665 | | | |
666 | | * 12:acd174b7ab39 I |
|
666 | | * 12:acd174b7ab39 I | |
667 | | | |
|
667 | | | | |
668 | | o 11:6c11a6218c97 H |
|
668 | | o 11:6c11a6218c97 H | |
669 | | | |
|
669 | | | | |
670 | o | 10:b5313c85b22e D |
|
670 | o | 10:b5313c85b22e D | |
671 | |/ |
|
671 | |/ | |
672 | | * 8:53a6a128b2b7 M |
|
672 | | * 8:53a6a128b2b7 M | |
673 | | |\ |
|
673 | | |\ | |
674 | | | x 7:02de42196ebe H (rewritten using rebase as 11:6c11a6218c97) |
|
674 | | | x 7:02de42196ebe H (rewritten using rebase as 11:6c11a6218c97) | |
675 | | | | |
|
675 | | | | | |
676 | o---+ 6:eea13746799a G |
|
676 | o---+ 6:eea13746799a G | |
677 | | | | |
|
677 | | | | | |
678 | | | o 5:24b6387c8c8c F |
|
678 | | | o 5:24b6387c8c8c F | |
679 | | | | |
|
679 | | | | | |
680 | o---+ 4:9520eea781bc E |
|
680 | o---+ 4:9520eea781bc E | |
681 | / / |
|
681 | / / | |
682 | x | 3:32af7686d403 D (rewritten using rebase as 10:b5313c85b22e) |
|
682 | x | 3:32af7686d403 D (rewritten using rebase as 10:b5313c85b22e) | |
683 | | | |
|
683 | | | | |
684 | o | 2:5fddd98957c8 C |
|
684 | o | 2:5fddd98957c8 C | |
685 | | | |
|
685 | | | | |
686 | o | 1:42ccdea3bb16 B |
|
686 | o | 1:42ccdea3bb16 B | |
687 | |/ |
|
687 | |/ | |
688 | o 0:cd010b8cd998 A |
|
688 | o 0:cd010b8cd998 A | |
689 |
|
689 | |||
690 | $ hg up 14 -C |
|
690 | $ hg up 14 -C | |
691 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
691 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
692 | $ echo "K" > K |
|
692 | $ echo "K" > K | |
693 | $ hg add K |
|
693 | $ hg add K | |
694 | $ hg commit --amend -m "K" |
|
694 | $ hg commit --amend -m "K" | |
695 | 1 new orphan changesets |
|
695 | 1 new orphan changesets | |
696 | $ echo "L" > L |
|
696 | $ echo "L" > L | |
697 | $ hg add L |
|
697 | $ hg add L | |
698 | $ hg commit -m "L" |
|
698 | $ hg commit -m "L" | |
699 | $ hg up '.^' |
|
699 | $ hg up '.^' | |
700 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
700 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
701 | $ echo "M" > M |
|
701 | $ echo "M" > M | |
702 | $ hg add M |
|
702 | $ hg add M | |
703 | $ hg commit --amend -m "M" |
|
703 | $ hg commit --amend -m "M" | |
704 | 1 new orphan changesets |
|
704 | 1 new orphan changesets | |
705 | $ hg log -G |
|
705 | $ hg log -G | |
706 | @ 18:bfaedf8eb73b M |
|
706 | @ 18:bfaedf8eb73b M | |
707 | | |
|
707 | | | |
708 | | * 17:97219452e4bd L |
|
708 | | * 17:97219452e4bd L | |
709 | | | |
|
709 | | | | |
710 | | x 16:fc37a630c901 K (rewritten using amend as 18:bfaedf8eb73b) |
|
710 | | x 16:fc37a630c901 K (rewritten using amend as 18:bfaedf8eb73b) | |
711 | |/ |
|
711 | |/ | |
712 | | * 15:5ae8a643467b J |
|
712 | | * 15:5ae8a643467b J | |
713 | | | |
|
713 | | | | |
714 | | x 14:9ad579b4a5de I (rewritten using amend as 16:fc37a630c901) |
|
714 | | x 14:9ad579b4a5de I (rewritten using amend as 16:fc37a630c901) | |
715 | |/ |
|
715 | |/ | |
716 | | * 12:acd174b7ab39 I |
|
716 | | * 12:acd174b7ab39 I | |
717 | | | |
|
717 | | | | |
718 | | o 11:6c11a6218c97 H |
|
718 | | o 11:6c11a6218c97 H | |
719 | | | |
|
719 | | | | |
720 | o | 10:b5313c85b22e D |
|
720 | o | 10:b5313c85b22e D | |
721 | |/ |
|
721 | |/ | |
722 | | * 8:53a6a128b2b7 M |
|
722 | | * 8:53a6a128b2b7 M | |
723 | | |\ |
|
723 | | |\ | |
724 | | | x 7:02de42196ebe H (rewritten using rebase as 11:6c11a6218c97) |
|
724 | | | x 7:02de42196ebe H (rewritten using rebase as 11:6c11a6218c97) | |
725 | | | | |
|
725 | | | | | |
726 | o---+ 6:eea13746799a G |
|
726 | o---+ 6:eea13746799a G | |
727 | | | | |
|
727 | | | | | |
728 | | | o 5:24b6387c8c8c F |
|
728 | | | o 5:24b6387c8c8c F | |
729 | | | | |
|
729 | | | | | |
730 | o---+ 4:9520eea781bc E |
|
730 | o---+ 4:9520eea781bc E | |
731 | / / |
|
731 | / / | |
732 | x | 3:32af7686d403 D (rewritten using rebase as 10:b5313c85b22e) |
|
732 | x | 3:32af7686d403 D (rewritten using rebase as 10:b5313c85b22e) | |
733 | | | |
|
733 | | | | |
734 | o | 2:5fddd98957c8 C |
|
734 | o | 2:5fddd98957c8 C | |
735 | | | |
|
735 | | | | |
736 | o | 1:42ccdea3bb16 B |
|
736 | o | 1:42ccdea3bb16 B | |
737 | |/ |
|
737 | |/ | |
738 | o 0:cd010b8cd998 A |
|
738 | o 0:cd010b8cd998 A | |
739 |
|
739 | |||
740 | $ hg rebase -s 14 -d 17 --config experimental.rebaseskipobsolete=True |
|
740 | $ hg rebase -s 14 -d 17 --config experimental.rebaseskipobsolete=True | |
741 | note: not rebasing 14:9ad579b4a5de "I", already in destination as 16:fc37a630c901 "K" |
|
741 | note: not rebasing 14:9ad579b4a5de "I", already in destination as 16:fc37a630c901 "K" | |
742 | rebasing 15:5ae8a643467b "J" |
|
742 | rebasing 15:5ae8a643467b "J" | |
743 | 1 new orphan changesets |
|
743 | 1 new orphan changesets | |
744 |
|
744 | |||
745 | $ cd .. |
|
745 | $ cd .. | |
746 |
|
746 | |||
747 | Skip obsolete changeset even with multiple hops |
|
747 | Skip obsolete changeset even with multiple hops | |
748 | ----------------------------------------------- |
|
748 | ----------------------------------------------- | |
749 |
|
749 | |||
750 | setup |
|
750 | setup | |
751 |
|
751 | |||
752 | $ hg init obsskip |
|
752 | $ hg init obsskip | |
753 | $ cd obsskip |
|
753 | $ cd obsskip | |
754 | $ cat << EOF >> .hg/hgrc |
|
754 | $ cat << EOF >> .hg/hgrc | |
755 | > [experimental] |
|
755 | > [experimental] | |
756 | > rebaseskipobsolete = True |
|
756 | > rebaseskipobsolete = True | |
757 | > [extensions] |
|
757 | > [extensions] | |
758 | > strip = |
|
758 | > strip = | |
759 | > EOF |
|
759 | > EOF | |
760 | $ echo A > A |
|
760 | $ echo A > A | |
761 | $ hg add A |
|
761 | $ hg add A | |
762 | $ hg commit -m A |
|
762 | $ hg commit -m A | |
763 | $ echo B > B |
|
763 | $ echo B > B | |
764 | $ hg add B |
|
764 | $ hg add B | |
765 | $ hg commit -m B0 |
|
765 | $ hg commit -m B0 | |
766 | $ hg commit --amend -m B1 |
|
766 | $ hg commit --amend -m B1 | |
767 | $ hg commit --amend -m B2 |
|
767 | $ hg commit --amend -m B2 | |
768 | $ hg up --hidden 'desc(B0)' |
|
768 | $ hg up --hidden 'desc(B0)' | |
769 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
769 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
770 | updated to hidden changeset a8b11f55fb19 |
|
770 | updated to hidden changeset a8b11f55fb19 | |
771 | (hidden revision 'a8b11f55fb19' was rewritten as: 261e70097290) |
|
771 | (hidden revision 'a8b11f55fb19' was rewritten as: 261e70097290) | |
772 | $ echo C > C |
|
772 | $ echo C > C | |
773 | $ hg add C |
|
773 | $ hg add C | |
774 | $ hg commit -m C |
|
774 | $ hg commit -m C | |
775 | 1 new orphan changesets |
|
775 | 1 new orphan changesets | |
776 | $ hg log -G |
|
776 | $ hg log -G | |
777 | @ 4:212cb178bcbb C |
|
777 | @ 4:212cb178bcbb C | |
778 | | |
|
778 | | | |
779 | | o 3:261e70097290 B2 |
|
779 | | o 3:261e70097290 B2 | |
780 | | | |
|
780 | | | | |
781 | x | 1:a8b11f55fb19 B0 (rewritten using amend as 3:261e70097290) |
|
781 | x | 1:a8b11f55fb19 B0 (rewritten using amend as 3:261e70097290) | |
782 | |/ |
|
782 | |/ | |
783 | o 0:4a2df7238c3b A |
|
783 | o 0:4a2df7238c3b A | |
784 |
|
784 | |||
785 |
|
785 | |||
786 | Rebase finds its way in a chain of marker |
|
786 | Rebase finds its way in a chain of marker | |
787 |
|
787 | |||
788 | $ hg rebase -d 'desc(B2)' |
|
788 | $ hg rebase -d 'desc(B2)' | |
789 | note: not rebasing 1:a8b11f55fb19 "B0", already in destination as 3:261e70097290 "B2" |
|
789 | note: not rebasing 1:a8b11f55fb19 "B0", already in destination as 3:261e70097290 "B2" | |
790 | rebasing 4:212cb178bcbb "C" (tip) |
|
790 | rebasing 4:212cb178bcbb "C" (tip) | |
791 |
|
791 | |||
792 | Even when the chain include missing node |
|
792 | Even when the chain include missing node | |
793 |
|
793 | |||
794 | $ hg up --hidden 'desc(B0)' |
|
794 | $ hg up --hidden 'desc(B0)' | |
795 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
795 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
796 | updated to hidden changeset a8b11f55fb19 |
|
796 | updated to hidden changeset a8b11f55fb19 | |
797 | (hidden revision 'a8b11f55fb19' was rewritten as: 261e70097290) |
|
797 | (hidden revision 'a8b11f55fb19' was rewritten as: 261e70097290) | |
798 | $ echo D > D |
|
798 | $ echo D > D | |
799 | $ hg add D |
|
799 | $ hg add D | |
800 | $ hg commit -m D |
|
800 | $ hg commit -m D | |
801 | 1 new orphan changesets |
|
801 | 1 new orphan changesets | |
802 | $ hg --hidden strip -r 'desc(B1)' |
|
802 | $ hg --hidden strip -r 'desc(B1)' | |
803 | saved backup bundle to $TESTTMP/obsskip/.hg/strip-backup/86f6414ccda7-b1c452ee-backup.hg |
|
803 | saved backup bundle to $TESTTMP/obsskip/.hg/strip-backup/86f6414ccda7-b1c452ee-backup.hg | |
804 | 1 new orphan changesets |
|
804 | 1 new orphan changesets | |
805 | $ hg log -G |
|
805 | $ hg log -G | |
806 | @ 5:1a79b7535141 D |
|
806 | @ 5:1a79b7535141 D | |
807 | | |
|
807 | | | |
808 | | o 4:ff2c4d47b71d C |
|
808 | | o 4:ff2c4d47b71d C | |
809 | | | |
|
809 | | | | |
810 | | o 2:261e70097290 B2 |
|
810 | | o 2:261e70097290 B2 | |
811 | | | |
|
811 | | | | |
812 | x | 1:a8b11f55fb19 B0 (rewritten using amend as 2:261e70097290) |
|
812 | x | 1:a8b11f55fb19 B0 (rewritten using amend as 2:261e70097290) | |
813 | |/ |
|
813 | |/ | |
814 | o 0:4a2df7238c3b A |
|
814 | o 0:4a2df7238c3b A | |
815 |
|
815 | |||
816 |
|
816 | |||
817 | $ hg rebase -d 'desc(B2)' |
|
817 | $ hg rebase -d 'desc(B2)' | |
818 | note: not rebasing 1:a8b11f55fb19 "B0", already in destination as 2:261e70097290 "B2" |
|
818 | note: not rebasing 1:a8b11f55fb19 "B0", already in destination as 2:261e70097290 "B2" | |
819 | rebasing 5:1a79b7535141 "D" (tip) |
|
819 | rebasing 5:1a79b7535141 "D" (tip) | |
820 | $ hg up 4 |
|
820 | $ hg up 4 | |
821 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
821 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
822 | $ echo "O" > O |
|
822 | $ echo "O" > O | |
823 | $ hg add O |
|
823 | $ hg add O | |
824 | $ hg commit -m O |
|
824 | $ hg commit -m O | |
825 | $ echo "P" > P |
|
825 | $ echo "P" > P | |
826 | $ hg add P |
|
826 | $ hg add P | |
827 | $ hg commit -m P |
|
827 | $ hg commit -m P | |
828 | $ hg log -G |
|
828 | $ hg log -G | |
829 | @ 8:8d47583e023f P |
|
829 | @ 8:8d47583e023f P | |
830 | | |
|
830 | | | |
831 | o 7:360bbaa7d3ce O |
|
831 | o 7:360bbaa7d3ce O | |
832 | | |
|
832 | | | |
833 | | o 6:9c48361117de D |
|
833 | | o 6:9c48361117de D | |
834 | | | |
|
834 | | | | |
835 | o | 4:ff2c4d47b71d C |
|
835 | o | 4:ff2c4d47b71d C | |
836 | |/ |
|
836 | |/ | |
837 | o 2:261e70097290 B2 |
|
837 | o 2:261e70097290 B2 | |
838 | | |
|
838 | | | |
839 | o 0:4a2df7238c3b A |
|
839 | o 0:4a2df7238c3b A | |
840 |
|
840 | |||
841 | $ hg debugobsolete `hg log -r 7 -T '{node}\n'` --config experimental.evolution=true |
|
841 | $ hg debugobsolete `hg log -r 7 -T '{node}\n'` --config experimental.evolution=true | |
842 | 1 new obsolescence markers |
|
842 | 1 new obsolescence markers | |
843 | obsoleted 1 changesets |
|
843 | obsoleted 1 changesets | |
844 | 1 new orphan changesets |
|
844 | 1 new orphan changesets | |
845 | $ hg rebase -d 6 -r "4::" |
|
845 | $ hg rebase -d 6 -r "4::" | |
846 | rebasing 4:ff2c4d47b71d "C" |
|
846 | rebasing 4:ff2c4d47b71d "C" | |
847 | note: not rebasing 7:360bbaa7d3ce "O", it has no successor |
|
847 | note: not rebasing 7:360bbaa7d3ce "O", it has no successor | |
848 | rebasing 8:8d47583e023f "P" (tip) |
|
848 | rebasing 8:8d47583e023f "P" (tip) | |
849 |
|
849 | |||
850 | If all the changeset to be rebased are obsolete and present in the destination, we |
|
850 | If all the changeset to be rebased are obsolete and present in the destination, we | |
851 | should display a friendly error message |
|
851 | should display a friendly error message | |
852 |
|
852 | |||
853 | $ hg log -G |
|
853 | $ hg log -G | |
854 | @ 10:121d9e3bc4c6 P |
|
854 | @ 10:121d9e3bc4c6 P | |
855 | | |
|
855 | | | |
856 | o 9:4be60e099a77 C |
|
856 | o 9:4be60e099a77 C | |
857 | | |
|
857 | | | |
858 | o 6:9c48361117de D |
|
858 | o 6:9c48361117de D | |
859 | | |
|
859 | | | |
860 | o 2:261e70097290 B2 |
|
860 | o 2:261e70097290 B2 | |
861 | | |
|
861 | | | |
862 | o 0:4a2df7238c3b A |
|
862 | o 0:4a2df7238c3b A | |
863 |
|
863 | |||
864 |
|
864 | |||
865 | $ hg up 9 |
|
865 | $ hg up 9 | |
866 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
866 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
867 | $ echo "non-relevant change" > nonrelevant |
|
867 | $ echo "non-relevant change" > nonrelevant | |
868 | $ hg add nonrelevant |
|
868 | $ hg add nonrelevant | |
869 | $ hg commit -m nonrelevant |
|
869 | $ hg commit -m nonrelevant | |
870 | created new head |
|
870 | created new head | |
871 | $ hg debugobsolete `hg log -r 11 -T '{node}\n'` --config experimental.evolution=true |
|
871 | $ hg debugobsolete `hg log -r 11 -T '{node}\n'` --config experimental.evolution=true | |
872 | 1 new obsolescence markers |
|
872 | 1 new obsolescence markers | |
873 | obsoleted 1 changesets |
|
873 | obsoleted 1 changesets | |
874 | $ hg log -G |
|
874 | $ hg log -G | |
875 | @ 11:f44da1f4954c nonrelevant (pruned) |
|
875 | @ 11:f44da1f4954c nonrelevant (pruned) | |
876 | | |
|
876 | | | |
877 | | o 10:121d9e3bc4c6 P |
|
877 | | o 10:121d9e3bc4c6 P | |
878 | |/ |
|
878 | |/ | |
879 | o 9:4be60e099a77 C |
|
879 | o 9:4be60e099a77 C | |
880 | | |
|
880 | | | |
881 | o 6:9c48361117de D |
|
881 | o 6:9c48361117de D | |
882 | | |
|
882 | | | |
883 | o 2:261e70097290 B2 |
|
883 | o 2:261e70097290 B2 | |
884 | | |
|
884 | | | |
885 | o 0:4a2df7238c3b A |
|
885 | o 0:4a2df7238c3b A | |
886 |
|
886 | |||
887 | $ hg rebase -r . -d 10 |
|
887 | $ hg rebase -r . -d 10 | |
888 | note: not rebasing 11:f44da1f4954c "nonrelevant" (tip), it has no successor |
|
888 | note: not rebasing 11:f44da1f4954c "nonrelevant" (tip), it has no successor | |
889 |
|
889 | |||
890 | If a rebase is going to create divergence, it should abort |
|
890 | If a rebase is going to create divergence, it should abort | |
891 |
|
891 | |||
892 | $ hg log -G |
|
892 | $ hg log -G | |
893 | @ 10:121d9e3bc4c6 P |
|
893 | @ 10:121d9e3bc4c6 P | |
894 | | |
|
894 | | | |
895 | o 9:4be60e099a77 C |
|
895 | o 9:4be60e099a77 C | |
896 | | |
|
896 | | | |
897 | o 6:9c48361117de D |
|
897 | o 6:9c48361117de D | |
898 | | |
|
898 | | | |
899 | o 2:261e70097290 B2 |
|
899 | o 2:261e70097290 B2 | |
900 | | |
|
900 | | | |
901 | o 0:4a2df7238c3b A |
|
901 | o 0:4a2df7238c3b A | |
902 |
|
902 | |||
903 |
|
903 | |||
904 | $ hg up 9 |
|
904 | $ hg up 9 | |
905 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
905 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
906 | $ echo "john" > doe |
|
906 | $ echo "john" > doe | |
907 | $ hg add doe |
|
907 | $ hg add doe | |
908 | $ hg commit -m "john doe" |
|
908 | $ hg commit -m "john doe" | |
909 | created new head |
|
909 | created new head | |
910 | $ hg up 10 |
|
910 | $ hg up 10 | |
911 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
911 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
912 | $ echo "foo" > bar |
|
912 | $ echo "foo" > bar | |
913 | $ hg add bar |
|
913 | $ hg add bar | |
914 | $ hg commit --amend -m "10'" |
|
914 | $ hg commit --amend -m "10'" | |
915 | $ hg up 10 --hidden |
|
915 | $ hg up 10 --hidden | |
916 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
916 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
917 | updated to hidden changeset 121d9e3bc4c6 |
|
917 | updated to hidden changeset 121d9e3bc4c6 | |
918 | (hidden revision '121d9e3bc4c6' was rewritten as: 77d874d096a2) |
|
918 | (hidden revision '121d9e3bc4c6' was rewritten as: 77d874d096a2) | |
919 | $ echo "bar" > foo |
|
919 | $ echo "bar" > foo | |
920 | $ hg add foo |
|
920 | $ hg add foo | |
921 | $ hg commit -m "bar foo" |
|
921 | $ hg commit -m "bar foo" | |
922 | 1 new orphan changesets |
|
922 | 1 new orphan changesets | |
923 | $ hg log -G |
|
923 | $ hg log -G | |
924 | @ 14:73568ab6879d bar foo |
|
924 | @ 14:73568ab6879d bar foo | |
925 | | |
|
925 | | | |
926 | | o 13:77d874d096a2 10' |
|
926 | | o 13:77d874d096a2 10' | |
927 | | | |
|
927 | | | | |
928 | | | o 12:3eb461388009 john doe |
|
928 | | | o 12:3eb461388009 john doe | |
929 | | |/ |
|
929 | | |/ | |
930 | x | 10:121d9e3bc4c6 P (rewritten using amend as 13:77d874d096a2) |
|
930 | x | 10:121d9e3bc4c6 P (rewritten using amend as 13:77d874d096a2) | |
931 | |/ |
|
931 | |/ | |
932 | o 9:4be60e099a77 C |
|
932 | o 9:4be60e099a77 C | |
933 | | |
|
933 | | | |
934 | o 6:9c48361117de D |
|
934 | o 6:9c48361117de D | |
935 | | |
|
935 | | | |
936 | o 2:261e70097290 B2 |
|
936 | o 2:261e70097290 B2 | |
937 | | |
|
937 | | | |
938 | o 0:4a2df7238c3b A |
|
938 | o 0:4a2df7238c3b A | |
939 |
|
939 | |||
940 | $ hg summary |
|
940 | $ hg summary | |
941 | parent: 14:73568ab6879d tip (orphan) |
|
941 | parent: 14:73568ab6879d tip (orphan) | |
942 | bar foo |
|
942 | bar foo | |
943 | branch: default |
|
943 | branch: default | |
944 | commit: (clean) |
|
944 | commit: (clean) | |
945 | update: 2 new changesets, 3 branch heads (merge) |
|
945 | update: 2 new changesets, 3 branch heads (merge) | |
946 | phases: 8 draft |
|
946 | phases: 8 draft | |
947 | orphan: 1 changesets |
|
947 | orphan: 1 changesets | |
948 | $ hg rebase -s 10 -d 12 |
|
948 | $ hg rebase -s 10 -d 12 | |
949 | abort: this rebase will cause divergences from: 121d9e3bc4c6 |
|
949 | abort: this rebase will cause divergences from: 121d9e3bc4c6 | |
950 | (to force the rebase please set experimental.evolution.allowdivergence=True) |
|
950 | (to force the rebase please set experimental.evolution.allowdivergence=True) | |
951 | [255] |
|
951 | [255] | |
952 | $ hg log -G |
|
952 | $ hg log -G | |
953 | @ 14:73568ab6879d bar foo |
|
953 | @ 14:73568ab6879d bar foo | |
954 | | |
|
954 | | | |
955 | | o 13:77d874d096a2 10' |
|
955 | | o 13:77d874d096a2 10' | |
956 | | | |
|
956 | | | | |
957 | | | o 12:3eb461388009 john doe |
|
957 | | | o 12:3eb461388009 john doe | |
958 | | |/ |
|
958 | | |/ | |
959 | x | 10:121d9e3bc4c6 P (rewritten using amend as 13:77d874d096a2) |
|
959 | x | 10:121d9e3bc4c6 P (rewritten using amend as 13:77d874d096a2) | |
960 | |/ |
|
960 | |/ | |
961 | o 9:4be60e099a77 C |
|
961 | o 9:4be60e099a77 C | |
962 | | |
|
962 | | | |
963 | o 6:9c48361117de D |
|
963 | o 6:9c48361117de D | |
964 | | |
|
964 | | | |
965 | o 2:261e70097290 B2 |
|
965 | o 2:261e70097290 B2 | |
966 | | |
|
966 | | | |
967 | o 0:4a2df7238c3b A |
|
967 | o 0:4a2df7238c3b A | |
968 |
|
968 | |||
969 | With experimental.evolution.allowdivergence=True, rebase can create divergence |
|
969 | With experimental.evolution.allowdivergence=True, rebase can create divergence | |
970 |
|
970 | |||
971 | $ hg rebase -s 10 -d 12 --config experimental.evolution.allowdivergence=True |
|
971 | $ hg rebase -s 10 -d 12 --config experimental.evolution.allowdivergence=True | |
972 | rebasing 10:121d9e3bc4c6 "P" |
|
972 | rebasing 10:121d9e3bc4c6 "P" | |
973 | rebasing 14:73568ab6879d "bar foo" (tip) |
|
973 | rebasing 14:73568ab6879d "bar foo" (tip) | |
974 | 2 new content-divergent changesets |
|
974 | 2 new content-divergent changesets | |
975 | $ hg summary |
|
975 | $ hg summary | |
976 | parent: 16:61bd55f69bc4 tip |
|
976 | parent: 16:61bd55f69bc4 tip | |
977 | bar foo |
|
977 | bar foo | |
978 | branch: default |
|
978 | branch: default | |
979 | commit: (clean) |
|
979 | commit: (clean) | |
980 | update: 1 new changesets, 2 branch heads (merge) |
|
980 | update: 1 new changesets, 2 branch heads (merge) | |
981 | phases: 8 draft |
|
981 | phases: 8 draft | |
982 | content-divergent: 2 changesets |
|
982 | content-divergent: 2 changesets | |
983 |
|
983 | |||
984 | rebase --continue + skipped rev because their successors are in destination |
|
984 | rebase --continue + skipped rev because their successors are in destination | |
985 | we make a change in trunk and work on conflicting changes to make rebase abort. |
|
985 | we make a change in trunk and work on conflicting changes to make rebase abort. | |
986 |
|
986 | |||
987 | $ hg log -G -r 16:: |
|
987 | $ hg log -G -r 16:: | |
988 | @ 16:61bd55f69bc4 bar foo |
|
988 | @ 16:61bd55f69bc4 bar foo | |
989 | | |
|
989 | | | |
990 | ~ |
|
990 | ~ | |
991 |
|
991 | |||
992 | Create the two changes in trunk |
|
992 | Create the two changes in trunk | |
993 | $ printf "a" > willconflict |
|
993 | $ printf "a" > willconflict | |
994 | $ hg add willconflict |
|
994 | $ hg add willconflict | |
995 | $ hg commit -m "willconflict first version" |
|
995 | $ hg commit -m "willconflict first version" | |
996 |
|
996 | |||
997 | $ printf "dummy" > C |
|
997 | $ printf "dummy" > C | |
998 | $ hg commit -m "dummy change successor" |
|
998 | $ hg commit -m "dummy change successor" | |
999 |
|
999 | |||
1000 | Create the changes that we will rebase |
|
1000 | Create the changes that we will rebase | |
1001 | $ hg update -C 16 -q |
|
1001 | $ hg update -C 16 -q | |
1002 | $ printf "b" > willconflict |
|
1002 | $ printf "b" > willconflict | |
1003 | $ hg add willconflict |
|
1003 | $ hg add willconflict | |
1004 | $ hg commit -m "willconflict second version" |
|
1004 | $ hg commit -m "willconflict second version" | |
1005 | created new head |
|
1005 | created new head | |
1006 | $ printf "dummy" > K |
|
1006 | $ printf "dummy" > K | |
1007 | $ hg add K |
|
1007 | $ hg add K | |
1008 | $ hg commit -m "dummy change" |
|
1008 | $ hg commit -m "dummy change" | |
1009 | $ printf "dummy" > L |
|
1009 | $ printf "dummy" > L | |
1010 | $ hg add L |
|
1010 | $ hg add L | |
1011 | $ hg commit -m "dummy change" |
|
1011 | $ hg commit -m "dummy change" | |
1012 | $ hg debugobsolete `hg log -r ".^" -T '{node}'` `hg log -r 18 -T '{node}'` --config experimental.evolution=true |
|
1012 | $ hg debugobsolete `hg log -r ".^" -T '{node}'` `hg log -r 18 -T '{node}'` --config experimental.evolution=true | |
1013 | 1 new obsolescence markers |
|
1013 | 1 new obsolescence markers | |
1014 | obsoleted 1 changesets |
|
1014 | obsoleted 1 changesets | |
1015 | 1 new orphan changesets |
|
1015 | 1 new orphan changesets | |
1016 |
|
1016 | |||
1017 | $ hg log -G -r 16:: |
|
1017 | $ hg log -G -r 16:: | |
1018 | @ 21:7bdc8a87673d dummy change |
|
1018 | @ 21:7bdc8a87673d dummy change | |
1019 | | |
|
1019 | | | |
1020 | x 20:8b31da3c4919 dummy change (rewritten as 18:601db7a18f51) |
|
1020 | x 20:8b31da3c4919 dummy change (rewritten as 18:601db7a18f51) | |
1021 | | |
|
1021 | | | |
1022 | o 19:b82fb57ea638 willconflict second version |
|
1022 | o 19:b82fb57ea638 willconflict second version | |
1023 | | |
|
1023 | | | |
1024 | | o 18:601db7a18f51 dummy change successor |
|
1024 | | o 18:601db7a18f51 dummy change successor | |
1025 | | | |
|
1025 | | | | |
1026 | | o 17:357ddf1602d5 willconflict first version |
|
1026 | | o 17:357ddf1602d5 willconflict first version | |
1027 | |/ |
|
1027 | |/ | |
1028 | o 16:61bd55f69bc4 bar foo |
|
1028 | o 16:61bd55f69bc4 bar foo | |
1029 | | |
|
1029 | | | |
1030 | ~ |
|
1030 | ~ | |
1031 | $ hg rebase -r ".^^ + .^ + ." -d 18 |
|
1031 | $ hg rebase -r ".^^ + .^ + ." -d 18 | |
1032 | rebasing 19:b82fb57ea638 "willconflict second version" |
|
1032 | rebasing 19:b82fb57ea638 "willconflict second version" | |
1033 | merging willconflict |
|
1033 | merging willconflict | |
1034 | warning: conflicts while merging willconflict! (edit, then use 'hg resolve --mark') |
|
1034 | warning: conflicts while merging willconflict! (edit, then use 'hg resolve --mark') | |
1035 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') |
|
1035 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') | |
1036 | [1] |
|
1036 | [1] | |
1037 |
|
1037 | |||
1038 | $ hg resolve --mark willconflict |
|
1038 | $ hg resolve --mark willconflict | |
1039 | (no more unresolved files) |
|
1039 | (no more unresolved files) | |
1040 | continue: hg rebase --continue |
|
1040 | continue: hg rebase --continue | |
1041 | $ hg rebase --continue |
|
1041 | $ hg rebase --continue | |
1042 | rebasing 19:b82fb57ea638 "willconflict second version" |
|
1042 | rebasing 19:b82fb57ea638 "willconflict second version" | |
1043 | note: not rebasing 20:8b31da3c4919 "dummy change", already in destination as 18:601db7a18f51 "dummy change successor" |
|
1043 | note: not rebasing 20:8b31da3c4919 "dummy change", already in destination as 18:601db7a18f51 "dummy change successor" | |
1044 | rebasing 21:7bdc8a87673d "dummy change" (tip) |
|
1044 | rebasing 21:7bdc8a87673d "dummy change" (tip) | |
1045 | $ cd .. |
|
1045 | $ cd .. | |
1046 |
|
1046 | |||
1047 | Divergence cases due to obsolete changesets |
|
1047 | Divergence cases due to obsolete changesets | |
1048 | ------------------------------------------- |
|
1048 | ------------------------------------------- | |
1049 |
|
1049 | |||
1050 | We should ignore branches with unstable changesets when they are based on an |
|
1050 | We should ignore branches with unstable changesets when they are based on an | |
1051 | obsolete changeset which successor is in rebase set. |
|
1051 | obsolete changeset which successor is in rebase set. | |
1052 |
|
1052 | |||
1053 | $ hg init divergence |
|
1053 | $ hg init divergence | |
1054 | $ cd divergence |
|
1054 | $ cd divergence | |
1055 | $ cat >> .hg/hgrc << EOF |
|
1055 | $ cat >> .hg/hgrc << EOF | |
1056 | > [extensions] |
|
1056 | > [extensions] | |
1057 | > strip = |
|
1057 | > strip = | |
1058 | > [alias] |
|
1058 | > [alias] | |
1059 | > strip = strip --no-backup --quiet |
|
1059 | > strip = strip --no-backup --quiet | |
1060 | > [templates] |
|
1060 | > [templates] | |
1061 | > instabilities = '{rev}:{node|short} {desc|firstline}{if(instabilities," ({instabilities})")}\n' |
|
1061 | > instabilities = '{rev}:{node|short} {desc|firstline}{if(instabilities," ({instabilities})")}\n' | |
1062 | > EOF |
|
1062 | > EOF | |
1063 |
|
1063 | |||
1064 | $ hg debugdrawdag <<EOF |
|
1064 | $ hg debugdrawdag <<EOF | |
1065 | > e f |
|
1065 | > e f | |
1066 | > | | |
|
1066 | > | | | |
1067 | > d' d # replace: d -> d' |
|
1067 | > d' d # replace: d -> d' | |
1068 | > \ / |
|
1068 | > \ / | |
1069 | > c |
|
1069 | > c | |
1070 | > | |
|
1070 | > | | |
1071 | > x b |
|
1071 | > x b | |
1072 | > \| |
|
1072 | > \| | |
1073 | > a |
|
1073 | > a | |
1074 | > EOF |
|
1074 | > EOF | |
1075 | 1 new orphan changesets |
|
1075 | 1 new orphan changesets | |
1076 | $ hg log -G -r 'a':: |
|
1076 | $ hg log -G -r 'a':: | |
1077 | * 7:1143e9adc121 f |
|
1077 | * 7:1143e9adc121 f | |
1078 | | |
|
1078 | | | |
1079 | | o 6:d60ebfa0f1cb e |
|
1079 | | o 6:d60ebfa0f1cb e | |
1080 | | | |
|
1080 | | | | |
1081 | | o 5:027ad6c5830d d' |
|
1081 | | o 5:027ad6c5830d d' | |
1082 | | | |
|
1082 | | | | |
1083 | x | 4:76be324c128b d (rewritten using replace as 5:027ad6c5830d) |
|
1083 | x | 4:76be324c128b d (rewritten using replace as 5:027ad6c5830d) | |
1084 | |/ |
|
1084 | |/ | |
1085 | o 3:a82ac2b38757 c |
|
1085 | o 3:a82ac2b38757 c | |
1086 | | |
|
1086 | | | |
1087 | | o 2:630d7c95eff7 x |
|
1087 | | o 2:630d7c95eff7 x | |
1088 | | | |
|
1088 | | | | |
1089 | o | 1:488e1b7e7341 b |
|
1089 | o | 1:488e1b7e7341 b | |
1090 | |/ |
|
1090 | |/ | |
1091 | o 0:b173517d0057 a |
|
1091 | o 0:b173517d0057 a | |
1092 |
|
1092 | |||
1093 |
|
1093 | |||
1094 | Changeset d and its descendants are excluded to avoid divergence of d, which |
|
1094 | Changeset d and its descendants are excluded to avoid divergence of d, which | |
1095 | would occur because the successor of d (d') is also in rebaseset. As a |
|
1095 | would occur because the successor of d (d') is also in rebaseset. As a | |
1096 | consequence f (descendant of d) is left behind. |
|
1096 | consequence f (descendant of d) is left behind. | |
1097 |
|
1097 | |||
1098 | $ hg rebase -b 'e' -d 'x' |
|
1098 | $ hg rebase -b 'e' -d 'x' | |
1099 | rebasing 1:488e1b7e7341 "b" (b) |
|
1099 | rebasing 1:488e1b7e7341 "b" (b) | |
1100 | rebasing 3:a82ac2b38757 "c" (c) |
|
1100 | rebasing 3:a82ac2b38757 "c" (c) | |
1101 | rebasing 5:027ad6c5830d "d'" (d') |
|
1101 | rebasing 5:027ad6c5830d "d'" (d') | |
1102 | rebasing 6:d60ebfa0f1cb "e" (e) |
|
1102 | rebasing 6:d60ebfa0f1cb "e" (e) | |
1103 | note: not rebasing 4:76be324c128b "d" (d) and its descendants as this would cause divergence |
|
1103 | note: not rebasing 4:76be324c128b "d" (d) and its descendants as this would cause divergence | |
1104 | $ hg log -G -r 'a':: |
|
1104 | $ hg log -G -r 'a':: | |
1105 | o 11:eb6d63fc4ed5 e |
|
1105 | o 11:eb6d63fc4ed5 e | |
1106 | | |
|
1106 | | | |
1107 | o 10:44d8c724a70c d' |
|
1107 | o 10:44d8c724a70c d' | |
1108 | | |
|
1108 | | | |
1109 | o 9:d008e6b4d3fd c |
|
1109 | o 9:d008e6b4d3fd c | |
1110 | | |
|
1110 | | | |
1111 | o 8:67e8f4a16c49 b |
|
1111 | o 8:67e8f4a16c49 b | |
1112 | | |
|
1112 | | | |
1113 | | * 7:1143e9adc121 f |
|
1113 | | * 7:1143e9adc121 f | |
1114 | | | |
|
1114 | | | | |
1115 | | | x 6:d60ebfa0f1cb e (rewritten using rebase as 11:eb6d63fc4ed5) |
|
1115 | | | x 6:d60ebfa0f1cb e (rewritten using rebase as 11:eb6d63fc4ed5) | |
1116 | | | | |
|
1116 | | | | | |
1117 | | | x 5:027ad6c5830d d' (rewritten using rebase as 10:44d8c724a70c) |
|
1117 | | | x 5:027ad6c5830d d' (rewritten using rebase as 10:44d8c724a70c) | |
1118 | | | | |
|
1118 | | | | | |
1119 | | x | 4:76be324c128b d (rewritten using replace as 5:027ad6c5830d) |
|
1119 | | x | 4:76be324c128b d (rewritten using replace as 5:027ad6c5830d) | |
1120 | | |/ |
|
1120 | | |/ | |
1121 | | x 3:a82ac2b38757 c (rewritten using rebase as 9:d008e6b4d3fd) |
|
1121 | | x 3:a82ac2b38757 c (rewritten using rebase as 9:d008e6b4d3fd) | |
1122 | | | |
|
1122 | | | | |
1123 | o | 2:630d7c95eff7 x |
|
1123 | o | 2:630d7c95eff7 x | |
1124 | | | |
|
1124 | | | | |
1125 | | x 1:488e1b7e7341 b (rewritten using rebase as 8:67e8f4a16c49) |
|
1125 | | x 1:488e1b7e7341 b (rewritten using rebase as 8:67e8f4a16c49) | |
1126 | |/ |
|
1126 | |/ | |
1127 | o 0:b173517d0057 a |
|
1127 | o 0:b173517d0057 a | |
1128 |
|
1128 | |||
1129 | $ hg strip -r 8: |
|
1129 | $ hg strip -r 8: | |
1130 | $ hg log -G -r 'a':: |
|
1130 | $ hg log -G -r 'a':: | |
1131 | * 7:1143e9adc121 f |
|
1131 | * 7:1143e9adc121 f | |
1132 | | |
|
1132 | | | |
1133 | | o 6:d60ebfa0f1cb e |
|
1133 | | o 6:d60ebfa0f1cb e | |
1134 | | | |
|
1134 | | | | |
1135 | | o 5:027ad6c5830d d' |
|
1135 | | o 5:027ad6c5830d d' | |
1136 | | | |
|
1136 | | | | |
1137 | x | 4:76be324c128b d (rewritten using replace as 5:027ad6c5830d) |
|
1137 | x | 4:76be324c128b d (rewritten using replace as 5:027ad6c5830d) | |
1138 | |/ |
|
1138 | |/ | |
1139 | o 3:a82ac2b38757 c |
|
1139 | o 3:a82ac2b38757 c | |
1140 | | |
|
1140 | | | |
1141 | | o 2:630d7c95eff7 x |
|
1141 | | o 2:630d7c95eff7 x | |
1142 | | | |
|
1142 | | | | |
1143 | o | 1:488e1b7e7341 b |
|
1143 | o | 1:488e1b7e7341 b | |
1144 | |/ |
|
1144 | |/ | |
1145 | o 0:b173517d0057 a |
|
1145 | o 0:b173517d0057 a | |
1146 |
|
1146 | |||
1147 |
|
1147 | |||
1148 | If the rebase set has an obsolete (d) with a successor (d') outside the rebase |
|
1148 | If the rebase set has an obsolete (d) with a successor (d') outside the rebase | |
1149 | set and none in destination, we still get the divergence warning. |
|
1149 | set and none in destination, we still get the divergence warning. | |
1150 | By allowing divergence, we can perform the rebase. |
|
1150 | By allowing divergence, we can perform the rebase. | |
1151 |
|
1151 | |||
1152 | $ hg rebase -r 'c'::'f' -d 'x' |
|
1152 | $ hg rebase -r 'c'::'f' -d 'x' | |
1153 | abort: this rebase will cause divergences from: 76be324c128b |
|
1153 | abort: this rebase will cause divergences from: 76be324c128b | |
1154 | (to force the rebase please set experimental.evolution.allowdivergence=True) |
|
1154 | (to force the rebase please set experimental.evolution.allowdivergence=True) | |
1155 | [255] |
|
1155 | [255] | |
1156 | $ hg rebase --config experimental.evolution.allowdivergence=true -r 'c'::'f' -d 'x' |
|
1156 | $ hg rebase --config experimental.evolution.allowdivergence=true -r 'c'::'f' -d 'x' | |
1157 | rebasing 3:a82ac2b38757 "c" (c) |
|
1157 | rebasing 3:a82ac2b38757 "c" (c) | |
1158 | rebasing 4:76be324c128b "d" (d) |
|
1158 | rebasing 4:76be324c128b "d" (d) | |
1159 | rebasing 7:1143e9adc121 "f" (f tip) |
|
1159 | rebasing 7:1143e9adc121 "f" (f tip) | |
1160 | 1 new orphan changesets |
|
1160 | 1 new orphan changesets | |
1161 | 2 new content-divergent changesets |
|
1161 | 2 new content-divergent changesets | |
1162 | $ hg log -G -r 'a':: -T instabilities |
|
1162 | $ hg log -G -r 'a':: -T instabilities | |
1163 | o 10:e1744ea07510 f |
|
1163 | o 10:e1744ea07510 f | |
1164 | | |
|
1164 | | | |
1165 | * 9:e2b36ea9a0a0 d (content-divergent) |
|
1165 | * 9:e2b36ea9a0a0 d (content-divergent) | |
1166 | | |
|
1166 | | | |
1167 | o 8:6a0376de376e c |
|
1167 | o 8:6a0376de376e c | |
1168 | | |
|
1168 | | | |
1169 | | x 7:1143e9adc121 f |
|
1169 | | x 7:1143e9adc121 f | |
1170 | | | |
|
1170 | | | | |
1171 | | | * 6:d60ebfa0f1cb e (orphan) |
|
1171 | | | * 6:d60ebfa0f1cb e (orphan) | |
1172 | | | | |
|
1172 | | | | | |
1173 | | | * 5:027ad6c5830d d' (orphan content-divergent) |
|
1173 | | | * 5:027ad6c5830d d' (orphan content-divergent) | |
1174 | | | | |
|
1174 | | | | | |
1175 | | x | 4:76be324c128b d |
|
1175 | | x | 4:76be324c128b d | |
1176 | | |/ |
|
1176 | | |/ | |
1177 | | x 3:a82ac2b38757 c |
|
1177 | | x 3:a82ac2b38757 c | |
1178 | | | |
|
1178 | | | | |
1179 | o | 2:630d7c95eff7 x |
|
1179 | o | 2:630d7c95eff7 x | |
1180 | | | |
|
1180 | | | | |
1181 | | o 1:488e1b7e7341 b |
|
1181 | | o 1:488e1b7e7341 b | |
1182 | |/ |
|
1182 | |/ | |
1183 | o 0:b173517d0057 a |
|
1183 | o 0:b173517d0057 a | |
1184 |
|
1184 | |||
1185 | $ hg strip -r 8: |
|
1185 | $ hg strip -r 8: | |
1186 |
|
1186 | |||
1187 | (Not skipping obsoletes means that divergence is allowed.) |
|
1187 | (Not skipping obsoletes means that divergence is allowed.) | |
1188 |
|
1188 | |||
1189 | $ hg rebase --config experimental.rebaseskipobsolete=false -r 'c'::'f' -d 'x' |
|
1189 | $ hg rebase --config experimental.rebaseskipobsolete=false -r 'c'::'f' -d 'x' | |
1190 | rebasing 3:a82ac2b38757 "c" (c) |
|
1190 | rebasing 3:a82ac2b38757 "c" (c) | |
1191 | rebasing 4:76be324c128b "d" (d) |
|
1191 | rebasing 4:76be324c128b "d" (d) | |
1192 | rebasing 7:1143e9adc121 "f" (f tip) |
|
1192 | rebasing 7:1143e9adc121 "f" (f tip) | |
1193 | 1 new orphan changesets |
|
1193 | 1 new orphan changesets | |
1194 | 2 new content-divergent changesets |
|
1194 | 2 new content-divergent changesets | |
1195 |
|
1195 | |||
1196 | $ hg strip -r 0: |
|
1196 | $ hg strip -r 0: | |
1197 |
|
1197 | |||
1198 | Similar test on a more complex graph |
|
1198 | Similar test on a more complex graph | |
1199 |
|
1199 | |||
1200 | $ hg debugdrawdag <<EOF |
|
1200 | $ hg debugdrawdag <<EOF | |
1201 | > g |
|
1201 | > g | |
1202 | > | |
|
1202 | > | | |
1203 | > f e |
|
1203 | > f e | |
1204 | > | | |
|
1204 | > | | | |
1205 | > e' d # replace: e -> e' |
|
1205 | > e' d # replace: e -> e' | |
1206 | > \ / |
|
1206 | > \ / | |
1207 | > c |
|
1207 | > c | |
1208 | > | |
|
1208 | > | | |
1209 | > x b |
|
1209 | > x b | |
1210 | > \| |
|
1210 | > \| | |
1211 | > a |
|
1211 | > a | |
1212 | > EOF |
|
1212 | > EOF | |
1213 | 1 new orphan changesets |
|
1213 | 1 new orphan changesets | |
1214 | $ hg log -G -r 'a': |
|
1214 | $ hg log -G -r 'a': | |
1215 | * 8:2876ce66c6eb g |
|
1215 | * 8:2876ce66c6eb g | |
1216 | | |
|
1216 | | | |
1217 | | o 7:3ffec603ab53 f |
|
1217 | | o 7:3ffec603ab53 f | |
1218 | | | |
|
1218 | | | | |
1219 | x | 6:e36fae928aec e (rewritten using replace as 5:63324dc512ea) |
|
1219 | x | 6:e36fae928aec e (rewritten using replace as 5:63324dc512ea) | |
1220 | | | |
|
1220 | | | | |
1221 | | o 5:63324dc512ea e' |
|
1221 | | o 5:63324dc512ea e' | |
1222 | | | |
|
1222 | | | | |
1223 | o | 4:76be324c128b d |
|
1223 | o | 4:76be324c128b d | |
1224 | |/ |
|
1224 | |/ | |
1225 | o 3:a82ac2b38757 c |
|
1225 | o 3:a82ac2b38757 c | |
1226 | | |
|
1226 | | | |
1227 | | o 2:630d7c95eff7 x |
|
1227 | | o 2:630d7c95eff7 x | |
1228 | | | |
|
1228 | | | | |
1229 | o | 1:488e1b7e7341 b |
|
1229 | o | 1:488e1b7e7341 b | |
1230 | |/ |
|
1230 | |/ | |
1231 | o 0:b173517d0057 a |
|
1231 | o 0:b173517d0057 a | |
1232 |
|
1232 | |||
1233 | $ hg rebase -b 'f' -d 'x' |
|
1233 | $ hg rebase -b 'f' -d 'x' | |
1234 | rebasing 1:488e1b7e7341 "b" (b) |
|
1234 | rebasing 1:488e1b7e7341 "b" (b) | |
1235 | rebasing 3:a82ac2b38757 "c" (c) |
|
1235 | rebasing 3:a82ac2b38757 "c" (c) | |
1236 | rebasing 5:63324dc512ea "e'" (e') |
|
1236 | rebasing 5:63324dc512ea "e'" (e') | |
1237 | rebasing 7:3ffec603ab53 "f" (f) |
|
1237 | rebasing 7:3ffec603ab53 "f" (f) | |
1238 | rebasing 4:76be324c128b "d" (d) |
|
1238 | rebasing 4:76be324c128b "d" (d) | |
1239 | note: not rebasing 6:e36fae928aec "e" (e) and its descendants as this would cause divergence |
|
1239 | note: not rebasing 6:e36fae928aec "e" (e) and its descendants as this would cause divergence | |
1240 | $ hg log -G -r 'a': |
|
1240 | $ hg log -G -r 'a': | |
1241 | o 13:a1707a5b7c2c d |
|
1241 | o 13:a1707a5b7c2c d | |
1242 | | |
|
1242 | | | |
1243 | | o 12:ef6251596616 f |
|
1243 | | o 12:ef6251596616 f | |
1244 | | | |
|
1244 | | | | |
1245 | | o 11:b6f172e64af9 e' |
|
1245 | | o 11:b6f172e64af9 e' | |
1246 | |/ |
|
1246 | |/ | |
1247 | o 10:d008e6b4d3fd c |
|
1247 | o 10:d008e6b4d3fd c | |
1248 | | |
|
1248 | | | |
1249 | o 9:67e8f4a16c49 b |
|
1249 | o 9:67e8f4a16c49 b | |
1250 | | |
|
1250 | | | |
1251 | | * 8:2876ce66c6eb g |
|
1251 | | * 8:2876ce66c6eb g | |
1252 | | | |
|
1252 | | | | |
1253 | | | x 7:3ffec603ab53 f (rewritten using rebase as 12:ef6251596616) |
|
1253 | | | x 7:3ffec603ab53 f (rewritten using rebase as 12:ef6251596616) | |
1254 | | | | |
|
1254 | | | | | |
1255 | | x | 6:e36fae928aec e (rewritten using replace as 5:63324dc512ea) |
|
1255 | | x | 6:e36fae928aec e (rewritten using replace as 5:63324dc512ea) | |
1256 | | | | |
|
1256 | | | | | |
1257 | | | x 5:63324dc512ea e' (rewritten using rebase as 11:b6f172e64af9) |
|
1257 | | | x 5:63324dc512ea e' (rewritten using rebase as 11:b6f172e64af9) | |
1258 | | | | |
|
1258 | | | | | |
1259 | | x | 4:76be324c128b d (rewritten using rebase as 13:a1707a5b7c2c) |
|
1259 | | x | 4:76be324c128b d (rewritten using rebase as 13:a1707a5b7c2c) | |
1260 | | |/ |
|
1260 | | |/ | |
1261 | | x 3:a82ac2b38757 c (rewritten using rebase as 10:d008e6b4d3fd) |
|
1261 | | x 3:a82ac2b38757 c (rewritten using rebase as 10:d008e6b4d3fd) | |
1262 | | | |
|
1262 | | | | |
1263 | o | 2:630d7c95eff7 x |
|
1263 | o | 2:630d7c95eff7 x | |
1264 | | | |
|
1264 | | | | |
1265 | | x 1:488e1b7e7341 b (rewritten using rebase as 9:67e8f4a16c49) |
|
1265 | | x 1:488e1b7e7341 b (rewritten using rebase as 9:67e8f4a16c49) | |
1266 | |/ |
|
1266 | |/ | |
1267 | o 0:b173517d0057 a |
|
1267 | o 0:b173517d0057 a | |
1268 |
|
1268 | |||
1269 |
|
1269 | |||
1270 | issue5782 |
|
1270 | issue5782 | |
1271 | $ hg strip -r 0: |
|
1271 | $ hg strip -r 0: | |
1272 | $ hg debugdrawdag <<EOF |
|
1272 | $ hg debugdrawdag <<EOF | |
1273 | > d |
|
1273 | > d | |
1274 | > | |
|
1274 | > | | |
1275 | > c1 c # replace: c -> c1 |
|
1275 | > c1 c # replace: c -> c1 | |
1276 | > \ / |
|
1276 | > \ / | |
1277 | > b |
|
1277 | > b | |
1278 | > | |
|
1278 | > | | |
1279 | > a |
|
1279 | > a | |
1280 | > EOF |
|
1280 | > EOF | |
1281 | 1 new orphan changesets |
|
1281 | 1 new orphan changesets | |
1282 | $ hg debugobsolete `hg log -T "{node}" --hidden -r 'desc("c1")'` |
|
1282 | $ hg debugobsolete `hg log -T "{node}" --hidden -r 'desc("c1")'` | |
1283 | 1 new obsolescence markers |
|
1283 | 1 new obsolescence markers | |
1284 | obsoleted 1 changesets |
|
1284 | obsoleted 1 changesets | |
1285 | $ hg log -G -r 'a': --hidden |
|
1285 | $ hg log -G -r 'a': --hidden | |
1286 | * 4:76be324c128b d |
|
1286 | * 4:76be324c128b d | |
1287 | | |
|
1287 | | | |
1288 | | x 3:ef8a456de8fa c1 (pruned) |
|
1288 | | x 3:ef8a456de8fa c1 (pruned) | |
1289 | | | |
|
1289 | | | | |
1290 | x | 2:a82ac2b38757 c (rewritten using replace as 3:ef8a456de8fa) |
|
1290 | x | 2:a82ac2b38757 c (rewritten using replace as 3:ef8a456de8fa) | |
1291 | |/ |
|
1291 | |/ | |
1292 | o 1:488e1b7e7341 b |
|
1292 | o 1:488e1b7e7341 b | |
1293 | | |
|
1293 | | | |
1294 | o 0:b173517d0057 a |
|
1294 | o 0:b173517d0057 a | |
1295 |
|
1295 | |||
1296 | $ hg rebase -d 0 -r 2 |
|
1296 | $ hg rebase -d 0 -r 2 | |
1297 | rebasing 2:a82ac2b38757 "c" (c) |
|
1297 | rebasing 2:a82ac2b38757 "c" (c) | |
1298 | $ hg log -G -r 'a': --hidden |
|
1298 | $ hg log -G -r 'a': --hidden | |
1299 | o 5:69ad416a4a26 c |
|
1299 | o 5:69ad416a4a26 c | |
1300 | | |
|
1300 | | | |
1301 | | * 4:76be324c128b d |
|
1301 | | * 4:76be324c128b d | |
1302 | | | |
|
1302 | | | | |
1303 | | | x 3:ef8a456de8fa c1 (pruned) |
|
1303 | | | x 3:ef8a456de8fa c1 (pruned) | |
1304 | | | | |
|
1304 | | | | | |
1305 | | x | 2:a82ac2b38757 c (rewritten using replace as 3:ef8a456de8fa rewritten using rebase as 5:69ad416a4a26) |
|
1305 | | x | 2:a82ac2b38757 c (rewritten using replace as 3:ef8a456de8fa rewritten using rebase as 5:69ad416a4a26) | |
1306 | | |/ |
|
1306 | | |/ | |
1307 | | o 1:488e1b7e7341 b |
|
1307 | | o 1:488e1b7e7341 b | |
1308 | |/ |
|
1308 | |/ | |
1309 | o 0:b173517d0057 a |
|
1309 | o 0:b173517d0057 a | |
1310 |
|
1310 | |||
1311 | $ cd .. |
|
1311 | $ cd .. | |
1312 |
|
1312 | |||
1313 | Rebase merge where successor of one parent is equal to destination (issue5198) |
|
1313 | Rebase merge where successor of one parent is equal to destination (issue5198) | |
1314 |
|
1314 | |||
1315 | $ hg init p1-succ-is-dest |
|
1315 | $ hg init p1-succ-is-dest | |
1316 | $ cd p1-succ-is-dest |
|
1316 | $ cd p1-succ-is-dest | |
1317 |
|
1317 | |||
1318 | $ hg debugdrawdag <<EOF |
|
1318 | $ hg debugdrawdag <<EOF | |
1319 | > F |
|
1319 | > F | |
1320 | > /| |
|
1320 | > /| | |
1321 | > E D B # replace: D -> B |
|
1321 | > E D B # replace: D -> B | |
1322 | > \|/ |
|
1322 | > \|/ | |
1323 | > A |
|
1323 | > A | |
1324 | > EOF |
|
1324 | > EOF | |
1325 | 1 new orphan changesets |
|
1325 | 1 new orphan changesets | |
1326 |
|
1326 | |||
1327 | $ hg rebase -d B -s D |
|
1327 | $ hg rebase -d B -s D | |
1328 | note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B) |
|
1328 | note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B) | |
1329 | rebasing 4:66f1a38021c9 "F" (F tip) |
|
1329 | rebasing 4:66f1a38021c9 "F" (F tip) | |
1330 | $ hg log -G |
|
1330 | $ hg log -G | |
1331 | o 5:50e9d60b99c6 F |
|
1331 | o 5:50e9d60b99c6 F | |
1332 | |\ |
|
1332 | |\ | |
1333 | | | x 4:66f1a38021c9 F (rewritten using rebase as 5:50e9d60b99c6) |
|
1333 | | | x 4:66f1a38021c9 F (rewritten using rebase as 5:50e9d60b99c6) | |
1334 | | |/| |
|
1334 | | |/| | |
1335 | | o | 3:7fb047a69f22 E |
|
1335 | | o | 3:7fb047a69f22 E | |
1336 | | | | |
|
1336 | | | | | |
1337 | | | x 2:b18e25de2cf5 D (rewritten using replace as 1:112478962961) |
|
1337 | | | x 2:b18e25de2cf5 D (rewritten using replace as 1:112478962961) | |
1338 | | |/ |
|
1338 | | |/ | |
1339 | o | 1:112478962961 B |
|
1339 | o | 1:112478962961 B | |
1340 | |/ |
|
1340 | |/ | |
1341 | o 0:426bada5c675 A |
|
1341 | o 0:426bada5c675 A | |
1342 |
|
1342 | |||
1343 | $ cd .. |
|
1343 | $ cd .. | |
1344 |
|
1344 | |||
1345 | Rebase merge where successor of other parent is equal to destination |
|
1345 | Rebase merge where successor of other parent is equal to destination | |
1346 |
|
1346 | |||
1347 | $ hg init p2-succ-is-dest |
|
1347 | $ hg init p2-succ-is-dest | |
1348 | $ cd p2-succ-is-dest |
|
1348 | $ cd p2-succ-is-dest | |
1349 |
|
1349 | |||
1350 | $ hg debugdrawdag <<EOF |
|
1350 | $ hg debugdrawdag <<EOF | |
1351 | > F |
|
1351 | > F | |
1352 | > /| |
|
1352 | > /| | |
1353 | > E D B # replace: E -> B |
|
1353 | > E D B # replace: E -> B | |
1354 | > \|/ |
|
1354 | > \|/ | |
1355 | > A |
|
1355 | > A | |
1356 | > EOF |
|
1356 | > EOF | |
1357 | 1 new orphan changesets |
|
1357 | 1 new orphan changesets | |
1358 |
|
1358 | |||
1359 | $ hg rebase -d B -s E |
|
1359 | $ hg rebase -d B -s E | |
1360 | note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B) |
|
1360 | note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B) | |
1361 | rebasing 4:66f1a38021c9 "F" (F tip) |
|
1361 | rebasing 4:66f1a38021c9 "F" (F tip) | |
1362 | $ hg log -G |
|
1362 | $ hg log -G | |
1363 | o 5:aae1787dacee F |
|
1363 | o 5:aae1787dacee F | |
1364 | |\ |
|
1364 | |\ | |
1365 | | | x 4:66f1a38021c9 F (rewritten using rebase as 5:aae1787dacee) |
|
1365 | | | x 4:66f1a38021c9 F (rewritten using rebase as 5:aae1787dacee) | |
1366 | | |/| |
|
1366 | | |/| | |
1367 | | | x 3:7fb047a69f22 E (rewritten using replace as 1:112478962961) |
|
1367 | | | x 3:7fb047a69f22 E (rewritten using replace as 1:112478962961) | |
1368 | | | | |
|
1368 | | | | | |
1369 | | o | 2:b18e25de2cf5 D |
|
1369 | | o | 2:b18e25de2cf5 D | |
1370 | | |/ |
|
1370 | | |/ | |
1371 | o / 1:112478962961 B |
|
1371 | o / 1:112478962961 B | |
1372 | |/ |
|
1372 | |/ | |
1373 | o 0:426bada5c675 A |
|
1373 | o 0:426bada5c675 A | |
1374 |
|
1374 | |||
1375 | $ cd .. |
|
1375 | $ cd .. | |
1376 |
|
1376 | |||
1377 | Rebase merge where successor of one parent is ancestor of destination |
|
1377 | Rebase merge where successor of one parent is ancestor of destination | |
1378 |
|
1378 | |||
1379 | $ hg init p1-succ-in-dest |
|
1379 | $ hg init p1-succ-in-dest | |
1380 | $ cd p1-succ-in-dest |
|
1380 | $ cd p1-succ-in-dest | |
1381 |
|
1381 | |||
1382 | $ hg debugdrawdag <<EOF |
|
1382 | $ hg debugdrawdag <<EOF | |
1383 | > F C |
|
1383 | > F C | |
1384 | > /| | |
|
1384 | > /| | | |
1385 | > E D B # replace: D -> B |
|
1385 | > E D B # replace: D -> B | |
1386 | > \|/ |
|
1386 | > \|/ | |
1387 | > A |
|
1387 | > A | |
1388 | > EOF |
|
1388 | > EOF | |
1389 | 1 new orphan changesets |
|
1389 | 1 new orphan changesets | |
1390 |
|
1390 | |||
1391 | $ hg rebase -d C -s D |
|
1391 | $ hg rebase -d C -s D | |
1392 | note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B) |
|
1392 | note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B) | |
1393 | rebasing 5:66f1a38021c9 "F" (F tip) |
|
1393 | rebasing 5:66f1a38021c9 "F" (F tip) | |
1394 |
|
1394 | |||
1395 | $ hg log -G |
|
1395 | $ hg log -G | |
1396 | o 6:0913febf6439 F |
|
1396 | o 6:0913febf6439 F | |
1397 | |\ |
|
1397 | |\ | |
1398 | +---x 5:66f1a38021c9 F (rewritten using rebase as 6:0913febf6439) |
|
1398 | +---x 5:66f1a38021c9 F (rewritten using rebase as 6:0913febf6439) | |
1399 | | | | |
|
1399 | | | | | |
1400 | | o | 4:26805aba1e60 C |
|
1400 | | o | 4:26805aba1e60 C | |
1401 | | | | |
|
1401 | | | | | |
1402 | o | | 3:7fb047a69f22 E |
|
1402 | o | | 3:7fb047a69f22 E | |
1403 | | | | |
|
1403 | | | | | |
1404 | +---x 2:b18e25de2cf5 D (rewritten using replace as 1:112478962961) |
|
1404 | +---x 2:b18e25de2cf5 D (rewritten using replace as 1:112478962961) | |
1405 | | | |
|
1405 | | | | |
1406 | | o 1:112478962961 B |
|
1406 | | o 1:112478962961 B | |
1407 | |/ |
|
1407 | |/ | |
1408 | o 0:426bada5c675 A |
|
1408 | o 0:426bada5c675 A | |
1409 |
|
1409 | |||
1410 | $ cd .. |
|
1410 | $ cd .. | |
1411 |
|
1411 | |||
1412 | Rebase merge where successor of other parent is ancestor of destination |
|
1412 | Rebase merge where successor of other parent is ancestor of destination | |
1413 |
|
1413 | |||
1414 | $ hg init p2-succ-in-dest |
|
1414 | $ hg init p2-succ-in-dest | |
1415 | $ cd p2-succ-in-dest |
|
1415 | $ cd p2-succ-in-dest | |
1416 |
|
1416 | |||
1417 | $ hg debugdrawdag <<EOF |
|
1417 | $ hg debugdrawdag <<EOF | |
1418 | > F C |
|
1418 | > F C | |
1419 | > /| | |
|
1419 | > /| | | |
1420 | > E D B # replace: E -> B |
|
1420 | > E D B # replace: E -> B | |
1421 | > \|/ |
|
1421 | > \|/ | |
1422 | > A |
|
1422 | > A | |
1423 | > EOF |
|
1423 | > EOF | |
1424 | 1 new orphan changesets |
|
1424 | 1 new orphan changesets | |
1425 |
|
1425 | |||
1426 | $ hg rebase -d C -s E |
|
1426 | $ hg rebase -d C -s E | |
1427 | note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B) |
|
1427 | note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B) | |
1428 | rebasing 5:66f1a38021c9 "F" (F tip) |
|
1428 | rebasing 5:66f1a38021c9 "F" (F tip) | |
1429 | $ hg log -G |
|
1429 | $ hg log -G | |
1430 | o 6:c6ab0cc6d220 F |
|
1430 | o 6:c6ab0cc6d220 F | |
1431 | |\ |
|
1431 | |\ | |
1432 | +---x 5:66f1a38021c9 F (rewritten using rebase as 6:c6ab0cc6d220) |
|
1432 | +---x 5:66f1a38021c9 F (rewritten using rebase as 6:c6ab0cc6d220) | |
1433 | | | | |
|
1433 | | | | | |
1434 | | o | 4:26805aba1e60 C |
|
1434 | | o | 4:26805aba1e60 C | |
1435 | | | | |
|
1435 | | | | | |
1436 | | | x 3:7fb047a69f22 E (rewritten using replace as 1:112478962961) |
|
1436 | | | x 3:7fb047a69f22 E (rewritten using replace as 1:112478962961) | |
1437 | | | | |
|
1437 | | | | | |
1438 | o---+ 2:b18e25de2cf5 D |
|
1438 | o---+ 2:b18e25de2cf5 D | |
1439 | / / |
|
1439 | / / | |
1440 | o / 1:112478962961 B |
|
1440 | o / 1:112478962961 B | |
1441 | |/ |
|
1441 | |/ | |
1442 | o 0:426bada5c675 A |
|
1442 | o 0:426bada5c675 A | |
1443 |
|
1443 | |||
1444 | $ cd .. |
|
1444 | $ cd .. | |
1445 |
|
1445 | |||
1446 | Rebase merge where successor of one parent is ancestor of destination |
|
1446 | Rebase merge where successor of one parent is ancestor of destination | |
1447 |
|
1447 | |||
1448 | $ hg init p1-succ-in-dest-b |
|
1448 | $ hg init p1-succ-in-dest-b | |
1449 | $ cd p1-succ-in-dest-b |
|
1449 | $ cd p1-succ-in-dest-b | |
1450 |
|
1450 | |||
1451 | $ hg debugdrawdag <<EOF |
|
1451 | $ hg debugdrawdag <<EOF | |
1452 | > F C |
|
1452 | > F C | |
1453 | > /| | |
|
1453 | > /| | | |
1454 | > E D B # replace: E -> B |
|
1454 | > E D B # replace: E -> B | |
1455 | > \|/ |
|
1455 | > \|/ | |
1456 | > A |
|
1456 | > A | |
1457 | > EOF |
|
1457 | > EOF | |
1458 | 1 new orphan changesets |
|
1458 | 1 new orphan changesets | |
1459 |
|
1459 | |||
1460 | $ hg rebase -d C -b F |
|
1460 | $ hg rebase -d C -b F | |
1461 | rebasing 2:b18e25de2cf5 "D" (D) |
|
1461 | rebasing 2:b18e25de2cf5 "D" (D) | |
1462 | note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B) |
|
1462 | note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B) | |
1463 | rebasing 5:66f1a38021c9 "F" (F tip) |
|
1463 | rebasing 5:66f1a38021c9 "F" (F tip) | |
1464 | note: not rebasing 5:66f1a38021c9 "F" (F tip), its destination already has all its changes |
|
1464 | note: not rebasing 5:66f1a38021c9 "F" (F tip), its destination already has all its changes | |
1465 | $ hg log -G |
|
1465 | $ hg log -G | |
1466 | o 6:8f47515dda15 D |
|
1466 | o 6:8f47515dda15 D | |
1467 | | |
|
1467 | | | |
1468 | | x 5:66f1a38021c9 F (pruned using rebase) |
|
1468 | | x 5:66f1a38021c9 F (pruned using rebase) | |
1469 | | |\ |
|
1469 | | |\ | |
1470 | o | | 4:26805aba1e60 C |
|
1470 | o | | 4:26805aba1e60 C | |
1471 | | | | |
|
1471 | | | | | |
1472 | | | x 3:7fb047a69f22 E (rewritten using replace as 1:112478962961) |
|
1472 | | | x 3:7fb047a69f22 E (rewritten using replace as 1:112478962961) | |
1473 | | | | |
|
1473 | | | | | |
1474 | | x | 2:b18e25de2cf5 D (rewritten using rebase as 6:8f47515dda15) |
|
1474 | | x | 2:b18e25de2cf5 D (rewritten using rebase as 6:8f47515dda15) | |
1475 | | |/ |
|
1475 | | |/ | |
1476 | o / 1:112478962961 B |
|
1476 | o / 1:112478962961 B | |
1477 | |/ |
|
1477 | |/ | |
1478 | o 0:426bada5c675 A |
|
1478 | o 0:426bada5c675 A | |
1479 |
|
1479 | |||
1480 | $ cd .. |
|
1480 | $ cd .. | |
1481 |
|
1481 | |||
1482 | Rebase merge where successor of other parent is ancestor of destination |
|
1482 | Rebase merge where successor of other parent is ancestor of destination | |
1483 |
|
1483 | |||
1484 | $ hg init p2-succ-in-dest-b |
|
1484 | $ hg init p2-succ-in-dest-b | |
1485 | $ cd p2-succ-in-dest-b |
|
1485 | $ cd p2-succ-in-dest-b | |
1486 |
|
1486 | |||
1487 | $ hg debugdrawdag <<EOF |
|
1487 | $ hg debugdrawdag <<EOF | |
1488 | > F C |
|
1488 | > F C | |
1489 | > /| | |
|
1489 | > /| | | |
1490 | > E D B # replace: D -> B |
|
1490 | > E D B # replace: D -> B | |
1491 | > \|/ |
|
1491 | > \|/ | |
1492 | > A |
|
1492 | > A | |
1493 | > EOF |
|
1493 | > EOF | |
1494 | 1 new orphan changesets |
|
1494 | 1 new orphan changesets | |
1495 |
|
1495 | |||
1496 | $ hg rebase -d C -b F |
|
1496 | $ hg rebase -d C -b F | |
1497 | note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B) |
|
1497 | note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B) | |
1498 | rebasing 3:7fb047a69f22 "E" (E) |
|
1498 | rebasing 3:7fb047a69f22 "E" (E) | |
1499 | rebasing 5:66f1a38021c9 "F" (F tip) |
|
1499 | rebasing 5:66f1a38021c9 "F" (F tip) | |
1500 | note: not rebasing 5:66f1a38021c9 "F" (F tip), its destination already has all its changes |
|
1500 | note: not rebasing 5:66f1a38021c9 "F" (F tip), its destination already has all its changes | |
1501 |
|
1501 | |||
1502 | $ hg log -G |
|
1502 | $ hg log -G | |
1503 | o 6:533690786a86 E |
|
1503 | o 6:533690786a86 E | |
1504 | | |
|
1504 | | | |
1505 | | x 5:66f1a38021c9 F (pruned using rebase) |
|
1505 | | x 5:66f1a38021c9 F (pruned using rebase) | |
1506 | | |\ |
|
1506 | | |\ | |
1507 | o | | 4:26805aba1e60 C |
|
1507 | o | | 4:26805aba1e60 C | |
1508 | | | | |
|
1508 | | | | | |
1509 | | | x 3:7fb047a69f22 E (rewritten using rebase as 6:533690786a86) |
|
1509 | | | x 3:7fb047a69f22 E (rewritten using rebase as 6:533690786a86) | |
1510 | | | | |
|
1510 | | | | | |
1511 | | x | 2:b18e25de2cf5 D (rewritten using replace as 1:112478962961) |
|
1511 | | x | 2:b18e25de2cf5 D (rewritten using replace as 1:112478962961) | |
1512 | | |/ |
|
1512 | | |/ | |
1513 | o / 1:112478962961 B |
|
1513 | o / 1:112478962961 B | |
1514 | |/ |
|
1514 | |/ | |
1515 | o 0:426bada5c675 A |
|
1515 | o 0:426bada5c675 A | |
1516 |
|
1516 | |||
1517 | $ cd .. |
|
1517 | $ cd .. | |
1518 |
|
1518 | |||
1519 | Rebase merge where extinct node has successor that is not an ancestor of |
|
1519 | Rebase merge where extinct node has successor that is not an ancestor of | |
1520 | destination |
|
1520 | destination | |
1521 |
|
1521 | |||
1522 | $ hg init extinct-with-succ-not-in-dest |
|
1522 | $ hg init extinct-with-succ-not-in-dest | |
1523 | $ cd extinct-with-succ-not-in-dest |
|
1523 | $ cd extinct-with-succ-not-in-dest | |
1524 |
|
1524 | |||
1525 | $ hg debugdrawdag <<EOF |
|
1525 | $ hg debugdrawdag <<EOF | |
1526 | > E C # replace: C -> E |
|
1526 | > E C # replace: C -> E | |
1527 | > | | |
|
1527 | > | | | |
1528 | > D B |
|
1528 | > D B | |
1529 | > |/ |
|
1529 | > |/ | |
1530 | > A |
|
1530 | > A | |
1531 | > EOF |
|
1531 | > EOF | |
1532 |
|
1532 | |||
1533 | $ hg rebase -d D -s B |
|
1533 | $ hg rebase -d D -s B | |
1534 | rebasing 1:112478962961 "B" (B) |
|
1534 | rebasing 1:112478962961 "B" (B) | |
1535 | note: not rebasing 3:26805aba1e60 "C" (C) and its descendants as this would cause divergence |
|
1535 | note: not rebasing 3:26805aba1e60 "C" (C) and its descendants as this would cause divergence | |
1536 |
|
1536 | |||
1537 | $ cd .. |
|
1537 | $ cd .. | |
1538 |
|
1538 | |||
1539 | $ hg init p2-succ-in-dest-c |
|
1539 | $ hg init p2-succ-in-dest-c | |
1540 | $ cd p2-succ-in-dest-c |
|
1540 | $ cd p2-succ-in-dest-c | |
1541 |
|
1541 | |||
1542 | The scenario here was that B::D were developed on default. B was queued on |
|
1542 | The scenario here was that B::D were developed on default. B was queued on | |
1543 | stable, but amended before being push to hg-committed. C was queued on default, |
|
1543 | stable, but amended before being push to hg-committed. C was queued on default, | |
1544 | along with unrelated J. |
|
1544 | along with unrelated J. | |
1545 |
|
1545 | |||
1546 | $ hg debugdrawdag <<EOF |
|
1546 | $ hg debugdrawdag <<EOF | |
1547 | > J |
|
1547 | > J | |
1548 | > | |
|
1548 | > | | |
1549 | > F |
|
1549 | > F | |
1550 | > | |
|
1550 | > | | |
1551 | > E |
|
1551 | > E | |
1552 | > | D |
|
1552 | > | D | |
1553 | > | | |
|
1553 | > | | | |
1554 | > | C # replace: C -> F |
|
1554 | > | C # replace: C -> F | |
1555 | > | | H I # replace: B -> H -> I |
|
1555 | > | | H I # replace: B -> H -> I | |
1556 | > | B |/ |
|
1556 | > | B |/ | |
1557 | > |/ G |
|
1557 | > |/ G | |
1558 | > A |
|
1558 | > A | |
1559 | > EOF |
|
1559 | > EOF | |
1560 | 1 new orphan changesets |
|
1560 | 1 new orphan changesets | |
1561 |
|
1561 | |||
1562 | This strip seems to be the key to avoid an early divergence warning. |
|
1562 | This strip seems to be the key to avoid an early divergence warning. | |
1563 | $ hg --config extensions.strip= --hidden strip -qr H |
|
1563 | $ hg --config extensions.strip= --hidden strip -qr H | |
1564 | 1 new orphan changesets |
|
1564 | 1 new orphan changesets | |
1565 |
|
1565 | |||
1566 | $ hg rebase -b 'desc("D")' -d 'desc("J")' |
|
1566 | $ hg rebase -b 'desc("D")' -d 'desc("J")' | |
1567 | abort: this rebase will cause divergences from: 112478962961 |
|
1567 | abort: this rebase will cause divergences from: 112478962961 | |
1568 | (to force the rebase please set experimental.evolution.allowdivergence=True) |
|
1568 | (to force the rebase please set experimental.evolution.allowdivergence=True) | |
1569 | [255] |
|
1569 | [255] | |
1570 |
|
1570 | |||
1571 | Rebase merge where both parents have successors in destination |
|
1571 | Rebase merge where both parents have successors in destination | |
1572 |
|
1572 | |||
1573 | $ hg init p12-succ-in-dest |
|
1573 | $ hg init p12-succ-in-dest | |
1574 | $ cd p12-succ-in-dest |
|
1574 | $ cd p12-succ-in-dest | |
1575 | $ hg debugdrawdag <<'EOS' |
|
1575 | $ hg debugdrawdag <<'EOS' | |
1576 | > E F |
|
1576 | > E F | |
1577 | > /| /| # replace: A -> C |
|
1577 | > /| /| # replace: A -> C | |
1578 | > A B C D # replace: B -> D |
|
1578 | > A B C D # replace: B -> D | |
1579 | > | | |
|
1579 | > | | | |
1580 | > X Y |
|
1580 | > X Y | |
1581 | > EOS |
|
1581 | > EOS | |
1582 | 1 new orphan changesets |
|
1582 | 1 new orphan changesets | |
1583 | $ hg rebase -r A+B+E -d F |
|
1583 | $ hg rebase -r A+B+E -d F | |
1584 | note: not rebasing 4:a3d17304151f "A" (A), already in destination as 0:96cc3511f894 "C" (C) |
|
1584 | note: not rebasing 4:a3d17304151f "A" (A), already in destination as 0:96cc3511f894 "C" (C) | |
1585 | note: not rebasing 5:b23a2cc00842 "B" (B), already in destination as 1:058c1e1fb10a "D" (D) |
|
1585 | note: not rebasing 5:b23a2cc00842 "B" (B), already in destination as 1:058c1e1fb10a "D" (D) | |
1586 | rebasing 7:dac5d11c5a7d "E" (E tip) |
|
1586 | rebasing 7:dac5d11c5a7d "E" (E tip) | |
1587 | abort: rebasing 7:dac5d11c5a7d will include unwanted changes from 3:59c792af609c, 5:b23a2cc00842 or 2:ba2b7fa7166d, 4:a3d17304151f |
|
1587 | abort: rebasing 7:dac5d11c5a7d will include unwanted changes from 3:59c792af609c, 5:b23a2cc00842 or 2:ba2b7fa7166d, 4:a3d17304151f | |
1588 | [255] |
|
1588 | [255] | |
1589 | $ cd .. |
|
1589 | $ cd .. | |
1590 |
|
1590 | |||
1591 | Rebase a non-clean merge. One parent has successor in destination, the other |
|
1591 | Rebase a non-clean merge. One parent has successor in destination, the other | |
1592 | parent moves as requested. |
|
1592 | parent moves as requested. | |
1593 |
|
1593 | |||
1594 | $ hg init p1-succ-p2-move |
|
1594 | $ hg init p1-succ-p2-move | |
1595 | $ cd p1-succ-p2-move |
|
1595 | $ cd p1-succ-p2-move | |
1596 | $ hg debugdrawdag <<'EOS' |
|
1596 | $ hg debugdrawdag <<'EOS' | |
1597 | > D Z |
|
1597 | > D Z | |
1598 | > /| | # replace: A -> C |
|
1598 | > /| | # replace: A -> C | |
1599 | > A B C # D/D = D |
|
1599 | > A B C # D/D = D | |
1600 | > EOS |
|
1600 | > EOS | |
1601 | 1 new orphan changesets |
|
1601 | 1 new orphan changesets | |
1602 | $ hg rebase -r A+B+D -d Z |
|
1602 | $ hg rebase -r A+B+D -d Z | |
1603 | note: not rebasing 0:426bada5c675 "A" (A), already in destination as 2:96cc3511f894 "C" (C) |
|
1603 | note: not rebasing 0:426bada5c675 "A" (A), already in destination as 2:96cc3511f894 "C" (C) | |
1604 | rebasing 1:fc2b737bb2e5 "B" (B) |
|
1604 | rebasing 1:fc2b737bb2e5 "B" (B) | |
1605 | rebasing 3:b8ed089c80ad "D" (D) |
|
1605 | rebasing 3:b8ed089c80ad "D" (D) | |
1606 |
|
1606 | |||
1607 | $ rm .hg/localtags |
|
1607 | $ rm .hg/localtags | |
1608 | $ hg log -G |
|
1608 | $ hg log -G | |
1609 | o 6:e4f78693cc88 D |
|
1609 | o 6:e4f78693cc88 D | |
1610 | | |
|
1610 | | | |
1611 | o 5:76840d832e98 B |
|
1611 | o 5:76840d832e98 B | |
1612 | | |
|
1612 | | | |
1613 | o 4:50e41c1f3950 Z |
|
1613 | o 4:50e41c1f3950 Z | |
1614 | | |
|
1614 | | | |
1615 | o 2:96cc3511f894 C |
|
1615 | o 2:96cc3511f894 C | |
1616 |
|
1616 | |||
1617 | $ hg files -r tip |
|
1617 | $ hg files -r tip | |
1618 | B |
|
1618 | B | |
1619 | C |
|
1619 | C | |
1620 | D |
|
1620 | D | |
1621 | Z |
|
1621 | Z | |
1622 |
|
1622 | |||
1623 | $ cd .. |
|
1623 | $ cd .. | |
1624 |
|
1624 | |||
1625 | $ hg init p1-move-p2-succ |
|
1625 | $ hg init p1-move-p2-succ | |
1626 | $ cd p1-move-p2-succ |
|
1626 | $ cd p1-move-p2-succ | |
1627 | $ hg debugdrawdag <<'EOS' |
|
1627 | $ hg debugdrawdag <<'EOS' | |
1628 | > D Z |
|
1628 | > D Z | |
1629 | > /| | # replace: B -> C |
|
1629 | > /| | # replace: B -> C | |
1630 | > A B C # D/D = D |
|
1630 | > A B C # D/D = D | |
1631 | > EOS |
|
1631 | > EOS | |
1632 | 1 new orphan changesets |
|
1632 | 1 new orphan changesets | |
1633 | $ hg rebase -r B+A+D -d Z |
|
1633 | $ hg rebase -r B+A+D -d Z | |
1634 | rebasing 0:426bada5c675 "A" (A) |
|
1634 | rebasing 0:426bada5c675 "A" (A) | |
1635 | note: not rebasing 1:fc2b737bb2e5 "B" (B), already in destination as 2:96cc3511f894 "C" (C) |
|
1635 | note: not rebasing 1:fc2b737bb2e5 "B" (B), already in destination as 2:96cc3511f894 "C" (C) | |
1636 | rebasing 3:b8ed089c80ad "D" (D) |
|
1636 | rebasing 3:b8ed089c80ad "D" (D) | |
1637 |
|
1637 | |||
1638 | $ rm .hg/localtags |
|
1638 | $ rm .hg/localtags | |
1639 | $ hg log -G |
|
1639 | $ hg log -G | |
1640 | o 6:1b355ed94d82 D |
|
1640 | o 6:1b355ed94d82 D | |
1641 | | |
|
1641 | | | |
1642 | o 5:a81a74d764a6 A |
|
1642 | o 5:a81a74d764a6 A | |
1643 | | |
|
1643 | | | |
1644 | o 4:50e41c1f3950 Z |
|
1644 | o 4:50e41c1f3950 Z | |
1645 | | |
|
1645 | | | |
1646 | o 2:96cc3511f894 C |
|
1646 | o 2:96cc3511f894 C | |
1647 |
|
1647 | |||
1648 | $ hg files -r tip |
|
1648 | $ hg files -r tip | |
1649 | A |
|
1649 | A | |
1650 | C |
|
1650 | C | |
1651 | D |
|
1651 | D | |
1652 | Z |
|
1652 | Z | |
1653 |
|
1653 | |||
1654 | $ cd .. |
|
1654 | $ cd .. | |
1655 |
|
1655 | |||
1656 | Test that bookmark is moved and working dir is updated when all changesets have |
|
1656 | Test that bookmark is moved and working dir is updated when all changesets have | |
1657 | equivalents in destination |
|
1657 | equivalents in destination | |
1658 | $ hg init rbsrepo && cd rbsrepo |
|
1658 | $ hg init rbsrepo && cd rbsrepo | |
1659 | $ echo "[experimental]" > .hg/hgrc |
|
1659 | $ echo "[experimental]" > .hg/hgrc | |
1660 | $ echo "evolution=true" >> .hg/hgrc |
|
1660 | $ echo "evolution=true" >> .hg/hgrc | |
1661 | $ echo "rebaseskipobsolete=on" >> .hg/hgrc |
|
1661 | $ echo "rebaseskipobsolete=on" >> .hg/hgrc | |
1662 | $ echo root > root && hg ci -Am root |
|
1662 | $ echo root > root && hg ci -Am root | |
1663 | adding root |
|
1663 | adding root | |
1664 | $ echo a > a && hg ci -Am a |
|
1664 | $ echo a > a && hg ci -Am a | |
1665 | adding a |
|
1665 | adding a | |
1666 | $ hg up 0 |
|
1666 | $ hg up 0 | |
1667 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1667 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1668 | $ echo b > b && hg ci -Am b |
|
1668 | $ echo b > b && hg ci -Am b | |
1669 | adding b |
|
1669 | adding b | |
1670 | created new head |
|
1670 | created new head | |
1671 | $ hg rebase -r 2 -d 1 |
|
1671 | $ hg rebase -r 2 -d 1 | |
1672 | rebasing 2:1e9a3c00cbe9 "b" (tip) |
|
1672 | rebasing 2:1e9a3c00cbe9 "b" (tip) | |
1673 | $ hg log -r . # working dir is at rev 3 (successor of 2) |
|
1673 | $ hg log -r . # working dir is at rev 3 (successor of 2) | |
1674 | 3:be1832deae9a b (no-eol) |
|
1674 | 3:be1832deae9a b (no-eol) | |
1675 | $ hg book -r 2 mybook --hidden # rev 2 has a bookmark on it now |
|
1675 | $ hg book -r 2 mybook --hidden # rev 2 has a bookmark on it now | |
1676 | bookmarking hidden changeset 1e9a3c00cbe9 |
|
1676 | bookmarking hidden changeset 1e9a3c00cbe9 | |
1677 | (hidden revision '1e9a3c00cbe9' was rewritten as: be1832deae9a) |
|
1677 | (hidden revision '1e9a3c00cbe9' was rewritten as: be1832deae9a) | |
1678 | $ hg up 2 && hg log -r . # working dir is at rev 2 again |
|
1678 | $ hg up 2 && hg log -r . # working dir is at rev 2 again | |
1679 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1679 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1680 | 2:1e9a3c00cbe9 b (rewritten using rebase as 3:be1832deae9a) (no-eol) |
|
1680 | 2:1e9a3c00cbe9 b (rewritten using rebase as 3:be1832deae9a) (no-eol) | |
1681 | $ hg rebase -r 2 -d 3 --config experimental.evolution.track-operation=1 |
|
1681 | $ hg rebase -r 2 -d 3 --config experimental.evolution.track-operation=1 | |
1682 | note: not rebasing 2:1e9a3c00cbe9 "b" (mybook), already in destination as 3:be1832deae9a "b" (tip) |
|
1682 | note: not rebasing 2:1e9a3c00cbe9 "b" (mybook), already in destination as 3:be1832deae9a "b" (tip) | |
1683 | Check that working directory and bookmark was updated to rev 3 although rev 2 |
|
1683 | Check that working directory and bookmark was updated to rev 3 although rev 2 | |
1684 | was skipped |
|
1684 | was skipped | |
1685 | $ hg log -r . |
|
1685 | $ hg log -r . | |
1686 | 3:be1832deae9a b (no-eol) |
|
1686 | 3:be1832deae9a b (no-eol) | |
1687 | $ hg bookmarks |
|
1687 | $ hg bookmarks | |
1688 | mybook 3:be1832deae9a |
|
1688 | mybook 3:be1832deae9a | |
1689 | $ hg debugobsolete --rev tip |
|
1689 | $ hg debugobsolete --rev tip | |
1690 | 1e9a3c00cbe90d236ac05ef61efcc5e40b7412bc be1832deae9ac531caa7438b8dcf6055a122cd8e 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
1690 | 1e9a3c00cbe90d236ac05ef61efcc5e40b7412bc be1832deae9ac531caa7438b8dcf6055a122cd8e 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
1691 |
|
1691 | |||
1692 | Obsoleted working parent and bookmark could be moved if an ancestor of working |
|
1692 | Obsoleted working parent and bookmark could be moved if an ancestor of working | |
1693 | parent gets moved: |
|
1693 | parent gets moved: | |
1694 |
|
1694 | |||
1695 | $ hg init $TESTTMP/ancestor-wd-move |
|
1695 | $ hg init $TESTTMP/ancestor-wd-move | |
1696 | $ cd $TESTTMP/ancestor-wd-move |
|
1696 | $ cd $TESTTMP/ancestor-wd-move | |
1697 | $ hg debugdrawdag <<'EOS' |
|
1697 | $ hg debugdrawdag <<'EOS' | |
1698 | > E D1 # rebase: D1 -> D2 |
|
1698 | > E D1 # rebase: D1 -> D2 | |
1699 | > | | |
|
1699 | > | | | |
1700 | > | C |
|
1700 | > | C | |
1701 | > D2 | |
|
1701 | > D2 | | |
1702 | > | B |
|
1702 | > | B | |
1703 | > |/ |
|
1703 | > |/ | |
1704 | > A |
|
1704 | > A | |
1705 | > EOS |
|
1705 | > EOS | |
1706 | $ hg update D1 -q |
|
1706 | $ hg update D1 -q | |
1707 | $ hg bookmark book -i |
|
1707 | $ hg bookmark book -i | |
1708 | $ hg rebase -r B+D1 -d E |
|
1708 | $ hg rebase -r B+D1 -d E | |
1709 | rebasing 1:112478962961 "B" (B) |
|
1709 | rebasing 1:112478962961 "B" (B) | |
1710 | note: not rebasing 5:15ecf15e0114 "D1" (book D1 tip), already in destination as 2:0807738e0be9 "D2" (D2) |
|
1710 | note: not rebasing 5:15ecf15e0114 "D1" (book D1 tip), already in destination as 2:0807738e0be9 "D2" (D2) | |
1711 | 1 new orphan changesets |
|
1711 | 1 new orphan changesets | |
1712 | $ hg log -G -T '{desc} {bookmarks}' |
|
1712 | $ hg log -G -T '{desc} {bookmarks}' | |
1713 | @ B book |
|
1713 | @ B book | |
1714 | | |
|
1714 | | | |
1715 | | x D1 |
|
1715 | | x D1 | |
1716 | | | |
|
1716 | | | | |
1717 | o | E |
|
1717 | o | E | |
1718 | | | |
|
1718 | | | | |
1719 | | * C |
|
1719 | | * C | |
1720 | | | |
|
1720 | | | | |
1721 | o | D2 |
|
1721 | o | D2 | |
1722 | | | |
|
1722 | | | | |
1723 | | x B |
|
1723 | | x B | |
1724 | |/ |
|
1724 | |/ | |
1725 | o A |
|
1725 | o A | |
1726 |
|
1726 | |||
1727 | Rebasing a merge with one of its parent having a hidden successor |
|
1727 | Rebasing a merge with one of its parent having a hidden successor | |
1728 |
|
1728 | |||
1729 | $ hg init $TESTTMP/merge-p1-hidden-successor |
|
1729 | $ hg init $TESTTMP/merge-p1-hidden-successor | |
1730 | $ cd $TESTTMP/merge-p1-hidden-successor |
|
1730 | $ cd $TESTTMP/merge-p1-hidden-successor | |
1731 |
|
1731 | |||
1732 | $ hg debugdrawdag <<'EOS' |
|
1732 | $ hg debugdrawdag <<'EOS' | |
1733 | > E |
|
1733 | > E | |
1734 | > | |
|
1734 | > | | |
1735 | > B3 B2 # amend: B1 -> B2 -> B3 |
|
1735 | > B3 B2 # amend: B1 -> B2 -> B3 | |
1736 | > |/ # B2 is hidden |
|
1736 | > |/ # B2 is hidden | |
1737 | > | D |
|
1737 | > | D | |
1738 | > | |\ |
|
1738 | > | |\ | |
1739 | > | B1 C |
|
1739 | > | B1 C | |
1740 | > |/ |
|
1740 | > |/ | |
1741 | > A |
|
1741 | > A | |
1742 | > EOS |
|
1742 | > EOS | |
1743 | 1 new orphan changesets |
|
1743 | 1 new orphan changesets | |
1744 |
|
1744 | |||
1745 | $ eval `hg tags -T '{tag}={node}\n'` |
|
1745 | $ eval `hg tags -T '{tag}={node}\n'` | |
1746 | $ rm .hg/localtags |
|
1746 | $ rm .hg/localtags | |
1747 |
|
1747 | |||
1748 | $ hg rebase -r $D -d $E |
|
1748 | $ hg rebase -r $D -d $E | |
1749 | rebasing 5:9e62094e4d94 "D" |
|
1749 | rebasing 5:9e62094e4d94 "D" | |
1750 |
|
1750 | |||
1751 | $ hg log -G |
|
1751 | $ hg log -G | |
1752 | o 7:a699d059adcf D |
|
1752 | o 7:a699d059adcf D | |
1753 | |\ |
|
1753 | |\ | |
1754 | | o 6:ecc93090a95c E |
|
1754 | | o 6:ecc93090a95c E | |
1755 | | | |
|
1755 | | | | |
1756 | | o 4:0dc878468a23 B3 |
|
1756 | | o 4:0dc878468a23 B3 | |
1757 | | | |
|
1757 | | | | |
1758 | o | 1:96cc3511f894 C |
|
1758 | o | 1:96cc3511f894 C | |
1759 | / |
|
1759 | / | |
1760 | o 0:426bada5c675 A |
|
1760 | o 0:426bada5c675 A | |
1761 |
|
1761 | |||
1762 | For some reasons (--hidden, rebaseskipobsolete=0, directaccess, etc.), |
|
1762 | For some reasons (--hidden, rebaseskipobsolete=0, directaccess, etc.), | |
1763 | rebasestate may contain hidden hashes. "rebase --abort" should work regardless. |
|
1763 | rebasestate may contain hidden hashes. "rebase --abort" should work regardless. | |
1764 |
|
1764 | |||
1765 | $ hg init $TESTTMP/hidden-state1 |
|
1765 | $ hg init $TESTTMP/hidden-state1 | |
1766 | $ cd $TESTTMP/hidden-state1 |
|
1766 | $ cd $TESTTMP/hidden-state1 | |
1767 | $ cat >> .hg/hgrc <<EOF |
|
1767 | $ cat >> .hg/hgrc <<EOF | |
1768 | > [experimental] |
|
1768 | > [experimental] | |
1769 | > rebaseskipobsolete=0 |
|
1769 | > rebaseskipobsolete=0 | |
1770 | > EOF |
|
1770 | > EOF | |
1771 |
|
1771 | |||
1772 | $ hg debugdrawdag <<'EOS' |
|
1772 | $ hg debugdrawdag <<'EOS' | |
1773 | > C |
|
1773 | > C | |
1774 | > | |
|
1774 | > | | |
1775 | > D B # prune: B, C |
|
1775 | > D B # prune: B, C | |
1776 | > |/ # B/D=B |
|
1776 | > |/ # B/D=B | |
1777 | > A |
|
1777 | > A | |
1778 | > EOS |
|
1778 | > EOS | |
1779 |
|
1779 | |||
1780 | $ eval `hg tags -T '{tag}={node}\n'` |
|
1780 | $ eval `hg tags -T '{tag}={node}\n'` | |
1781 | $ rm .hg/localtags |
|
1781 | $ rm .hg/localtags | |
1782 |
|
1782 | |||
1783 | $ hg update -q $C --hidden |
|
1783 | $ hg update -q $C --hidden | |
1784 | updated to hidden changeset 7829726be4dc |
|
1784 | updated to hidden changeset 7829726be4dc | |
1785 | (hidden revision '7829726be4dc' is pruned) |
|
1785 | (hidden revision '7829726be4dc' is pruned) | |
1786 | $ hg rebase -s $B -d $D |
|
1786 | $ hg rebase -s $B -d $D | |
1787 | rebasing 1:2ec65233581b "B" |
|
1787 | rebasing 1:2ec65233581b "B" | |
1788 | merging D |
|
1788 | merging D | |
1789 | warning: conflicts while merging D! (edit, then use 'hg resolve --mark') |
|
1789 | warning: conflicts while merging D! (edit, then use 'hg resolve --mark') | |
1790 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') |
|
1790 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') | |
1791 | [1] |
|
1791 | [1] | |
1792 |
|
1792 | |||
1793 | $ cp -R . $TESTTMP/hidden-state2 |
|
1793 | $ cp -R . $TESTTMP/hidden-state2 | |
1794 |
|
1794 | |||
1795 | $ hg log -G |
|
1795 | $ hg log -G | |
1796 | @ 2:b18e25de2cf5 D |
|
1796 | @ 2:b18e25de2cf5 D | |
1797 | | |
|
1797 | | | |
|
1798 | | % 1:2ec65233581b B (pruned using prune) | |||
|
1799 | |/ | |||
1798 | o 0:426bada5c675 A |
|
1800 | o 0:426bada5c675 A | |
1799 |
|
1801 | |||
1800 | $ hg summary |
|
1802 | $ hg summary | |
1801 | parent: 2:b18e25de2cf5 tip |
|
1803 | parent: 2:b18e25de2cf5 tip | |
1802 | D |
|
1804 | D | |
1803 | branch: default |
|
1805 | branch: default | |
1804 | commit: 1 modified, 1 added, 1 unknown, 1 unresolved |
|
1806 | commit: 1 modified, 1 added, 1 unknown, 1 unresolved | |
1805 | update: (current) |
|
1807 | update: 1 new changesets, 2 branch heads (merge) | |
1806 |
phases: |
|
1808 | phases: 3 draft | |
1807 | rebase: 0 rebased, 2 remaining (rebase --continue) |
|
1809 | rebase: 0 rebased, 2 remaining (rebase --continue) | |
1808 |
|
1810 | |||
1809 | $ hg rebase --abort |
|
1811 | $ hg rebase --abort | |
1810 | rebase aborted |
|
1812 | rebase aborted | |
1811 |
|
1813 | |||
1812 | Also test --continue for the above case |
|
1814 | Also test --continue for the above case | |
1813 |
|
1815 | |||
1814 | $ cd $TESTTMP/hidden-state2 |
|
1816 | $ cd $TESTTMP/hidden-state2 | |
1815 | $ hg resolve -m |
|
1817 | $ hg resolve -m | |
1816 | (no more unresolved files) |
|
1818 | (no more unresolved files) | |
1817 | continue: hg rebase --continue |
|
1819 | continue: hg rebase --continue | |
1818 | $ hg rebase --continue |
|
1820 | $ hg rebase --continue | |
1819 | rebasing 1:2ec65233581b "B" |
|
1821 | rebasing 1:2ec65233581b "B" | |
1820 | rebasing 3:7829726be4dc "C" (tip) |
|
1822 | rebasing 3:7829726be4dc "C" (tip) | |
1821 | $ hg log -G |
|
1823 | $ hg log -G | |
1822 | @ 5:1964d5d5b547 C |
|
1824 | @ 5:1964d5d5b547 C | |
1823 | | |
|
1825 | | | |
1824 | o 4:68deb90c12a2 B |
|
1826 | o 4:68deb90c12a2 B | |
1825 | | |
|
1827 | | | |
1826 | o 2:b18e25de2cf5 D |
|
1828 | o 2:b18e25de2cf5 D | |
1827 | | |
|
1829 | | | |
1828 | o 0:426bada5c675 A |
|
1830 | o 0:426bada5c675 A | |
1829 |
|
1831 | |||
1830 | ==================== |
|
1832 | ==================== | |
1831 | Test --stop option | |
|
1833 | Test --stop option | | |
1832 | ==================== |
|
1834 | ==================== | |
1833 | $ cd .. |
|
1835 | $ cd .. | |
1834 | $ hg init rbstop |
|
1836 | $ hg init rbstop | |
1835 | $ cd rbstop |
|
1837 | $ cd rbstop | |
1836 | $ echo a>a |
|
1838 | $ echo a>a | |
1837 | $ hg ci -Aqma |
|
1839 | $ hg ci -Aqma | |
1838 | $ echo b>b |
|
1840 | $ echo b>b | |
1839 | $ hg ci -Aqmb |
|
1841 | $ hg ci -Aqmb | |
1840 | $ echo c>c |
|
1842 | $ echo c>c | |
1841 | $ hg ci -Aqmc |
|
1843 | $ hg ci -Aqmc | |
1842 | $ echo d>d |
|
1844 | $ echo d>d | |
1843 | $ hg ci -Aqmd |
|
1845 | $ hg ci -Aqmd | |
1844 | $ hg up 0 -q |
|
1846 | $ hg up 0 -q | |
1845 | $ echo f>f |
|
1847 | $ echo f>f | |
1846 | $ hg ci -Aqmf |
|
1848 | $ hg ci -Aqmf | |
1847 | $ echo D>d |
|
1849 | $ echo D>d | |
1848 | $ hg ci -Aqm "conflict with d" |
|
1850 | $ hg ci -Aqm "conflict with d" | |
1849 | $ hg up 3 -q |
|
1851 | $ hg up 3 -q | |
1850 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
1852 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
1851 | o 5:00bfc9898aeb test |
|
1853 | o 5:00bfc9898aeb test | |
1852 | | conflict with d |
|
1854 | | conflict with d | |
1853 | | |
|
1855 | | | |
1854 | o 4:dafd40200f93 test |
|
1856 | o 4:dafd40200f93 test | |
1855 | | f |
|
1857 | | f | |
1856 | | |
|
1858 | | | |
1857 | | @ 3:055a42cdd887 test |
|
1859 | | @ 3:055a42cdd887 test | |
1858 | | | d |
|
1860 | | | d | |
1859 | | | |
|
1861 | | | | |
1860 | | o 2:177f92b77385 test |
|
1862 | | o 2:177f92b77385 test | |
1861 | | | c |
|
1863 | | | c | |
1862 | | | |
|
1864 | | | | |
1863 | | o 1:d2ae7f538514 test |
|
1865 | | o 1:d2ae7f538514 test | |
1864 | |/ b |
|
1866 | |/ b | |
1865 | | |
|
1867 | | | |
1866 | o 0:cb9a9f314b8b test |
|
1868 | o 0:cb9a9f314b8b test | |
1867 | a |
|
1869 | a | |
1868 |
|
1870 | |||
1869 | $ hg rebase -s 1 -d 5 |
|
1871 | $ hg rebase -s 1 -d 5 | |
1870 | rebasing 1:d2ae7f538514 "b" |
|
1872 | rebasing 1:d2ae7f538514 "b" | |
1871 | rebasing 2:177f92b77385 "c" |
|
1873 | rebasing 2:177f92b77385 "c" | |
1872 | rebasing 3:055a42cdd887 "d" |
|
1874 | rebasing 3:055a42cdd887 "d" | |
1873 | merging d |
|
1875 | merging d | |
1874 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
|
1876 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | |
1875 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') |
|
1877 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') | |
1876 | [1] |
|
1878 | [1] | |
1877 | $ hg rebase --stop |
|
1879 | $ hg rebase --stop | |
1878 | 1 new orphan changesets |
|
1880 | 1 new orphan changesets | |
1879 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
1881 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
1880 | o 7:7fffad344617 test |
|
1882 | o 7:7fffad344617 test | |
1881 | | c |
|
1883 | | c | |
1882 | | |
|
1884 | | | |
1883 | o 6:b15528633407 test |
|
1885 | o 6:b15528633407 test | |
1884 | | b |
|
1886 | | b | |
1885 | | |
|
1887 | | | |
1886 | o 5:00bfc9898aeb test |
|
1888 | o 5:00bfc9898aeb test | |
1887 | | conflict with d |
|
1889 | | conflict with d | |
1888 | | |
|
1890 | | | |
1889 | o 4:dafd40200f93 test |
|
1891 | o 4:dafd40200f93 test | |
1890 | | f |
|
1892 | | f | |
1891 | | |
|
1893 | | | |
1892 | | @ 3:055a42cdd887 test |
|
1894 | | @ 3:055a42cdd887 test | |
1893 | | | d |
|
1895 | | | d | |
1894 | | | |
|
1896 | | | | |
1895 | | x 2:177f92b77385 test |
|
1897 | | x 2:177f92b77385 test | |
1896 | | | c |
|
1898 | | | c | |
1897 | | | |
|
1899 | | | | |
1898 | | x 1:d2ae7f538514 test |
|
1900 | | x 1:d2ae7f538514 test | |
1899 | |/ b |
|
1901 | |/ b | |
1900 | | |
|
1902 | | | |
1901 | o 0:cb9a9f314b8b test |
|
1903 | o 0:cb9a9f314b8b test | |
1902 | a |
|
1904 | a | |
1903 |
|
1905 | |||
1904 | Test it aborts if unstable csets is not allowed: |
|
1906 | Test it aborts if unstable csets is not allowed: | |
1905 | =============================================== |
|
1907 | =============================================== | |
1906 | $ cat >> $HGRCPATH << EOF |
|
1908 | $ cat >> $HGRCPATH << EOF | |
1907 | > [experimental] |
|
1909 | > [experimental] | |
1908 | > evolution.allowunstable=False |
|
1910 | > evolution.allowunstable=False | |
1909 | > EOF |
|
1911 | > EOF | |
1910 |
|
1912 | |||
1911 | $ hg strip 6 --no-backup -q |
|
1913 | $ hg strip 6 --no-backup -q | |
1912 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
1914 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
1913 | o 5:00bfc9898aeb test |
|
1915 | o 5:00bfc9898aeb test | |
1914 | | conflict with d |
|
1916 | | conflict with d | |
1915 | | |
|
1917 | | | |
1916 | o 4:dafd40200f93 test |
|
1918 | o 4:dafd40200f93 test | |
1917 | | f |
|
1919 | | f | |
1918 | | |
|
1920 | | | |
1919 | | @ 3:055a42cdd887 test |
|
1921 | | @ 3:055a42cdd887 test | |
1920 | | | d |
|
1922 | | | d | |
1921 | | | |
|
1923 | | | | |
1922 | | o 2:177f92b77385 test |
|
1924 | | o 2:177f92b77385 test | |
1923 | | | c |
|
1925 | | | c | |
1924 | | | |
|
1926 | | | | |
1925 | | o 1:d2ae7f538514 test |
|
1927 | | o 1:d2ae7f538514 test | |
1926 | |/ b |
|
1928 | |/ b | |
1927 | | |
|
1929 | | | |
1928 | o 0:cb9a9f314b8b test |
|
1930 | o 0:cb9a9f314b8b test | |
1929 | a |
|
1931 | a | |
1930 |
|
1932 | |||
1931 | $ hg rebase -s 1 -d 5 |
|
1933 | $ hg rebase -s 1 -d 5 | |
1932 | rebasing 1:d2ae7f538514 "b" |
|
1934 | rebasing 1:d2ae7f538514 "b" | |
1933 | rebasing 2:177f92b77385 "c" |
|
1935 | rebasing 2:177f92b77385 "c" | |
1934 | rebasing 3:055a42cdd887 "d" |
|
1936 | rebasing 3:055a42cdd887 "d" | |
1935 | merging d |
|
1937 | merging d | |
1936 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
|
1938 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | |
1937 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') |
|
1939 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') | |
1938 | [1] |
|
1940 | [1] | |
1939 | $ hg rebase --stop |
|
1941 | $ hg rebase --stop | |
1940 | abort: cannot remove original changesets with unrebased descendants |
|
1942 | abort: cannot remove original changesets with unrebased descendants | |
1941 | (either enable obsmarkers to allow unstable revisions or use --keep to keep original changesets) |
|
1943 | (either enable obsmarkers to allow unstable revisions or use --keep to keep original changesets) | |
1942 | [255] |
|
1944 | [255] | |
1943 | $ hg rebase --abort |
|
1945 | $ hg rebase --abort | |
1944 | saved backup bundle to $TESTTMP/rbstop/.hg/strip-backup/b15528633407-6eb72b6f-backup.hg |
|
1946 | saved backup bundle to $TESTTMP/rbstop/.hg/strip-backup/b15528633407-6eb72b6f-backup.hg | |
1945 | rebase aborted |
|
1947 | rebase aborted | |
1946 |
|
1948 | |||
1947 | Test --stop when --keep is passed: |
|
1949 | Test --stop when --keep is passed: | |
1948 | ================================== |
|
1950 | ================================== | |
1949 | $ hg rebase -s 1 -d 5 --keep |
|
1951 | $ hg rebase -s 1 -d 5 --keep | |
1950 | rebasing 1:d2ae7f538514 "b" |
|
1952 | rebasing 1:d2ae7f538514 "b" | |
1951 | rebasing 2:177f92b77385 "c" |
|
1953 | rebasing 2:177f92b77385 "c" | |
1952 | rebasing 3:055a42cdd887 "d" |
|
1954 | rebasing 3:055a42cdd887 "d" | |
1953 | merging d |
|
1955 | merging d | |
1954 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
|
1956 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | |
1955 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') |
|
1957 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') | |
1956 | [1] |
|
1958 | [1] | |
1957 | $ hg rebase --stop |
|
1959 | $ hg rebase --stop | |
1958 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
1960 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
1959 | o 7:7fffad344617 test |
|
1961 | o 7:7fffad344617 test | |
1960 | | c |
|
1962 | | c | |
1961 | | |
|
1963 | | | |
1962 | o 6:b15528633407 test |
|
1964 | o 6:b15528633407 test | |
1963 | | b |
|
1965 | | b | |
1964 | | |
|
1966 | | | |
1965 | o 5:00bfc9898aeb test |
|
1967 | o 5:00bfc9898aeb test | |
1966 | | conflict with d |
|
1968 | | conflict with d | |
1967 | | |
|
1969 | | | |
1968 | o 4:dafd40200f93 test |
|
1970 | o 4:dafd40200f93 test | |
1969 | | f |
|
1971 | | f | |
1970 | | |
|
1972 | | | |
1971 | | @ 3:055a42cdd887 test |
|
1973 | | @ 3:055a42cdd887 test | |
1972 | | | d |
|
1974 | | | d | |
1973 | | | |
|
1975 | | | | |
1974 | | o 2:177f92b77385 test |
|
1976 | | o 2:177f92b77385 test | |
1975 | | | c |
|
1977 | | | c | |
1976 | | | |
|
1978 | | | | |
1977 | | o 1:d2ae7f538514 test |
|
1979 | | o 1:d2ae7f538514 test | |
1978 | |/ b |
|
1980 | |/ b | |
1979 | | |
|
1981 | | | |
1980 | o 0:cb9a9f314b8b test |
|
1982 | o 0:cb9a9f314b8b test | |
1981 | a |
|
1983 | a | |
1982 |
|
1984 | |||
1983 | Test --stop aborts when --collapse was passed: |
|
1985 | Test --stop aborts when --collapse was passed: | |
1984 | ============================================= |
|
1986 | ============================================= | |
1985 | $ cat >> $HGRCPATH << EOF |
|
1987 | $ cat >> $HGRCPATH << EOF | |
1986 | > [experimental] |
|
1988 | > [experimental] | |
1987 | > evolution.allowunstable=True |
|
1989 | > evolution.allowunstable=True | |
1988 | > EOF |
|
1990 | > EOF | |
1989 |
|
1991 | |||
1990 | $ hg strip 6 |
|
1992 | $ hg strip 6 | |
1991 | saved backup bundle to $TESTTMP/rbstop/.hg/strip-backup/b15528633407-6eb72b6f-backup.hg |
|
1993 | saved backup bundle to $TESTTMP/rbstop/.hg/strip-backup/b15528633407-6eb72b6f-backup.hg | |
1992 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
1994 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
1993 | o 5:00bfc9898aeb test |
|
1995 | o 5:00bfc9898aeb test | |
1994 | | conflict with d |
|
1996 | | conflict with d | |
1995 | | |
|
1997 | | | |
1996 | o 4:dafd40200f93 test |
|
1998 | o 4:dafd40200f93 test | |
1997 | | f |
|
1999 | | f | |
1998 | | |
|
2000 | | | |
1999 | | @ 3:055a42cdd887 test |
|
2001 | | @ 3:055a42cdd887 test | |
2000 | | | d |
|
2002 | | | d | |
2001 | | | |
|
2003 | | | | |
2002 | | o 2:177f92b77385 test |
|
2004 | | o 2:177f92b77385 test | |
2003 | | | c |
|
2005 | | | c | |
2004 | | | |
|
2006 | | | | |
2005 | | o 1:d2ae7f538514 test |
|
2007 | | o 1:d2ae7f538514 test | |
2006 | |/ b |
|
2008 | |/ b | |
2007 | | |
|
2009 | | | |
2008 | o 0:cb9a9f314b8b test |
|
2010 | o 0:cb9a9f314b8b test | |
2009 | a |
|
2011 | a | |
2010 |
|
2012 | |||
2011 | $ hg rebase -s 1 -d 5 --collapse -m "collapsed b c d" |
|
2013 | $ hg rebase -s 1 -d 5 --collapse -m "collapsed b c d" | |
2012 | rebasing 1:d2ae7f538514 "b" |
|
2014 | rebasing 1:d2ae7f538514 "b" | |
2013 | rebasing 2:177f92b77385 "c" |
|
2015 | rebasing 2:177f92b77385 "c" | |
2014 | rebasing 3:055a42cdd887 "d" |
|
2016 | rebasing 3:055a42cdd887 "d" | |
2015 | merging d |
|
2017 | merging d | |
2016 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
|
2018 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | |
2017 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') |
|
2019 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') | |
2018 | [1] |
|
2020 | [1] | |
2019 | $ hg rebase --stop |
|
2021 | $ hg rebase --stop | |
2020 | abort: cannot stop in --collapse session |
|
2022 | abort: cannot stop in --collapse session | |
2021 | [255] |
|
2023 | [255] | |
2022 | $ hg rebase --abort |
|
2024 | $ hg rebase --abort | |
2023 | rebase aborted |
|
2025 | rebase aborted | |
2024 | $ hg diff |
|
2026 | $ hg diff | |
2025 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
2027 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
2026 | o 5:00bfc9898aeb test |
|
2028 | o 5:00bfc9898aeb test | |
2027 | | conflict with d |
|
2029 | | conflict with d | |
2028 | | |
|
2030 | | | |
2029 | o 4:dafd40200f93 test |
|
2031 | o 4:dafd40200f93 test | |
2030 | | f |
|
2032 | | f | |
2031 | | |
|
2033 | | | |
2032 | | @ 3:055a42cdd887 test |
|
2034 | | @ 3:055a42cdd887 test | |
2033 | | | d |
|
2035 | | | d | |
2034 | | | |
|
2036 | | | | |
2035 | | o 2:177f92b77385 test |
|
2037 | | o 2:177f92b77385 test | |
2036 | | | c |
|
2038 | | | c | |
2037 | | | |
|
2039 | | | | |
2038 | | o 1:d2ae7f538514 test |
|
2040 | | o 1:d2ae7f538514 test | |
2039 | |/ b |
|
2041 | |/ b | |
2040 | | |
|
2042 | | | |
2041 | o 0:cb9a9f314b8b test |
|
2043 | o 0:cb9a9f314b8b test | |
2042 | a |
|
2044 | a | |
2043 |
|
2045 | |||
2044 | Test --stop raise errors with conflicting options: |
|
2046 | Test --stop raise errors with conflicting options: | |
2045 | ================================================= |
|
2047 | ================================================= | |
2046 | $ hg rebase -s 3 -d 5 |
|
2048 | $ hg rebase -s 3 -d 5 | |
2047 | rebasing 3:055a42cdd887 "d" |
|
2049 | rebasing 3:055a42cdd887 "d" | |
2048 | merging d |
|
2050 | merging d | |
2049 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
|
2051 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | |
2050 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') |
|
2052 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') | |
2051 | [1] |
|
2053 | [1] | |
2052 | $ hg rebase --stop --dry-run |
|
2054 | $ hg rebase --stop --dry-run | |
2053 | abort: cannot specify both --stop and --dry-run |
|
2055 | abort: cannot specify both --stop and --dry-run | |
2054 | [255] |
|
2056 | [255] | |
2055 |
|
2057 | |||
2056 | $ hg rebase -s 3 -d 5 |
|
2058 | $ hg rebase -s 3 -d 5 | |
2057 | abort: rebase in progress |
|
2059 | abort: rebase in progress | |
2058 | (use 'hg rebase --continue' or 'hg rebase --abort') |
|
2060 | (use 'hg rebase --continue' or 'hg rebase --abort') | |
2059 | [255] |
|
2061 | [255] | |
2060 | $ hg rebase --stop --continue |
|
2062 | $ hg rebase --stop --continue | |
2061 | abort: cannot specify both --stop and --continue |
|
2063 | abort: cannot specify both --stop and --continue | |
2062 | [255] |
|
2064 | [255] | |
2063 |
|
2065 | |||
2064 | Test --stop moves bookmarks of original revisions to new rebased nodes: |
|
2066 | Test --stop moves bookmarks of original revisions to new rebased nodes: | |
2065 | ====================================================================== |
|
2067 | ====================================================================== | |
2066 | $ cd .. |
|
2068 | $ cd .. | |
2067 | $ hg init repo |
|
2069 | $ hg init repo | |
2068 | $ cd repo |
|
2070 | $ cd repo | |
2069 |
|
2071 | |||
2070 | $ echo a > a |
|
2072 | $ echo a > a | |
2071 | $ hg ci -Am A |
|
2073 | $ hg ci -Am A | |
2072 | adding a |
|
2074 | adding a | |
2073 |
|
2075 | |||
2074 | $ echo b > b |
|
2076 | $ echo b > b | |
2075 | $ hg ci -Am B |
|
2077 | $ hg ci -Am B | |
2076 | adding b |
|
2078 | adding b | |
2077 | $ hg book X |
|
2079 | $ hg book X | |
2078 | $ hg book Y |
|
2080 | $ hg book Y | |
2079 |
|
2081 | |||
2080 | $ echo c > c |
|
2082 | $ echo c > c | |
2081 | $ hg ci -Am C |
|
2083 | $ hg ci -Am C | |
2082 | adding c |
|
2084 | adding c | |
2083 | $ hg book Z |
|
2085 | $ hg book Z | |
2084 |
|
2086 | |||
2085 | $ echo d > d |
|
2087 | $ echo d > d | |
2086 | $ hg ci -Am D |
|
2088 | $ hg ci -Am D | |
2087 | adding d |
|
2089 | adding d | |
2088 |
|
2090 | |||
2089 | $ hg up 0 -q |
|
2091 | $ hg up 0 -q | |
2090 | $ echo e > e |
|
2092 | $ echo e > e | |
2091 | $ hg ci -Am E |
|
2093 | $ hg ci -Am E | |
2092 | adding e |
|
2094 | adding e | |
2093 | created new head |
|
2095 | created new head | |
2094 |
|
2096 | |||
2095 | $ echo doubt > d |
|
2097 | $ echo doubt > d | |
2096 | $ hg ci -Am "conflict with d" |
|
2098 | $ hg ci -Am "conflict with d" | |
2097 | adding d |
|
2099 | adding d | |
2098 |
|
2100 | |||
2099 | $ hg log -GT "{rev}: {node|short} '{desc}' bookmarks: {bookmarks}\n" |
|
2101 | $ hg log -GT "{rev}: {node|short} '{desc}' bookmarks: {bookmarks}\n" | |
2100 | @ 5: 39adf30bc1be 'conflict with d' bookmarks: |
|
2102 | @ 5: 39adf30bc1be 'conflict with d' bookmarks: | |
2101 | | |
|
2103 | | | |
2102 | o 4: 9c1e55f411b6 'E' bookmarks: |
|
2104 | o 4: 9c1e55f411b6 'E' bookmarks: | |
2103 | | |
|
2105 | | | |
2104 | | o 3: 67a385d4e6f2 'D' bookmarks: Z |
|
2106 | | o 3: 67a385d4e6f2 'D' bookmarks: Z | |
2105 | | | |
|
2107 | | | | |
2106 | | o 2: 49cb3485fa0c 'C' bookmarks: Y |
|
2108 | | o 2: 49cb3485fa0c 'C' bookmarks: Y | |
2107 | | | |
|
2109 | | | | |
2108 | | o 1: 6c81ed0049f8 'B' bookmarks: X |
|
2110 | | o 1: 6c81ed0049f8 'B' bookmarks: X | |
2109 | |/ |
|
2111 | |/ | |
2110 | o 0: 1994f17a630e 'A' bookmarks: |
|
2112 | o 0: 1994f17a630e 'A' bookmarks: | |
2111 |
|
2113 | |||
2112 | $ hg rebase -s 1 -d 5 |
|
2114 | $ hg rebase -s 1 -d 5 | |
2113 | rebasing 1:6c81ed0049f8 "B" (X) |
|
2115 | rebasing 1:6c81ed0049f8 "B" (X) | |
2114 | rebasing 2:49cb3485fa0c "C" (Y) |
|
2116 | rebasing 2:49cb3485fa0c "C" (Y) | |
2115 | rebasing 3:67a385d4e6f2 "D" (Z) |
|
2117 | rebasing 3:67a385d4e6f2 "D" (Z) | |
2116 | merging d |
|
2118 | merging d | |
2117 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
|
2119 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | |
2118 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') |
|
2120 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') | |
2119 | [1] |
|
2121 | [1] | |
2120 | $ hg rebase --stop |
|
2122 | $ hg rebase --stop | |
2121 | 1 new orphan changesets |
|
2123 | 1 new orphan changesets | |
2122 | $ hg log -GT "{rev}: {node|short} '{desc}' bookmarks: {bookmarks}\n" |
|
2124 | $ hg log -GT "{rev}: {node|short} '{desc}' bookmarks: {bookmarks}\n" | |
2123 | o 7: 9c86c650b686 'C' bookmarks: Y |
|
2125 | o 7: 9c86c650b686 'C' bookmarks: Y | |
2124 | | |
|
2126 | | | |
2125 | o 6: 9b87b54e5fd8 'B' bookmarks: X |
|
2127 | o 6: 9b87b54e5fd8 'B' bookmarks: X | |
2126 | | |
|
2128 | | | |
2127 | @ 5: 39adf30bc1be 'conflict with d' bookmarks: |
|
2129 | @ 5: 39adf30bc1be 'conflict with d' bookmarks: | |
2128 | | |
|
2130 | | | |
2129 | o 4: 9c1e55f411b6 'E' bookmarks: |
|
2131 | o 4: 9c1e55f411b6 'E' bookmarks: | |
2130 | | |
|
2132 | | | |
2131 | | * 3: 67a385d4e6f2 'D' bookmarks: Z |
|
2133 | | * 3: 67a385d4e6f2 'D' bookmarks: Z | |
2132 | | | |
|
2134 | | | | |
2133 | | x 2: 49cb3485fa0c 'C' bookmarks: |
|
2135 | | x 2: 49cb3485fa0c 'C' bookmarks: | |
2134 | | | |
|
2136 | | | | |
2135 | | x 1: 6c81ed0049f8 'B' bookmarks: |
|
2137 | | x 1: 6c81ed0049f8 'B' bookmarks: | |
2136 | |/ |
|
2138 | |/ | |
2137 | o 0: 1994f17a630e 'A' bookmarks: |
|
2139 | o 0: 1994f17a630e 'A' bookmarks: | |
2138 |
|
2140 |
General Comments 0
You need to be logged in to leave comments.
Login now