Show More
@@ -1,917 +1,922 b'' | |||||
1 | # Mercurial bookmark support code |
|
1 | # Mercurial bookmark support code | |
2 | # |
|
2 | # | |
3 | # Copyright 2008 David Soria Parra <dsp@php.net> |
|
3 | # Copyright 2008 David Soria Parra <dsp@php.net> | |
4 | # |
|
4 | # | |
5 | # This software may be used and distributed according to the terms of the |
|
5 | # This software may be used and distributed according to the terms of the | |
6 | # GNU General Public License version 2 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. | |
7 |
|
7 | |||
8 | from __future__ import absolute_import |
|
8 | from __future__ import absolute_import | |
9 |
|
9 | |||
10 | import errno |
|
10 | import errno | |
11 | import struct |
|
11 | import struct | |
12 |
|
12 | |||
13 | from .i18n import _ |
|
13 | from .i18n import _ | |
14 | from .node import ( |
|
14 | from .node import ( | |
15 | bin, |
|
15 | bin, | |
16 | hex, |
|
16 | hex, | |
17 | short, |
|
17 | short, | |
18 | wdirid, |
|
18 | wdirid, | |
19 | ) |
|
19 | ) | |
20 | from . import ( |
|
20 | from . import ( | |
21 | encoding, |
|
21 | encoding, | |
22 | error, |
|
22 | error, | |
23 | obsutil, |
|
23 | obsutil, | |
24 | pycompat, |
|
24 | pycompat, | |
25 | scmutil, |
|
25 | scmutil, | |
26 | txnutil, |
|
26 | txnutil, | |
27 | util, |
|
27 | util, | |
28 | ) |
|
28 | ) | |
29 |
|
29 | |||
30 | # label constants |
|
30 | # label constants | |
31 | # until 3.5, bookmarks.current was the advertised name, not |
|
31 | # until 3.5, bookmarks.current was the advertised name, not | |
32 | # bookmarks.active, so we must use both to avoid breaking old |
|
32 | # bookmarks.active, so we must use both to avoid breaking old | |
33 | # custom styles |
|
33 | # custom styles | |
34 | activebookmarklabel = 'bookmarks.active bookmarks.current' |
|
34 | activebookmarklabel = 'bookmarks.active bookmarks.current' | |
35 |
|
35 | |||
36 | def _getbkfile(repo): |
|
36 | def _getbkfile(repo): | |
37 | """Hook so that extensions that mess with the store can hook bm storage. |
|
37 | """Hook so that extensions that mess with the store can hook bm storage. | |
38 |
|
38 | |||
39 | For core, this just handles wether we should see pending |
|
39 | For core, this just handles wether we should see pending | |
40 | bookmarks or the committed ones. Other extensions (like share) |
|
40 | bookmarks or the committed ones. Other extensions (like share) | |
41 | may need to tweak this behavior further. |
|
41 | may need to tweak this behavior further. | |
42 | """ |
|
42 | """ | |
43 | fp, pending = txnutil.trypending(repo.root, repo.vfs, 'bookmarks') |
|
43 | fp, pending = txnutil.trypending(repo.root, repo.vfs, 'bookmarks') | |
44 | return fp |
|
44 | return fp | |
45 |
|
45 | |||
46 | class bmstore(dict): |
|
46 | class bmstore(dict): | |
47 | """Storage for bookmarks. |
|
47 | """Storage for bookmarks. | |
48 |
|
48 | |||
49 | This object should do all bookmark-related reads and writes, so |
|
49 | This object should do all bookmark-related reads and writes, so | |
50 | that it's fairly simple to replace the storage underlying |
|
50 | that it's fairly simple to replace the storage underlying | |
51 | bookmarks without having to clone the logic surrounding |
|
51 | bookmarks without having to clone the logic surrounding | |
52 | bookmarks. This type also should manage the active bookmark, if |
|
52 | bookmarks. This type also should manage the active bookmark, if | |
53 | any. |
|
53 | any. | |
54 |
|
54 | |||
55 | This particular bmstore implementation stores bookmarks as |
|
55 | This particular bmstore implementation stores bookmarks as | |
56 | {hash}\s{name}\n (the same format as localtags) in |
|
56 | {hash}\s{name}\n (the same format as localtags) in | |
57 | .hg/bookmarks. The mapping is stored as {name: nodeid}. |
|
57 | .hg/bookmarks. The mapping is stored as {name: nodeid}. | |
58 | """ |
|
58 | """ | |
59 |
|
59 | |||
60 | def __init__(self, repo): |
|
60 | def __init__(self, repo): | |
61 | dict.__init__(self) |
|
61 | dict.__init__(self) | |
62 | self._repo = repo |
|
62 | self._repo = repo | |
63 | self._clean = True |
|
63 | self._clean = True | |
64 | self._aclean = True |
|
64 | self._aclean = True | |
65 | nm = repo.changelog.nodemap |
|
65 | nm = repo.changelog.nodemap | |
66 | tonode = bin # force local lookup |
|
66 | tonode = bin # force local lookup | |
67 | setitem = dict.__setitem__ |
|
67 | setitem = dict.__setitem__ | |
68 | try: |
|
68 | try: | |
69 | with _getbkfile(repo) as bkfile: |
|
69 | with _getbkfile(repo) as bkfile: | |
70 | for line in bkfile: |
|
70 | for line in bkfile: | |
71 | line = line.strip() |
|
71 | line = line.strip() | |
72 | if not line: |
|
72 | if not line: | |
73 | continue |
|
73 | continue | |
74 | try: |
|
74 | try: | |
75 | sha, refspec = line.split(' ', 1) |
|
75 | sha, refspec = line.split(' ', 1) | |
76 | node = tonode(sha) |
|
76 | node = tonode(sha) | |
77 | if node in nm: |
|
77 | if node in nm: | |
78 | refspec = encoding.tolocal(refspec) |
|
78 | refspec = encoding.tolocal(refspec) | |
79 | setitem(self, refspec, node) |
|
79 | setitem(self, refspec, node) | |
80 | except (TypeError, ValueError): |
|
80 | except (TypeError, ValueError): | |
81 | # TypeError: |
|
81 | # TypeError: | |
82 | # - bin(...) |
|
82 | # - bin(...) | |
83 | # ValueError: |
|
83 | # ValueError: | |
84 | # - node in nm, for non-20-bytes entry |
|
84 | # - node in nm, for non-20-bytes entry | |
85 | # - split(...), for string without ' ' |
|
85 | # - split(...), for string without ' ' | |
86 | repo.ui.warn(_('malformed line in .hg/bookmarks: %r\n') |
|
86 | repo.ui.warn(_('malformed line in .hg/bookmarks: %r\n') | |
87 | % line) |
|
87 | % line) | |
88 | except IOError as inst: |
|
88 | except IOError as inst: | |
89 | if inst.errno != errno.ENOENT: |
|
89 | if inst.errno != errno.ENOENT: | |
90 | raise |
|
90 | raise | |
91 | self._active = _readactive(repo, self) |
|
91 | self._active = _readactive(repo, self) | |
92 |
|
92 | |||
93 | @property |
|
93 | @property | |
94 | def active(self): |
|
94 | def active(self): | |
95 | return self._active |
|
95 | return self._active | |
96 |
|
96 | |||
97 | @active.setter |
|
97 | @active.setter | |
98 | def active(self, mark): |
|
98 | def active(self, mark): | |
99 | if mark is not None and mark not in self: |
|
99 | if mark is not None and mark not in self: | |
100 | raise AssertionError('bookmark %s does not exist!' % mark) |
|
100 | raise AssertionError('bookmark %s does not exist!' % mark) | |
101 |
|
101 | |||
102 | self._active = mark |
|
102 | self._active = mark | |
103 | self._aclean = False |
|
103 | self._aclean = False | |
104 |
|
104 | |||
105 | def __setitem__(self, *args, **kwargs): |
|
105 | def __setitem__(self, *args, **kwargs): | |
106 | msg = ("'bookmarks[name] = node' is deprecated, " |
|
106 | msg = ("'bookmarks[name] = node' is deprecated, " | |
107 | "use 'bookmarks.applychanges'") |
|
107 | "use 'bookmarks.applychanges'") | |
108 | self._repo.ui.deprecwarn(msg, '4.3') |
|
108 | self._repo.ui.deprecwarn(msg, '4.3') | |
109 | self._set(*args, **kwargs) |
|
109 | self._set(*args, **kwargs) | |
110 |
|
110 | |||
111 | def _set(self, key, value): |
|
111 | def _set(self, key, value): | |
112 | self._clean = False |
|
112 | self._clean = False | |
113 | return dict.__setitem__(self, key, value) |
|
113 | return dict.__setitem__(self, key, value) | |
114 |
|
114 | |||
115 | def __delitem__(self, key): |
|
115 | def __delitem__(self, key): | |
116 | msg = ("'del bookmarks[name]' is deprecated, " |
|
116 | msg = ("'del bookmarks[name]' is deprecated, " | |
117 | "use 'bookmarks.applychanges'") |
|
117 | "use 'bookmarks.applychanges'") | |
118 | self._repo.ui.deprecwarn(msg, '4.3') |
|
118 | self._repo.ui.deprecwarn(msg, '4.3') | |
119 | self._del(key) |
|
119 | self._del(key) | |
120 |
|
120 | |||
121 | def _del(self, key): |
|
121 | def _del(self, key): | |
122 | self._clean = False |
|
122 | self._clean = False | |
123 | return dict.__delitem__(self, key) |
|
123 | return dict.__delitem__(self, key) | |
124 |
|
124 | |||
125 | def update(self, *others): |
|
125 | def update(self, *others): | |
126 | msg = ("bookmarks.update(...)' is deprecated, " |
|
126 | msg = ("bookmarks.update(...)' is deprecated, " | |
127 | "use 'bookmarks.applychanges'") |
|
127 | "use 'bookmarks.applychanges'") | |
128 | self._repo.ui.deprecwarn(msg, '4.5') |
|
128 | self._repo.ui.deprecwarn(msg, '4.5') | |
129 | return dict.update(self, *others) |
|
129 | return dict.update(self, *others) | |
130 |
|
130 | |||
131 | def applychanges(self, repo, tr, changes): |
|
131 | def applychanges(self, repo, tr, changes): | |
132 | """Apply a list of changes to bookmarks |
|
132 | """Apply a list of changes to bookmarks | |
133 | """ |
|
133 | """ | |
134 | bmchanges = tr.changes.get('bookmarks') |
|
134 | bmchanges = tr.changes.get('bookmarks') | |
135 | for name, node in changes: |
|
135 | for name, node in changes: | |
136 | old = self.get(name) |
|
136 | old = self.get(name) | |
137 | if node is None: |
|
137 | if node is None: | |
138 | self._del(name) |
|
138 | self._del(name) | |
139 | else: |
|
139 | else: | |
140 | self._set(name, node) |
|
140 | self._set(name, node) | |
141 | if bmchanges is not None: |
|
141 | if bmchanges is not None: | |
142 | # if a previous value exist preserve the "initial" value |
|
142 | # if a previous value exist preserve the "initial" value | |
143 | previous = bmchanges.get(name) |
|
143 | previous = bmchanges.get(name) | |
144 | if previous is not None: |
|
144 | if previous is not None: | |
145 | old = previous[0] |
|
145 | old = previous[0] | |
146 | bmchanges[name] = (old, node) |
|
146 | bmchanges[name] = (old, node) | |
147 | self._recordchange(tr) |
|
147 | self._recordchange(tr) | |
148 |
|
148 | |||
149 | def recordchange(self, tr): |
|
149 | def recordchange(self, tr): | |
150 | msg = ("'bookmarks.recorchange' is deprecated, " |
|
150 | msg = ("'bookmarks.recorchange' is deprecated, " | |
151 | "use 'bookmarks.applychanges'") |
|
151 | "use 'bookmarks.applychanges'") | |
152 | self._repo.ui.deprecwarn(msg, '4.3') |
|
152 | self._repo.ui.deprecwarn(msg, '4.3') | |
153 | return self._recordchange(tr) |
|
153 | return self._recordchange(tr) | |
154 |
|
154 | |||
155 | def _recordchange(self, tr): |
|
155 | def _recordchange(self, tr): | |
156 | """record that bookmarks have been changed in a transaction |
|
156 | """record that bookmarks have been changed in a transaction | |
157 |
|
157 | |||
158 | The transaction is then responsible for updating the file content.""" |
|
158 | The transaction is then responsible for updating the file content.""" | |
159 | tr.addfilegenerator('bookmarks', ('bookmarks',), self._write, |
|
159 | tr.addfilegenerator('bookmarks', ('bookmarks',), self._write, | |
160 | location='plain') |
|
160 | location='plain') | |
161 | tr.hookargs['bookmark_moved'] = '1' |
|
161 | tr.hookargs['bookmark_moved'] = '1' | |
162 |
|
162 | |||
163 | def _writerepo(self, repo): |
|
163 | def _writerepo(self, repo): | |
164 | """Factored out for extensibility""" |
|
164 | """Factored out for extensibility""" | |
165 | rbm = repo._bookmarks |
|
165 | rbm = repo._bookmarks | |
166 | if rbm.active not in self: |
|
166 | if rbm.active not in self: | |
167 | rbm.active = None |
|
167 | rbm.active = None | |
168 | rbm._writeactive() |
|
168 | rbm._writeactive() | |
169 |
|
169 | |||
170 | with repo.wlock(): |
|
170 | with repo.wlock(): | |
171 | file_ = repo.vfs('bookmarks', 'w', atomictemp=True, |
|
171 | file_ = repo.vfs('bookmarks', 'w', atomictemp=True, | |
172 | checkambig=True) |
|
172 | checkambig=True) | |
173 | try: |
|
173 | try: | |
174 | self._write(file_) |
|
174 | self._write(file_) | |
175 | except: # re-raises |
|
175 | except: # re-raises | |
176 | file_.discard() |
|
176 | file_.discard() | |
177 | raise |
|
177 | raise | |
178 | finally: |
|
178 | finally: | |
179 | file_.close() |
|
179 | file_.close() | |
180 |
|
180 | |||
181 | def _writeactive(self): |
|
181 | def _writeactive(self): | |
182 | if self._aclean: |
|
182 | if self._aclean: | |
183 | return |
|
183 | return | |
184 | with self._repo.wlock(): |
|
184 | with self._repo.wlock(): | |
185 | if self._active is not None: |
|
185 | if self._active is not None: | |
186 | f = self._repo.vfs('bookmarks.current', 'w', atomictemp=True, |
|
186 | f = self._repo.vfs('bookmarks.current', 'w', atomictemp=True, | |
187 | checkambig=True) |
|
187 | checkambig=True) | |
188 | try: |
|
188 | try: | |
189 | f.write(encoding.fromlocal(self._active)) |
|
189 | f.write(encoding.fromlocal(self._active)) | |
190 | finally: |
|
190 | finally: | |
191 | f.close() |
|
191 | f.close() | |
192 | else: |
|
192 | else: | |
193 | self._repo.vfs.tryunlink('bookmarks.current') |
|
193 | self._repo.vfs.tryunlink('bookmarks.current') | |
194 | self._aclean = True |
|
194 | self._aclean = True | |
195 |
|
195 | |||
196 | def _write(self, fp): |
|
196 | def _write(self, fp): | |
197 | for name, node in self.iteritems(): |
|
197 | for name, node in self.iteritems(): | |
198 | fp.write("%s %s\n" % (hex(node), encoding.fromlocal(name))) |
|
198 | fp.write("%s %s\n" % (hex(node), encoding.fromlocal(name))) | |
199 | self._clean = True |
|
199 | self._clean = True | |
200 | self._repo.invalidatevolatilesets() |
|
200 | self._repo.invalidatevolatilesets() | |
201 |
|
201 | |||
202 | def expandname(self, bname): |
|
202 | def expandname(self, bname): | |
203 | if bname == '.': |
|
203 | if bname == '.': | |
204 | if self.active: |
|
204 | if self.active: | |
205 | return self.active |
|
205 | return self.active | |
206 | else: |
|
206 | else: | |
207 | raise error.Abort(_("no active bookmark")) |
|
207 | raise error.Abort(_("no active bookmark")) | |
208 | return bname |
|
208 | return bname | |
209 |
|
209 | |||
210 | def checkconflict(self, mark, force=False, target=None): |
|
210 | def checkconflict(self, mark, force=False, target=None): | |
211 | """check repo for a potential clash of mark with an existing bookmark, |
|
211 | """check repo for a potential clash of mark with an existing bookmark, | |
212 | branch, or hash |
|
212 | branch, or hash | |
213 |
|
213 | |||
214 | If target is supplied, then check that we are moving the bookmark |
|
214 | If target is supplied, then check that we are moving the bookmark | |
215 | forward. |
|
215 | forward. | |
216 |
|
216 | |||
217 | If force is supplied, then forcibly move the bookmark to a new commit |
|
217 | If force is supplied, then forcibly move the bookmark to a new commit | |
218 | regardless if it is a move forward. |
|
218 | regardless if it is a move forward. | |
219 |
|
219 | |||
220 | If divergent bookmark are to be deleted, they will be returned as list. |
|
220 | If divergent bookmark are to be deleted, they will be returned as list. | |
221 | """ |
|
221 | """ | |
222 | cur = self._repo.changectx('.').node() |
|
222 | cur = self._repo.changectx('.').node() | |
223 | if mark in self and not force: |
|
223 | if mark in self and not force: | |
224 | if target: |
|
224 | if target: | |
225 | if self[mark] == target and target == cur: |
|
225 | if self[mark] == target and target == cur: | |
226 | # re-activating a bookmark |
|
226 | # re-activating a bookmark | |
227 | return [] |
|
227 | return [] | |
228 | rev = self._repo[target].rev() |
|
228 | rev = self._repo[target].rev() | |
229 | anc = self._repo.changelog.ancestors([rev]) |
|
229 | anc = self._repo.changelog.ancestors([rev]) | |
230 | bmctx = self._repo[self[mark]] |
|
230 | bmctx = self._repo[self[mark]] | |
231 | divs = [self._repo[b].node() for b in self |
|
231 | divs = [self._repo[b].node() for b in self | |
232 | if b.split('@', 1)[0] == mark.split('@', 1)[0]] |
|
232 | if b.split('@', 1)[0] == mark.split('@', 1)[0]] | |
233 |
|
233 | |||
234 | # allow resolving a single divergent bookmark even if moving |
|
234 | # allow resolving a single divergent bookmark even if moving | |
235 | # the bookmark across branches when a revision is specified |
|
235 | # the bookmark across branches when a revision is specified | |
236 | # that contains a divergent bookmark |
|
236 | # that contains a divergent bookmark | |
237 | if bmctx.rev() not in anc and target in divs: |
|
237 | if bmctx.rev() not in anc and target in divs: | |
238 | return divergent2delete(self._repo, [target], mark) |
|
238 | return divergent2delete(self._repo, [target], mark) | |
239 |
|
239 | |||
240 | deletefrom = [b for b in divs |
|
240 | deletefrom = [b for b in divs | |
241 | if self._repo[b].rev() in anc or b == target] |
|
241 | if self._repo[b].rev() in anc or b == target] | |
242 | delbms = divergent2delete(self._repo, deletefrom, mark) |
|
242 | delbms = divergent2delete(self._repo, deletefrom, mark) | |
243 | if validdest(self._repo, bmctx, self._repo[target]): |
|
243 | if validdest(self._repo, bmctx, self._repo[target]): | |
244 | self._repo.ui.status( |
|
244 | self._repo.ui.status( | |
245 | _("moving bookmark '%s' forward from %s\n") % |
|
245 | _("moving bookmark '%s' forward from %s\n") % | |
246 | (mark, short(bmctx.node()))) |
|
246 | (mark, short(bmctx.node()))) | |
247 | return delbms |
|
247 | return delbms | |
248 | raise error.Abort(_("bookmark '%s' already exists " |
|
248 | raise error.Abort(_("bookmark '%s' already exists " | |
249 | "(use -f to force)") % mark) |
|
249 | "(use -f to force)") % mark) | |
250 | if ((mark in self._repo.branchmap() or |
|
250 | if ((mark in self._repo.branchmap() or | |
251 | mark == self._repo.dirstate.branch()) and not force): |
|
251 | mark == self._repo.dirstate.branch()) and not force): | |
252 | raise error.Abort( |
|
252 | raise error.Abort( | |
253 | _("a bookmark cannot have the name of an existing branch")) |
|
253 | _("a bookmark cannot have the name of an existing branch")) | |
254 | if len(mark) > 3 and not force: |
|
254 | if len(mark) > 3 and not force: | |
255 | try: |
|
255 | try: | |
256 | shadowhash = (mark in self._repo) |
|
256 | shadowhash = (mark in self._repo) | |
257 | except error.LookupError: # ambiguous identifier |
|
257 | except error.LookupError: # ambiguous identifier | |
258 | shadowhash = False |
|
258 | shadowhash = False | |
259 | if shadowhash: |
|
259 | if shadowhash: | |
260 | self._repo.ui.warn( |
|
260 | self._repo.ui.warn( | |
261 | _("bookmark %s matches a changeset hash\n" |
|
261 | _("bookmark %s matches a changeset hash\n" | |
262 | "(did you leave a -r out of an 'hg bookmark' " |
|
262 | "(did you leave a -r out of an 'hg bookmark' " | |
263 | "command?)\n") |
|
263 | "command?)\n") | |
264 | % mark) |
|
264 | % mark) | |
265 | return [] |
|
265 | return [] | |
266 |
|
266 | |||
267 | def _readactive(repo, marks): |
|
267 | def _readactive(repo, marks): | |
268 | """ |
|
268 | """ | |
269 | Get the active bookmark. We can have an active bookmark that updates |
|
269 | Get the active bookmark. We can have an active bookmark that updates | |
270 | itself as we commit. This function returns the name of that bookmark. |
|
270 | itself as we commit. This function returns the name of that bookmark. | |
271 | It is stored in .hg/bookmarks.current |
|
271 | It is stored in .hg/bookmarks.current | |
272 | """ |
|
272 | """ | |
273 | mark = None |
|
273 | mark = None | |
274 | try: |
|
274 | try: | |
275 | file = repo.vfs('bookmarks.current') |
|
275 | file = repo.vfs('bookmarks.current') | |
276 | except IOError as inst: |
|
276 | except IOError as inst: | |
277 | if inst.errno != errno.ENOENT: |
|
277 | if inst.errno != errno.ENOENT: | |
278 | raise |
|
278 | raise | |
279 | return None |
|
279 | return None | |
280 | try: |
|
280 | try: | |
281 | # No readline() in osutil.posixfile, reading everything is |
|
281 | # No readline() in osutil.posixfile, reading everything is | |
282 | # cheap. |
|
282 | # cheap. | |
283 | # Note that it's possible for readlines() here to raise |
|
283 | # Note that it's possible for readlines() here to raise | |
284 | # IOError, since we might be reading the active mark over |
|
284 | # IOError, since we might be reading the active mark over | |
285 | # static-http which only tries to load the file when we try |
|
285 | # static-http which only tries to load the file when we try | |
286 | # to read from it. |
|
286 | # to read from it. | |
287 | mark = encoding.tolocal((file.readlines() or [''])[0]) |
|
287 | mark = encoding.tolocal((file.readlines() or [''])[0]) | |
288 | if mark == '' or mark not in marks: |
|
288 | if mark == '' or mark not in marks: | |
289 | mark = None |
|
289 | mark = None | |
290 | except IOError as inst: |
|
290 | except IOError as inst: | |
291 | if inst.errno != errno.ENOENT: |
|
291 | if inst.errno != errno.ENOENT: | |
292 | raise |
|
292 | raise | |
293 | return None |
|
293 | return None | |
294 | finally: |
|
294 | finally: | |
295 | file.close() |
|
295 | file.close() | |
296 | return mark |
|
296 | return mark | |
297 |
|
297 | |||
298 | def activate(repo, mark): |
|
298 | def activate(repo, mark): | |
299 | """ |
|
299 | """ | |
300 | Set the given bookmark to be 'active', meaning that this bookmark will |
|
300 | Set the given bookmark to be 'active', meaning that this bookmark will | |
301 | follow new commits that are made. |
|
301 | follow new commits that are made. | |
302 | The name is recorded in .hg/bookmarks.current |
|
302 | The name is recorded in .hg/bookmarks.current | |
303 | """ |
|
303 | """ | |
304 | repo._bookmarks.active = mark |
|
304 | repo._bookmarks.active = mark | |
305 | repo._bookmarks._writeactive() |
|
305 | repo._bookmarks._writeactive() | |
306 |
|
306 | |||
307 | def deactivate(repo): |
|
307 | def deactivate(repo): | |
308 | """ |
|
308 | """ | |
309 | Unset the active bookmark in this repository. |
|
309 | Unset the active bookmark in this repository. | |
310 | """ |
|
310 | """ | |
311 | repo._bookmarks.active = None |
|
311 | repo._bookmarks.active = None | |
312 | repo._bookmarks._writeactive() |
|
312 | repo._bookmarks._writeactive() | |
313 |
|
313 | |||
314 | def isactivewdirparent(repo): |
|
314 | def isactivewdirparent(repo): | |
315 | """ |
|
315 | """ | |
316 | Tell whether the 'active' bookmark (the one that follows new commits) |
|
316 | Tell whether the 'active' bookmark (the one that follows new commits) | |
317 | points to one of the parents of the current working directory (wdir). |
|
317 | points to one of the parents of the current working directory (wdir). | |
318 |
|
318 | |||
319 | While this is normally the case, it can on occasion be false; for example, |
|
319 | While this is normally the case, it can on occasion be false; for example, | |
320 | immediately after a pull, the active bookmark can be moved to point |
|
320 | immediately after a pull, the active bookmark can be moved to point | |
321 | to a place different than the wdir. This is solved by running `hg update`. |
|
321 | to a place different than the wdir. This is solved by running `hg update`. | |
322 | """ |
|
322 | """ | |
323 | mark = repo._activebookmark |
|
323 | mark = repo._activebookmark | |
324 | marks = repo._bookmarks |
|
324 | marks = repo._bookmarks | |
325 | parents = [p.node() for p in repo[None].parents()] |
|
325 | parents = [p.node() for p in repo[None].parents()] | |
326 | return (mark in marks and marks[mark] in parents) |
|
326 | return (mark in marks and marks[mark] in parents) | |
327 |
|
327 | |||
328 | def divergent2delete(repo, deletefrom, bm): |
|
328 | def divergent2delete(repo, deletefrom, bm): | |
329 | """find divergent versions of bm on nodes in deletefrom. |
|
329 | """find divergent versions of bm on nodes in deletefrom. | |
330 |
|
330 | |||
331 | the list of bookmark to delete.""" |
|
331 | the list of bookmark to delete.""" | |
332 | todelete = [] |
|
332 | todelete = [] | |
333 | marks = repo._bookmarks |
|
333 | marks = repo._bookmarks | |
334 | divergent = [b for b in marks if b.split('@', 1)[0] == bm.split('@', 1)[0]] |
|
334 | divergent = [b for b in marks if b.split('@', 1)[0] == bm.split('@', 1)[0]] | |
335 | for mark in divergent: |
|
335 | for mark in divergent: | |
336 | if mark == '@' or '@' not in mark: |
|
336 | if mark == '@' or '@' not in mark: | |
337 | # can't be divergent by definition |
|
337 | # can't be divergent by definition | |
338 | continue |
|
338 | continue | |
339 | if mark and marks[mark] in deletefrom: |
|
339 | if mark and marks[mark] in deletefrom: | |
340 | if mark != bm: |
|
340 | if mark != bm: | |
341 | todelete.append(mark) |
|
341 | todelete.append(mark) | |
342 | return todelete |
|
342 | return todelete | |
343 |
|
343 | |||
344 | def headsforactive(repo): |
|
344 | def headsforactive(repo): | |
345 | """Given a repo with an active bookmark, return divergent bookmark nodes. |
|
345 | """Given a repo with an active bookmark, return divergent bookmark nodes. | |
346 |
|
346 | |||
347 | Args: |
|
347 | Args: | |
348 | repo: A repository with an active bookmark. |
|
348 | repo: A repository with an active bookmark. | |
349 |
|
349 | |||
350 | Returns: |
|
350 | Returns: | |
351 | A list of binary node ids that is the full list of other |
|
351 | A list of binary node ids that is the full list of other | |
352 | revisions with bookmarks divergent from the active bookmark. If |
|
352 | revisions with bookmarks divergent from the active bookmark. If | |
353 | there were no divergent bookmarks, then this list will contain |
|
353 | there were no divergent bookmarks, then this list will contain | |
354 | only one entry. |
|
354 | only one entry. | |
355 | """ |
|
355 | """ | |
356 | if not repo._activebookmark: |
|
356 | if not repo._activebookmark: | |
357 | raise ValueError( |
|
357 | raise ValueError( | |
358 | 'headsforactive() only makes sense with an active bookmark') |
|
358 | 'headsforactive() only makes sense with an active bookmark') | |
359 | name = repo._activebookmark.split('@', 1)[0] |
|
359 | name = repo._activebookmark.split('@', 1)[0] | |
360 | heads = [] |
|
360 | heads = [] | |
361 | for mark, n in repo._bookmarks.iteritems(): |
|
361 | for mark, n in repo._bookmarks.iteritems(): | |
362 | if mark.split('@', 1)[0] == name: |
|
362 | if mark.split('@', 1)[0] == name: | |
363 | heads.append(n) |
|
363 | heads.append(n) | |
364 | return heads |
|
364 | return heads | |
365 |
|
365 | |||
366 | def calculateupdate(ui, repo, checkout): |
|
366 | def calculateupdate(ui, repo, checkout): | |
367 | '''Return a tuple (targetrev, movemarkfrom) indicating the rev to |
|
367 | '''Return a tuple (targetrev, movemarkfrom) indicating the rev to | |
368 | check out and where to move the active bookmark from, if needed.''' |
|
368 | check out and where to move the active bookmark from, if needed.''' | |
369 | movemarkfrom = None |
|
369 | movemarkfrom = None | |
370 | if checkout is None: |
|
370 | if checkout is None: | |
371 | activemark = repo._activebookmark |
|
371 | activemark = repo._activebookmark | |
372 | if isactivewdirparent(repo): |
|
372 | if isactivewdirparent(repo): | |
373 | movemarkfrom = repo['.'].node() |
|
373 | movemarkfrom = repo['.'].node() | |
374 | elif activemark: |
|
374 | elif activemark: | |
375 | ui.status(_("updating to active bookmark %s\n") % activemark) |
|
375 | ui.status(_("updating to active bookmark %s\n") % activemark) | |
376 | checkout = activemark |
|
376 | checkout = activemark | |
377 | return (checkout, movemarkfrom) |
|
377 | return (checkout, movemarkfrom) | |
378 |
|
378 | |||
379 | def update(repo, parents, node): |
|
379 | def update(repo, parents, node): | |
380 | deletefrom = parents |
|
380 | deletefrom = parents | |
381 | marks = repo._bookmarks |
|
381 | marks = repo._bookmarks | |
382 | active = marks.active |
|
382 | active = marks.active | |
383 | if not active: |
|
383 | if not active: | |
384 | return False |
|
384 | return False | |
385 |
|
385 | |||
386 | bmchanges = [] |
|
386 | bmchanges = [] | |
387 | if marks[active] in parents: |
|
387 | if marks[active] in parents: | |
388 | new = repo[node] |
|
388 | new = repo[node] | |
389 | divs = [repo[b] for b in marks |
|
389 | divs = [repo[b] for b in marks | |
390 | if b.split('@', 1)[0] == active.split('@', 1)[0]] |
|
390 | if b.split('@', 1)[0] == active.split('@', 1)[0]] | |
391 | anc = repo.changelog.ancestors([new.rev()]) |
|
391 | anc = repo.changelog.ancestors([new.rev()]) | |
392 | deletefrom = [b.node() for b in divs if b.rev() in anc or b == new] |
|
392 | deletefrom = [b.node() for b in divs if b.rev() in anc or b == new] | |
393 | if validdest(repo, repo[marks[active]], new): |
|
393 | if validdest(repo, repo[marks[active]], new): | |
394 | bmchanges.append((active, new.node())) |
|
394 | bmchanges.append((active, new.node())) | |
395 |
|
395 | |||
396 | for bm in divergent2delete(repo, deletefrom, active): |
|
396 | for bm in divergent2delete(repo, deletefrom, active): | |
397 | bmchanges.append((bm, None)) |
|
397 | bmchanges.append((bm, None)) | |
398 |
|
398 | |||
399 | if bmchanges: |
|
399 | if bmchanges: | |
400 | with repo.lock(), repo.transaction('bookmark') as tr: |
|
400 | with repo.lock(), repo.transaction('bookmark') as tr: | |
401 | marks.applychanges(repo, tr, bmchanges) |
|
401 | marks.applychanges(repo, tr, bmchanges) | |
402 | return bool(bmchanges) |
|
402 | return bool(bmchanges) | |
403 |
|
403 | |||
404 | def listbinbookmarks(repo): |
|
404 | def listbinbookmarks(repo): | |
405 | # We may try to list bookmarks on a repo type that does not |
|
405 | # We may try to list bookmarks on a repo type that does not | |
406 | # support it (e.g., statichttprepository). |
|
406 | # support it (e.g., statichttprepository). | |
407 | marks = getattr(repo, '_bookmarks', {}) |
|
407 | marks = getattr(repo, '_bookmarks', {}) | |
408 |
|
408 | |||
409 | hasnode = repo.changelog.hasnode |
|
409 | hasnode = repo.changelog.hasnode | |
410 | for k, v in marks.iteritems(): |
|
410 | for k, v in marks.iteritems(): | |
411 | # don't expose local divergent bookmarks |
|
411 | # don't expose local divergent bookmarks | |
412 | if hasnode(v) and ('@' not in k or k.endswith('@')): |
|
412 | if hasnode(v) and ('@' not in k or k.endswith('@')): | |
413 | yield k, v |
|
413 | yield k, v | |
414 |
|
414 | |||
415 | def listbookmarks(repo): |
|
415 | def listbookmarks(repo): | |
416 | d = {} |
|
416 | d = {} | |
417 | for book, node in listbinbookmarks(repo): |
|
417 | for book, node in listbinbookmarks(repo): | |
418 | d[book] = hex(node) |
|
418 | d[book] = hex(node) | |
419 | return d |
|
419 | return d | |
420 |
|
420 | |||
421 | def pushbookmark(repo, key, old, new): |
|
421 | def pushbookmark(repo, key, old, new): | |
422 | with repo.wlock(), repo.lock(), repo.transaction('bookmarks') as tr: |
|
422 | with repo.wlock(), repo.lock(), repo.transaction('bookmarks') as tr: | |
423 | marks = repo._bookmarks |
|
423 | marks = repo._bookmarks | |
424 | existing = hex(marks.get(key, '')) |
|
424 | existing = hex(marks.get(key, '')) | |
425 | if existing != old and existing != new: |
|
425 | if existing != old and existing != new: | |
426 | return False |
|
426 | return False | |
427 | if new == '': |
|
427 | if new == '': | |
428 | changes = [(key, None)] |
|
428 | changes = [(key, None)] | |
429 | else: |
|
429 | else: | |
430 | if new not in repo: |
|
430 | if new not in repo: | |
431 | return False |
|
431 | return False | |
432 | changes = [(key, repo[new].node())] |
|
432 | changes = [(key, repo[new].node())] | |
433 | marks.applychanges(repo, tr, changes) |
|
433 | marks.applychanges(repo, tr, changes) | |
434 | return True |
|
434 | return True | |
435 |
|
435 | |||
436 | def comparebookmarks(repo, srcmarks, dstmarks, targets=None): |
|
436 | def comparebookmarks(repo, srcmarks, dstmarks, targets=None): | |
437 | '''Compare bookmarks between srcmarks and dstmarks |
|
437 | '''Compare bookmarks between srcmarks and dstmarks | |
438 |
|
438 | |||
439 | This returns tuple "(addsrc, adddst, advsrc, advdst, diverge, |
|
439 | This returns tuple "(addsrc, adddst, advsrc, advdst, diverge, | |
440 | differ, invalid)", each are list of bookmarks below: |
|
440 | differ, invalid)", each are list of bookmarks below: | |
441 |
|
441 | |||
442 | :addsrc: added on src side (removed on dst side, perhaps) |
|
442 | :addsrc: added on src side (removed on dst side, perhaps) | |
443 | :adddst: added on dst side (removed on src side, perhaps) |
|
443 | :adddst: added on dst side (removed on src side, perhaps) | |
444 | :advsrc: advanced on src side |
|
444 | :advsrc: advanced on src side | |
445 | :advdst: advanced on dst side |
|
445 | :advdst: advanced on dst side | |
446 | :diverge: diverge |
|
446 | :diverge: diverge | |
447 | :differ: changed, but changeset referred on src is unknown on dst |
|
447 | :differ: changed, but changeset referred on src is unknown on dst | |
448 | :invalid: unknown on both side |
|
448 | :invalid: unknown on both side | |
449 | :same: same on both side |
|
449 | :same: same on both side | |
450 |
|
450 | |||
451 | Each elements of lists in result tuple is tuple "(bookmark name, |
|
451 | Each elements of lists in result tuple is tuple "(bookmark name, | |
452 | changeset ID on source side, changeset ID on destination |
|
452 | changeset ID on source side, changeset ID on destination | |
453 | side)". Each changeset IDs are 40 hexadecimal digit string or |
|
453 | side)". Each changeset IDs are 40 hexadecimal digit string or | |
454 | None. |
|
454 | None. | |
455 |
|
455 | |||
456 | Changeset IDs of tuples in "addsrc", "adddst", "differ" or |
|
456 | Changeset IDs of tuples in "addsrc", "adddst", "differ" or | |
457 | "invalid" list may be unknown for repo. |
|
457 | "invalid" list may be unknown for repo. | |
458 |
|
458 | |||
459 | If "targets" is specified, only bookmarks listed in it are |
|
459 | If "targets" is specified, only bookmarks listed in it are | |
460 | examined. |
|
460 | examined. | |
461 | ''' |
|
461 | ''' | |
462 |
|
462 | |||
463 | if targets: |
|
463 | if targets: | |
464 | bset = set(targets) |
|
464 | bset = set(targets) | |
465 | else: |
|
465 | else: | |
466 | srcmarkset = set(srcmarks) |
|
466 | srcmarkset = set(srcmarks) | |
467 | dstmarkset = set(dstmarks) |
|
467 | dstmarkset = set(dstmarks) | |
468 | bset = srcmarkset | dstmarkset |
|
468 | bset = srcmarkset | dstmarkset | |
469 |
|
469 | |||
470 | results = ([], [], [], [], [], [], [], []) |
|
470 | results = ([], [], [], [], [], [], [], []) | |
471 | addsrc = results[0].append |
|
471 | addsrc = results[0].append | |
472 | adddst = results[1].append |
|
472 | adddst = results[1].append | |
473 | advsrc = results[2].append |
|
473 | advsrc = results[2].append | |
474 | advdst = results[3].append |
|
474 | advdst = results[3].append | |
475 | diverge = results[4].append |
|
475 | diverge = results[4].append | |
476 | differ = results[5].append |
|
476 | differ = results[5].append | |
477 | invalid = results[6].append |
|
477 | invalid = results[6].append | |
478 | same = results[7].append |
|
478 | same = results[7].append | |
479 |
|
479 | |||
480 | for b in sorted(bset): |
|
480 | for b in sorted(bset): | |
481 | if b not in srcmarks: |
|
481 | if b not in srcmarks: | |
482 | if b in dstmarks: |
|
482 | if b in dstmarks: | |
483 | adddst((b, None, dstmarks[b])) |
|
483 | adddst((b, None, dstmarks[b])) | |
484 | else: |
|
484 | else: | |
485 | invalid((b, None, None)) |
|
485 | invalid((b, None, None)) | |
486 | elif b not in dstmarks: |
|
486 | elif b not in dstmarks: | |
487 | addsrc((b, srcmarks[b], None)) |
|
487 | addsrc((b, srcmarks[b], None)) | |
488 | else: |
|
488 | else: | |
489 | scid = srcmarks[b] |
|
489 | scid = srcmarks[b] | |
490 | dcid = dstmarks[b] |
|
490 | dcid = dstmarks[b] | |
491 | if scid == dcid: |
|
491 | if scid == dcid: | |
492 | same((b, scid, dcid)) |
|
492 | same((b, scid, dcid)) | |
493 | elif scid in repo and dcid in repo: |
|
493 | elif scid in repo and dcid in repo: | |
494 | sctx = repo[scid] |
|
494 | sctx = repo[scid] | |
495 | dctx = repo[dcid] |
|
495 | dctx = repo[dcid] | |
496 | if sctx.rev() < dctx.rev(): |
|
496 | if sctx.rev() < dctx.rev(): | |
497 | if validdest(repo, sctx, dctx): |
|
497 | if validdest(repo, sctx, dctx): | |
498 | advdst((b, scid, dcid)) |
|
498 | advdst((b, scid, dcid)) | |
499 | else: |
|
499 | else: | |
500 | diverge((b, scid, dcid)) |
|
500 | diverge((b, scid, dcid)) | |
501 | else: |
|
501 | else: | |
502 | if validdest(repo, dctx, sctx): |
|
502 | if validdest(repo, dctx, sctx): | |
503 | advsrc((b, scid, dcid)) |
|
503 | advsrc((b, scid, dcid)) | |
504 | else: |
|
504 | else: | |
505 | diverge((b, scid, dcid)) |
|
505 | diverge((b, scid, dcid)) | |
506 | else: |
|
506 | else: | |
507 | # it is too expensive to examine in detail, in this case |
|
507 | # it is too expensive to examine in detail, in this case | |
508 | differ((b, scid, dcid)) |
|
508 | differ((b, scid, dcid)) | |
509 |
|
509 | |||
510 | return results |
|
510 | return results | |
511 |
|
511 | |||
512 | def _diverge(ui, b, path, localmarks, remotenode): |
|
512 | def _diverge(ui, b, path, localmarks, remotenode): | |
513 | '''Return appropriate diverged bookmark for specified ``path`` |
|
513 | '''Return appropriate diverged bookmark for specified ``path`` | |
514 |
|
514 | |||
515 | This returns None, if it is failed to assign any divergent |
|
515 | This returns None, if it is failed to assign any divergent | |
516 | bookmark name. |
|
516 | bookmark name. | |
517 |
|
517 | |||
518 | This reuses already existing one with "@number" suffix, if it |
|
518 | This reuses already existing one with "@number" suffix, if it | |
519 | refers ``remotenode``. |
|
519 | refers ``remotenode``. | |
520 | ''' |
|
520 | ''' | |
521 | if b == '@': |
|
521 | if b == '@': | |
522 | b = '' |
|
522 | b = '' | |
523 | # try to use an @pathalias suffix |
|
523 | # try to use an @pathalias suffix | |
524 | # if an @pathalias already exists, we overwrite (update) it |
|
524 | # if an @pathalias already exists, we overwrite (update) it | |
525 | if path.startswith("file:"): |
|
525 | if path.startswith("file:"): | |
526 | path = util.url(path).path |
|
526 | path = util.url(path).path | |
527 | for p, u in ui.configitems("paths"): |
|
527 | for p, u in ui.configitems("paths"): | |
528 | if u.startswith("file:"): |
|
528 | if u.startswith("file:"): | |
529 | u = util.url(u).path |
|
529 | u = util.url(u).path | |
530 | if path == u: |
|
530 | if path == u: | |
531 | return '%s@%s' % (b, p) |
|
531 | return '%s@%s' % (b, p) | |
532 |
|
532 | |||
533 | # assign a unique "@number" suffix newly |
|
533 | # assign a unique "@number" suffix newly | |
534 | for x in range(1, 100): |
|
534 | for x in range(1, 100): | |
535 | n = '%s@%d' % (b, x) |
|
535 | n = '%s@%d' % (b, x) | |
536 | if n not in localmarks or localmarks[n] == remotenode: |
|
536 | if n not in localmarks or localmarks[n] == remotenode: | |
537 | return n |
|
537 | return n | |
538 |
|
538 | |||
539 | return None |
|
539 | return None | |
540 |
|
540 | |||
541 | def unhexlifybookmarks(marks): |
|
541 | def unhexlifybookmarks(marks): | |
542 | binremotemarks = {} |
|
542 | binremotemarks = {} | |
543 | for name, node in marks.items(): |
|
543 | for name, node in marks.items(): | |
544 | binremotemarks[name] = bin(node) |
|
544 | binremotemarks[name] = bin(node) | |
545 | return binremotemarks |
|
545 | return binremotemarks | |
546 |
|
546 | |||
547 | _binaryentry = struct.Struct('>20sH') |
|
547 | _binaryentry = struct.Struct('>20sH') | |
548 |
|
548 | |||
549 | def binaryencode(bookmarks): |
|
549 | def binaryencode(bookmarks): | |
550 | """encode a '(bookmark, node)' iterable into a binary stream |
|
550 | """encode a '(bookmark, node)' iterable into a binary stream | |
551 |
|
551 | |||
552 | the binary format is: |
|
552 | the binary format is: | |
553 |
|
553 | |||
554 | <node><bookmark-length><bookmark-name> |
|
554 | <node><bookmark-length><bookmark-name> | |
555 |
|
555 | |||
556 | :node: is a 20 bytes binary node, |
|
556 | :node: is a 20 bytes binary node, | |
557 | :bookmark-length: an unsigned short, |
|
557 | :bookmark-length: an unsigned short, | |
558 | :bookmark-name: the name of the bookmark (of length <bookmark-length>) |
|
558 | :bookmark-name: the name of the bookmark (of length <bookmark-length>) | |
559 |
|
559 | |||
560 | wdirid (all bits set) will be used as a special value for "missing" |
|
560 | wdirid (all bits set) will be used as a special value for "missing" | |
561 | """ |
|
561 | """ | |
562 | binarydata = [] |
|
562 | binarydata = [] | |
563 | for book, node in bookmarks: |
|
563 | for book, node in bookmarks: | |
564 | if not node: # None or '' |
|
564 | if not node: # None or '' | |
565 | node = wdirid |
|
565 | node = wdirid | |
566 | binarydata.append(_binaryentry.pack(node, len(book))) |
|
566 | binarydata.append(_binaryentry.pack(node, len(book))) | |
567 | binarydata.append(book) |
|
567 | binarydata.append(book) | |
568 | return ''.join(binarydata) |
|
568 | return ''.join(binarydata) | |
569 |
|
569 | |||
570 | def binarydecode(stream): |
|
570 | def binarydecode(stream): | |
571 | """decode a binary stream into an '(bookmark, node)' iterable |
|
571 | """decode a binary stream into an '(bookmark, node)' iterable | |
572 |
|
572 | |||
573 | the binary format is: |
|
573 | the binary format is: | |
574 |
|
574 | |||
575 | <node><bookmark-length><bookmark-name> |
|
575 | <node><bookmark-length><bookmark-name> | |
576 |
|
576 | |||
577 | :node: is a 20 bytes binary node, |
|
577 | :node: is a 20 bytes binary node, | |
578 | :bookmark-length: an unsigned short, |
|
578 | :bookmark-length: an unsigned short, | |
579 | :bookmark-name: the name of the bookmark (of length <bookmark-length>)) |
|
579 | :bookmark-name: the name of the bookmark (of length <bookmark-length>)) | |
580 |
|
580 | |||
581 | wdirid (all bits set) will be used as a special value for "missing" |
|
581 | wdirid (all bits set) will be used as a special value for "missing" | |
582 | """ |
|
582 | """ | |
583 | entrysize = _binaryentry.size |
|
583 | entrysize = _binaryentry.size | |
584 | books = [] |
|
584 | books = [] | |
585 | while True: |
|
585 | while True: | |
586 | entry = stream.read(entrysize) |
|
586 | entry = stream.read(entrysize) | |
587 | if len(entry) < entrysize: |
|
587 | if len(entry) < entrysize: | |
588 | if entry: |
|
588 | if entry: | |
589 | raise error.Abort(_('bad bookmark stream')) |
|
589 | raise error.Abort(_('bad bookmark stream')) | |
590 | break |
|
590 | break | |
591 | node, length = _binaryentry.unpack(entry) |
|
591 | node, length = _binaryentry.unpack(entry) | |
592 | bookmark = stream.read(length) |
|
592 | bookmark = stream.read(length) | |
593 | if len(bookmark) < length: |
|
593 | if len(bookmark) < length: | |
594 | if entry: |
|
594 | if entry: | |
595 | raise error.Abort(_('bad bookmark stream')) |
|
595 | raise error.Abort(_('bad bookmark stream')) | |
596 | if node == wdirid: |
|
596 | if node == wdirid: | |
597 | node = None |
|
597 | node = None | |
598 | books.append((bookmark, node)) |
|
598 | books.append((bookmark, node)) | |
599 | return books |
|
599 | return books | |
600 |
|
600 | |||
601 | def updatefromremote(ui, repo, remotemarks, path, trfunc, explicit=()): |
|
601 | def updatefromremote(ui, repo, remotemarks, path, trfunc, explicit=()): | |
602 | ui.debug("checking for updated bookmarks\n") |
|
602 | ui.debug("checking for updated bookmarks\n") | |
603 | localmarks = repo._bookmarks |
|
603 | localmarks = repo._bookmarks | |
604 | (addsrc, adddst, advsrc, advdst, diverge, differ, invalid, same |
|
604 | (addsrc, adddst, advsrc, advdst, diverge, differ, invalid, same | |
605 | ) = comparebookmarks(repo, remotemarks, localmarks) |
|
605 | ) = comparebookmarks(repo, remotemarks, localmarks) | |
606 |
|
606 | |||
607 | status = ui.status |
|
607 | status = ui.status | |
608 | warn = ui.warn |
|
608 | warn = ui.warn | |
609 | if ui.configbool('ui', 'quietbookmarkmove'): |
|
609 | if ui.configbool('ui', 'quietbookmarkmove'): | |
610 | status = warn = ui.debug |
|
610 | status = warn = ui.debug | |
611 |
|
611 | |||
612 | explicit = set(explicit) |
|
612 | explicit = set(explicit) | |
613 | changed = [] |
|
613 | changed = [] | |
614 | for b, scid, dcid in addsrc: |
|
614 | for b, scid, dcid in addsrc: | |
615 | if scid in repo: # add remote bookmarks for changes we already have |
|
615 | if scid in repo: # add remote bookmarks for changes we already have | |
616 | changed.append((b, scid, status, |
|
616 | changed.append((b, scid, status, | |
617 | _("adding remote bookmark %s\n") % (b))) |
|
617 | _("adding remote bookmark %s\n") % (b))) | |
618 | elif b in explicit: |
|
618 | elif b in explicit: | |
619 | explicit.remove(b) |
|
619 | explicit.remove(b) | |
620 | ui.warn(_("remote bookmark %s points to locally missing %s\n") |
|
620 | ui.warn(_("remote bookmark %s points to locally missing %s\n") | |
621 | % (b, hex(scid)[:12])) |
|
621 | % (b, hex(scid)[:12])) | |
622 |
|
622 | |||
623 | for b, scid, dcid in advsrc: |
|
623 | for b, scid, dcid in advsrc: | |
624 | changed.append((b, scid, status, |
|
624 | changed.append((b, scid, status, | |
625 | _("updating bookmark %s\n") % (b))) |
|
625 | _("updating bookmark %s\n") % (b))) | |
626 | # remove normal movement from explicit set |
|
626 | # remove normal movement from explicit set | |
627 | explicit.difference_update(d[0] for d in changed) |
|
627 | explicit.difference_update(d[0] for d in changed) | |
628 |
|
628 | |||
629 | for b, scid, dcid in diverge: |
|
629 | for b, scid, dcid in diverge: | |
630 | if b in explicit: |
|
630 | if b in explicit: | |
631 | explicit.discard(b) |
|
631 | explicit.discard(b) | |
632 | changed.append((b, scid, status, |
|
632 | changed.append((b, scid, status, | |
633 | _("importing bookmark %s\n") % (b))) |
|
633 | _("importing bookmark %s\n") % (b))) | |
634 | else: |
|
634 | else: | |
635 | db = _diverge(ui, b, path, localmarks, scid) |
|
635 | db = _diverge(ui, b, path, localmarks, scid) | |
636 | if db: |
|
636 | if db: | |
637 | changed.append((db, scid, warn, |
|
637 | changed.append((db, scid, warn, | |
638 | _("divergent bookmark %s stored as %s\n") % |
|
638 | _("divergent bookmark %s stored as %s\n") % | |
639 | (b, db))) |
|
639 | (b, db))) | |
640 | else: |
|
640 | else: | |
641 | warn(_("warning: failed to assign numbered name " |
|
641 | warn(_("warning: failed to assign numbered name " | |
642 | "to divergent bookmark %s\n") % (b)) |
|
642 | "to divergent bookmark %s\n") % (b)) | |
643 | for b, scid, dcid in adddst + advdst: |
|
643 | for b, scid, dcid in adddst + advdst: | |
644 | if b in explicit: |
|
644 | if b in explicit: | |
645 | explicit.discard(b) |
|
645 | explicit.discard(b) | |
646 | changed.append((b, scid, status, |
|
646 | changed.append((b, scid, status, | |
647 | _("importing bookmark %s\n") % (b))) |
|
647 | _("importing bookmark %s\n") % (b))) | |
648 | for b, scid, dcid in differ: |
|
648 | for b, scid, dcid in differ: | |
649 | if b in explicit: |
|
649 | if b in explicit: | |
650 | explicit.remove(b) |
|
650 | explicit.remove(b) | |
651 | ui.warn(_("remote bookmark %s points to locally missing %s\n") |
|
651 | ui.warn(_("remote bookmark %s points to locally missing %s\n") | |
652 | % (b, hex(scid)[:12])) |
|
652 | % (b, hex(scid)[:12])) | |
653 |
|
653 | |||
654 | if changed: |
|
654 | if changed: | |
655 | tr = trfunc() |
|
655 | tr = trfunc() | |
656 | changes = [] |
|
656 | changes = [] | |
657 | for b, node, writer, msg in sorted(changed): |
|
657 | for b, node, writer, msg in sorted(changed): | |
658 | changes.append((b, node)) |
|
658 | changes.append((b, node)) | |
659 | writer(msg) |
|
659 | writer(msg) | |
660 | localmarks.applychanges(repo, tr, changes) |
|
660 | localmarks.applychanges(repo, tr, changes) | |
661 |
|
661 | |||
662 | def incoming(ui, repo, other): |
|
662 | def incoming(ui, repo, other): | |
663 | '''Show bookmarks incoming from other to repo |
|
663 | '''Show bookmarks incoming from other to repo | |
664 | ''' |
|
664 | ''' | |
665 | ui.status(_("searching for changed bookmarks\n")) |
|
665 | ui.status(_("searching for changed bookmarks\n")) | |
666 |
|
666 | |||
667 | remotemarks = unhexlifybookmarks(other.listkeys('bookmarks')) |
|
667 | remotemarks = unhexlifybookmarks(other.listkeys('bookmarks')) | |
668 | r = comparebookmarks(repo, remotemarks, repo._bookmarks) |
|
668 | r = comparebookmarks(repo, remotemarks, repo._bookmarks) | |
669 | addsrc, adddst, advsrc, advdst, diverge, differ, invalid, same = r |
|
669 | addsrc, adddst, advsrc, advdst, diverge, differ, invalid, same = r | |
670 |
|
670 | |||
671 | incomings = [] |
|
671 | incomings = [] | |
672 | if ui.debugflag: |
|
672 | if ui.debugflag: | |
673 | getid = lambda id: id |
|
673 | getid = lambda id: id | |
674 | else: |
|
674 | else: | |
675 | getid = lambda id: id[:12] |
|
675 | getid = lambda id: id[:12] | |
676 | if ui.verbose: |
|
676 | if ui.verbose: | |
677 | def add(b, id, st): |
|
677 | def add(b, id, st): | |
678 | incomings.append(" %-25s %s %s\n" % (b, getid(id), st)) |
|
678 | incomings.append(" %-25s %s %s\n" % (b, getid(id), st)) | |
679 | else: |
|
679 | else: | |
680 | def add(b, id, st): |
|
680 | def add(b, id, st): | |
681 | incomings.append(" %-25s %s\n" % (b, getid(id))) |
|
681 | incomings.append(" %-25s %s\n" % (b, getid(id))) | |
682 | for b, scid, dcid in addsrc: |
|
682 | for b, scid, dcid in addsrc: | |
683 | # i18n: "added" refers to a bookmark |
|
683 | # i18n: "added" refers to a bookmark | |
684 | add(b, hex(scid), _('added')) |
|
684 | add(b, hex(scid), _('added')) | |
685 | for b, scid, dcid in advsrc: |
|
685 | for b, scid, dcid in advsrc: | |
686 | # i18n: "advanced" refers to a bookmark |
|
686 | # i18n: "advanced" refers to a bookmark | |
687 | add(b, hex(scid), _('advanced')) |
|
687 | add(b, hex(scid), _('advanced')) | |
688 | for b, scid, dcid in diverge: |
|
688 | for b, scid, dcid in diverge: | |
689 | # i18n: "diverged" refers to a bookmark |
|
689 | # i18n: "diverged" refers to a bookmark | |
690 | add(b, hex(scid), _('diverged')) |
|
690 | add(b, hex(scid), _('diverged')) | |
691 | for b, scid, dcid in differ: |
|
691 | for b, scid, dcid in differ: | |
692 | # i18n: "changed" refers to a bookmark |
|
692 | # i18n: "changed" refers to a bookmark | |
693 | add(b, hex(scid), _('changed')) |
|
693 | add(b, hex(scid), _('changed')) | |
694 |
|
694 | |||
695 | if not incomings: |
|
695 | if not incomings: | |
696 | ui.status(_("no changed bookmarks found\n")) |
|
696 | ui.status(_("no changed bookmarks found\n")) | |
697 | return 1 |
|
697 | return 1 | |
698 |
|
698 | |||
699 | for s in sorted(incomings): |
|
699 | for s in sorted(incomings): | |
700 | ui.write(s) |
|
700 | ui.write(s) | |
701 |
|
701 | |||
702 | return 0 |
|
702 | return 0 | |
703 |
|
703 | |||
704 | def outgoing(ui, repo, other): |
|
704 | def outgoing(ui, repo, other): | |
705 | '''Show bookmarks outgoing from repo to other |
|
705 | '''Show bookmarks outgoing from repo to other | |
706 | ''' |
|
706 | ''' | |
707 | ui.status(_("searching for changed bookmarks\n")) |
|
707 | ui.status(_("searching for changed bookmarks\n")) | |
708 |
|
708 | |||
709 | remotemarks = unhexlifybookmarks(other.listkeys('bookmarks')) |
|
709 | remotemarks = unhexlifybookmarks(other.listkeys('bookmarks')) | |
710 | r = comparebookmarks(repo, repo._bookmarks, remotemarks) |
|
710 | r = comparebookmarks(repo, repo._bookmarks, remotemarks) | |
711 | addsrc, adddst, advsrc, advdst, diverge, differ, invalid, same = r |
|
711 | addsrc, adddst, advsrc, advdst, diverge, differ, invalid, same = r | |
712 |
|
712 | |||
713 | outgoings = [] |
|
713 | outgoings = [] | |
714 | if ui.debugflag: |
|
714 | if ui.debugflag: | |
715 | getid = lambda id: id |
|
715 | getid = lambda id: id | |
716 | else: |
|
716 | else: | |
717 | getid = lambda id: id[:12] |
|
717 | getid = lambda id: id[:12] | |
718 | if ui.verbose: |
|
718 | if ui.verbose: | |
719 | def add(b, id, st): |
|
719 | def add(b, id, st): | |
720 | outgoings.append(" %-25s %s %s\n" % (b, getid(id), st)) |
|
720 | outgoings.append(" %-25s %s %s\n" % (b, getid(id), st)) | |
721 | else: |
|
721 | else: | |
722 | def add(b, id, st): |
|
722 | def add(b, id, st): | |
723 | outgoings.append(" %-25s %s\n" % (b, getid(id))) |
|
723 | outgoings.append(" %-25s %s\n" % (b, getid(id))) | |
724 | for b, scid, dcid in addsrc: |
|
724 | for b, scid, dcid in addsrc: | |
725 | # i18n: "added refers to a bookmark |
|
725 | # i18n: "added refers to a bookmark | |
726 | add(b, hex(scid), _('added')) |
|
726 | add(b, hex(scid), _('added')) | |
727 | for b, scid, dcid in adddst: |
|
727 | for b, scid, dcid in adddst: | |
728 | # i18n: "deleted" refers to a bookmark |
|
728 | # i18n: "deleted" refers to a bookmark | |
729 | add(b, ' ' * 40, _('deleted')) |
|
729 | add(b, ' ' * 40, _('deleted')) | |
730 | for b, scid, dcid in advsrc: |
|
730 | for b, scid, dcid in advsrc: | |
731 | # i18n: "advanced" refers to a bookmark |
|
731 | # i18n: "advanced" refers to a bookmark | |
732 | add(b, hex(scid), _('advanced')) |
|
732 | add(b, hex(scid), _('advanced')) | |
733 | for b, scid, dcid in diverge: |
|
733 | for b, scid, dcid in diverge: | |
734 | # i18n: "diverged" refers to a bookmark |
|
734 | # i18n: "diverged" refers to a bookmark | |
735 | add(b, hex(scid), _('diverged')) |
|
735 | add(b, hex(scid), _('diverged')) | |
736 | for b, scid, dcid in differ: |
|
736 | for b, scid, dcid in differ: | |
737 | # i18n: "changed" refers to a bookmark |
|
737 | # i18n: "changed" refers to a bookmark | |
738 | add(b, hex(scid), _('changed')) |
|
738 | add(b, hex(scid), _('changed')) | |
739 |
|
739 | |||
740 | if not outgoings: |
|
740 | if not outgoings: | |
741 | ui.status(_("no changed bookmarks found\n")) |
|
741 | ui.status(_("no changed bookmarks found\n")) | |
742 | return 1 |
|
742 | return 1 | |
743 |
|
743 | |||
744 | for s in sorted(outgoings): |
|
744 | for s in sorted(outgoings): | |
745 | ui.write(s) |
|
745 | ui.write(s) | |
746 |
|
746 | |||
747 | return 0 |
|
747 | return 0 | |
748 |
|
748 | |||
749 | def summary(repo, other): |
|
749 | def summary(repo, other): | |
750 | '''Compare bookmarks between repo and other for "hg summary" output |
|
750 | '''Compare bookmarks between repo and other for "hg summary" output | |
751 |
|
751 | |||
752 | This returns "(# of incoming, # of outgoing)" tuple. |
|
752 | This returns "(# of incoming, # of outgoing)" tuple. | |
753 | ''' |
|
753 | ''' | |
754 | remotemarks = unhexlifybookmarks(other.listkeys('bookmarks')) |
|
754 | remotemarks = unhexlifybookmarks(other.listkeys('bookmarks')) | |
755 | r = comparebookmarks(repo, remotemarks, repo._bookmarks) |
|
755 | r = comparebookmarks(repo, remotemarks, repo._bookmarks) | |
756 | addsrc, adddst, advsrc, advdst, diverge, differ, invalid, same = r |
|
756 | addsrc, adddst, advsrc, advdst, diverge, differ, invalid, same = r | |
757 | return (len(addsrc), len(adddst)) |
|
757 | return (len(addsrc), len(adddst)) | |
758 |
|
758 | |||
759 | def validdest(repo, old, new): |
|
759 | def validdest(repo, old, new): | |
760 | """Is the new bookmark destination a valid update from the old one""" |
|
760 | """Is the new bookmark destination a valid update from the old one""" | |
761 | repo = repo.unfiltered() |
|
761 | repo = repo.unfiltered() | |
762 | if old == new: |
|
762 | if old == new: | |
763 | # Old == new -> nothing to update. |
|
763 | # Old == new -> nothing to update. | |
764 | return False |
|
764 | return False | |
765 | elif not old: |
|
765 | elif not old: | |
766 | # old is nullrev, anything is valid. |
|
766 | # old is nullrev, anything is valid. | |
767 | # (new != nullrev has been excluded by the previous check) |
|
767 | # (new != nullrev has been excluded by the previous check) | |
768 | return True |
|
768 | return True | |
769 | elif repo.obsstore: |
|
769 | elif repo.obsstore: | |
770 | return new.node() in obsutil.foreground(repo, [old.node()]) |
|
770 | return new.node() in obsutil.foreground(repo, [old.node()]) | |
771 | else: |
|
771 | else: | |
772 | # still an independent clause as it is lazier (and therefore faster) |
|
772 | # still an independent clause as it is lazier (and therefore faster) | |
773 | return old.descendant(new) |
|
773 | return old.descendant(new) | |
774 |
|
774 | |||
775 | def checkformat(repo, mark): |
|
775 | def checkformat(repo, mark): | |
776 | """return a valid version of a potential bookmark name |
|
776 | """return a valid version of a potential bookmark name | |
777 |
|
777 | |||
778 | Raises an abort error if the bookmark name is not valid. |
|
778 | Raises an abort error if the bookmark name is not valid. | |
779 | """ |
|
779 | """ | |
780 | mark = mark.strip() |
|
780 | mark = mark.strip() | |
781 | if not mark: |
|
781 | if not mark: | |
782 | raise error.Abort(_("bookmark names cannot consist entirely of " |
|
782 | raise error.Abort(_("bookmark names cannot consist entirely of " | |
783 | "whitespace")) |
|
783 | "whitespace")) | |
784 | scmutil.checknewlabel(repo, mark, 'bookmark') |
|
784 | scmutil.checknewlabel(repo, mark, 'bookmark') | |
785 | return mark |
|
785 | return mark | |
786 |
|
786 | |||
787 | def delete(repo, tr, names): |
|
787 | def delete(repo, tr, names): | |
788 | """remove a mark from the bookmark store |
|
788 | """remove a mark from the bookmark store | |
789 |
|
789 | |||
790 | Raises an abort error if mark does not exist. |
|
790 | Raises an abort error if mark does not exist. | |
791 | """ |
|
791 | """ | |
792 | marks = repo._bookmarks |
|
792 | marks = repo._bookmarks | |
793 | changes = [] |
|
793 | changes = [] | |
794 | for mark in names: |
|
794 | for mark in names: | |
795 | if mark not in marks: |
|
795 | if mark not in marks: | |
796 | raise error.Abort(_("bookmark '%s' does not exist") % mark) |
|
796 | raise error.Abort(_("bookmark '%s' does not exist") % mark) | |
797 | if mark == repo._activebookmark: |
|
797 | if mark == repo._activebookmark: | |
798 | deactivate(repo) |
|
798 | deactivate(repo) | |
799 | changes.append((mark, None)) |
|
799 | changes.append((mark, None)) | |
800 | marks.applychanges(repo, tr, changes) |
|
800 | marks.applychanges(repo, tr, changes) | |
801 |
|
801 | |||
802 | def rename(repo, tr, old, new, force=False, inactive=False): |
|
802 | def rename(repo, tr, old, new, force=False, inactive=False): | |
803 | """rename a bookmark from old to new |
|
803 | """rename a bookmark from old to new | |
804 |
|
804 | |||
805 | If force is specified, then the new name can overwrite an existing |
|
805 | If force is specified, then the new name can overwrite an existing | |
806 | bookmark. |
|
806 | bookmark. | |
807 |
|
807 | |||
808 | If inactive is specified, then do not activate the new bookmark. |
|
808 | If inactive is specified, then do not activate the new bookmark. | |
809 |
|
809 | |||
810 | Raises an abort error if old is not in the bookmark store. |
|
810 | Raises an abort error if old is not in the bookmark store. | |
811 | """ |
|
811 | """ | |
812 | marks = repo._bookmarks |
|
812 | marks = repo._bookmarks | |
813 | mark = checkformat(repo, new) |
|
813 | mark = checkformat(repo, new) | |
814 | if old not in marks: |
|
814 | if old not in marks: | |
815 | raise error.Abort(_("bookmark '%s' does not exist") % old) |
|
815 | raise error.Abort(_("bookmark '%s' does not exist") % old) | |
816 | changes = [] |
|
816 | changes = [] | |
817 | for bm in marks.checkconflict(mark, force): |
|
817 | for bm in marks.checkconflict(mark, force): | |
818 | changes.append((bm, None)) |
|
818 | changes.append((bm, None)) | |
819 | changes.extend([(mark, marks[old]), (old, None)]) |
|
819 | changes.extend([(mark, marks[old]), (old, None)]) | |
820 | marks.applychanges(repo, tr, changes) |
|
820 | marks.applychanges(repo, tr, changes) | |
821 | if repo._activebookmark == old and not inactive: |
|
821 | if repo._activebookmark == old and not inactive: | |
822 | activate(repo, mark) |
|
822 | activate(repo, mark) | |
823 |
|
823 | |||
824 | def addbookmarks(repo, tr, names, rev=None, force=False, inactive=False): |
|
824 | def addbookmarks(repo, tr, names, rev=None, force=False, inactive=False): | |
825 | """add a list of bookmarks |
|
825 | """add a list of bookmarks | |
826 |
|
826 | |||
827 | If force is specified, then the new name can overwrite an existing |
|
827 | If force is specified, then the new name can overwrite an existing | |
828 | bookmark. |
|
828 | bookmark. | |
829 |
|
829 | |||
830 | If inactive is specified, then do not activate any bookmark. Otherwise, the |
|
830 | If inactive is specified, then do not activate any bookmark. Otherwise, the | |
831 | first bookmark is activated. |
|
831 | first bookmark is activated. | |
832 |
|
832 | |||
833 | Raises an abort error if old is not in the bookmark store. |
|
833 | Raises an abort error if old is not in the bookmark store. | |
834 | """ |
|
834 | """ | |
835 | marks = repo._bookmarks |
|
835 | marks = repo._bookmarks | |
836 | cur = repo.changectx('.').node() |
|
836 | cur = repo.changectx('.').node() | |
837 | newact = None |
|
837 | newact = None | |
838 | changes = [] |
|
838 | changes = [] | |
839 | hiddenrev = None |
|
839 | hiddenrev = None | |
840 |
|
840 | |||
841 | # unhide revs if any |
|
841 | # unhide revs if any | |
842 | if rev: |
|
842 | if rev: | |
843 | repo = scmutil.unhidehashlikerevs(repo, [rev], 'nowarn') |
|
843 | repo = scmutil.unhidehashlikerevs(repo, [rev], 'nowarn') | |
844 |
|
844 | |||
845 | for mark in names: |
|
845 | for mark in names: | |
846 | mark = checkformat(repo, mark) |
|
846 | mark = checkformat(repo, mark) | |
847 | if newact is None: |
|
847 | if newact is None: | |
848 | newact = mark |
|
848 | newact = mark | |
849 | if inactive and mark == repo._activebookmark: |
|
849 | if inactive and mark == repo._activebookmark: | |
850 | deactivate(repo) |
|
850 | deactivate(repo) | |
851 | return |
|
851 | return | |
852 | tgt = cur |
|
852 | tgt = cur | |
853 | if rev: |
|
853 | if rev: | |
854 | ctx = scmutil.revsingle(repo, rev) |
|
854 | ctx = scmutil.revsingle(repo, rev) | |
855 | if ctx.hidden(): |
|
855 | if ctx.hidden(): | |
856 | hiddenrev = ctx.hex()[:12] |
|
856 | hiddenrev = ctx.hex()[:12] | |
857 | tgt = ctx.node() |
|
857 | tgt = ctx.node() | |
858 | for bm in marks.checkconflict(mark, force, tgt): |
|
858 | for bm in marks.checkconflict(mark, force, tgt): | |
859 | changes.append((bm, None)) |
|
859 | changes.append((bm, None)) | |
860 | changes.append((mark, tgt)) |
|
860 | changes.append((mark, tgt)) | |
861 |
|
861 | |||
862 | if hiddenrev: |
|
862 | if hiddenrev: | |
863 | repo.ui.warn(_("bookmarking hidden changeset %s\n") % hiddenrev) |
|
863 | repo.ui.warn(_("bookmarking hidden changeset %s\n") % hiddenrev) | |
|
864 | ||||
|
865 | if ctx.obsolete(): | |||
|
866 | msg = obsutil._getfilteredreason(repo, "%s" % hiddenrev, ctx) | |||
|
867 | repo.ui.warn("(%s)\n" % msg) | |||
|
868 | ||||
864 | marks.applychanges(repo, tr, changes) |
|
869 | marks.applychanges(repo, tr, changes) | |
865 | if not inactive and cur == marks[newact] and not rev: |
|
870 | if not inactive and cur == marks[newact] and not rev: | |
866 | activate(repo, newact) |
|
871 | activate(repo, newact) | |
867 | elif cur != tgt and newact == repo._activebookmark: |
|
872 | elif cur != tgt and newact == repo._activebookmark: | |
868 | deactivate(repo) |
|
873 | deactivate(repo) | |
869 |
|
874 | |||
870 | def _printbookmarks(ui, repo, bmarks, **opts): |
|
875 | def _printbookmarks(ui, repo, bmarks, **opts): | |
871 | """private method to print bookmarks |
|
876 | """private method to print bookmarks | |
872 |
|
877 | |||
873 | Provides a way for extensions to control how bookmarks are printed (e.g. |
|
878 | Provides a way for extensions to control how bookmarks are printed (e.g. | |
874 | prepend or postpend names) |
|
879 | prepend or postpend names) | |
875 | """ |
|
880 | """ | |
876 | opts = pycompat.byteskwargs(opts) |
|
881 | opts = pycompat.byteskwargs(opts) | |
877 | fm = ui.formatter('bookmarks', opts) |
|
882 | fm = ui.formatter('bookmarks', opts) | |
878 | hexfn = fm.hexfunc |
|
883 | hexfn = fm.hexfunc | |
879 | if len(bmarks) == 0 and fm.isplain(): |
|
884 | if len(bmarks) == 0 and fm.isplain(): | |
880 | ui.status(_("no bookmarks set\n")) |
|
885 | ui.status(_("no bookmarks set\n")) | |
881 | for bmark, (n, prefix, label) in sorted(bmarks.iteritems()): |
|
886 | for bmark, (n, prefix, label) in sorted(bmarks.iteritems()): | |
882 | fm.startitem() |
|
887 | fm.startitem() | |
883 | if not ui.quiet: |
|
888 | if not ui.quiet: | |
884 | fm.plain(' %s ' % prefix, label=label) |
|
889 | fm.plain(' %s ' % prefix, label=label) | |
885 | fm.write('bookmark', '%s', bmark, label=label) |
|
890 | fm.write('bookmark', '%s', bmark, label=label) | |
886 | pad = " " * (25 - encoding.colwidth(bmark)) |
|
891 | pad = " " * (25 - encoding.colwidth(bmark)) | |
887 | fm.condwrite(not ui.quiet, 'rev node', pad + ' %d:%s', |
|
892 | fm.condwrite(not ui.quiet, 'rev node', pad + ' %d:%s', | |
888 | repo.changelog.rev(n), hexfn(n), label=label) |
|
893 | repo.changelog.rev(n), hexfn(n), label=label) | |
889 | fm.data(active=(activebookmarklabel in label)) |
|
894 | fm.data(active=(activebookmarklabel in label)) | |
890 | fm.plain('\n') |
|
895 | fm.plain('\n') | |
891 | fm.end() |
|
896 | fm.end() | |
892 |
|
897 | |||
893 | def printbookmarks(ui, repo, **opts): |
|
898 | def printbookmarks(ui, repo, **opts): | |
894 | """print bookmarks to a formatter |
|
899 | """print bookmarks to a formatter | |
895 |
|
900 | |||
896 | Provides a way for extensions to control how bookmarks are printed. |
|
901 | Provides a way for extensions to control how bookmarks are printed. | |
897 | """ |
|
902 | """ | |
898 | marks = repo._bookmarks |
|
903 | marks = repo._bookmarks | |
899 | bmarks = {} |
|
904 | bmarks = {} | |
900 | for bmark, n in sorted(marks.iteritems()): |
|
905 | for bmark, n in sorted(marks.iteritems()): | |
901 | active = repo._activebookmark |
|
906 | active = repo._activebookmark | |
902 | if bmark == active: |
|
907 | if bmark == active: | |
903 | prefix, label = '*', activebookmarklabel |
|
908 | prefix, label = '*', activebookmarklabel | |
904 | else: |
|
909 | else: | |
905 | prefix, label = ' ', '' |
|
910 | prefix, label = ' ', '' | |
906 |
|
911 | |||
907 | bmarks[bmark] = (n, prefix, label) |
|
912 | bmarks[bmark] = (n, prefix, label) | |
908 | _printbookmarks(ui, repo, bmarks, **opts) |
|
913 | _printbookmarks(ui, repo, bmarks, **opts) | |
909 |
|
914 | |||
910 | def preparehookargs(name, old, new): |
|
915 | def preparehookargs(name, old, new): | |
911 | if new is None: |
|
916 | if new is None: | |
912 | new = '' |
|
917 | new = '' | |
913 | if old is None: |
|
918 | if old is None: | |
914 | old = '' |
|
919 | old = '' | |
915 | return {'bookmark': name, |
|
920 | return {'bookmark': name, | |
916 | 'node': hex(new), |
|
921 | 'node': hex(new), | |
917 | 'oldnode': hex(old)} |
|
922 | 'oldnode': hex(old)} |
@@ -1,200 +1,201 b'' | |||||
1 | Tests for access level on hidden commits by various commands on based of their |
|
1 | Tests for access level on hidden commits by various commands on based of their | |
2 | type. |
|
2 | type. | |
3 |
|
3 | |||
4 | Setting the required config to start this |
|
4 | Setting the required config to start this | |
5 |
|
5 | |||
6 | $ cat >> $HGRCPATH <<EOF |
|
6 | $ cat >> $HGRCPATH <<EOF | |
7 | > [experimental] |
|
7 | > [experimental] | |
8 | > evolution=createmarkers, allowunstable |
|
8 | > evolution=createmarkers, allowunstable | |
9 | > directaccess=True |
|
9 | > directaccess=True | |
10 | > directaccess.revnums=True |
|
10 | > directaccess.revnums=True | |
11 | > [extensions] |
|
11 | > [extensions] | |
12 | > amend = |
|
12 | > amend = | |
13 | > EOF |
|
13 | > EOF | |
14 |
|
14 | |||
15 | $ hg init repo |
|
15 | $ hg init repo | |
16 | $ cd repo |
|
16 | $ cd repo | |
17 | $ for ch in a b c; do touch $ch; echo "foo" >> $ch; hg ci -Aqm "Added "$ch; done |
|
17 | $ for ch in a b c; do touch $ch; echo "foo" >> $ch; hg ci -Aqm "Added "$ch; done | |
18 |
|
18 | |||
19 | $ hg log -G -T '{rev}:{node} {desc}' --hidden |
|
19 | $ hg log -G -T '{rev}:{node} {desc}' --hidden | |
20 | @ 2:28ad74487de9599d00d81085be739c61fc340652 Added c |
|
20 | @ 2:28ad74487de9599d00d81085be739c61fc340652 Added c | |
21 | | |
|
21 | | | |
22 | o 1:29becc82797a4bc11ec8880b58eaecd2ab3e7760 Added b |
|
22 | o 1:29becc82797a4bc11ec8880b58eaecd2ab3e7760 Added b | |
23 | | |
|
23 | | | |
24 | o 0:18d04c59bb5d2d4090ad9a5b59bd6274adb63add Added a |
|
24 | o 0:18d04c59bb5d2d4090ad9a5b59bd6274adb63add Added a | |
25 |
|
25 | |||
26 | $ echo "bar" >> c |
|
26 | $ echo "bar" >> c | |
27 | $ hg amend |
|
27 | $ hg amend | |
28 |
|
28 | |||
29 | $ hg log -G -T '{rev}:{node} {desc}' --hidden |
|
29 | $ hg log -G -T '{rev}:{node} {desc}' --hidden | |
30 | @ 3:2443a0e664694756d8b435d06b6ad84f941b6fc0 Added c |
|
30 | @ 3:2443a0e664694756d8b435d06b6ad84f941b6fc0 Added c | |
31 | | |
|
31 | | | |
32 | | x 2:28ad74487de9599d00d81085be739c61fc340652 Added c |
|
32 | | x 2:28ad74487de9599d00d81085be739c61fc340652 Added c | |
33 | |/ |
|
33 | |/ | |
34 | o 1:29becc82797a4bc11ec8880b58eaecd2ab3e7760 Added b |
|
34 | o 1:29becc82797a4bc11ec8880b58eaecd2ab3e7760 Added b | |
35 | | |
|
35 | | | |
36 | o 0:18d04c59bb5d2d4090ad9a5b59bd6274adb63add Added a |
|
36 | o 0:18d04c59bb5d2d4090ad9a5b59bd6274adb63add Added a | |
37 |
|
37 | |||
38 | Testing read only commands on the hidden revision |
|
38 | Testing read only commands on the hidden revision | |
39 |
|
39 | |||
40 | Testing with rev number |
|
40 | Testing with rev number | |
41 |
|
41 | |||
42 | $ hg exp 2 --config experimental.directaccess.revnums=False |
|
42 | $ hg exp 2 --config experimental.directaccess.revnums=False | |
43 | abort: hidden revision '2' was rewritten as: 2443a0e66469! |
|
43 | abort: hidden revision '2' was rewritten as: 2443a0e66469! | |
44 | (use --hidden to access hidden revisions) |
|
44 | (use --hidden to access hidden revisions) | |
45 | [255] |
|
45 | [255] | |
46 |
|
46 | |||
47 | $ hg exp 2 |
|
47 | $ hg exp 2 | |
48 | # HG changeset patch |
|
48 | # HG changeset patch | |
49 | # User test |
|
49 | # User test | |
50 | # Date 0 0 |
|
50 | # Date 0 0 | |
51 | # Thu Jan 01 00:00:00 1970 +0000 |
|
51 | # Thu Jan 01 00:00:00 1970 +0000 | |
52 | # Node ID 28ad74487de9599d00d81085be739c61fc340652 |
|
52 | # Node ID 28ad74487de9599d00d81085be739c61fc340652 | |
53 | # Parent 29becc82797a4bc11ec8880b58eaecd2ab3e7760 |
|
53 | # Parent 29becc82797a4bc11ec8880b58eaecd2ab3e7760 | |
54 | Added c |
|
54 | Added c | |
55 |
|
55 | |||
56 | diff -r 29becc82797a -r 28ad74487de9 c |
|
56 | diff -r 29becc82797a -r 28ad74487de9 c | |
57 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
57 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
58 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 |
|
58 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 | |
59 | @@ -0,0 +1,1 @@ |
|
59 | @@ -0,0 +1,1 @@ | |
60 | +foo |
|
60 | +foo | |
61 |
|
61 | |||
62 | $ hg log -r 2 |
|
62 | $ hg log -r 2 | |
63 | changeset: 2:28ad74487de9 |
|
63 | changeset: 2:28ad74487de9 | |
64 | user: test |
|
64 | user: test | |
65 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
65 | date: Thu Jan 01 00:00:00 1970 +0000 | |
66 | obsolete: rewritten using amend as 3:2443a0e66469 |
|
66 | obsolete: rewritten using amend as 3:2443a0e66469 | |
67 | summary: Added c |
|
67 | summary: Added c | |
68 |
|
68 | |||
69 | $ hg identify -r 2 |
|
69 | $ hg identify -r 2 | |
70 | 28ad74487de9 |
|
70 | 28ad74487de9 | |
71 |
|
71 | |||
72 | $ hg status --change 2 |
|
72 | $ hg status --change 2 | |
73 | A c |
|
73 | A c | |
74 |
|
74 | |||
75 | $ hg status --change 2 --config experimental.directaccess.revnums=False |
|
75 | $ hg status --change 2 --config experimental.directaccess.revnums=False | |
76 | abort: hidden revision '2' was rewritten as: 2443a0e66469! |
|
76 | abort: hidden revision '2' was rewritten as: 2443a0e66469! | |
77 | (use --hidden to access hidden revisions) |
|
77 | (use --hidden to access hidden revisions) | |
78 | [255] |
|
78 | [255] | |
79 |
|
79 | |||
80 | $ hg diff -c 2 |
|
80 | $ hg diff -c 2 | |
81 | diff -r 29becc82797a -r 28ad74487de9 c |
|
81 | diff -r 29becc82797a -r 28ad74487de9 c | |
82 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
82 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
83 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 |
|
83 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 | |
84 | @@ -0,0 +1,1 @@ |
|
84 | @@ -0,0 +1,1 @@ | |
85 | +foo |
|
85 | +foo | |
86 |
|
86 | |||
87 | Testing with hash |
|
87 | Testing with hash | |
88 |
|
88 | |||
89 | `hg export` |
|
89 | `hg export` | |
90 |
|
90 | |||
91 | $ hg exp 28ad74 |
|
91 | $ hg exp 28ad74 | |
92 | # HG changeset patch |
|
92 | # HG changeset patch | |
93 | # User test |
|
93 | # User test | |
94 | # Date 0 0 |
|
94 | # Date 0 0 | |
95 | # Thu Jan 01 00:00:00 1970 +0000 |
|
95 | # Thu Jan 01 00:00:00 1970 +0000 | |
96 | # Node ID 28ad74487de9599d00d81085be739c61fc340652 |
|
96 | # Node ID 28ad74487de9599d00d81085be739c61fc340652 | |
97 | # Parent 29becc82797a4bc11ec8880b58eaecd2ab3e7760 |
|
97 | # Parent 29becc82797a4bc11ec8880b58eaecd2ab3e7760 | |
98 | Added c |
|
98 | Added c | |
99 |
|
99 | |||
100 | diff -r 29becc82797a -r 28ad74487de9 c |
|
100 | diff -r 29becc82797a -r 28ad74487de9 c | |
101 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
101 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
102 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 |
|
102 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 | |
103 | @@ -0,0 +1,1 @@ |
|
103 | @@ -0,0 +1,1 @@ | |
104 | +foo |
|
104 | +foo | |
105 |
|
105 | |||
106 | `hg log` |
|
106 | `hg log` | |
107 |
|
107 | |||
108 | $ hg log -r 28ad74 |
|
108 | $ hg log -r 28ad74 | |
109 | changeset: 2:28ad74487de9 |
|
109 | changeset: 2:28ad74487de9 | |
110 | user: test |
|
110 | user: test | |
111 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
111 | date: Thu Jan 01 00:00:00 1970 +0000 | |
112 | obsolete: rewritten using amend as 3:2443a0e66469 |
|
112 | obsolete: rewritten using amend as 3:2443a0e66469 | |
113 | summary: Added c |
|
113 | summary: Added c | |
114 |
|
114 | |||
115 | `hg cat` |
|
115 | `hg cat` | |
116 |
|
116 | |||
117 | $ hg cat -r 28ad74 c |
|
117 | $ hg cat -r 28ad74 c | |
118 | foo |
|
118 | foo | |
119 |
|
119 | |||
120 | `hg diff` |
|
120 | `hg diff` | |
121 |
|
121 | |||
122 | $ hg diff -c 28ad74 |
|
122 | $ hg diff -c 28ad74 | |
123 | diff -r 29becc82797a -r 28ad74487de9 c |
|
123 | diff -r 29becc82797a -r 28ad74487de9 c | |
124 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
124 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
125 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 |
|
125 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 | |
126 | @@ -0,0 +1,1 @@ |
|
126 | @@ -0,0 +1,1 @@ | |
127 | +foo |
|
127 | +foo | |
128 |
|
128 | |||
129 | `hg files` |
|
129 | `hg files` | |
130 |
|
130 | |||
131 | $ hg files -r 28ad74 |
|
131 | $ hg files -r 28ad74 | |
132 | a |
|
132 | a | |
133 | b |
|
133 | b | |
134 | c |
|
134 | c | |
135 |
|
135 | |||
136 | `hg identify` |
|
136 | `hg identify` | |
137 |
|
137 | |||
138 | $ hg identify -r 28ad74 |
|
138 | $ hg identify -r 28ad74 | |
139 | 28ad74487de9 |
|
139 | 28ad74487de9 | |
140 |
|
140 | |||
141 | `hg annotate` |
|
141 | `hg annotate` | |
142 |
|
142 | |||
143 | $ hg annotate -r 28ad74 a |
|
143 | $ hg annotate -r 28ad74 a | |
144 | 0: foo |
|
144 | 0: foo | |
145 |
|
145 | |||
146 | `hg status` |
|
146 | `hg status` | |
147 |
|
147 | |||
148 | $ hg status --change 28ad74 |
|
148 | $ hg status --change 28ad74 | |
149 | A c |
|
149 | A c | |
150 |
|
150 | |||
151 | `hg archive` |
|
151 | `hg archive` | |
152 |
|
152 | |||
153 | This should not throw error |
|
153 | This should not throw error | |
154 | $ hg archive -r 28ad74 foo |
|
154 | $ hg archive -r 28ad74 foo | |
155 |
|
155 | |||
156 | `hg update` |
|
156 | `hg update` | |
157 |
|
157 | |||
158 | $ hg up 28ad74 |
|
158 | $ hg up 28ad74 | |
159 | updating to a hidden changeset 28ad74487de9 |
|
159 | updating to a hidden changeset 28ad74487de9 | |
160 | (hidden revision '28ad74487de9' was rewritten as: 2443a0e66469) |
|
160 | (hidden revision '28ad74487de9' was rewritten as: 2443a0e66469) | |
161 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
161 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
162 |
|
162 | |||
163 | $ hg up 3 |
|
163 | $ hg up 3 | |
164 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
164 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
165 |
|
165 | |||
166 | $ hg up |
|
166 | $ hg up | |
167 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
167 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
168 |
|
168 | |||
169 | `hg revert` |
|
169 | `hg revert` | |
170 |
|
170 | |||
171 | $ hg revert -r 28ad74 --all |
|
171 | $ hg revert -r 28ad74 --all | |
172 | reverting c |
|
172 | reverting c | |
173 |
|
173 | |||
174 | $ hg diff |
|
174 | $ hg diff | |
175 | diff -r 2443a0e66469 c |
|
175 | diff -r 2443a0e66469 c | |
176 | --- a/c Thu Jan 01 00:00:00 1970 +0000 |
|
176 | --- a/c Thu Jan 01 00:00:00 1970 +0000 | |
177 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 |
|
177 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 | |
178 | @@ -1,2 +1,1 @@ |
|
178 | @@ -1,2 +1,1 @@ | |
179 | foo |
|
179 | foo | |
180 | -bar |
|
180 | -bar | |
181 |
|
181 | |||
182 | Commands with undefined cmdtype should not work right now |
|
182 | Commands with undefined cmdtype should not work right now | |
183 |
|
183 | |||
184 | $ hg phase -r 28ad74 |
|
184 | $ hg phase -r 28ad74 | |
185 | abort: hidden revision '28ad74' was rewritten as: 2443a0e66469! |
|
185 | abort: hidden revision '28ad74' was rewritten as: 2443a0e66469! | |
186 | (use --hidden to access hidden revisions) |
|
186 | (use --hidden to access hidden revisions) | |
187 | [255] |
|
187 | [255] | |
188 |
|
188 | |||
189 | $ hg phase -r 2 |
|
189 | $ hg phase -r 2 | |
190 | abort: hidden revision '2' was rewritten as: 2443a0e66469! |
|
190 | abort: hidden revision '2' was rewritten as: 2443a0e66469! | |
191 | (use --hidden to access hidden revisions) |
|
191 | (use --hidden to access hidden revisions) | |
192 | [255] |
|
192 | [255] | |
193 |
|
193 | |||
194 | Setting a bookmark will make that changeset unhidden, so this should come in end |
|
194 | Setting a bookmark will make that changeset unhidden, so this should come in end | |
195 |
|
195 | |||
196 | $ hg bookmarks -r 28ad74 book |
|
196 | $ hg bookmarks -r 28ad74 book | |
197 | bookmarking hidden changeset 28ad74487de9 |
|
197 | bookmarking hidden changeset 28ad74487de9 | |
|
198 | (hidden revision '28ad74487de9' was rewritten as: 2443a0e66469) | |||
198 |
|
199 | |||
199 | $ hg bookmarks |
|
200 | $ hg bookmarks | |
200 | book 2:28ad74487de9 |
|
201 | book 2:28ad74487de9 |
@@ -1,2615 +1,2617 b'' | |||||
1 | Log on empty repository: checking consistency |
|
1 | Log on empty repository: checking consistency | |
2 |
|
2 | |||
3 | $ hg init empty |
|
3 | $ hg init empty | |
4 | $ cd empty |
|
4 | $ cd empty | |
5 | $ hg log |
|
5 | $ hg log | |
6 | $ hg log -r 1 |
|
6 | $ hg log -r 1 | |
7 | abort: unknown revision '1'! |
|
7 | abort: unknown revision '1'! | |
8 | [255] |
|
8 | [255] | |
9 | $ hg log -r -1:0 |
|
9 | $ hg log -r -1:0 | |
10 | abort: unknown revision '-1'! |
|
10 | abort: unknown revision '-1'! | |
11 | [255] |
|
11 | [255] | |
12 | $ hg log -r 'branch(name)' |
|
12 | $ hg log -r 'branch(name)' | |
13 | abort: unknown revision 'name'! |
|
13 | abort: unknown revision 'name'! | |
14 | [255] |
|
14 | [255] | |
15 | $ hg log -r null -q |
|
15 | $ hg log -r null -q | |
16 | -1:000000000000 |
|
16 | -1:000000000000 | |
17 |
|
17 | |||
18 | $ cd .. |
|
18 | $ cd .. | |
19 |
|
19 | |||
20 | The g is crafted to have 2 filelog topological heads in a linear |
|
20 | The g is crafted to have 2 filelog topological heads in a linear | |
21 | changeset graph |
|
21 | changeset graph | |
22 |
|
22 | |||
23 | $ hg init a |
|
23 | $ hg init a | |
24 | $ cd a |
|
24 | $ cd a | |
25 | $ echo a > a |
|
25 | $ echo a > a | |
26 | $ echo f > f |
|
26 | $ echo f > f | |
27 | $ hg ci -Ama -d '1 0' |
|
27 | $ hg ci -Ama -d '1 0' | |
28 | adding a |
|
28 | adding a | |
29 | adding f |
|
29 | adding f | |
30 |
|
30 | |||
31 | $ hg cp a b |
|
31 | $ hg cp a b | |
32 | $ hg cp f g |
|
32 | $ hg cp f g | |
33 | $ hg ci -mb -d '2 0' |
|
33 | $ hg ci -mb -d '2 0' | |
34 |
|
34 | |||
35 | $ mkdir dir |
|
35 | $ mkdir dir | |
36 | $ hg mv b dir |
|
36 | $ hg mv b dir | |
37 | $ echo g >> g |
|
37 | $ echo g >> g | |
38 | $ echo f >> f |
|
38 | $ echo f >> f | |
39 | $ hg ci -mc -d '3 0' |
|
39 | $ hg ci -mc -d '3 0' | |
40 |
|
40 | |||
41 | $ hg mv a b |
|
41 | $ hg mv a b | |
42 | $ hg cp -f f g |
|
42 | $ hg cp -f f g | |
43 | $ echo a > d |
|
43 | $ echo a > d | |
44 | $ hg add d |
|
44 | $ hg add d | |
45 | $ hg ci -md -d '4 0' |
|
45 | $ hg ci -md -d '4 0' | |
46 |
|
46 | |||
47 | $ hg mv dir/b e |
|
47 | $ hg mv dir/b e | |
48 | $ hg ci -me -d '5 0' |
|
48 | $ hg ci -me -d '5 0' | |
49 |
|
49 | |||
50 | Make sure largefiles doesn't interfere with logging a regular file |
|
50 | Make sure largefiles doesn't interfere with logging a regular file | |
51 | $ hg --debug log a -T '{rev}: {desc}\n' --config extensions.largefiles= |
|
51 | $ hg --debug log a -T '{rev}: {desc}\n' --config extensions.largefiles= | |
52 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) |
|
52 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) | |
53 | updated patterns: .hglf/a, a |
|
53 | updated patterns: .hglf/a, a | |
54 | 0: a |
|
54 | 0: a | |
55 | $ hg log a |
|
55 | $ hg log a | |
56 | changeset: 0:9161b9aeaf16 |
|
56 | changeset: 0:9161b9aeaf16 | |
57 | user: test |
|
57 | user: test | |
58 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
58 | date: Thu Jan 01 00:00:01 1970 +0000 | |
59 | summary: a |
|
59 | summary: a | |
60 |
|
60 | |||
61 | $ hg log glob:a* |
|
61 | $ hg log glob:a* | |
62 | changeset: 3:2ca5ba701980 |
|
62 | changeset: 3:2ca5ba701980 | |
63 | user: test |
|
63 | user: test | |
64 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
64 | date: Thu Jan 01 00:00:04 1970 +0000 | |
65 | summary: d |
|
65 | summary: d | |
66 |
|
66 | |||
67 | changeset: 0:9161b9aeaf16 |
|
67 | changeset: 0:9161b9aeaf16 | |
68 | user: test |
|
68 | user: test | |
69 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
69 | date: Thu Jan 01 00:00:01 1970 +0000 | |
70 | summary: a |
|
70 | summary: a | |
71 |
|
71 | |||
72 | $ hg --debug log glob:a* -T '{rev}: {desc}\n' --config extensions.largefiles= |
|
72 | $ hg --debug log glob:a* -T '{rev}: {desc}\n' --config extensions.largefiles= | |
73 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) |
|
73 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) | |
74 | updated patterns: glob:.hglf/a*, glob:a* |
|
74 | updated patterns: glob:.hglf/a*, glob:a* | |
75 | 3: d |
|
75 | 3: d | |
76 | 0: a |
|
76 | 0: a | |
77 |
|
77 | |||
78 | log on directory |
|
78 | log on directory | |
79 |
|
79 | |||
80 | $ hg log dir |
|
80 | $ hg log dir | |
81 | changeset: 4:7e4639b4691b |
|
81 | changeset: 4:7e4639b4691b | |
82 | tag: tip |
|
82 | tag: tip | |
83 | user: test |
|
83 | user: test | |
84 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
84 | date: Thu Jan 01 00:00:05 1970 +0000 | |
85 | summary: e |
|
85 | summary: e | |
86 |
|
86 | |||
87 | changeset: 2:f8954cd4dc1f |
|
87 | changeset: 2:f8954cd4dc1f | |
88 | user: test |
|
88 | user: test | |
89 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
89 | date: Thu Jan 01 00:00:03 1970 +0000 | |
90 | summary: c |
|
90 | summary: c | |
91 |
|
91 | |||
92 | $ hg log somethingthatdoesntexist dir |
|
92 | $ hg log somethingthatdoesntexist dir | |
93 | changeset: 4:7e4639b4691b |
|
93 | changeset: 4:7e4639b4691b | |
94 | tag: tip |
|
94 | tag: tip | |
95 | user: test |
|
95 | user: test | |
96 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
96 | date: Thu Jan 01 00:00:05 1970 +0000 | |
97 | summary: e |
|
97 | summary: e | |
98 |
|
98 | |||
99 | changeset: 2:f8954cd4dc1f |
|
99 | changeset: 2:f8954cd4dc1f | |
100 | user: test |
|
100 | user: test | |
101 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
101 | date: Thu Jan 01 00:00:03 1970 +0000 | |
102 | summary: c |
|
102 | summary: c | |
103 |
|
103 | |||
104 |
|
104 | |||
105 | -X, with explicit path |
|
105 | -X, with explicit path | |
106 |
|
106 | |||
107 | $ hg log a -X a |
|
107 | $ hg log a -X a | |
108 |
|
108 | |||
109 | -f, non-existent directory |
|
109 | -f, non-existent directory | |
110 |
|
110 | |||
111 | $ hg log -f dir |
|
111 | $ hg log -f dir | |
112 | abort: cannot follow file not in parent revision: "dir" |
|
112 | abort: cannot follow file not in parent revision: "dir" | |
113 | [255] |
|
113 | [255] | |
114 |
|
114 | |||
115 | -f, directory |
|
115 | -f, directory | |
116 |
|
116 | |||
117 | $ hg up -q 3 |
|
117 | $ hg up -q 3 | |
118 | $ hg log -f dir |
|
118 | $ hg log -f dir | |
119 | changeset: 2:f8954cd4dc1f |
|
119 | changeset: 2:f8954cd4dc1f | |
120 | user: test |
|
120 | user: test | |
121 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
121 | date: Thu Jan 01 00:00:03 1970 +0000 | |
122 | summary: c |
|
122 | summary: c | |
123 |
|
123 | |||
124 | -f, directory with --patch |
|
124 | -f, directory with --patch | |
125 |
|
125 | |||
126 | $ hg log -f dir -p |
|
126 | $ hg log -f dir -p | |
127 | changeset: 2:f8954cd4dc1f |
|
127 | changeset: 2:f8954cd4dc1f | |
128 | user: test |
|
128 | user: test | |
129 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
129 | date: Thu Jan 01 00:00:03 1970 +0000 | |
130 | summary: c |
|
130 | summary: c | |
131 |
|
131 | |||
132 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b |
|
132 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b | |
133 | --- /dev/null* (glob) |
|
133 | --- /dev/null* (glob) | |
134 | +++ b/dir/b* (glob) |
|
134 | +++ b/dir/b* (glob) | |
135 | @@ -0,0 +1,1 @@ |
|
135 | @@ -0,0 +1,1 @@ | |
136 | +a |
|
136 | +a | |
137 |
|
137 | |||
138 |
|
138 | |||
139 | -f, pattern |
|
139 | -f, pattern | |
140 |
|
140 | |||
141 | $ hg log -f -I 'dir**' -p |
|
141 | $ hg log -f -I 'dir**' -p | |
142 | changeset: 2:f8954cd4dc1f |
|
142 | changeset: 2:f8954cd4dc1f | |
143 | user: test |
|
143 | user: test | |
144 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
144 | date: Thu Jan 01 00:00:03 1970 +0000 | |
145 | summary: c |
|
145 | summary: c | |
146 |
|
146 | |||
147 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b |
|
147 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b | |
148 | --- /dev/null* (glob) |
|
148 | --- /dev/null* (glob) | |
149 | +++ b/dir/b* (glob) |
|
149 | +++ b/dir/b* (glob) | |
150 | @@ -0,0 +1,1 @@ |
|
150 | @@ -0,0 +1,1 @@ | |
151 | +a |
|
151 | +a | |
152 |
|
152 | |||
153 | $ hg up -q 4 |
|
153 | $ hg up -q 4 | |
154 |
|
154 | |||
155 | -f, a wrong style |
|
155 | -f, a wrong style | |
156 |
|
156 | |||
157 | $ hg log -f -l1 --style something |
|
157 | $ hg log -f -l1 --style something | |
158 | abort: style 'something' not found |
|
158 | abort: style 'something' not found | |
159 | (available styles: bisect, changelog, compact, default, phases, show, status, xml) |
|
159 | (available styles: bisect, changelog, compact, default, phases, show, status, xml) | |
160 | [255] |
|
160 | [255] | |
161 |
|
161 | |||
162 | -f, phases style |
|
162 | -f, phases style | |
163 |
|
163 | |||
164 |
|
164 | |||
165 | $ hg log -f -l1 --style phases |
|
165 | $ hg log -f -l1 --style phases | |
166 | changeset: 4:7e4639b4691b |
|
166 | changeset: 4:7e4639b4691b | |
167 | tag: tip |
|
167 | tag: tip | |
168 | phase: draft |
|
168 | phase: draft | |
169 | user: test |
|
169 | user: test | |
170 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
170 | date: Thu Jan 01 00:00:05 1970 +0000 | |
171 | summary: e |
|
171 | summary: e | |
172 |
|
172 | |||
173 |
|
173 | |||
174 | $ hg log -f -l1 --style phases -q |
|
174 | $ hg log -f -l1 --style phases -q | |
175 | 4:7e4639b4691b |
|
175 | 4:7e4639b4691b | |
176 |
|
176 | |||
177 | -f, but no args |
|
177 | -f, but no args | |
178 |
|
178 | |||
179 | $ hg log -f |
|
179 | $ hg log -f | |
180 | changeset: 4:7e4639b4691b |
|
180 | changeset: 4:7e4639b4691b | |
181 | tag: tip |
|
181 | tag: tip | |
182 | user: test |
|
182 | user: test | |
183 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
183 | date: Thu Jan 01 00:00:05 1970 +0000 | |
184 | summary: e |
|
184 | summary: e | |
185 |
|
185 | |||
186 | changeset: 3:2ca5ba701980 |
|
186 | changeset: 3:2ca5ba701980 | |
187 | user: test |
|
187 | user: test | |
188 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
188 | date: Thu Jan 01 00:00:04 1970 +0000 | |
189 | summary: d |
|
189 | summary: d | |
190 |
|
190 | |||
191 | changeset: 2:f8954cd4dc1f |
|
191 | changeset: 2:f8954cd4dc1f | |
192 | user: test |
|
192 | user: test | |
193 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
193 | date: Thu Jan 01 00:00:03 1970 +0000 | |
194 | summary: c |
|
194 | summary: c | |
195 |
|
195 | |||
196 | changeset: 1:d89b0a12d229 |
|
196 | changeset: 1:d89b0a12d229 | |
197 | user: test |
|
197 | user: test | |
198 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
198 | date: Thu Jan 01 00:00:02 1970 +0000 | |
199 | summary: b |
|
199 | summary: b | |
200 |
|
200 | |||
201 | changeset: 0:9161b9aeaf16 |
|
201 | changeset: 0:9161b9aeaf16 | |
202 | user: test |
|
202 | user: test | |
203 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
203 | date: Thu Jan 01 00:00:01 1970 +0000 | |
204 | summary: a |
|
204 | summary: a | |
205 |
|
205 | |||
206 |
|
206 | |||
207 | one rename |
|
207 | one rename | |
208 |
|
208 | |||
209 | $ hg up -q 2 |
|
209 | $ hg up -q 2 | |
210 | $ hg log -vf a |
|
210 | $ hg log -vf a | |
211 | changeset: 0:9161b9aeaf16 |
|
211 | changeset: 0:9161b9aeaf16 | |
212 | user: test |
|
212 | user: test | |
213 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
213 | date: Thu Jan 01 00:00:01 1970 +0000 | |
214 | files: a f |
|
214 | files: a f | |
215 | description: |
|
215 | description: | |
216 | a |
|
216 | a | |
217 |
|
217 | |||
218 |
|
218 | |||
219 |
|
219 | |||
220 | many renames |
|
220 | many renames | |
221 |
|
221 | |||
222 | $ hg up -q tip |
|
222 | $ hg up -q tip | |
223 | $ hg log -vf e |
|
223 | $ hg log -vf e | |
224 | changeset: 4:7e4639b4691b |
|
224 | changeset: 4:7e4639b4691b | |
225 | tag: tip |
|
225 | tag: tip | |
226 | user: test |
|
226 | user: test | |
227 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
227 | date: Thu Jan 01 00:00:05 1970 +0000 | |
228 | files: dir/b e |
|
228 | files: dir/b e | |
229 | description: |
|
229 | description: | |
230 | e |
|
230 | e | |
231 |
|
231 | |||
232 |
|
232 | |||
233 | changeset: 2:f8954cd4dc1f |
|
233 | changeset: 2:f8954cd4dc1f | |
234 | user: test |
|
234 | user: test | |
235 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
235 | date: Thu Jan 01 00:00:03 1970 +0000 | |
236 | files: b dir/b f g |
|
236 | files: b dir/b f g | |
237 | description: |
|
237 | description: | |
238 | c |
|
238 | c | |
239 |
|
239 | |||
240 |
|
240 | |||
241 | changeset: 1:d89b0a12d229 |
|
241 | changeset: 1:d89b0a12d229 | |
242 | user: test |
|
242 | user: test | |
243 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
243 | date: Thu Jan 01 00:00:02 1970 +0000 | |
244 | files: b g |
|
244 | files: b g | |
245 | description: |
|
245 | description: | |
246 | b |
|
246 | b | |
247 |
|
247 | |||
248 |
|
248 | |||
249 | changeset: 0:9161b9aeaf16 |
|
249 | changeset: 0:9161b9aeaf16 | |
250 | user: test |
|
250 | user: test | |
251 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
251 | date: Thu Jan 01 00:00:01 1970 +0000 | |
252 | files: a f |
|
252 | files: a f | |
253 | description: |
|
253 | description: | |
254 | a |
|
254 | a | |
255 |
|
255 | |||
256 |
|
256 | |||
257 |
|
257 | |||
258 |
|
258 | |||
259 | log -pf dir/b |
|
259 | log -pf dir/b | |
260 |
|
260 | |||
261 | $ hg up -q 3 |
|
261 | $ hg up -q 3 | |
262 | $ hg log -pf dir/b |
|
262 | $ hg log -pf dir/b | |
263 | changeset: 2:f8954cd4dc1f |
|
263 | changeset: 2:f8954cd4dc1f | |
264 | user: test |
|
264 | user: test | |
265 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
265 | date: Thu Jan 01 00:00:03 1970 +0000 | |
266 | summary: c |
|
266 | summary: c | |
267 |
|
267 | |||
268 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b |
|
268 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b | |
269 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
269 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
270 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 |
|
270 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 | |
271 | @@ -0,0 +1,1 @@ |
|
271 | @@ -0,0 +1,1 @@ | |
272 | +a |
|
272 | +a | |
273 |
|
273 | |||
274 | changeset: 1:d89b0a12d229 |
|
274 | changeset: 1:d89b0a12d229 | |
275 | user: test |
|
275 | user: test | |
276 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
276 | date: Thu Jan 01 00:00:02 1970 +0000 | |
277 | summary: b |
|
277 | summary: b | |
278 |
|
278 | |||
279 | diff -r 9161b9aeaf16 -r d89b0a12d229 b |
|
279 | diff -r 9161b9aeaf16 -r d89b0a12d229 b | |
280 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
280 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
281 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 |
|
281 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 | |
282 | @@ -0,0 +1,1 @@ |
|
282 | @@ -0,0 +1,1 @@ | |
283 | +a |
|
283 | +a | |
284 |
|
284 | |||
285 | changeset: 0:9161b9aeaf16 |
|
285 | changeset: 0:9161b9aeaf16 | |
286 | user: test |
|
286 | user: test | |
287 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
287 | date: Thu Jan 01 00:00:01 1970 +0000 | |
288 | summary: a |
|
288 | summary: a | |
289 |
|
289 | |||
290 | diff -r 000000000000 -r 9161b9aeaf16 a |
|
290 | diff -r 000000000000 -r 9161b9aeaf16 a | |
291 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
291 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
292 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
292 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
293 | @@ -0,0 +1,1 @@ |
|
293 | @@ -0,0 +1,1 @@ | |
294 | +a |
|
294 | +a | |
295 |
|
295 | |||
296 |
|
296 | |||
297 | log -pf b inside dir |
|
297 | log -pf b inside dir | |
298 |
|
298 | |||
299 | $ hg --cwd=dir log -pf b |
|
299 | $ hg --cwd=dir log -pf b | |
300 | changeset: 2:f8954cd4dc1f |
|
300 | changeset: 2:f8954cd4dc1f | |
301 | user: test |
|
301 | user: test | |
302 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
302 | date: Thu Jan 01 00:00:03 1970 +0000 | |
303 | summary: c |
|
303 | summary: c | |
304 |
|
304 | |||
305 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b |
|
305 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b | |
306 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
306 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
307 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 |
|
307 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 | |
308 | @@ -0,0 +1,1 @@ |
|
308 | @@ -0,0 +1,1 @@ | |
309 | +a |
|
309 | +a | |
310 |
|
310 | |||
311 | changeset: 1:d89b0a12d229 |
|
311 | changeset: 1:d89b0a12d229 | |
312 | user: test |
|
312 | user: test | |
313 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
313 | date: Thu Jan 01 00:00:02 1970 +0000 | |
314 | summary: b |
|
314 | summary: b | |
315 |
|
315 | |||
316 | diff -r 9161b9aeaf16 -r d89b0a12d229 b |
|
316 | diff -r 9161b9aeaf16 -r d89b0a12d229 b | |
317 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
317 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
318 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 |
|
318 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 | |
319 | @@ -0,0 +1,1 @@ |
|
319 | @@ -0,0 +1,1 @@ | |
320 | +a |
|
320 | +a | |
321 |
|
321 | |||
322 | changeset: 0:9161b9aeaf16 |
|
322 | changeset: 0:9161b9aeaf16 | |
323 | user: test |
|
323 | user: test | |
324 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
324 | date: Thu Jan 01 00:00:01 1970 +0000 | |
325 | summary: a |
|
325 | summary: a | |
326 |
|
326 | |||
327 | diff -r 000000000000 -r 9161b9aeaf16 a |
|
327 | diff -r 000000000000 -r 9161b9aeaf16 a | |
328 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
328 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
329 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
329 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
330 | @@ -0,0 +1,1 @@ |
|
330 | @@ -0,0 +1,1 @@ | |
331 | +a |
|
331 | +a | |
332 |
|
332 | |||
333 |
|
333 | |||
334 | log -pf, but no args |
|
334 | log -pf, but no args | |
335 |
|
335 | |||
336 | $ hg log -pf |
|
336 | $ hg log -pf | |
337 | changeset: 3:2ca5ba701980 |
|
337 | changeset: 3:2ca5ba701980 | |
338 | user: test |
|
338 | user: test | |
339 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
339 | date: Thu Jan 01 00:00:04 1970 +0000 | |
340 | summary: d |
|
340 | summary: d | |
341 |
|
341 | |||
342 | diff -r f8954cd4dc1f -r 2ca5ba701980 a |
|
342 | diff -r f8954cd4dc1f -r 2ca5ba701980 a | |
343 | --- a/a Thu Jan 01 00:00:03 1970 +0000 |
|
343 | --- a/a Thu Jan 01 00:00:03 1970 +0000 | |
344 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
344 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
345 | @@ -1,1 +0,0 @@ |
|
345 | @@ -1,1 +0,0 @@ | |
346 | -a |
|
346 | -a | |
347 | diff -r f8954cd4dc1f -r 2ca5ba701980 b |
|
347 | diff -r f8954cd4dc1f -r 2ca5ba701980 b | |
348 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
348 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
349 | +++ b/b Thu Jan 01 00:00:04 1970 +0000 |
|
349 | +++ b/b Thu Jan 01 00:00:04 1970 +0000 | |
350 | @@ -0,0 +1,1 @@ |
|
350 | @@ -0,0 +1,1 @@ | |
351 | +a |
|
351 | +a | |
352 | diff -r f8954cd4dc1f -r 2ca5ba701980 d |
|
352 | diff -r f8954cd4dc1f -r 2ca5ba701980 d | |
353 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
353 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
354 | +++ b/d Thu Jan 01 00:00:04 1970 +0000 |
|
354 | +++ b/d Thu Jan 01 00:00:04 1970 +0000 | |
355 | @@ -0,0 +1,1 @@ |
|
355 | @@ -0,0 +1,1 @@ | |
356 | +a |
|
356 | +a | |
357 | diff -r f8954cd4dc1f -r 2ca5ba701980 g |
|
357 | diff -r f8954cd4dc1f -r 2ca5ba701980 g | |
358 | --- a/g Thu Jan 01 00:00:03 1970 +0000 |
|
358 | --- a/g Thu Jan 01 00:00:03 1970 +0000 | |
359 | +++ b/g Thu Jan 01 00:00:04 1970 +0000 |
|
359 | +++ b/g Thu Jan 01 00:00:04 1970 +0000 | |
360 | @@ -1,2 +1,2 @@ |
|
360 | @@ -1,2 +1,2 @@ | |
361 | f |
|
361 | f | |
362 | -g |
|
362 | -g | |
363 | +f |
|
363 | +f | |
364 |
|
364 | |||
365 | changeset: 2:f8954cd4dc1f |
|
365 | changeset: 2:f8954cd4dc1f | |
366 | user: test |
|
366 | user: test | |
367 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
367 | date: Thu Jan 01 00:00:03 1970 +0000 | |
368 | summary: c |
|
368 | summary: c | |
369 |
|
369 | |||
370 | diff -r d89b0a12d229 -r f8954cd4dc1f b |
|
370 | diff -r d89b0a12d229 -r f8954cd4dc1f b | |
371 | --- a/b Thu Jan 01 00:00:02 1970 +0000 |
|
371 | --- a/b Thu Jan 01 00:00:02 1970 +0000 | |
372 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
372 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
373 | @@ -1,1 +0,0 @@ |
|
373 | @@ -1,1 +0,0 @@ | |
374 | -a |
|
374 | -a | |
375 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b |
|
375 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b | |
376 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
376 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
377 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 |
|
377 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 | |
378 | @@ -0,0 +1,1 @@ |
|
378 | @@ -0,0 +1,1 @@ | |
379 | +a |
|
379 | +a | |
380 | diff -r d89b0a12d229 -r f8954cd4dc1f f |
|
380 | diff -r d89b0a12d229 -r f8954cd4dc1f f | |
381 | --- a/f Thu Jan 01 00:00:02 1970 +0000 |
|
381 | --- a/f Thu Jan 01 00:00:02 1970 +0000 | |
382 | +++ b/f Thu Jan 01 00:00:03 1970 +0000 |
|
382 | +++ b/f Thu Jan 01 00:00:03 1970 +0000 | |
383 | @@ -1,1 +1,2 @@ |
|
383 | @@ -1,1 +1,2 @@ | |
384 | f |
|
384 | f | |
385 | +f |
|
385 | +f | |
386 | diff -r d89b0a12d229 -r f8954cd4dc1f g |
|
386 | diff -r d89b0a12d229 -r f8954cd4dc1f g | |
387 | --- a/g Thu Jan 01 00:00:02 1970 +0000 |
|
387 | --- a/g Thu Jan 01 00:00:02 1970 +0000 | |
388 | +++ b/g Thu Jan 01 00:00:03 1970 +0000 |
|
388 | +++ b/g Thu Jan 01 00:00:03 1970 +0000 | |
389 | @@ -1,1 +1,2 @@ |
|
389 | @@ -1,1 +1,2 @@ | |
390 | f |
|
390 | f | |
391 | +g |
|
391 | +g | |
392 |
|
392 | |||
393 | changeset: 1:d89b0a12d229 |
|
393 | changeset: 1:d89b0a12d229 | |
394 | user: test |
|
394 | user: test | |
395 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
395 | date: Thu Jan 01 00:00:02 1970 +0000 | |
396 | summary: b |
|
396 | summary: b | |
397 |
|
397 | |||
398 | diff -r 9161b9aeaf16 -r d89b0a12d229 b |
|
398 | diff -r 9161b9aeaf16 -r d89b0a12d229 b | |
399 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
399 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
400 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 |
|
400 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 | |
401 | @@ -0,0 +1,1 @@ |
|
401 | @@ -0,0 +1,1 @@ | |
402 | +a |
|
402 | +a | |
403 | diff -r 9161b9aeaf16 -r d89b0a12d229 g |
|
403 | diff -r 9161b9aeaf16 -r d89b0a12d229 g | |
404 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
404 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
405 | +++ b/g Thu Jan 01 00:00:02 1970 +0000 |
|
405 | +++ b/g Thu Jan 01 00:00:02 1970 +0000 | |
406 | @@ -0,0 +1,1 @@ |
|
406 | @@ -0,0 +1,1 @@ | |
407 | +f |
|
407 | +f | |
408 |
|
408 | |||
409 | changeset: 0:9161b9aeaf16 |
|
409 | changeset: 0:9161b9aeaf16 | |
410 | user: test |
|
410 | user: test | |
411 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
411 | date: Thu Jan 01 00:00:01 1970 +0000 | |
412 | summary: a |
|
412 | summary: a | |
413 |
|
413 | |||
414 | diff -r 000000000000 -r 9161b9aeaf16 a |
|
414 | diff -r 000000000000 -r 9161b9aeaf16 a | |
415 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
415 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
416 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
416 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
417 | @@ -0,0 +1,1 @@ |
|
417 | @@ -0,0 +1,1 @@ | |
418 | +a |
|
418 | +a | |
419 | diff -r 000000000000 -r 9161b9aeaf16 f |
|
419 | diff -r 000000000000 -r 9161b9aeaf16 f | |
420 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
420 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
421 | +++ b/f Thu Jan 01 00:00:01 1970 +0000 |
|
421 | +++ b/f Thu Jan 01 00:00:01 1970 +0000 | |
422 | @@ -0,0 +1,1 @@ |
|
422 | @@ -0,0 +1,1 @@ | |
423 | +f |
|
423 | +f | |
424 |
|
424 | |||
425 |
|
425 | |||
426 | log -vf dir/b |
|
426 | log -vf dir/b | |
427 |
|
427 | |||
428 | $ hg log -vf dir/b |
|
428 | $ hg log -vf dir/b | |
429 | changeset: 2:f8954cd4dc1f |
|
429 | changeset: 2:f8954cd4dc1f | |
430 | user: test |
|
430 | user: test | |
431 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
431 | date: Thu Jan 01 00:00:03 1970 +0000 | |
432 | files: b dir/b f g |
|
432 | files: b dir/b f g | |
433 | description: |
|
433 | description: | |
434 | c |
|
434 | c | |
435 |
|
435 | |||
436 |
|
436 | |||
437 | changeset: 1:d89b0a12d229 |
|
437 | changeset: 1:d89b0a12d229 | |
438 | user: test |
|
438 | user: test | |
439 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
439 | date: Thu Jan 01 00:00:02 1970 +0000 | |
440 | files: b g |
|
440 | files: b g | |
441 | description: |
|
441 | description: | |
442 | b |
|
442 | b | |
443 |
|
443 | |||
444 |
|
444 | |||
445 | changeset: 0:9161b9aeaf16 |
|
445 | changeset: 0:9161b9aeaf16 | |
446 | user: test |
|
446 | user: test | |
447 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
447 | date: Thu Jan 01 00:00:01 1970 +0000 | |
448 | files: a f |
|
448 | files: a f | |
449 | description: |
|
449 | description: | |
450 | a |
|
450 | a | |
451 |
|
451 | |||
452 |
|
452 | |||
453 |
|
453 | |||
454 |
|
454 | |||
455 | -f and multiple filelog heads |
|
455 | -f and multiple filelog heads | |
456 |
|
456 | |||
457 | $ hg up -q 2 |
|
457 | $ hg up -q 2 | |
458 | $ hg log -f g --template '{rev}\n' |
|
458 | $ hg log -f g --template '{rev}\n' | |
459 | 2 |
|
459 | 2 | |
460 | 1 |
|
460 | 1 | |
461 | 0 |
|
461 | 0 | |
462 | $ hg up -q tip |
|
462 | $ hg up -q tip | |
463 | $ hg log -f g --template '{rev}\n' |
|
463 | $ hg log -f g --template '{rev}\n' | |
464 | 3 |
|
464 | 3 | |
465 | 2 |
|
465 | 2 | |
466 | 0 |
|
466 | 0 | |
467 |
|
467 | |||
468 | follow files from the specified revisions (issue4959) |
|
468 | follow files from the specified revisions (issue4959) | |
469 |
|
469 | |||
470 | $ hg log -G -T '{rev} {files},{file_copies % " {source}->{name}"}\n' |
|
470 | $ hg log -G -T '{rev} {files},{file_copies % " {source}->{name}"}\n' | |
471 | @ 4 dir/b e, dir/b->e |
|
471 | @ 4 dir/b e, dir/b->e | |
472 | | |
|
472 | | | |
473 | o 3 a b d g, a->b f->g |
|
473 | o 3 a b d g, a->b f->g | |
474 | | |
|
474 | | | |
475 | o 2 b dir/b f g, b->dir/b |
|
475 | o 2 b dir/b f g, b->dir/b | |
476 | | |
|
476 | | | |
477 | o 1 b g, a->b f->g |
|
477 | o 1 b g, a->b f->g | |
478 | | |
|
478 | | | |
479 | o 0 a f, |
|
479 | o 0 a f, | |
480 |
|
480 | |||
481 |
|
481 | |||
482 | $ hg log -T '{rev}\n' -fr 4 e |
|
482 | $ hg log -T '{rev}\n' -fr 4 e | |
483 | 4 |
|
483 | 4 | |
484 | 2 |
|
484 | 2 | |
485 | 1 |
|
485 | 1 | |
486 | 0 |
|
486 | 0 | |
487 | $ hg log -T '{rev}\n' -fr 2 g |
|
487 | $ hg log -T '{rev}\n' -fr 2 g | |
488 | 2 |
|
488 | 2 | |
489 | 1 |
|
489 | 1 | |
490 | 0 |
|
490 | 0 | |
491 | $ hg log -T '{rev}\n' -fr '2+3' g |
|
491 | $ hg log -T '{rev}\n' -fr '2+3' g | |
492 | 3 |
|
492 | 3 | |
493 | 2 |
|
493 | 2 | |
494 | 1 |
|
494 | 1 | |
495 | 0 |
|
495 | 0 | |
496 |
|
496 | |||
497 | follow files from the specified revisions with glob patterns (issue5053) |
|
497 | follow files from the specified revisions with glob patterns (issue5053) | |
498 | (BROKEN: should follow copies from e@4) |
|
498 | (BROKEN: should follow copies from e@4) | |
499 |
|
499 | |||
500 | $ hg log -T '{rev}\n' -fr4 e -X '[abcdfg]' |
|
500 | $ hg log -T '{rev}\n' -fr4 e -X '[abcdfg]' | |
501 | 4 |
|
501 | 4 | |
502 | 2 (false !) |
|
502 | 2 (false !) | |
503 | 1 (false !) |
|
503 | 1 (false !) | |
504 | 0 (false !) |
|
504 | 0 (false !) | |
505 |
|
505 | |||
506 | follow files from the specified revisions with missing patterns |
|
506 | follow files from the specified revisions with missing patterns | |
507 | (BROKEN: should follow copies from e@4) |
|
507 | (BROKEN: should follow copies from e@4) | |
508 |
|
508 | |||
509 | $ hg log -T '{rev}\n' -fr4 e x |
|
509 | $ hg log -T '{rev}\n' -fr4 e x | |
510 | 4 |
|
510 | 4 | |
511 | 2 (false !) |
|
511 | 2 (false !) | |
512 | 1 (false !) |
|
512 | 1 (false !) | |
513 | 0 (false !) |
|
513 | 0 (false !) | |
514 |
|
514 | |||
515 | follow files from the specified revisions across copies with -p/--patch |
|
515 | follow files from the specified revisions across copies with -p/--patch | |
516 |
|
516 | |||
517 | $ hg log -T '== rev: {rev},{file_copies % " {source}->{name}"} ==\n' -fpr 4 e g |
|
517 | $ hg log -T '== rev: {rev},{file_copies % " {source}->{name}"} ==\n' -fpr 4 e g | |
518 | == rev: 4, dir/b->e == |
|
518 | == rev: 4, dir/b->e == | |
519 | diff -r 2ca5ba701980 -r 7e4639b4691b e |
|
519 | diff -r 2ca5ba701980 -r 7e4639b4691b e | |
520 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
520 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
521 | +++ b/e Thu Jan 01 00:00:05 1970 +0000 |
|
521 | +++ b/e Thu Jan 01 00:00:05 1970 +0000 | |
522 | @@ -0,0 +1,1 @@ |
|
522 | @@ -0,0 +1,1 @@ | |
523 | +a |
|
523 | +a | |
524 |
|
524 | |||
525 | == rev: 3, a->b f->g == |
|
525 | == rev: 3, a->b f->g == | |
526 | diff -r f8954cd4dc1f -r 2ca5ba701980 g |
|
526 | diff -r f8954cd4dc1f -r 2ca5ba701980 g | |
527 | --- a/g Thu Jan 01 00:00:03 1970 +0000 |
|
527 | --- a/g Thu Jan 01 00:00:03 1970 +0000 | |
528 | +++ b/g Thu Jan 01 00:00:04 1970 +0000 |
|
528 | +++ b/g Thu Jan 01 00:00:04 1970 +0000 | |
529 | @@ -1,2 +1,2 @@ |
|
529 | @@ -1,2 +1,2 @@ | |
530 | f |
|
530 | f | |
531 | -g |
|
531 | -g | |
532 | +f |
|
532 | +f | |
533 |
|
533 | |||
534 | == rev: 2, b->dir/b == |
|
534 | == rev: 2, b->dir/b == | |
535 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b |
|
535 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b | |
536 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
536 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
537 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 |
|
537 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 | |
538 | @@ -0,0 +1,1 @@ |
|
538 | @@ -0,0 +1,1 @@ | |
539 | +a |
|
539 | +a | |
540 | diff -r d89b0a12d229 -r f8954cd4dc1f f |
|
540 | diff -r d89b0a12d229 -r f8954cd4dc1f f | |
541 | --- a/f Thu Jan 01 00:00:02 1970 +0000 |
|
541 | --- a/f Thu Jan 01 00:00:02 1970 +0000 | |
542 | +++ b/f Thu Jan 01 00:00:03 1970 +0000 |
|
542 | +++ b/f Thu Jan 01 00:00:03 1970 +0000 | |
543 | @@ -1,1 +1,2 @@ |
|
543 | @@ -1,1 +1,2 @@ | |
544 | f |
|
544 | f | |
545 | +f |
|
545 | +f | |
546 |
|
546 | |||
547 | == rev: 1, a->b f->g == |
|
547 | == rev: 1, a->b f->g == | |
548 | diff -r 9161b9aeaf16 -r d89b0a12d229 b |
|
548 | diff -r 9161b9aeaf16 -r d89b0a12d229 b | |
549 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
549 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
550 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 |
|
550 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 | |
551 | @@ -0,0 +1,1 @@ |
|
551 | @@ -0,0 +1,1 @@ | |
552 | +a |
|
552 | +a | |
553 |
|
553 | |||
554 | == rev: 0, == |
|
554 | == rev: 0, == | |
555 | diff -r 000000000000 -r 9161b9aeaf16 a |
|
555 | diff -r 000000000000 -r 9161b9aeaf16 a | |
556 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
556 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
557 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
557 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
558 | @@ -0,0 +1,1 @@ |
|
558 | @@ -0,0 +1,1 @@ | |
559 | +a |
|
559 | +a | |
560 | diff -r 000000000000 -r 9161b9aeaf16 f |
|
560 | diff -r 000000000000 -r 9161b9aeaf16 f | |
561 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
561 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
562 | +++ b/f Thu Jan 01 00:00:01 1970 +0000 |
|
562 | +++ b/f Thu Jan 01 00:00:01 1970 +0000 | |
563 | @@ -0,0 +1,1 @@ |
|
563 | @@ -0,0 +1,1 @@ | |
564 | +f |
|
564 | +f | |
565 |
|
565 | |||
566 |
|
566 | |||
567 | log copies with --copies |
|
567 | log copies with --copies | |
568 |
|
568 | |||
569 | $ hg log -vC --template '{rev} {file_copies}\n' |
|
569 | $ hg log -vC --template '{rev} {file_copies}\n' | |
570 | 4 e (dir/b) |
|
570 | 4 e (dir/b) | |
571 | 3 b (a)g (f) |
|
571 | 3 b (a)g (f) | |
572 | 2 dir/b (b) |
|
572 | 2 dir/b (b) | |
573 | 1 b (a)g (f) |
|
573 | 1 b (a)g (f) | |
574 | 0 |
|
574 | 0 | |
575 |
|
575 | |||
576 | log copies switch without --copies, with old filecopy template |
|
576 | log copies switch without --copies, with old filecopy template | |
577 |
|
577 | |||
578 | $ hg log -v --template '{rev} {file_copies_switch%filecopy}\n' |
|
578 | $ hg log -v --template '{rev} {file_copies_switch%filecopy}\n' | |
579 | 4 |
|
579 | 4 | |
580 | 3 |
|
580 | 3 | |
581 | 2 |
|
581 | 2 | |
582 | 1 |
|
582 | 1 | |
583 | 0 |
|
583 | 0 | |
584 |
|
584 | |||
585 | log copies switch with --copies |
|
585 | log copies switch with --copies | |
586 |
|
586 | |||
587 | $ hg log -vC --template '{rev} {file_copies_switch}\n' |
|
587 | $ hg log -vC --template '{rev} {file_copies_switch}\n' | |
588 | 4 e (dir/b) |
|
588 | 4 e (dir/b) | |
589 | 3 b (a)g (f) |
|
589 | 3 b (a)g (f) | |
590 | 2 dir/b (b) |
|
590 | 2 dir/b (b) | |
591 | 1 b (a)g (f) |
|
591 | 1 b (a)g (f) | |
592 | 0 |
|
592 | 0 | |
593 |
|
593 | |||
594 |
|
594 | |||
595 | log copies with hardcoded style and with --style=default |
|
595 | log copies with hardcoded style and with --style=default | |
596 |
|
596 | |||
597 | $ hg log -vC -r4 |
|
597 | $ hg log -vC -r4 | |
598 | changeset: 4:7e4639b4691b |
|
598 | changeset: 4:7e4639b4691b | |
599 | tag: tip |
|
599 | tag: tip | |
600 | user: test |
|
600 | user: test | |
601 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
601 | date: Thu Jan 01 00:00:05 1970 +0000 | |
602 | files: dir/b e |
|
602 | files: dir/b e | |
603 | copies: e (dir/b) |
|
603 | copies: e (dir/b) | |
604 | description: |
|
604 | description: | |
605 | e |
|
605 | e | |
606 |
|
606 | |||
607 |
|
607 | |||
608 | $ hg log -vC -r4 --style=default |
|
608 | $ hg log -vC -r4 --style=default | |
609 | changeset: 4:7e4639b4691b |
|
609 | changeset: 4:7e4639b4691b | |
610 | tag: tip |
|
610 | tag: tip | |
611 | user: test |
|
611 | user: test | |
612 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
612 | date: Thu Jan 01 00:00:05 1970 +0000 | |
613 | files: dir/b e |
|
613 | files: dir/b e | |
614 | copies: e (dir/b) |
|
614 | copies: e (dir/b) | |
615 | description: |
|
615 | description: | |
616 | e |
|
616 | e | |
617 |
|
617 | |||
618 |
|
618 | |||
619 | $ hg log -vC -r4 -Tjson |
|
619 | $ hg log -vC -r4 -Tjson | |
620 | [ |
|
620 | [ | |
621 | { |
|
621 | { | |
622 | "rev": 4, |
|
622 | "rev": 4, | |
623 | "node": "7e4639b4691b9f84b81036a8d4fb218ce3c5e3a3", |
|
623 | "node": "7e4639b4691b9f84b81036a8d4fb218ce3c5e3a3", | |
624 | "branch": "default", |
|
624 | "branch": "default", | |
625 | "phase": "draft", |
|
625 | "phase": "draft", | |
626 | "user": "test", |
|
626 | "user": "test", | |
627 | "date": [5, 0], |
|
627 | "date": [5, 0], | |
628 | "desc": "e", |
|
628 | "desc": "e", | |
629 | "bookmarks": [], |
|
629 | "bookmarks": [], | |
630 | "tags": ["tip"], |
|
630 | "tags": ["tip"], | |
631 | "parents": ["2ca5ba7019804f1f597249caddf22a64d34df0ba"], |
|
631 | "parents": ["2ca5ba7019804f1f597249caddf22a64d34df0ba"], | |
632 | "files": ["dir/b", "e"], |
|
632 | "files": ["dir/b", "e"], | |
633 | "copies": {"e": "dir/b"} |
|
633 | "copies": {"e": "dir/b"} | |
634 | } |
|
634 | } | |
635 | ] |
|
635 | ] | |
636 |
|
636 | |||
637 | log copies, non-linear manifest |
|
637 | log copies, non-linear manifest | |
638 |
|
638 | |||
639 | $ hg up -C 3 |
|
639 | $ hg up -C 3 | |
640 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
640 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
641 | $ hg mv dir/b e |
|
641 | $ hg mv dir/b e | |
642 | $ echo foo > foo |
|
642 | $ echo foo > foo | |
643 | $ hg ci -Ame2 -d '6 0' |
|
643 | $ hg ci -Ame2 -d '6 0' | |
644 | adding foo |
|
644 | adding foo | |
645 | created new head |
|
645 | created new head | |
646 | $ hg log -v --template '{rev} {file_copies}\n' -r 5 |
|
646 | $ hg log -v --template '{rev} {file_copies}\n' -r 5 | |
647 | 5 e (dir/b) |
|
647 | 5 e (dir/b) | |
648 |
|
648 | |||
649 |
|
649 | |||
650 | log copies, execute bit set |
|
650 | log copies, execute bit set | |
651 |
|
651 | |||
652 | #if execbit |
|
652 | #if execbit | |
653 | $ chmod +x e |
|
653 | $ chmod +x e | |
654 | $ hg ci -me3 -d '7 0' |
|
654 | $ hg ci -me3 -d '7 0' | |
655 | $ hg log -v --template '{rev} {file_copies}\n' -r 6 |
|
655 | $ hg log -v --template '{rev} {file_copies}\n' -r 6 | |
656 | 6 |
|
656 | 6 | |
657 | #endif |
|
657 | #endif | |
658 |
|
658 | |||
659 |
|
659 | |||
660 | log -p d |
|
660 | log -p d | |
661 |
|
661 | |||
662 | $ hg log -pv d |
|
662 | $ hg log -pv d | |
663 | changeset: 3:2ca5ba701980 |
|
663 | changeset: 3:2ca5ba701980 | |
664 | user: test |
|
664 | user: test | |
665 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
665 | date: Thu Jan 01 00:00:04 1970 +0000 | |
666 | files: a b d g |
|
666 | files: a b d g | |
667 | description: |
|
667 | description: | |
668 | d |
|
668 | d | |
669 |
|
669 | |||
670 |
|
670 | |||
671 | diff -r f8954cd4dc1f -r 2ca5ba701980 d |
|
671 | diff -r f8954cd4dc1f -r 2ca5ba701980 d | |
672 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
672 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
673 | +++ b/d Thu Jan 01 00:00:04 1970 +0000 |
|
673 | +++ b/d Thu Jan 01 00:00:04 1970 +0000 | |
674 | @@ -0,0 +1,1 @@ |
|
674 | @@ -0,0 +1,1 @@ | |
675 | +a |
|
675 | +a | |
676 |
|
676 | |||
677 |
|
677 | |||
678 |
|
678 | |||
679 | log --removed file |
|
679 | log --removed file | |
680 |
|
680 | |||
681 | $ hg log --removed -v a |
|
681 | $ hg log --removed -v a | |
682 | changeset: 3:2ca5ba701980 |
|
682 | changeset: 3:2ca5ba701980 | |
683 | user: test |
|
683 | user: test | |
684 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
684 | date: Thu Jan 01 00:00:04 1970 +0000 | |
685 | files: a b d g |
|
685 | files: a b d g | |
686 | description: |
|
686 | description: | |
687 | d |
|
687 | d | |
688 |
|
688 | |||
689 |
|
689 | |||
690 | changeset: 0:9161b9aeaf16 |
|
690 | changeset: 0:9161b9aeaf16 | |
691 | user: test |
|
691 | user: test | |
692 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
692 | date: Thu Jan 01 00:00:01 1970 +0000 | |
693 | files: a f |
|
693 | files: a f | |
694 | description: |
|
694 | description: | |
695 | a |
|
695 | a | |
696 |
|
696 | |||
697 |
|
697 | |||
698 |
|
698 | |||
699 | log --removed revrange file |
|
699 | log --removed revrange file | |
700 |
|
700 | |||
701 | $ hg log --removed -v -r0:2 a |
|
701 | $ hg log --removed -v -r0:2 a | |
702 | changeset: 0:9161b9aeaf16 |
|
702 | changeset: 0:9161b9aeaf16 | |
703 | user: test |
|
703 | user: test | |
704 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
704 | date: Thu Jan 01 00:00:01 1970 +0000 | |
705 | files: a f |
|
705 | files: a f | |
706 | description: |
|
706 | description: | |
707 | a |
|
707 | a | |
708 |
|
708 | |||
709 |
|
709 | |||
710 | $ cd .. |
|
710 | $ cd .. | |
711 |
|
711 | |||
712 | log --follow tests |
|
712 | log --follow tests | |
713 |
|
713 | |||
714 | $ hg init follow |
|
714 | $ hg init follow | |
715 | $ cd follow |
|
715 | $ cd follow | |
716 |
|
716 | |||
717 | $ echo base > base |
|
717 | $ echo base > base | |
718 | $ hg ci -Ambase -d '1 0' |
|
718 | $ hg ci -Ambase -d '1 0' | |
719 | adding base |
|
719 | adding base | |
720 |
|
720 | |||
721 | $ echo r1 >> base |
|
721 | $ echo r1 >> base | |
722 | $ hg ci -Amr1 -d '1 0' |
|
722 | $ hg ci -Amr1 -d '1 0' | |
723 | $ echo r2 >> base |
|
723 | $ echo r2 >> base | |
724 | $ hg ci -Amr2 -d '1 0' |
|
724 | $ hg ci -Amr2 -d '1 0' | |
725 |
|
725 | |||
726 | $ hg up -C 1 |
|
726 | $ hg up -C 1 | |
727 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
727 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
728 | $ echo b1 > b1 |
|
728 | $ echo b1 > b1 | |
729 |
|
729 | |||
730 | log -r "follow('set:clean()')" |
|
730 | log -r "follow('set:clean()')" | |
731 |
|
731 | |||
732 | $ hg log -r "follow('set:clean()')" |
|
732 | $ hg log -r "follow('set:clean()')" | |
733 | changeset: 0:67e992f2c4f3 |
|
733 | changeset: 0:67e992f2c4f3 | |
734 | user: test |
|
734 | user: test | |
735 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
735 | date: Thu Jan 01 00:00:01 1970 +0000 | |
736 | summary: base |
|
736 | summary: base | |
737 |
|
737 | |||
738 | changeset: 1:3d5bf5654eda |
|
738 | changeset: 1:3d5bf5654eda | |
739 | user: test |
|
739 | user: test | |
740 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
740 | date: Thu Jan 01 00:00:01 1970 +0000 | |
741 | summary: r1 |
|
741 | summary: r1 | |
742 |
|
742 | |||
743 |
|
743 | |||
744 | $ hg ci -Amb1 -d '1 0' |
|
744 | $ hg ci -Amb1 -d '1 0' | |
745 | adding b1 |
|
745 | adding b1 | |
746 | created new head |
|
746 | created new head | |
747 |
|
747 | |||
748 |
|
748 | |||
749 | log -f |
|
749 | log -f | |
750 |
|
750 | |||
751 | $ hg log -f |
|
751 | $ hg log -f | |
752 | changeset: 3:e62f78d544b4 |
|
752 | changeset: 3:e62f78d544b4 | |
753 | tag: tip |
|
753 | tag: tip | |
754 | parent: 1:3d5bf5654eda |
|
754 | parent: 1:3d5bf5654eda | |
755 | user: test |
|
755 | user: test | |
756 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
756 | date: Thu Jan 01 00:00:01 1970 +0000 | |
757 | summary: b1 |
|
757 | summary: b1 | |
758 |
|
758 | |||
759 | changeset: 1:3d5bf5654eda |
|
759 | changeset: 1:3d5bf5654eda | |
760 | user: test |
|
760 | user: test | |
761 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
761 | date: Thu Jan 01 00:00:01 1970 +0000 | |
762 | summary: r1 |
|
762 | summary: r1 | |
763 |
|
763 | |||
764 | changeset: 0:67e992f2c4f3 |
|
764 | changeset: 0:67e992f2c4f3 | |
765 | user: test |
|
765 | user: test | |
766 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
766 | date: Thu Jan 01 00:00:01 1970 +0000 | |
767 | summary: base |
|
767 | summary: base | |
768 |
|
768 | |||
769 |
|
769 | |||
770 | log -r follow('glob:b*') |
|
770 | log -r follow('glob:b*') | |
771 |
|
771 | |||
772 | $ hg log -r "follow('glob:b*')" |
|
772 | $ hg log -r "follow('glob:b*')" | |
773 | changeset: 0:67e992f2c4f3 |
|
773 | changeset: 0:67e992f2c4f3 | |
774 | user: test |
|
774 | user: test | |
775 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
775 | date: Thu Jan 01 00:00:01 1970 +0000 | |
776 | summary: base |
|
776 | summary: base | |
777 |
|
777 | |||
778 | changeset: 1:3d5bf5654eda |
|
778 | changeset: 1:3d5bf5654eda | |
779 | user: test |
|
779 | user: test | |
780 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
780 | date: Thu Jan 01 00:00:01 1970 +0000 | |
781 | summary: r1 |
|
781 | summary: r1 | |
782 |
|
782 | |||
783 | changeset: 3:e62f78d544b4 |
|
783 | changeset: 3:e62f78d544b4 | |
784 | tag: tip |
|
784 | tag: tip | |
785 | parent: 1:3d5bf5654eda |
|
785 | parent: 1:3d5bf5654eda | |
786 | user: test |
|
786 | user: test | |
787 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
787 | date: Thu Jan 01 00:00:01 1970 +0000 | |
788 | summary: b1 |
|
788 | summary: b1 | |
789 |
|
789 | |||
790 | log -f -r '1 + 4' |
|
790 | log -f -r '1 + 4' | |
791 |
|
791 | |||
792 | $ hg up -C 0 |
|
792 | $ hg up -C 0 | |
793 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
793 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
794 | $ echo b2 > b2 |
|
794 | $ echo b2 > b2 | |
795 | $ hg ci -Amb2 -d '1 0' |
|
795 | $ hg ci -Amb2 -d '1 0' | |
796 | adding b2 |
|
796 | adding b2 | |
797 | created new head |
|
797 | created new head | |
798 | $ hg log -f -r '1 + 4' |
|
798 | $ hg log -f -r '1 + 4' | |
799 | changeset: 4:ddb82e70d1a1 |
|
799 | changeset: 4:ddb82e70d1a1 | |
800 | tag: tip |
|
800 | tag: tip | |
801 | parent: 0:67e992f2c4f3 |
|
801 | parent: 0:67e992f2c4f3 | |
802 | user: test |
|
802 | user: test | |
803 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
803 | date: Thu Jan 01 00:00:01 1970 +0000 | |
804 | summary: b2 |
|
804 | summary: b2 | |
805 |
|
805 | |||
806 | changeset: 1:3d5bf5654eda |
|
806 | changeset: 1:3d5bf5654eda | |
807 | user: test |
|
807 | user: test | |
808 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
808 | date: Thu Jan 01 00:00:01 1970 +0000 | |
809 | summary: r1 |
|
809 | summary: r1 | |
810 |
|
810 | |||
811 | changeset: 0:67e992f2c4f3 |
|
811 | changeset: 0:67e992f2c4f3 | |
812 | user: test |
|
812 | user: test | |
813 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
813 | date: Thu Jan 01 00:00:01 1970 +0000 | |
814 | summary: base |
|
814 | summary: base | |
815 |
|
815 | |||
816 |
|
816 | |||
817 | log -fr with aliases: 'A' should be expanded, but 'reverse()' should have no |
|
817 | log -fr with aliases: 'A' should be expanded, but 'reverse()' should have no | |
818 | effect |
|
818 | effect | |
819 |
|
819 | |||
820 | $ hg log --config 'revsetalias.reverse(x)=x' --config 'revsetalias.A=1+4' -qfrA |
|
820 | $ hg log --config 'revsetalias.reverse(x)=x' --config 'revsetalias.A=1+4' -qfrA | |
821 | 4:ddb82e70d1a1 |
|
821 | 4:ddb82e70d1a1 | |
822 | 1:3d5bf5654eda |
|
822 | 1:3d5bf5654eda | |
823 | 0:67e992f2c4f3 |
|
823 | 0:67e992f2c4f3 | |
824 |
|
824 | |||
825 | log -r "follow('set:grep(b2)')" |
|
825 | log -r "follow('set:grep(b2)')" | |
826 |
|
826 | |||
827 | $ hg log -r "follow('set:grep(b2)')" |
|
827 | $ hg log -r "follow('set:grep(b2)')" | |
828 | changeset: 4:ddb82e70d1a1 |
|
828 | changeset: 4:ddb82e70d1a1 | |
829 | tag: tip |
|
829 | tag: tip | |
830 | parent: 0:67e992f2c4f3 |
|
830 | parent: 0:67e992f2c4f3 | |
831 | user: test |
|
831 | user: test | |
832 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
832 | date: Thu Jan 01 00:00:01 1970 +0000 | |
833 | summary: b2 |
|
833 | summary: b2 | |
834 |
|
834 | |||
835 | log -r "follow('set:grep(b2)', 4)" |
|
835 | log -r "follow('set:grep(b2)', 4)" | |
836 |
|
836 | |||
837 | $ hg up -qC 0 |
|
837 | $ hg up -qC 0 | |
838 | $ hg log -r "follow('set:grep(b2)', 4)" |
|
838 | $ hg log -r "follow('set:grep(b2)', 4)" | |
839 | changeset: 4:ddb82e70d1a1 |
|
839 | changeset: 4:ddb82e70d1a1 | |
840 | tag: tip |
|
840 | tag: tip | |
841 | parent: 0:67e992f2c4f3 |
|
841 | parent: 0:67e992f2c4f3 | |
842 | user: test |
|
842 | user: test | |
843 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
843 | date: Thu Jan 01 00:00:01 1970 +0000 | |
844 | summary: b2 |
|
844 | summary: b2 | |
845 |
|
845 | |||
846 |
|
846 | |||
847 | follow files starting from multiple revisions: |
|
847 | follow files starting from multiple revisions: | |
848 |
|
848 | |||
849 | $ hg log -T '{rev}: {files}\n' -r "follow('glob:b?', startrev=2+3+4)" |
|
849 | $ hg log -T '{rev}: {files}\n' -r "follow('glob:b?', startrev=2+3+4)" | |
850 | 3: b1 |
|
850 | 3: b1 | |
851 | 4: b2 |
|
851 | 4: b2 | |
852 |
|
852 | |||
853 | follow files starting from empty revision: |
|
853 | follow files starting from empty revision: | |
854 |
|
854 | |||
855 | $ hg log -T '{rev}: {files}\n' -r "follow('glob:*', startrev=.-.)" |
|
855 | $ hg log -T '{rev}: {files}\n' -r "follow('glob:*', startrev=.-.)" | |
856 |
|
856 | |||
857 | follow starting from revisions: |
|
857 | follow starting from revisions: | |
858 |
|
858 | |||
859 | $ hg log -Gq -r "follow(startrev=2+4)" |
|
859 | $ hg log -Gq -r "follow(startrev=2+4)" | |
860 | o 4:ddb82e70d1a1 |
|
860 | o 4:ddb82e70d1a1 | |
861 | | |
|
861 | | | |
862 | | o 2:60c670bf5b30 |
|
862 | | o 2:60c670bf5b30 | |
863 | | | |
|
863 | | | | |
864 | | o 1:3d5bf5654eda |
|
864 | | o 1:3d5bf5654eda | |
865 | |/ |
|
865 | |/ | |
866 | @ 0:67e992f2c4f3 |
|
866 | @ 0:67e992f2c4f3 | |
867 |
|
867 | |||
868 |
|
868 | |||
869 | follow the current revision: |
|
869 | follow the current revision: | |
870 |
|
870 | |||
871 | $ hg log -Gq -r "follow()" |
|
871 | $ hg log -Gq -r "follow()" | |
872 | @ 0:67e992f2c4f3 |
|
872 | @ 0:67e992f2c4f3 | |
873 |
|
873 | |||
874 |
|
874 | |||
875 | $ hg up -qC 4 |
|
875 | $ hg up -qC 4 | |
876 |
|
876 | |||
877 | log -f -r null |
|
877 | log -f -r null | |
878 |
|
878 | |||
879 | $ hg log -f -r null |
|
879 | $ hg log -f -r null | |
880 | changeset: -1:000000000000 |
|
880 | changeset: -1:000000000000 | |
881 | user: |
|
881 | user: | |
882 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
882 | date: Thu Jan 01 00:00:00 1970 +0000 | |
883 |
|
883 | |||
884 | $ hg log -f -r null -G |
|
884 | $ hg log -f -r null -G | |
885 | o changeset: -1:000000000000 |
|
885 | o changeset: -1:000000000000 | |
886 | user: |
|
886 | user: | |
887 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
887 | date: Thu Jan 01 00:00:00 1970 +0000 | |
888 |
|
888 | |||
889 |
|
889 | |||
890 |
|
890 | |||
891 | log -f with null parent |
|
891 | log -f with null parent | |
892 |
|
892 | |||
893 | $ hg up -C null |
|
893 | $ hg up -C null | |
894 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
894 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
895 | $ hg log -f |
|
895 | $ hg log -f | |
896 |
|
896 | |||
897 |
|
897 | |||
898 | log -r . with two parents |
|
898 | log -r . with two parents | |
899 |
|
899 | |||
900 | $ hg up -C 3 |
|
900 | $ hg up -C 3 | |
901 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
901 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
902 | $ hg merge tip |
|
902 | $ hg merge tip | |
903 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
903 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
904 | (branch merge, don't forget to commit) |
|
904 | (branch merge, don't forget to commit) | |
905 | $ hg log -r . |
|
905 | $ hg log -r . | |
906 | changeset: 3:e62f78d544b4 |
|
906 | changeset: 3:e62f78d544b4 | |
907 | parent: 1:3d5bf5654eda |
|
907 | parent: 1:3d5bf5654eda | |
908 | user: test |
|
908 | user: test | |
909 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
909 | date: Thu Jan 01 00:00:01 1970 +0000 | |
910 | summary: b1 |
|
910 | summary: b1 | |
911 |
|
911 | |||
912 |
|
912 | |||
913 |
|
913 | |||
914 | log -r . with one parent |
|
914 | log -r . with one parent | |
915 |
|
915 | |||
916 | $ hg ci -mm12 -d '1 0' |
|
916 | $ hg ci -mm12 -d '1 0' | |
917 | $ hg log -r . |
|
917 | $ hg log -r . | |
918 | changeset: 5:302e9dd6890d |
|
918 | changeset: 5:302e9dd6890d | |
919 | tag: tip |
|
919 | tag: tip | |
920 | parent: 3:e62f78d544b4 |
|
920 | parent: 3:e62f78d544b4 | |
921 | parent: 4:ddb82e70d1a1 |
|
921 | parent: 4:ddb82e70d1a1 | |
922 | user: test |
|
922 | user: test | |
923 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
923 | date: Thu Jan 01 00:00:01 1970 +0000 | |
924 | summary: m12 |
|
924 | summary: m12 | |
925 |
|
925 | |||
926 |
|
926 | |||
927 | $ echo postm >> b1 |
|
927 | $ echo postm >> b1 | |
928 | $ hg ci -Amb1.1 -d'1 0' |
|
928 | $ hg ci -Amb1.1 -d'1 0' | |
929 |
|
929 | |||
930 |
|
930 | |||
931 | log --follow-first |
|
931 | log --follow-first | |
932 |
|
932 | |||
933 | $ hg log --follow-first |
|
933 | $ hg log --follow-first | |
934 | changeset: 6:2404bbcab562 |
|
934 | changeset: 6:2404bbcab562 | |
935 | tag: tip |
|
935 | tag: tip | |
936 | user: test |
|
936 | user: test | |
937 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
937 | date: Thu Jan 01 00:00:01 1970 +0000 | |
938 | summary: b1.1 |
|
938 | summary: b1.1 | |
939 |
|
939 | |||
940 | changeset: 5:302e9dd6890d |
|
940 | changeset: 5:302e9dd6890d | |
941 | parent: 3:e62f78d544b4 |
|
941 | parent: 3:e62f78d544b4 | |
942 | parent: 4:ddb82e70d1a1 |
|
942 | parent: 4:ddb82e70d1a1 | |
943 | user: test |
|
943 | user: test | |
944 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
944 | date: Thu Jan 01 00:00:01 1970 +0000 | |
945 | summary: m12 |
|
945 | summary: m12 | |
946 |
|
946 | |||
947 | changeset: 3:e62f78d544b4 |
|
947 | changeset: 3:e62f78d544b4 | |
948 | parent: 1:3d5bf5654eda |
|
948 | parent: 1:3d5bf5654eda | |
949 | user: test |
|
949 | user: test | |
950 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
950 | date: Thu Jan 01 00:00:01 1970 +0000 | |
951 | summary: b1 |
|
951 | summary: b1 | |
952 |
|
952 | |||
953 | changeset: 1:3d5bf5654eda |
|
953 | changeset: 1:3d5bf5654eda | |
954 | user: test |
|
954 | user: test | |
955 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
955 | date: Thu Jan 01 00:00:01 1970 +0000 | |
956 | summary: r1 |
|
956 | summary: r1 | |
957 |
|
957 | |||
958 | changeset: 0:67e992f2c4f3 |
|
958 | changeset: 0:67e992f2c4f3 | |
959 | user: test |
|
959 | user: test | |
960 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
960 | date: Thu Jan 01 00:00:01 1970 +0000 | |
961 | summary: base |
|
961 | summary: base | |
962 |
|
962 | |||
963 |
|
963 | |||
964 |
|
964 | |||
965 | log -P 2 |
|
965 | log -P 2 | |
966 |
|
966 | |||
967 | $ hg log -P 2 |
|
967 | $ hg log -P 2 | |
968 | changeset: 6:2404bbcab562 |
|
968 | changeset: 6:2404bbcab562 | |
969 | tag: tip |
|
969 | tag: tip | |
970 | user: test |
|
970 | user: test | |
971 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
971 | date: Thu Jan 01 00:00:01 1970 +0000 | |
972 | summary: b1.1 |
|
972 | summary: b1.1 | |
973 |
|
973 | |||
974 | changeset: 5:302e9dd6890d |
|
974 | changeset: 5:302e9dd6890d | |
975 | parent: 3:e62f78d544b4 |
|
975 | parent: 3:e62f78d544b4 | |
976 | parent: 4:ddb82e70d1a1 |
|
976 | parent: 4:ddb82e70d1a1 | |
977 | user: test |
|
977 | user: test | |
978 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
978 | date: Thu Jan 01 00:00:01 1970 +0000 | |
979 | summary: m12 |
|
979 | summary: m12 | |
980 |
|
980 | |||
981 | changeset: 4:ddb82e70d1a1 |
|
981 | changeset: 4:ddb82e70d1a1 | |
982 | parent: 0:67e992f2c4f3 |
|
982 | parent: 0:67e992f2c4f3 | |
983 | user: test |
|
983 | user: test | |
984 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
984 | date: Thu Jan 01 00:00:01 1970 +0000 | |
985 | summary: b2 |
|
985 | summary: b2 | |
986 |
|
986 | |||
987 | changeset: 3:e62f78d544b4 |
|
987 | changeset: 3:e62f78d544b4 | |
988 | parent: 1:3d5bf5654eda |
|
988 | parent: 1:3d5bf5654eda | |
989 | user: test |
|
989 | user: test | |
990 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
990 | date: Thu Jan 01 00:00:01 1970 +0000 | |
991 | summary: b1 |
|
991 | summary: b1 | |
992 |
|
992 | |||
993 |
|
993 | |||
994 |
|
994 | |||
995 | log -r tip -p --git |
|
995 | log -r tip -p --git | |
996 |
|
996 | |||
997 | $ hg log -r tip -p --git |
|
997 | $ hg log -r tip -p --git | |
998 | changeset: 6:2404bbcab562 |
|
998 | changeset: 6:2404bbcab562 | |
999 | tag: tip |
|
999 | tag: tip | |
1000 | user: test |
|
1000 | user: test | |
1001 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
1001 | date: Thu Jan 01 00:00:01 1970 +0000 | |
1002 | summary: b1.1 |
|
1002 | summary: b1.1 | |
1003 |
|
1003 | |||
1004 | diff --git a/b1 b/b1 |
|
1004 | diff --git a/b1 b/b1 | |
1005 | --- a/b1 |
|
1005 | --- a/b1 | |
1006 | +++ b/b1 |
|
1006 | +++ b/b1 | |
1007 | @@ -1,1 +1,2 @@ |
|
1007 | @@ -1,1 +1,2 @@ | |
1008 | b1 |
|
1008 | b1 | |
1009 | +postm |
|
1009 | +postm | |
1010 |
|
1010 | |||
1011 |
|
1011 | |||
1012 |
|
1012 | |||
1013 | log -r "" |
|
1013 | log -r "" | |
1014 |
|
1014 | |||
1015 | $ hg log -r '' |
|
1015 | $ hg log -r '' | |
1016 | hg: parse error: empty query |
|
1016 | hg: parse error: empty query | |
1017 | [255] |
|
1017 | [255] | |
1018 |
|
1018 | |||
1019 | log -r <some unknown node id> |
|
1019 | log -r <some unknown node id> | |
1020 |
|
1020 | |||
1021 | $ hg log -r 1000000000000000000000000000000000000000 |
|
1021 | $ hg log -r 1000000000000000000000000000000000000000 | |
1022 | abort: unknown revision '1000000000000000000000000000000000000000'! |
|
1022 | abort: unknown revision '1000000000000000000000000000000000000000'! | |
1023 | [255] |
|
1023 | [255] | |
1024 |
|
1024 | |||
1025 | log -k r1 |
|
1025 | log -k r1 | |
1026 |
|
1026 | |||
1027 | $ hg log -k r1 |
|
1027 | $ hg log -k r1 | |
1028 | changeset: 1:3d5bf5654eda |
|
1028 | changeset: 1:3d5bf5654eda | |
1029 | user: test |
|
1029 | user: test | |
1030 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
1030 | date: Thu Jan 01 00:00:01 1970 +0000 | |
1031 | summary: r1 |
|
1031 | summary: r1 | |
1032 |
|
1032 | |||
1033 | log -p -l2 --color=always |
|
1033 | log -p -l2 --color=always | |
1034 |
|
1034 | |||
1035 | $ hg --config extensions.color= --config color.mode=ansi \ |
|
1035 | $ hg --config extensions.color= --config color.mode=ansi \ | |
1036 | > log -p -l2 --color=always |
|
1036 | > log -p -l2 --color=always | |
1037 | \x1b[0;33mchangeset: 6:2404bbcab562\x1b[0m (esc) |
|
1037 | \x1b[0;33mchangeset: 6:2404bbcab562\x1b[0m (esc) | |
1038 | tag: tip |
|
1038 | tag: tip | |
1039 | user: test |
|
1039 | user: test | |
1040 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
1040 | date: Thu Jan 01 00:00:01 1970 +0000 | |
1041 | summary: b1.1 |
|
1041 | summary: b1.1 | |
1042 |
|
1042 | |||
1043 | \x1b[0;1mdiff -r 302e9dd6890d -r 2404bbcab562 b1\x1b[0m (esc) |
|
1043 | \x1b[0;1mdiff -r 302e9dd6890d -r 2404bbcab562 b1\x1b[0m (esc) | |
1044 | \x1b[0;31;1m--- a/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) |
|
1044 | \x1b[0;31;1m--- a/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) | |
1045 | \x1b[0;32;1m+++ b/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) |
|
1045 | \x1b[0;32;1m+++ b/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) | |
1046 | \x1b[0;35m@@ -1,1 +1,2 @@\x1b[0m (esc) |
|
1046 | \x1b[0;35m@@ -1,1 +1,2 @@\x1b[0m (esc) | |
1047 | b1 |
|
1047 | b1 | |
1048 | \x1b[0;32m+postm\x1b[0m (esc) |
|
1048 | \x1b[0;32m+postm\x1b[0m (esc) | |
1049 |
|
1049 | |||
1050 | \x1b[0;33mchangeset: 5:302e9dd6890d\x1b[0m (esc) |
|
1050 | \x1b[0;33mchangeset: 5:302e9dd6890d\x1b[0m (esc) | |
1051 | parent: 3:e62f78d544b4 |
|
1051 | parent: 3:e62f78d544b4 | |
1052 | parent: 4:ddb82e70d1a1 |
|
1052 | parent: 4:ddb82e70d1a1 | |
1053 | user: test |
|
1053 | user: test | |
1054 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
1054 | date: Thu Jan 01 00:00:01 1970 +0000 | |
1055 | summary: m12 |
|
1055 | summary: m12 | |
1056 |
|
1056 | |||
1057 | \x1b[0;1mdiff -r e62f78d544b4 -r 302e9dd6890d b2\x1b[0m (esc) |
|
1057 | \x1b[0;1mdiff -r e62f78d544b4 -r 302e9dd6890d b2\x1b[0m (esc) | |
1058 | \x1b[0;31;1m--- /dev/null Thu Jan 01 00:00:00 1970 +0000\x1b[0m (esc) |
|
1058 | \x1b[0;31;1m--- /dev/null Thu Jan 01 00:00:00 1970 +0000\x1b[0m (esc) | |
1059 | \x1b[0;32;1m+++ b/b2 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) |
|
1059 | \x1b[0;32;1m+++ b/b2 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) | |
1060 | \x1b[0;35m@@ -0,0 +1,1 @@\x1b[0m (esc) |
|
1060 | \x1b[0;35m@@ -0,0 +1,1 @@\x1b[0m (esc) | |
1061 | \x1b[0;32m+b2\x1b[0m (esc) |
|
1061 | \x1b[0;32m+b2\x1b[0m (esc) | |
1062 |
|
1062 | |||
1063 |
|
1063 | |||
1064 |
|
1064 | |||
1065 | log -r tip --stat |
|
1065 | log -r tip --stat | |
1066 |
|
1066 | |||
1067 | $ hg log -r tip --stat |
|
1067 | $ hg log -r tip --stat | |
1068 | changeset: 6:2404bbcab562 |
|
1068 | changeset: 6:2404bbcab562 | |
1069 | tag: tip |
|
1069 | tag: tip | |
1070 | user: test |
|
1070 | user: test | |
1071 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
1071 | date: Thu Jan 01 00:00:01 1970 +0000 | |
1072 | summary: b1.1 |
|
1072 | summary: b1.1 | |
1073 |
|
1073 | |||
1074 | b1 | 1 + |
|
1074 | b1 | 1 + | |
1075 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
1075 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
1076 |
|
1076 | |||
1077 |
|
1077 | |||
1078 | $ cd .. |
|
1078 | $ cd .. | |
1079 |
|
1079 | |||
1080 | log --follow --patch FILE in repository where linkrev isn't trustworthy |
|
1080 | log --follow --patch FILE in repository where linkrev isn't trustworthy | |
1081 | (issue5376) |
|
1081 | (issue5376) | |
1082 |
|
1082 | |||
1083 | $ hg init follow-dup |
|
1083 | $ hg init follow-dup | |
1084 | $ cd follow-dup |
|
1084 | $ cd follow-dup | |
1085 | $ cat <<EOF >> .hg/hgrc |
|
1085 | $ cat <<EOF >> .hg/hgrc | |
1086 | > [ui] |
|
1086 | > [ui] | |
1087 | > logtemplate = '=== {rev}: {desc}\n' |
|
1087 | > logtemplate = '=== {rev}: {desc}\n' | |
1088 | > [diff] |
|
1088 | > [diff] | |
1089 | > nodates = True |
|
1089 | > nodates = True | |
1090 | > EOF |
|
1090 | > EOF | |
1091 | $ echo 0 >> a |
|
1091 | $ echo 0 >> a | |
1092 | $ hg ci -qAm 'a0' |
|
1092 | $ hg ci -qAm 'a0' | |
1093 | $ echo 1 >> a |
|
1093 | $ echo 1 >> a | |
1094 | $ hg ci -m 'a1' |
|
1094 | $ hg ci -m 'a1' | |
1095 | $ hg up -q 0 |
|
1095 | $ hg up -q 0 | |
1096 | $ echo 1 >> a |
|
1096 | $ echo 1 >> a | |
1097 | $ touch b |
|
1097 | $ touch b | |
1098 | $ hg ci -qAm 'a1 with b' |
|
1098 | $ hg ci -qAm 'a1 with b' | |
1099 | $ echo 3 >> a |
|
1099 | $ echo 3 >> a | |
1100 | $ hg ci -m 'a3' |
|
1100 | $ hg ci -m 'a3' | |
1101 |
|
1101 | |||
1102 | fctx.rev() == 2, but fctx.linkrev() == 1 |
|
1102 | fctx.rev() == 2, but fctx.linkrev() == 1 | |
1103 |
|
1103 | |||
1104 | $ hg log -pf a |
|
1104 | $ hg log -pf a | |
1105 | === 3: a3 |
|
1105 | === 3: a3 | |
1106 | diff -r 4ea02ba94d66 -r e7a6331a34f0 a |
|
1106 | diff -r 4ea02ba94d66 -r e7a6331a34f0 a | |
1107 | --- a/a |
|
1107 | --- a/a | |
1108 | +++ b/a |
|
1108 | +++ b/a | |
1109 | @@ -1,2 +1,3 @@ |
|
1109 | @@ -1,2 +1,3 @@ | |
1110 | 0 |
|
1110 | 0 | |
1111 | 1 |
|
1111 | 1 | |
1112 | +3 |
|
1112 | +3 | |
1113 |
|
1113 | |||
1114 | === 2: a1 with b |
|
1114 | === 2: a1 with b | |
1115 | diff -r 49b5e81287e2 -r 4ea02ba94d66 a |
|
1115 | diff -r 49b5e81287e2 -r 4ea02ba94d66 a | |
1116 | --- a/a |
|
1116 | --- a/a | |
1117 | +++ b/a |
|
1117 | +++ b/a | |
1118 | @@ -1,1 +1,2 @@ |
|
1118 | @@ -1,1 +1,2 @@ | |
1119 | 0 |
|
1119 | 0 | |
1120 | +1 |
|
1120 | +1 | |
1121 |
|
1121 | |||
1122 | === 0: a0 |
|
1122 | === 0: a0 | |
1123 | diff -r 000000000000 -r 49b5e81287e2 a |
|
1123 | diff -r 000000000000 -r 49b5e81287e2 a | |
1124 | --- /dev/null |
|
1124 | --- /dev/null | |
1125 | +++ b/a |
|
1125 | +++ b/a | |
1126 | @@ -0,0 +1,1 @@ |
|
1126 | @@ -0,0 +1,1 @@ | |
1127 | +0 |
|
1127 | +0 | |
1128 |
|
1128 | |||
1129 |
|
1129 | |||
1130 | fctx.introrev() == 2, but fctx.linkrev() == 1 |
|
1130 | fctx.introrev() == 2, but fctx.linkrev() == 1 | |
1131 |
|
1131 | |||
1132 | $ hg up -q 2 |
|
1132 | $ hg up -q 2 | |
1133 | $ hg log -pf a |
|
1133 | $ hg log -pf a | |
1134 | === 2: a1 with b |
|
1134 | === 2: a1 with b | |
1135 | diff -r 49b5e81287e2 -r 4ea02ba94d66 a |
|
1135 | diff -r 49b5e81287e2 -r 4ea02ba94d66 a | |
1136 | --- a/a |
|
1136 | --- a/a | |
1137 | +++ b/a |
|
1137 | +++ b/a | |
1138 | @@ -1,1 +1,2 @@ |
|
1138 | @@ -1,1 +1,2 @@ | |
1139 | 0 |
|
1139 | 0 | |
1140 | +1 |
|
1140 | +1 | |
1141 |
|
1141 | |||
1142 | === 0: a0 |
|
1142 | === 0: a0 | |
1143 | diff -r 000000000000 -r 49b5e81287e2 a |
|
1143 | diff -r 000000000000 -r 49b5e81287e2 a | |
1144 | --- /dev/null |
|
1144 | --- /dev/null | |
1145 | +++ b/a |
|
1145 | +++ b/a | |
1146 | @@ -0,0 +1,1 @@ |
|
1146 | @@ -0,0 +1,1 @@ | |
1147 | +0 |
|
1147 | +0 | |
1148 |
|
1148 | |||
1149 |
|
1149 | |||
1150 | $ cd .. |
|
1150 | $ cd .. | |
1151 |
|
1151 | |||
1152 | Multiple copy sources of a file: |
|
1152 | Multiple copy sources of a file: | |
1153 |
|
1153 | |||
1154 | $ hg init follow-multi |
|
1154 | $ hg init follow-multi | |
1155 | $ cd follow-multi |
|
1155 | $ cd follow-multi | |
1156 | $ echo 0 >> a |
|
1156 | $ echo 0 >> a | |
1157 | $ hg ci -qAm 'a' |
|
1157 | $ hg ci -qAm 'a' | |
1158 | $ hg cp a b |
|
1158 | $ hg cp a b | |
1159 | $ hg ci -m 'a->b' |
|
1159 | $ hg ci -m 'a->b' | |
1160 | $ echo 2 >> a |
|
1160 | $ echo 2 >> a | |
1161 | $ hg ci -m 'a' |
|
1161 | $ hg ci -m 'a' | |
1162 | $ echo 3 >> b |
|
1162 | $ echo 3 >> b | |
1163 | $ hg ci -m 'b' |
|
1163 | $ hg ci -m 'b' | |
1164 | $ echo 4 >> a |
|
1164 | $ echo 4 >> a | |
1165 | $ echo 4 >> b |
|
1165 | $ echo 4 >> b | |
1166 | $ hg ci -m 'a,b' |
|
1166 | $ hg ci -m 'a,b' | |
1167 | $ echo 5 >> a |
|
1167 | $ echo 5 >> a | |
1168 | $ hg ci -m 'a0' |
|
1168 | $ hg ci -m 'a0' | |
1169 | $ echo 6 >> b |
|
1169 | $ echo 6 >> b | |
1170 | $ hg ci -m 'b0' |
|
1170 | $ hg ci -m 'b0' | |
1171 | $ hg up -q 4 |
|
1171 | $ hg up -q 4 | |
1172 | $ echo 7 >> b |
|
1172 | $ echo 7 >> b | |
1173 | $ hg ci -m 'b1' |
|
1173 | $ hg ci -m 'b1' | |
1174 | created new head |
|
1174 | created new head | |
1175 | $ echo 8 >> a |
|
1175 | $ echo 8 >> a | |
1176 | $ hg ci -m 'a1' |
|
1176 | $ hg ci -m 'a1' | |
1177 | $ hg rm a |
|
1177 | $ hg rm a | |
1178 | $ hg mv b a |
|
1178 | $ hg mv b a | |
1179 | $ hg ci -m 'b1->a1' |
|
1179 | $ hg ci -m 'b1->a1' | |
1180 | $ hg merge -qt :local |
|
1180 | $ hg merge -qt :local | |
1181 | $ hg ci -m '(a0,b1->a1)->a' |
|
1181 | $ hg ci -m '(a0,b1->a1)->a' | |
1182 |
|
1182 | |||
1183 | $ hg log -GT '{rev}: {desc}\n' |
|
1183 | $ hg log -GT '{rev}: {desc}\n' | |
1184 | @ 10: (a0,b1->a1)->a |
|
1184 | @ 10: (a0,b1->a1)->a | |
1185 | |\ |
|
1185 | |\ | |
1186 | | o 9: b1->a1 |
|
1186 | | o 9: b1->a1 | |
1187 | | | |
|
1187 | | | | |
1188 | | o 8: a1 |
|
1188 | | o 8: a1 | |
1189 | | | |
|
1189 | | | | |
1190 | | o 7: b1 |
|
1190 | | o 7: b1 | |
1191 | | | |
|
1191 | | | | |
1192 | o | 6: b0 |
|
1192 | o | 6: b0 | |
1193 | | | |
|
1193 | | | | |
1194 | o | 5: a0 |
|
1194 | o | 5: a0 | |
1195 | |/ |
|
1195 | |/ | |
1196 | o 4: a,b |
|
1196 | o 4: a,b | |
1197 | | |
|
1197 | | | |
1198 | o 3: b |
|
1198 | o 3: b | |
1199 | | |
|
1199 | | | |
1200 | o 2: a |
|
1200 | o 2: a | |
1201 | | |
|
1201 | | | |
1202 | o 1: a->b |
|
1202 | o 1: a->b | |
1203 | | |
|
1203 | | | |
1204 | o 0: a |
|
1204 | o 0: a | |
1205 |
|
1205 | |||
1206 |
|
1206 | |||
1207 | since file 'a' has multiple copy sources at the revision 4, ancestors can't |
|
1207 | since file 'a' has multiple copy sources at the revision 4, ancestors can't | |
1208 | be indexed solely by fctx.linkrev(). |
|
1208 | be indexed solely by fctx.linkrev(). | |
1209 |
|
1209 | |||
1210 | $ hg log -T '{rev}: {desc}\n' -f a |
|
1210 | $ hg log -T '{rev}: {desc}\n' -f a | |
1211 | 10: (a0,b1->a1)->a |
|
1211 | 10: (a0,b1->a1)->a | |
1212 | 9: b1->a1 |
|
1212 | 9: b1->a1 | |
1213 | 7: b1 |
|
1213 | 7: b1 | |
1214 | 5: a0 |
|
1214 | 5: a0 | |
1215 | 4: a,b |
|
1215 | 4: a,b | |
1216 | 3: b |
|
1216 | 3: b | |
1217 | 2: a |
|
1217 | 2: a | |
1218 | 1: a->b |
|
1218 | 1: a->b | |
1219 | 0: a |
|
1219 | 0: a | |
1220 |
|
1220 | |||
1221 | $ cd .. |
|
1221 | $ cd .. | |
1222 |
|
1222 | |||
1223 | Test that log should respect the order of -rREV even if multiple OR conditions |
|
1223 | Test that log should respect the order of -rREV even if multiple OR conditions | |
1224 | are specified (issue5100): |
|
1224 | are specified (issue5100): | |
1225 |
|
1225 | |||
1226 | $ hg init revorder |
|
1226 | $ hg init revorder | |
1227 | $ cd revorder |
|
1227 | $ cd revorder | |
1228 |
|
1228 | |||
1229 | $ hg branch -q b0 |
|
1229 | $ hg branch -q b0 | |
1230 | $ echo 0 >> f0 |
|
1230 | $ echo 0 >> f0 | |
1231 | $ hg ci -qAm k0 -u u0 |
|
1231 | $ hg ci -qAm k0 -u u0 | |
1232 | $ hg branch -q b1 |
|
1232 | $ hg branch -q b1 | |
1233 | $ echo 1 >> f1 |
|
1233 | $ echo 1 >> f1 | |
1234 | $ hg ci -qAm k1 -u u1 |
|
1234 | $ hg ci -qAm k1 -u u1 | |
1235 | $ hg branch -q b2 |
|
1235 | $ hg branch -q b2 | |
1236 | $ echo 2 >> f2 |
|
1236 | $ echo 2 >> f2 | |
1237 | $ hg ci -qAm k2 -u u2 |
|
1237 | $ hg ci -qAm k2 -u u2 | |
1238 |
|
1238 | |||
1239 | $ hg update -q b2 |
|
1239 | $ hg update -q b2 | |
1240 | $ echo 3 >> f2 |
|
1240 | $ echo 3 >> f2 | |
1241 | $ hg ci -qAm k2 -u u2 |
|
1241 | $ hg ci -qAm k2 -u u2 | |
1242 | $ hg update -q b1 |
|
1242 | $ hg update -q b1 | |
1243 | $ echo 4 >> f1 |
|
1243 | $ echo 4 >> f1 | |
1244 | $ hg ci -qAm k1 -u u1 |
|
1244 | $ hg ci -qAm k1 -u u1 | |
1245 | $ hg update -q b0 |
|
1245 | $ hg update -q b0 | |
1246 | $ echo 5 >> f0 |
|
1246 | $ echo 5 >> f0 | |
1247 | $ hg ci -qAm k0 -u u0 |
|
1247 | $ hg ci -qAm k0 -u u0 | |
1248 |
|
1248 | |||
1249 | summary of revisions: |
|
1249 | summary of revisions: | |
1250 |
|
1250 | |||
1251 | $ hg log -G -T '{rev} {branch} {author} {desc} {files}\n' |
|
1251 | $ hg log -G -T '{rev} {branch} {author} {desc} {files}\n' | |
1252 | @ 5 b0 u0 k0 f0 |
|
1252 | @ 5 b0 u0 k0 f0 | |
1253 | | |
|
1253 | | | |
1254 | | o 4 b1 u1 k1 f1 |
|
1254 | | o 4 b1 u1 k1 f1 | |
1255 | | | |
|
1255 | | | | |
1256 | | | o 3 b2 u2 k2 f2 |
|
1256 | | | o 3 b2 u2 k2 f2 | |
1257 | | | | |
|
1257 | | | | | |
1258 | | | o 2 b2 u2 k2 f2 |
|
1258 | | | o 2 b2 u2 k2 f2 | |
1259 | | |/ |
|
1259 | | |/ | |
1260 | | o 1 b1 u1 k1 f1 |
|
1260 | | o 1 b1 u1 k1 f1 | |
1261 | |/ |
|
1261 | |/ | |
1262 | o 0 b0 u0 k0 f0 |
|
1262 | o 0 b0 u0 k0 f0 | |
1263 |
|
1263 | |||
1264 |
|
1264 | |||
1265 | log -b BRANCH in ascending order: |
|
1265 | log -b BRANCH in ascending order: | |
1266 |
|
1266 | |||
1267 | $ hg log -r0:tip -T '{rev} {branch}\n' -b b0 -b b1 |
|
1267 | $ hg log -r0:tip -T '{rev} {branch}\n' -b b0 -b b1 | |
1268 | 0 b0 |
|
1268 | 0 b0 | |
1269 | 1 b1 |
|
1269 | 1 b1 | |
1270 | 4 b1 |
|
1270 | 4 b1 | |
1271 | 5 b0 |
|
1271 | 5 b0 | |
1272 | $ hg log -r0:tip -T '{rev} {branch}\n' -b b1 -b b0 |
|
1272 | $ hg log -r0:tip -T '{rev} {branch}\n' -b b1 -b b0 | |
1273 | 0 b0 |
|
1273 | 0 b0 | |
1274 | 1 b1 |
|
1274 | 1 b1 | |
1275 | 4 b1 |
|
1275 | 4 b1 | |
1276 | 5 b0 |
|
1276 | 5 b0 | |
1277 |
|
1277 | |||
1278 | log --only-branch BRANCH in descending order: |
|
1278 | log --only-branch BRANCH in descending order: | |
1279 |
|
1279 | |||
1280 | $ hg log -rtip:0 -T '{rev} {branch}\n' --only-branch b1 --only-branch b2 |
|
1280 | $ hg log -rtip:0 -T '{rev} {branch}\n' --only-branch b1 --only-branch b2 | |
1281 | 4 b1 |
|
1281 | 4 b1 | |
1282 | 3 b2 |
|
1282 | 3 b2 | |
1283 | 2 b2 |
|
1283 | 2 b2 | |
1284 | 1 b1 |
|
1284 | 1 b1 | |
1285 | $ hg log -rtip:0 -T '{rev} {branch}\n' --only-branch b2 --only-branch b1 |
|
1285 | $ hg log -rtip:0 -T '{rev} {branch}\n' --only-branch b2 --only-branch b1 | |
1286 | 4 b1 |
|
1286 | 4 b1 | |
1287 | 3 b2 |
|
1287 | 3 b2 | |
1288 | 2 b2 |
|
1288 | 2 b2 | |
1289 | 1 b1 |
|
1289 | 1 b1 | |
1290 |
|
1290 | |||
1291 | log -u USER in ascending order, against compound set: |
|
1291 | log -u USER in ascending order, against compound set: | |
1292 |
|
1292 | |||
1293 | $ hg log -r'::head()' -T '{rev} {author}\n' -u u0 -u u2 |
|
1293 | $ hg log -r'::head()' -T '{rev} {author}\n' -u u0 -u u2 | |
1294 | 0 u0 |
|
1294 | 0 u0 | |
1295 | 2 u2 |
|
1295 | 2 u2 | |
1296 | 3 u2 |
|
1296 | 3 u2 | |
1297 | 5 u0 |
|
1297 | 5 u0 | |
1298 | $ hg log -r'::head()' -T '{rev} {author}\n' -u u2 -u u0 |
|
1298 | $ hg log -r'::head()' -T '{rev} {author}\n' -u u2 -u u0 | |
1299 | 0 u0 |
|
1299 | 0 u0 | |
1300 | 2 u2 |
|
1300 | 2 u2 | |
1301 | 3 u2 |
|
1301 | 3 u2 | |
1302 | 5 u0 |
|
1302 | 5 u0 | |
1303 |
|
1303 | |||
1304 | log -k TEXT in descending order, against compound set: |
|
1304 | log -k TEXT in descending order, against compound set: | |
1305 |
|
1305 | |||
1306 | $ hg log -r'5 + reverse(::3)' -T '{rev} {desc}\n' -k k0 -k k1 -k k2 |
|
1306 | $ hg log -r'5 + reverse(::3)' -T '{rev} {desc}\n' -k k0 -k k1 -k k2 | |
1307 | 5 k0 |
|
1307 | 5 k0 | |
1308 | 3 k2 |
|
1308 | 3 k2 | |
1309 | 2 k2 |
|
1309 | 2 k2 | |
1310 | 1 k1 |
|
1310 | 1 k1 | |
1311 | 0 k0 |
|
1311 | 0 k0 | |
1312 | $ hg log -r'5 + reverse(::3)' -T '{rev} {desc}\n' -k k2 -k k1 -k k0 |
|
1312 | $ hg log -r'5 + reverse(::3)' -T '{rev} {desc}\n' -k k2 -k k1 -k k0 | |
1313 | 5 k0 |
|
1313 | 5 k0 | |
1314 | 3 k2 |
|
1314 | 3 k2 | |
1315 | 2 k2 |
|
1315 | 2 k2 | |
1316 | 1 k1 |
|
1316 | 1 k1 | |
1317 | 0 k0 |
|
1317 | 0 k0 | |
1318 |
|
1318 | |||
1319 | log FILE in ascending order, against dagrange: |
|
1319 | log FILE in ascending order, against dagrange: | |
1320 |
|
1320 | |||
1321 | $ hg log -r1:: -T '{rev} {files}\n' f1 f2 |
|
1321 | $ hg log -r1:: -T '{rev} {files}\n' f1 f2 | |
1322 | 1 f1 |
|
1322 | 1 f1 | |
1323 | 2 f2 |
|
1323 | 2 f2 | |
1324 | 3 f2 |
|
1324 | 3 f2 | |
1325 | 4 f1 |
|
1325 | 4 f1 | |
1326 | $ hg log -r1:: -T '{rev} {files}\n' f2 f1 |
|
1326 | $ hg log -r1:: -T '{rev} {files}\n' f2 f1 | |
1327 | 1 f1 |
|
1327 | 1 f1 | |
1328 | 2 f2 |
|
1328 | 2 f2 | |
1329 | 3 f2 |
|
1329 | 3 f2 | |
1330 | 4 f1 |
|
1330 | 4 f1 | |
1331 |
|
1331 | |||
1332 | $ cd .. |
|
1332 | $ cd .. | |
1333 |
|
1333 | |||
1334 | User |
|
1334 | User | |
1335 |
|
1335 | |||
1336 | $ hg init usertest |
|
1336 | $ hg init usertest | |
1337 | $ cd usertest |
|
1337 | $ cd usertest | |
1338 |
|
1338 | |||
1339 | $ echo a > a |
|
1339 | $ echo a > a | |
1340 | $ hg ci -A -m "a" -u "User One <user1@example.org>" |
|
1340 | $ hg ci -A -m "a" -u "User One <user1@example.org>" | |
1341 | adding a |
|
1341 | adding a | |
1342 | $ echo b > b |
|
1342 | $ echo b > b | |
1343 | $ hg ci -A -m "b" -u "User Two <user2@example.org>" |
|
1343 | $ hg ci -A -m "b" -u "User Two <user2@example.org>" | |
1344 | adding b |
|
1344 | adding b | |
1345 |
|
1345 | |||
1346 | $ hg log -u "User One <user1@example.org>" |
|
1346 | $ hg log -u "User One <user1@example.org>" | |
1347 | changeset: 0:29a4c94f1924 |
|
1347 | changeset: 0:29a4c94f1924 | |
1348 | user: User One <user1@example.org> |
|
1348 | user: User One <user1@example.org> | |
1349 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1349 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1350 | summary: a |
|
1350 | summary: a | |
1351 |
|
1351 | |||
1352 | $ hg log -u "user1" -u "user2" |
|
1352 | $ hg log -u "user1" -u "user2" | |
1353 | changeset: 1:e834b5e69c0e |
|
1353 | changeset: 1:e834b5e69c0e | |
1354 | tag: tip |
|
1354 | tag: tip | |
1355 | user: User Two <user2@example.org> |
|
1355 | user: User Two <user2@example.org> | |
1356 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1356 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1357 | summary: b |
|
1357 | summary: b | |
1358 |
|
1358 | |||
1359 | changeset: 0:29a4c94f1924 |
|
1359 | changeset: 0:29a4c94f1924 | |
1360 | user: User One <user1@example.org> |
|
1360 | user: User One <user1@example.org> | |
1361 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1361 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1362 | summary: a |
|
1362 | summary: a | |
1363 |
|
1363 | |||
1364 | $ hg log -u "user3" |
|
1364 | $ hg log -u "user3" | |
1365 |
|
1365 | |||
1366 | "-u USER" shouldn't be overridden by "user(USER)" alias |
|
1366 | "-u USER" shouldn't be overridden by "user(USER)" alias | |
1367 |
|
1367 | |||
1368 | $ hg log --config 'revsetalias.user(x)=branch(x)' -u default |
|
1368 | $ hg log --config 'revsetalias.user(x)=branch(x)' -u default | |
1369 | $ hg log --config 'revsetalias.user(x)=branch(x)' -u user1 |
|
1369 | $ hg log --config 'revsetalias.user(x)=branch(x)' -u user1 | |
1370 | changeset: 0:29a4c94f1924 |
|
1370 | changeset: 0:29a4c94f1924 | |
1371 | user: User One <user1@example.org> |
|
1371 | user: User One <user1@example.org> | |
1372 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1372 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1373 | summary: a |
|
1373 | summary: a | |
1374 |
|
1374 | |||
1375 |
|
1375 | |||
1376 | $ cd .. |
|
1376 | $ cd .. | |
1377 |
|
1377 | |||
1378 | $ hg init branches |
|
1378 | $ hg init branches | |
1379 | $ cd branches |
|
1379 | $ cd branches | |
1380 |
|
1380 | |||
1381 | $ echo a > a |
|
1381 | $ echo a > a | |
1382 | $ hg ci -A -m "commit on default" |
|
1382 | $ hg ci -A -m "commit on default" | |
1383 | adding a |
|
1383 | adding a | |
1384 | $ hg branch test |
|
1384 | $ hg branch test | |
1385 | marked working directory as branch test |
|
1385 | marked working directory as branch test | |
1386 | (branches are permanent and global, did you want a bookmark?) |
|
1386 | (branches are permanent and global, did you want a bookmark?) | |
1387 | $ echo b > b |
|
1387 | $ echo b > b | |
1388 | $ hg ci -A -m "commit on test" |
|
1388 | $ hg ci -A -m "commit on test" | |
1389 | adding b |
|
1389 | adding b | |
1390 |
|
1390 | |||
1391 | $ hg up default |
|
1391 | $ hg up default | |
1392 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1392 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1393 | $ echo c > c |
|
1393 | $ echo c > c | |
1394 | $ hg ci -A -m "commit on default" |
|
1394 | $ hg ci -A -m "commit on default" | |
1395 | adding c |
|
1395 | adding c | |
1396 | $ hg up test |
|
1396 | $ hg up test | |
1397 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1397 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1398 | $ echo c > c |
|
1398 | $ echo c > c | |
1399 | $ hg ci -A -m "commit on test" |
|
1399 | $ hg ci -A -m "commit on test" | |
1400 | adding c |
|
1400 | adding c | |
1401 |
|
1401 | |||
1402 |
|
1402 | |||
1403 | log -b default |
|
1403 | log -b default | |
1404 |
|
1404 | |||
1405 | $ hg log -b default |
|
1405 | $ hg log -b default | |
1406 | changeset: 2:c3a4f03cc9a7 |
|
1406 | changeset: 2:c3a4f03cc9a7 | |
1407 | parent: 0:24427303d56f |
|
1407 | parent: 0:24427303d56f | |
1408 | user: test |
|
1408 | user: test | |
1409 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1409 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1410 | summary: commit on default |
|
1410 | summary: commit on default | |
1411 |
|
1411 | |||
1412 | changeset: 0:24427303d56f |
|
1412 | changeset: 0:24427303d56f | |
1413 | user: test |
|
1413 | user: test | |
1414 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1414 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1415 | summary: commit on default |
|
1415 | summary: commit on default | |
1416 |
|
1416 | |||
1417 |
|
1417 | |||
1418 |
|
1418 | |||
1419 | log -b test |
|
1419 | log -b test | |
1420 |
|
1420 | |||
1421 | $ hg log -b test |
|
1421 | $ hg log -b test | |
1422 | changeset: 3:f5d8de11c2e2 |
|
1422 | changeset: 3:f5d8de11c2e2 | |
1423 | branch: test |
|
1423 | branch: test | |
1424 | tag: tip |
|
1424 | tag: tip | |
1425 | parent: 1:d32277701ccb |
|
1425 | parent: 1:d32277701ccb | |
1426 | user: test |
|
1426 | user: test | |
1427 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1427 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1428 | summary: commit on test |
|
1428 | summary: commit on test | |
1429 |
|
1429 | |||
1430 | changeset: 1:d32277701ccb |
|
1430 | changeset: 1:d32277701ccb | |
1431 | branch: test |
|
1431 | branch: test | |
1432 | user: test |
|
1432 | user: test | |
1433 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1433 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1434 | summary: commit on test |
|
1434 | summary: commit on test | |
1435 |
|
1435 | |||
1436 |
|
1436 | |||
1437 |
|
1437 | |||
1438 | log -b dummy |
|
1438 | log -b dummy | |
1439 |
|
1439 | |||
1440 | $ hg log -b dummy |
|
1440 | $ hg log -b dummy | |
1441 | abort: unknown revision 'dummy'! |
|
1441 | abort: unknown revision 'dummy'! | |
1442 | [255] |
|
1442 | [255] | |
1443 |
|
1443 | |||
1444 |
|
1444 | |||
1445 | log -b . |
|
1445 | log -b . | |
1446 |
|
1446 | |||
1447 | $ hg log -b . |
|
1447 | $ hg log -b . | |
1448 | changeset: 3:f5d8de11c2e2 |
|
1448 | changeset: 3:f5d8de11c2e2 | |
1449 | branch: test |
|
1449 | branch: test | |
1450 | tag: tip |
|
1450 | tag: tip | |
1451 | parent: 1:d32277701ccb |
|
1451 | parent: 1:d32277701ccb | |
1452 | user: test |
|
1452 | user: test | |
1453 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1453 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1454 | summary: commit on test |
|
1454 | summary: commit on test | |
1455 |
|
1455 | |||
1456 | changeset: 1:d32277701ccb |
|
1456 | changeset: 1:d32277701ccb | |
1457 | branch: test |
|
1457 | branch: test | |
1458 | user: test |
|
1458 | user: test | |
1459 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1459 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1460 | summary: commit on test |
|
1460 | summary: commit on test | |
1461 |
|
1461 | |||
1462 |
|
1462 | |||
1463 |
|
1463 | |||
1464 | log -b default -b test |
|
1464 | log -b default -b test | |
1465 |
|
1465 | |||
1466 | $ hg log -b default -b test |
|
1466 | $ hg log -b default -b test | |
1467 | changeset: 3:f5d8de11c2e2 |
|
1467 | changeset: 3:f5d8de11c2e2 | |
1468 | branch: test |
|
1468 | branch: test | |
1469 | tag: tip |
|
1469 | tag: tip | |
1470 | parent: 1:d32277701ccb |
|
1470 | parent: 1:d32277701ccb | |
1471 | user: test |
|
1471 | user: test | |
1472 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1472 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1473 | summary: commit on test |
|
1473 | summary: commit on test | |
1474 |
|
1474 | |||
1475 | changeset: 2:c3a4f03cc9a7 |
|
1475 | changeset: 2:c3a4f03cc9a7 | |
1476 | parent: 0:24427303d56f |
|
1476 | parent: 0:24427303d56f | |
1477 | user: test |
|
1477 | user: test | |
1478 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1478 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1479 | summary: commit on default |
|
1479 | summary: commit on default | |
1480 |
|
1480 | |||
1481 | changeset: 1:d32277701ccb |
|
1481 | changeset: 1:d32277701ccb | |
1482 | branch: test |
|
1482 | branch: test | |
1483 | user: test |
|
1483 | user: test | |
1484 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1484 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1485 | summary: commit on test |
|
1485 | summary: commit on test | |
1486 |
|
1486 | |||
1487 | changeset: 0:24427303d56f |
|
1487 | changeset: 0:24427303d56f | |
1488 | user: test |
|
1488 | user: test | |
1489 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1489 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1490 | summary: commit on default |
|
1490 | summary: commit on default | |
1491 |
|
1491 | |||
1492 |
|
1492 | |||
1493 |
|
1493 | |||
1494 | log -b default -b . |
|
1494 | log -b default -b . | |
1495 |
|
1495 | |||
1496 | $ hg log -b default -b . |
|
1496 | $ hg log -b default -b . | |
1497 | changeset: 3:f5d8de11c2e2 |
|
1497 | changeset: 3:f5d8de11c2e2 | |
1498 | branch: test |
|
1498 | branch: test | |
1499 | tag: tip |
|
1499 | tag: tip | |
1500 | parent: 1:d32277701ccb |
|
1500 | parent: 1:d32277701ccb | |
1501 | user: test |
|
1501 | user: test | |
1502 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1502 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1503 | summary: commit on test |
|
1503 | summary: commit on test | |
1504 |
|
1504 | |||
1505 | changeset: 2:c3a4f03cc9a7 |
|
1505 | changeset: 2:c3a4f03cc9a7 | |
1506 | parent: 0:24427303d56f |
|
1506 | parent: 0:24427303d56f | |
1507 | user: test |
|
1507 | user: test | |
1508 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1508 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1509 | summary: commit on default |
|
1509 | summary: commit on default | |
1510 |
|
1510 | |||
1511 | changeset: 1:d32277701ccb |
|
1511 | changeset: 1:d32277701ccb | |
1512 | branch: test |
|
1512 | branch: test | |
1513 | user: test |
|
1513 | user: test | |
1514 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1514 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1515 | summary: commit on test |
|
1515 | summary: commit on test | |
1516 |
|
1516 | |||
1517 | changeset: 0:24427303d56f |
|
1517 | changeset: 0:24427303d56f | |
1518 | user: test |
|
1518 | user: test | |
1519 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1519 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1520 | summary: commit on default |
|
1520 | summary: commit on default | |
1521 |
|
1521 | |||
1522 |
|
1522 | |||
1523 |
|
1523 | |||
1524 | log -b . -b test |
|
1524 | log -b . -b test | |
1525 |
|
1525 | |||
1526 | $ hg log -b . -b test |
|
1526 | $ hg log -b . -b test | |
1527 | changeset: 3:f5d8de11c2e2 |
|
1527 | changeset: 3:f5d8de11c2e2 | |
1528 | branch: test |
|
1528 | branch: test | |
1529 | tag: tip |
|
1529 | tag: tip | |
1530 | parent: 1:d32277701ccb |
|
1530 | parent: 1:d32277701ccb | |
1531 | user: test |
|
1531 | user: test | |
1532 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1532 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1533 | summary: commit on test |
|
1533 | summary: commit on test | |
1534 |
|
1534 | |||
1535 | changeset: 1:d32277701ccb |
|
1535 | changeset: 1:d32277701ccb | |
1536 | branch: test |
|
1536 | branch: test | |
1537 | user: test |
|
1537 | user: test | |
1538 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1538 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1539 | summary: commit on test |
|
1539 | summary: commit on test | |
1540 |
|
1540 | |||
1541 |
|
1541 | |||
1542 |
|
1542 | |||
1543 | log -b 2 |
|
1543 | log -b 2 | |
1544 |
|
1544 | |||
1545 | $ hg log -b 2 |
|
1545 | $ hg log -b 2 | |
1546 | changeset: 2:c3a4f03cc9a7 |
|
1546 | changeset: 2:c3a4f03cc9a7 | |
1547 | parent: 0:24427303d56f |
|
1547 | parent: 0:24427303d56f | |
1548 | user: test |
|
1548 | user: test | |
1549 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1549 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1550 | summary: commit on default |
|
1550 | summary: commit on default | |
1551 |
|
1551 | |||
1552 | changeset: 0:24427303d56f |
|
1552 | changeset: 0:24427303d56f | |
1553 | user: test |
|
1553 | user: test | |
1554 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1554 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1555 | summary: commit on default |
|
1555 | summary: commit on default | |
1556 |
|
1556 | |||
1557 | #if gettext |
|
1557 | #if gettext | |
1558 |
|
1558 | |||
1559 | Test that all log names are translated (e.g. branches, bookmarks, tags): |
|
1559 | Test that all log names are translated (e.g. branches, bookmarks, tags): | |
1560 |
|
1560 | |||
1561 | $ hg bookmark babar -r tip |
|
1561 | $ hg bookmark babar -r tip | |
1562 |
|
1562 | |||
1563 | $ HGENCODING=UTF-8 LANGUAGE=de hg log -r tip |
|
1563 | $ HGENCODING=UTF-8 LANGUAGE=de hg log -r tip | |
1564 | \xc3\x84nderung: 3:f5d8de11c2e2 (esc) |
|
1564 | \xc3\x84nderung: 3:f5d8de11c2e2 (esc) | |
1565 | Zweig: test |
|
1565 | Zweig: test | |
1566 | Lesezeichen: babar |
|
1566 | Lesezeichen: babar | |
1567 | Marke: tip |
|
1567 | Marke: tip | |
1568 | Vorg\xc3\xa4nger: 1:d32277701ccb (esc) |
|
1568 | Vorg\xc3\xa4nger: 1:d32277701ccb (esc) | |
1569 | Nutzer: test |
|
1569 | Nutzer: test | |
1570 | Datum: Thu Jan 01 00:00:00 1970 +0000 |
|
1570 | Datum: Thu Jan 01 00:00:00 1970 +0000 | |
1571 | Zusammenfassung: commit on test |
|
1571 | Zusammenfassung: commit on test | |
1572 |
|
1572 | |||
1573 | $ hg bookmark -d babar |
|
1573 | $ hg bookmark -d babar | |
1574 |
|
1574 | |||
1575 | #endif |
|
1575 | #endif | |
1576 |
|
1576 | |||
1577 | log -p --cwd dir (in subdir) |
|
1577 | log -p --cwd dir (in subdir) | |
1578 |
|
1578 | |||
1579 | $ mkdir dir |
|
1579 | $ mkdir dir | |
1580 | $ hg log -p --cwd dir |
|
1580 | $ hg log -p --cwd dir | |
1581 | changeset: 3:f5d8de11c2e2 |
|
1581 | changeset: 3:f5d8de11c2e2 | |
1582 | branch: test |
|
1582 | branch: test | |
1583 | tag: tip |
|
1583 | tag: tip | |
1584 | parent: 1:d32277701ccb |
|
1584 | parent: 1:d32277701ccb | |
1585 | user: test |
|
1585 | user: test | |
1586 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1586 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1587 | summary: commit on test |
|
1587 | summary: commit on test | |
1588 |
|
1588 | |||
1589 | diff -r d32277701ccb -r f5d8de11c2e2 c |
|
1589 | diff -r d32277701ccb -r f5d8de11c2e2 c | |
1590 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1590 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1591 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 |
|
1591 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 | |
1592 | @@ -0,0 +1,1 @@ |
|
1592 | @@ -0,0 +1,1 @@ | |
1593 | +c |
|
1593 | +c | |
1594 |
|
1594 | |||
1595 | changeset: 2:c3a4f03cc9a7 |
|
1595 | changeset: 2:c3a4f03cc9a7 | |
1596 | parent: 0:24427303d56f |
|
1596 | parent: 0:24427303d56f | |
1597 | user: test |
|
1597 | user: test | |
1598 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1598 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1599 | summary: commit on default |
|
1599 | summary: commit on default | |
1600 |
|
1600 | |||
1601 | diff -r 24427303d56f -r c3a4f03cc9a7 c |
|
1601 | diff -r 24427303d56f -r c3a4f03cc9a7 c | |
1602 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1602 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1603 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 |
|
1603 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 | |
1604 | @@ -0,0 +1,1 @@ |
|
1604 | @@ -0,0 +1,1 @@ | |
1605 | +c |
|
1605 | +c | |
1606 |
|
1606 | |||
1607 | changeset: 1:d32277701ccb |
|
1607 | changeset: 1:d32277701ccb | |
1608 | branch: test |
|
1608 | branch: test | |
1609 | user: test |
|
1609 | user: test | |
1610 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1610 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1611 | summary: commit on test |
|
1611 | summary: commit on test | |
1612 |
|
1612 | |||
1613 | diff -r 24427303d56f -r d32277701ccb b |
|
1613 | diff -r 24427303d56f -r d32277701ccb b | |
1614 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1614 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1615 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
1615 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 | |
1616 | @@ -0,0 +1,1 @@ |
|
1616 | @@ -0,0 +1,1 @@ | |
1617 | +b |
|
1617 | +b | |
1618 |
|
1618 | |||
1619 | changeset: 0:24427303d56f |
|
1619 | changeset: 0:24427303d56f | |
1620 | user: test |
|
1620 | user: test | |
1621 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1621 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1622 | summary: commit on default |
|
1622 | summary: commit on default | |
1623 |
|
1623 | |||
1624 | diff -r 000000000000 -r 24427303d56f a |
|
1624 | diff -r 000000000000 -r 24427303d56f a | |
1625 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1625 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1626 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1626 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
1627 | @@ -0,0 +1,1 @@ |
|
1627 | @@ -0,0 +1,1 @@ | |
1628 | +a |
|
1628 | +a | |
1629 |
|
1629 | |||
1630 |
|
1630 | |||
1631 |
|
1631 | |||
1632 | log -p -R repo |
|
1632 | log -p -R repo | |
1633 |
|
1633 | |||
1634 | $ cd dir |
|
1634 | $ cd dir | |
1635 | $ hg log -p -R .. ../a |
|
1635 | $ hg log -p -R .. ../a | |
1636 | changeset: 0:24427303d56f |
|
1636 | changeset: 0:24427303d56f | |
1637 | user: test |
|
1637 | user: test | |
1638 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1638 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1639 | summary: commit on default |
|
1639 | summary: commit on default | |
1640 |
|
1640 | |||
1641 | diff -r 000000000000 -r 24427303d56f a |
|
1641 | diff -r 000000000000 -r 24427303d56f a | |
1642 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1642 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1643 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1643 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
1644 | @@ -0,0 +1,1 @@ |
|
1644 | @@ -0,0 +1,1 @@ | |
1645 | +a |
|
1645 | +a | |
1646 |
|
1646 | |||
1647 |
|
1647 | |||
1648 | $ cd ../.. |
|
1648 | $ cd ../.. | |
1649 |
|
1649 | |||
1650 | $ hg init follow2 |
|
1650 | $ hg init follow2 | |
1651 | $ cd follow2 |
|
1651 | $ cd follow2 | |
1652 |
|
1652 | |||
1653 | # Build the following history: |
|
1653 | # Build the following history: | |
1654 | # tip - o - x - o - x - x |
|
1654 | # tip - o - x - o - x - x | |
1655 | # \ / |
|
1655 | # \ / | |
1656 | # o - o - o - x |
|
1656 | # o - o - o - x | |
1657 | # \ / |
|
1657 | # \ / | |
1658 | # o |
|
1658 | # o | |
1659 | # |
|
1659 | # | |
1660 | # Where "o" is a revision containing "foo" and |
|
1660 | # Where "o" is a revision containing "foo" and | |
1661 | # "x" is a revision without "foo" |
|
1661 | # "x" is a revision without "foo" | |
1662 |
|
1662 | |||
1663 | $ touch init |
|
1663 | $ touch init | |
1664 | $ hg ci -A -m "init, unrelated" |
|
1664 | $ hg ci -A -m "init, unrelated" | |
1665 | adding init |
|
1665 | adding init | |
1666 | $ echo 'foo' > init |
|
1666 | $ echo 'foo' > init | |
1667 | $ hg ci -m "change, unrelated" |
|
1667 | $ hg ci -m "change, unrelated" | |
1668 | $ echo 'foo' > foo |
|
1668 | $ echo 'foo' > foo | |
1669 | $ hg ci -A -m "add unrelated old foo" |
|
1669 | $ hg ci -A -m "add unrelated old foo" | |
1670 | adding foo |
|
1670 | adding foo | |
1671 | $ hg rm foo |
|
1671 | $ hg rm foo | |
1672 | $ hg ci -m "delete foo, unrelated" |
|
1672 | $ hg ci -m "delete foo, unrelated" | |
1673 | $ echo 'related' > foo |
|
1673 | $ echo 'related' > foo | |
1674 | $ hg ci -A -m "add foo, related" |
|
1674 | $ hg ci -A -m "add foo, related" | |
1675 | adding foo |
|
1675 | adding foo | |
1676 |
|
1676 | |||
1677 | $ hg up 0 |
|
1677 | $ hg up 0 | |
1678 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1678 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1679 | $ touch branch |
|
1679 | $ touch branch | |
1680 | $ hg ci -A -m "first branch, unrelated" |
|
1680 | $ hg ci -A -m "first branch, unrelated" | |
1681 | adding branch |
|
1681 | adding branch | |
1682 | created new head |
|
1682 | created new head | |
1683 | $ touch foo |
|
1683 | $ touch foo | |
1684 | $ hg ci -A -m "create foo, related" |
|
1684 | $ hg ci -A -m "create foo, related" | |
1685 | adding foo |
|
1685 | adding foo | |
1686 | $ echo 'change' > foo |
|
1686 | $ echo 'change' > foo | |
1687 | $ hg ci -m "change foo, related" |
|
1687 | $ hg ci -m "change foo, related" | |
1688 |
|
1688 | |||
1689 | $ hg up 6 |
|
1689 | $ hg up 6 | |
1690 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1690 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1691 | $ echo 'change foo in branch' > foo |
|
1691 | $ echo 'change foo in branch' > foo | |
1692 | $ hg ci -m "change foo in branch, related" |
|
1692 | $ hg ci -m "change foo in branch, related" | |
1693 | created new head |
|
1693 | created new head | |
1694 | $ hg merge 7 |
|
1694 | $ hg merge 7 | |
1695 | merging foo |
|
1695 | merging foo | |
1696 | warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') |
|
1696 | warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') | |
1697 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
1697 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
1698 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
1698 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
1699 | [1] |
|
1699 | [1] | |
1700 | $ echo 'merge 1' > foo |
|
1700 | $ echo 'merge 1' > foo | |
1701 | $ hg resolve -m foo |
|
1701 | $ hg resolve -m foo | |
1702 | (no more unresolved files) |
|
1702 | (no more unresolved files) | |
1703 | $ hg ci -m "First merge, related" |
|
1703 | $ hg ci -m "First merge, related" | |
1704 |
|
1704 | |||
1705 | $ hg merge 4 |
|
1705 | $ hg merge 4 | |
1706 | merging foo |
|
1706 | merging foo | |
1707 | warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') |
|
1707 | warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') | |
1708 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
1708 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
1709 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
1709 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
1710 | [1] |
|
1710 | [1] | |
1711 | $ echo 'merge 2' > foo |
|
1711 | $ echo 'merge 2' > foo | |
1712 | $ hg resolve -m foo |
|
1712 | $ hg resolve -m foo | |
1713 | (no more unresolved files) |
|
1713 | (no more unresolved files) | |
1714 | $ hg ci -m "Last merge, related" |
|
1714 | $ hg ci -m "Last merge, related" | |
1715 |
|
1715 | |||
1716 | $ hg log --graph |
|
1716 | $ hg log --graph | |
1717 | @ changeset: 10:4dae8563d2c5 |
|
1717 | @ changeset: 10:4dae8563d2c5 | |
1718 | |\ tag: tip |
|
1718 | |\ tag: tip | |
1719 | | | parent: 9:7b35701b003e |
|
1719 | | | parent: 9:7b35701b003e | |
1720 | | | parent: 4:88176d361b69 |
|
1720 | | | parent: 4:88176d361b69 | |
1721 | | | user: test |
|
1721 | | | user: test | |
1722 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1722 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1723 | | | summary: Last merge, related |
|
1723 | | | summary: Last merge, related | |
1724 | | | |
|
1724 | | | | |
1725 | | o changeset: 9:7b35701b003e |
|
1725 | | o changeset: 9:7b35701b003e | |
1726 | | |\ parent: 8:e5416ad8a855 |
|
1726 | | |\ parent: 8:e5416ad8a855 | |
1727 | | | | parent: 7:87fe3144dcfa |
|
1727 | | | | parent: 7:87fe3144dcfa | |
1728 | | | | user: test |
|
1728 | | | | user: test | |
1729 | | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1729 | | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1730 | | | | summary: First merge, related |
|
1730 | | | | summary: First merge, related | |
1731 | | | | |
|
1731 | | | | | |
1732 | | | o changeset: 8:e5416ad8a855 |
|
1732 | | | o changeset: 8:e5416ad8a855 | |
1733 | | | | parent: 6:dc6c325fe5ee |
|
1733 | | | | parent: 6:dc6c325fe5ee | |
1734 | | | | user: test |
|
1734 | | | | user: test | |
1735 | | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1735 | | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1736 | | | | summary: change foo in branch, related |
|
1736 | | | | summary: change foo in branch, related | |
1737 | | | | |
|
1737 | | | | | |
1738 | | o | changeset: 7:87fe3144dcfa |
|
1738 | | o | changeset: 7:87fe3144dcfa | |
1739 | | |/ user: test |
|
1739 | | |/ user: test | |
1740 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1740 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1741 | | | summary: change foo, related |
|
1741 | | | summary: change foo, related | |
1742 | | | |
|
1742 | | | | |
1743 | | o changeset: 6:dc6c325fe5ee |
|
1743 | | o changeset: 6:dc6c325fe5ee | |
1744 | | | user: test |
|
1744 | | | user: test | |
1745 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1745 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1746 | | | summary: create foo, related |
|
1746 | | | summary: create foo, related | |
1747 | | | |
|
1747 | | | | |
1748 | | o changeset: 5:73db34516eb9 |
|
1748 | | o changeset: 5:73db34516eb9 | |
1749 | | | parent: 0:e87515fd044a |
|
1749 | | | parent: 0:e87515fd044a | |
1750 | | | user: test |
|
1750 | | | user: test | |
1751 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1751 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1752 | | | summary: first branch, unrelated |
|
1752 | | | summary: first branch, unrelated | |
1753 | | | |
|
1753 | | | | |
1754 | o | changeset: 4:88176d361b69 |
|
1754 | o | changeset: 4:88176d361b69 | |
1755 | | | user: test |
|
1755 | | | user: test | |
1756 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1756 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1757 | | | summary: add foo, related |
|
1757 | | | summary: add foo, related | |
1758 | | | |
|
1758 | | | | |
1759 | o | changeset: 3:dd78ae4afb56 |
|
1759 | o | changeset: 3:dd78ae4afb56 | |
1760 | | | user: test |
|
1760 | | | user: test | |
1761 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1761 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1762 | | | summary: delete foo, unrelated |
|
1762 | | | summary: delete foo, unrelated | |
1763 | | | |
|
1763 | | | | |
1764 | o | changeset: 2:c4c64aedf0f7 |
|
1764 | o | changeset: 2:c4c64aedf0f7 | |
1765 | | | user: test |
|
1765 | | | user: test | |
1766 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1766 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1767 | | | summary: add unrelated old foo |
|
1767 | | | summary: add unrelated old foo | |
1768 | | | |
|
1768 | | | | |
1769 | o | changeset: 1:e5faa7440653 |
|
1769 | o | changeset: 1:e5faa7440653 | |
1770 | |/ user: test |
|
1770 | |/ user: test | |
1771 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1771 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1772 | | summary: change, unrelated |
|
1772 | | summary: change, unrelated | |
1773 | | |
|
1773 | | | |
1774 | o changeset: 0:e87515fd044a |
|
1774 | o changeset: 0:e87515fd044a | |
1775 | user: test |
|
1775 | user: test | |
1776 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1776 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1777 | summary: init, unrelated |
|
1777 | summary: init, unrelated | |
1778 |
|
1778 | |||
1779 |
|
1779 | |||
1780 | $ hg --traceback log -f foo |
|
1780 | $ hg --traceback log -f foo | |
1781 | changeset: 10:4dae8563d2c5 |
|
1781 | changeset: 10:4dae8563d2c5 | |
1782 | tag: tip |
|
1782 | tag: tip | |
1783 | parent: 9:7b35701b003e |
|
1783 | parent: 9:7b35701b003e | |
1784 | parent: 4:88176d361b69 |
|
1784 | parent: 4:88176d361b69 | |
1785 | user: test |
|
1785 | user: test | |
1786 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1786 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1787 | summary: Last merge, related |
|
1787 | summary: Last merge, related | |
1788 |
|
1788 | |||
1789 | changeset: 9:7b35701b003e |
|
1789 | changeset: 9:7b35701b003e | |
1790 | parent: 8:e5416ad8a855 |
|
1790 | parent: 8:e5416ad8a855 | |
1791 | parent: 7:87fe3144dcfa |
|
1791 | parent: 7:87fe3144dcfa | |
1792 | user: test |
|
1792 | user: test | |
1793 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1793 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1794 | summary: First merge, related |
|
1794 | summary: First merge, related | |
1795 |
|
1795 | |||
1796 | changeset: 8:e5416ad8a855 |
|
1796 | changeset: 8:e5416ad8a855 | |
1797 | parent: 6:dc6c325fe5ee |
|
1797 | parent: 6:dc6c325fe5ee | |
1798 | user: test |
|
1798 | user: test | |
1799 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1799 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1800 | summary: change foo in branch, related |
|
1800 | summary: change foo in branch, related | |
1801 |
|
1801 | |||
1802 | changeset: 7:87fe3144dcfa |
|
1802 | changeset: 7:87fe3144dcfa | |
1803 | user: test |
|
1803 | user: test | |
1804 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1804 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1805 | summary: change foo, related |
|
1805 | summary: change foo, related | |
1806 |
|
1806 | |||
1807 | changeset: 6:dc6c325fe5ee |
|
1807 | changeset: 6:dc6c325fe5ee | |
1808 | user: test |
|
1808 | user: test | |
1809 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1809 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1810 | summary: create foo, related |
|
1810 | summary: create foo, related | |
1811 |
|
1811 | |||
1812 | changeset: 4:88176d361b69 |
|
1812 | changeset: 4:88176d361b69 | |
1813 | user: test |
|
1813 | user: test | |
1814 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1814 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1815 | summary: add foo, related |
|
1815 | summary: add foo, related | |
1816 |
|
1816 | |||
1817 |
|
1817 | |||
1818 | Also check when maxrev < lastrevfilelog |
|
1818 | Also check when maxrev < lastrevfilelog | |
1819 |
|
1819 | |||
1820 | $ hg --traceback log -f -r4 foo |
|
1820 | $ hg --traceback log -f -r4 foo | |
1821 | changeset: 4:88176d361b69 |
|
1821 | changeset: 4:88176d361b69 | |
1822 | user: test |
|
1822 | user: test | |
1823 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1823 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1824 | summary: add foo, related |
|
1824 | summary: add foo, related | |
1825 |
|
1825 | |||
1826 | $ cd .. |
|
1826 | $ cd .. | |
1827 |
|
1827 | |||
1828 | Issue2383: hg log showing _less_ differences than hg diff |
|
1828 | Issue2383: hg log showing _less_ differences than hg diff | |
1829 |
|
1829 | |||
1830 | $ hg init issue2383 |
|
1830 | $ hg init issue2383 | |
1831 | $ cd issue2383 |
|
1831 | $ cd issue2383 | |
1832 |
|
1832 | |||
1833 | Create a test repo: |
|
1833 | Create a test repo: | |
1834 |
|
1834 | |||
1835 | $ echo a > a |
|
1835 | $ echo a > a | |
1836 | $ hg ci -Am0 |
|
1836 | $ hg ci -Am0 | |
1837 | adding a |
|
1837 | adding a | |
1838 | $ echo b > b |
|
1838 | $ echo b > b | |
1839 | $ hg ci -Am1 |
|
1839 | $ hg ci -Am1 | |
1840 | adding b |
|
1840 | adding b | |
1841 | $ hg co 0 |
|
1841 | $ hg co 0 | |
1842 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1842 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1843 | $ echo b > a |
|
1843 | $ echo b > a | |
1844 | $ hg ci -m2 |
|
1844 | $ hg ci -m2 | |
1845 | created new head |
|
1845 | created new head | |
1846 |
|
1846 | |||
1847 | Merge: |
|
1847 | Merge: | |
1848 |
|
1848 | |||
1849 | $ hg merge |
|
1849 | $ hg merge | |
1850 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1850 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1851 | (branch merge, don't forget to commit) |
|
1851 | (branch merge, don't forget to commit) | |
1852 |
|
1852 | |||
1853 | Make sure there's a file listed in the merge to trigger the bug: |
|
1853 | Make sure there's a file listed in the merge to trigger the bug: | |
1854 |
|
1854 | |||
1855 | $ echo c > a |
|
1855 | $ echo c > a | |
1856 | $ hg ci -m3 |
|
1856 | $ hg ci -m3 | |
1857 |
|
1857 | |||
1858 | Two files shown here in diff: |
|
1858 | Two files shown here in diff: | |
1859 |
|
1859 | |||
1860 | $ hg diff --rev 2:3 |
|
1860 | $ hg diff --rev 2:3 | |
1861 | diff -r b09be438c43a -r 8e07aafe1edc a |
|
1861 | diff -r b09be438c43a -r 8e07aafe1edc a | |
1862 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1862 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1863 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1863 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
1864 | @@ -1,1 +1,1 @@ |
|
1864 | @@ -1,1 +1,1 @@ | |
1865 | -b |
|
1865 | -b | |
1866 | +c |
|
1866 | +c | |
1867 | diff -r b09be438c43a -r 8e07aafe1edc b |
|
1867 | diff -r b09be438c43a -r 8e07aafe1edc b | |
1868 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1868 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1869 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
1869 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 | |
1870 | @@ -0,0 +1,1 @@ |
|
1870 | @@ -0,0 +1,1 @@ | |
1871 | +b |
|
1871 | +b | |
1872 |
|
1872 | |||
1873 | Diff here should be the same: |
|
1873 | Diff here should be the same: | |
1874 |
|
1874 | |||
1875 | $ hg log -vpr 3 |
|
1875 | $ hg log -vpr 3 | |
1876 | changeset: 3:8e07aafe1edc |
|
1876 | changeset: 3:8e07aafe1edc | |
1877 | tag: tip |
|
1877 | tag: tip | |
1878 | parent: 2:b09be438c43a |
|
1878 | parent: 2:b09be438c43a | |
1879 | parent: 1:925d80f479bb |
|
1879 | parent: 1:925d80f479bb | |
1880 | user: test |
|
1880 | user: test | |
1881 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1881 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1882 | files: a |
|
1882 | files: a | |
1883 | description: |
|
1883 | description: | |
1884 | 3 |
|
1884 | 3 | |
1885 |
|
1885 | |||
1886 |
|
1886 | |||
1887 | diff -r b09be438c43a -r 8e07aafe1edc a |
|
1887 | diff -r b09be438c43a -r 8e07aafe1edc a | |
1888 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1888 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1889 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1889 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
1890 | @@ -1,1 +1,1 @@ |
|
1890 | @@ -1,1 +1,1 @@ | |
1891 | -b |
|
1891 | -b | |
1892 | +c |
|
1892 | +c | |
1893 | diff -r b09be438c43a -r 8e07aafe1edc b |
|
1893 | diff -r b09be438c43a -r 8e07aafe1edc b | |
1894 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1894 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1895 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
1895 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 | |
1896 | @@ -0,0 +1,1 @@ |
|
1896 | @@ -0,0 +1,1 @@ | |
1897 | +b |
|
1897 | +b | |
1898 |
|
1898 | |||
1899 | $ cd .. |
|
1899 | $ cd .. | |
1900 |
|
1900 | |||
1901 | 'hg log -r rev fn' when last(filelog(fn)) != rev |
|
1901 | 'hg log -r rev fn' when last(filelog(fn)) != rev | |
1902 |
|
1902 | |||
1903 | $ hg init simplelog |
|
1903 | $ hg init simplelog | |
1904 | $ cd simplelog |
|
1904 | $ cd simplelog | |
1905 | $ echo f > a |
|
1905 | $ echo f > a | |
1906 | $ hg ci -Am'a' -d '0 0' |
|
1906 | $ hg ci -Am'a' -d '0 0' | |
1907 | adding a |
|
1907 | adding a | |
1908 | $ echo f >> a |
|
1908 | $ echo f >> a | |
1909 | $ hg ci -Am'a bis' -d '1 0' |
|
1909 | $ hg ci -Am'a bis' -d '1 0' | |
1910 |
|
1910 | |||
1911 | $ hg log -r0 a |
|
1911 | $ hg log -r0 a | |
1912 | changeset: 0:9f758d63dcde |
|
1912 | changeset: 0:9f758d63dcde | |
1913 | user: test |
|
1913 | user: test | |
1914 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1914 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1915 | summary: a |
|
1915 | summary: a | |
1916 |
|
1916 | |||
1917 | enable obsolete to test hidden feature |
|
1917 | enable obsolete to test hidden feature | |
1918 |
|
1918 | |||
1919 | $ cat >> $HGRCPATH << EOF |
|
1919 | $ cat >> $HGRCPATH << EOF | |
1920 | > [experimental] |
|
1920 | > [experimental] | |
1921 | > evolution.createmarkers=True |
|
1921 | > evolution.createmarkers=True | |
1922 | > EOF |
|
1922 | > EOF | |
1923 |
|
1923 | |||
1924 | $ hg log --template='{rev}:{node}\n' |
|
1924 | $ hg log --template='{rev}:{node}\n' | |
1925 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1925 | 1:a765632148dc55d38c35c4f247c618701886cb2f | |
1926 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1926 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | |
1927 | $ hg debugobsolete a765632148dc55d38c35c4f247c618701886cb2f |
|
1927 | $ hg debugobsolete a765632148dc55d38c35c4f247c618701886cb2f | |
1928 | obsoleted 1 changesets |
|
1928 | obsoleted 1 changesets | |
1929 | $ hg up null -q |
|
1929 | $ hg up null -q | |
1930 | $ hg log --template='{rev}:{node}\n' |
|
1930 | $ hg log --template='{rev}:{node}\n' | |
1931 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1931 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | |
1932 | $ hg log --template='{rev}:{node}\n' --hidden |
|
1932 | $ hg log --template='{rev}:{node}\n' --hidden | |
1933 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1933 | 1:a765632148dc55d38c35c4f247c618701886cb2f | |
1934 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1934 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | |
1935 | $ hg log -r a |
|
1935 | $ hg log -r a | |
1936 | abort: hidden revision 'a' is pruned! |
|
1936 | abort: hidden revision 'a' is pruned! | |
1937 | (use --hidden to access hidden revisions) |
|
1937 | (use --hidden to access hidden revisions) | |
1938 | [255] |
|
1938 | [255] | |
1939 |
|
1939 | |||
1940 | test that parent prevent a changeset to be hidden |
|
1940 | test that parent prevent a changeset to be hidden | |
1941 |
|
1941 | |||
1942 | $ hg up 1 -q --hidden |
|
1942 | $ hg up 1 -q --hidden | |
1943 | updating to a hidden changeset a765632148dc |
|
1943 | updating to a hidden changeset a765632148dc | |
1944 | (hidden revision 'a765632148dc' is pruned) |
|
1944 | (hidden revision 'a765632148dc' is pruned) | |
1945 | $ hg log --template='{rev}:{node}\n' |
|
1945 | $ hg log --template='{rev}:{node}\n' | |
1946 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1946 | 1:a765632148dc55d38c35c4f247c618701886cb2f | |
1947 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1947 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | |
1948 |
|
1948 | |||
1949 | test that second parent prevent a changeset to be hidden too |
|
1949 | test that second parent prevent a changeset to be hidden too | |
1950 |
|
1950 | |||
1951 | $ hg debugsetparents 0 1 # nothing suitable to merge here |
|
1951 | $ hg debugsetparents 0 1 # nothing suitable to merge here | |
1952 | $ hg log --template='{rev}:{node}\n' |
|
1952 | $ hg log --template='{rev}:{node}\n' | |
1953 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1953 | 1:a765632148dc55d38c35c4f247c618701886cb2f | |
1954 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1954 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | |
1955 | $ hg debugsetparents 1 |
|
1955 | $ hg debugsetparents 1 | |
1956 | $ hg up -q null |
|
1956 | $ hg up -q null | |
1957 |
|
1957 | |||
1958 | bookmarks prevent a changeset being hidden |
|
1958 | bookmarks prevent a changeset being hidden | |
1959 |
|
1959 | |||
1960 | $ hg bookmark --hidden -r 1 X |
|
1960 | $ hg bookmark --hidden -r 1 X | |
1961 | bookmarking hidden changeset a765632148dc |
|
1961 | bookmarking hidden changeset a765632148dc | |
|
1962 | (hidden revision 'a765632148dc' is pruned) | |||
1962 | $ hg log --template '{rev}:{node}\n' |
|
1963 | $ hg log --template '{rev}:{node}\n' | |
1963 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1964 | 1:a765632148dc55d38c35c4f247c618701886cb2f | |
1964 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1965 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | |
1965 | $ hg bookmark -d X |
|
1966 | $ hg bookmark -d X | |
1966 |
|
1967 | |||
1967 | divergent bookmarks are not hidden |
|
1968 | divergent bookmarks are not hidden | |
1968 |
|
1969 | |||
1969 | $ hg bookmark --hidden -r 1 X@foo |
|
1970 | $ hg bookmark --hidden -r 1 X@foo | |
1970 | bookmarking hidden changeset a765632148dc |
|
1971 | bookmarking hidden changeset a765632148dc | |
|
1972 | (hidden revision 'a765632148dc' is pruned) | |||
1971 | $ hg log --template '{rev}:{node}\n' |
|
1973 | $ hg log --template '{rev}:{node}\n' | |
1972 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1974 | 1:a765632148dc55d38c35c4f247c618701886cb2f | |
1973 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1975 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | |
1974 |
|
1976 | |||
1975 | test hidden revision 0 (issue5385) |
|
1977 | test hidden revision 0 (issue5385) | |
1976 |
|
1978 | |||
1977 | $ hg bookmark -d X@foo |
|
1979 | $ hg bookmark -d X@foo | |
1978 | $ hg up null -q |
|
1980 | $ hg up null -q | |
1979 | $ hg debugobsolete 9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1981 | $ hg debugobsolete 9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | |
1980 | obsoleted 1 changesets |
|
1982 | obsoleted 1 changesets | |
1981 | $ echo f > b |
|
1983 | $ echo f > b | |
1982 | $ hg ci -Am'b' -d '2 0' |
|
1984 | $ hg ci -Am'b' -d '2 0' | |
1983 | adding b |
|
1985 | adding b | |
1984 | $ echo f >> b |
|
1986 | $ echo f >> b | |
1985 | $ hg ci -m'b bis' -d '3 0' |
|
1987 | $ hg ci -m'b bis' -d '3 0' | |
1986 | $ hg log -T'{rev}:{node}\n' |
|
1988 | $ hg log -T'{rev}:{node}\n' | |
1987 | 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e |
|
1989 | 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e | |
1988 | 2:94375ec45bddd2a824535fc04855bd058c926ec0 |
|
1990 | 2:94375ec45bddd2a824535fc04855bd058c926ec0 | |
1989 |
|
1991 | |||
1990 | $ hg log -T'{rev}:{node}\n' -r: |
|
1992 | $ hg log -T'{rev}:{node}\n' -r: | |
1991 | 2:94375ec45bddd2a824535fc04855bd058c926ec0 |
|
1993 | 2:94375ec45bddd2a824535fc04855bd058c926ec0 | |
1992 | 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e |
|
1994 | 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e | |
1993 | $ hg log -T'{rev}:{node}\n' -r:tip |
|
1995 | $ hg log -T'{rev}:{node}\n' -r:tip | |
1994 | 2:94375ec45bddd2a824535fc04855bd058c926ec0 |
|
1996 | 2:94375ec45bddd2a824535fc04855bd058c926ec0 | |
1995 | 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e |
|
1997 | 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e | |
1996 | $ hg log -T'{rev}:{node}\n' -r:0 |
|
1998 | $ hg log -T'{rev}:{node}\n' -r:0 | |
1997 | abort: hidden revision '0' is pruned! |
|
1999 | abort: hidden revision '0' is pruned! | |
1998 | (use --hidden to access hidden revisions) |
|
2000 | (use --hidden to access hidden revisions) | |
1999 | [255] |
|
2001 | [255] | |
2000 | $ hg log -T'{rev}:{node}\n' -f |
|
2002 | $ hg log -T'{rev}:{node}\n' -f | |
2001 | 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e |
|
2003 | 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e | |
2002 | 2:94375ec45bddd2a824535fc04855bd058c926ec0 |
|
2004 | 2:94375ec45bddd2a824535fc04855bd058c926ec0 | |
2003 |
|
2005 | |||
2004 | clear extensions configuration |
|
2006 | clear extensions configuration | |
2005 | $ echo '[extensions]' >> $HGRCPATH |
|
2007 | $ echo '[extensions]' >> $HGRCPATH | |
2006 | $ echo "obs=!" >> $HGRCPATH |
|
2008 | $ echo "obs=!" >> $HGRCPATH | |
2007 | $ cd .. |
|
2009 | $ cd .. | |
2008 |
|
2010 | |||
2009 | test -u/-k for problematic encoding |
|
2011 | test -u/-k for problematic encoding | |
2010 | # unicode: cp932: |
|
2012 | # unicode: cp932: | |
2011 | # u30A2 0x83 0x41(= 'A') |
|
2013 | # u30A2 0x83 0x41(= 'A') | |
2012 | # u30C2 0x83 0x61(= 'a') |
|
2014 | # u30C2 0x83 0x61(= 'a') | |
2013 |
|
2015 | |||
2014 | $ hg init problematicencoding |
|
2016 | $ hg init problematicencoding | |
2015 | $ cd problematicencoding |
|
2017 | $ cd problematicencoding | |
2016 |
|
2018 | |||
2017 | $ $PYTHON > setup.sh <<EOF |
|
2019 | $ $PYTHON > setup.sh <<EOF | |
2018 | > print(u''' |
|
2020 | > print(u''' | |
2019 | > echo a > text |
|
2021 | > echo a > text | |
2020 | > hg add text |
|
2022 | > hg add text | |
2021 | > hg --encoding utf-8 commit -u '\u30A2' -m none |
|
2023 | > hg --encoding utf-8 commit -u '\u30A2' -m none | |
2022 | > echo b > text |
|
2024 | > echo b > text | |
2023 | > hg --encoding utf-8 commit -u '\u30C2' -m none |
|
2025 | > hg --encoding utf-8 commit -u '\u30C2' -m none | |
2024 | > echo c > text |
|
2026 | > echo c > text | |
2025 | > hg --encoding utf-8 commit -u none -m '\u30A2' |
|
2027 | > hg --encoding utf-8 commit -u none -m '\u30A2' | |
2026 | > echo d > text |
|
2028 | > echo d > text | |
2027 | > hg --encoding utf-8 commit -u none -m '\u30C2' |
|
2029 | > hg --encoding utf-8 commit -u none -m '\u30C2' | |
2028 | > '''.encode('utf-8')) |
|
2030 | > '''.encode('utf-8')) | |
2029 | > EOF |
|
2031 | > EOF | |
2030 | $ sh < setup.sh |
|
2032 | $ sh < setup.sh | |
2031 |
|
2033 | |||
2032 | test in problematic encoding |
|
2034 | test in problematic encoding | |
2033 | $ $PYTHON > test.sh <<EOF |
|
2035 | $ $PYTHON > test.sh <<EOF | |
2034 | > print(u''' |
|
2036 | > print(u''' | |
2035 | > hg --encoding cp932 log --template '{rev}\\n' -u '\u30A2' |
|
2037 | > hg --encoding cp932 log --template '{rev}\\n' -u '\u30A2' | |
2036 | > echo ==== |
|
2038 | > echo ==== | |
2037 | > hg --encoding cp932 log --template '{rev}\\n' -u '\u30C2' |
|
2039 | > hg --encoding cp932 log --template '{rev}\\n' -u '\u30C2' | |
2038 | > echo ==== |
|
2040 | > echo ==== | |
2039 | > hg --encoding cp932 log --template '{rev}\\n' -k '\u30A2' |
|
2041 | > hg --encoding cp932 log --template '{rev}\\n' -k '\u30A2' | |
2040 | > echo ==== |
|
2042 | > echo ==== | |
2041 | > hg --encoding cp932 log --template '{rev}\\n' -k '\u30C2' |
|
2043 | > hg --encoding cp932 log --template '{rev}\\n' -k '\u30C2' | |
2042 | > '''.encode('cp932')) |
|
2044 | > '''.encode('cp932')) | |
2043 | > EOF |
|
2045 | > EOF | |
2044 | $ sh < test.sh |
|
2046 | $ sh < test.sh | |
2045 | 0 |
|
2047 | 0 | |
2046 | ==== |
|
2048 | ==== | |
2047 | 1 |
|
2049 | 1 | |
2048 | ==== |
|
2050 | ==== | |
2049 | 2 |
|
2051 | 2 | |
2050 | 0 |
|
2052 | 0 | |
2051 | ==== |
|
2053 | ==== | |
2052 | 3 |
|
2054 | 3 | |
2053 | 1 |
|
2055 | 1 | |
2054 |
|
2056 | |||
2055 | $ cd .. |
|
2057 | $ cd .. | |
2056 |
|
2058 | |||
2057 | test hg log on non-existent files and on directories |
|
2059 | test hg log on non-existent files and on directories | |
2058 | $ hg init issue1340 |
|
2060 | $ hg init issue1340 | |
2059 | $ cd issue1340 |
|
2061 | $ cd issue1340 | |
2060 | $ mkdir d1; mkdir D2; mkdir D3.i; mkdir d4.hg; mkdir d5.d; mkdir .d6 |
|
2062 | $ mkdir d1; mkdir D2; mkdir D3.i; mkdir d4.hg; mkdir d5.d; mkdir .d6 | |
2061 | $ echo 1 > d1/f1 |
|
2063 | $ echo 1 > d1/f1 | |
2062 | $ echo 1 > D2/f1 |
|
2064 | $ echo 1 > D2/f1 | |
2063 | $ echo 1 > D3.i/f1 |
|
2065 | $ echo 1 > D3.i/f1 | |
2064 | $ echo 1 > d4.hg/f1 |
|
2066 | $ echo 1 > d4.hg/f1 | |
2065 | $ echo 1 > d5.d/f1 |
|
2067 | $ echo 1 > d5.d/f1 | |
2066 | $ echo 1 > .d6/f1 |
|
2068 | $ echo 1 > .d6/f1 | |
2067 | $ hg -q add . |
|
2069 | $ hg -q add . | |
2068 | $ hg commit -m "a bunch of weird directories" |
|
2070 | $ hg commit -m "a bunch of weird directories" | |
2069 | $ hg log -l1 d1/f1 | grep changeset |
|
2071 | $ hg log -l1 d1/f1 | grep changeset | |
2070 | changeset: 0:65624cd9070a |
|
2072 | changeset: 0:65624cd9070a | |
2071 | $ hg log -l1 f1 |
|
2073 | $ hg log -l1 f1 | |
2072 | $ hg log -l1 . | grep changeset |
|
2074 | $ hg log -l1 . | grep changeset | |
2073 | changeset: 0:65624cd9070a |
|
2075 | changeset: 0:65624cd9070a | |
2074 | $ hg log -l1 ./ | grep changeset |
|
2076 | $ hg log -l1 ./ | grep changeset | |
2075 | changeset: 0:65624cd9070a |
|
2077 | changeset: 0:65624cd9070a | |
2076 | $ hg log -l1 d1 | grep changeset |
|
2078 | $ hg log -l1 d1 | grep changeset | |
2077 | changeset: 0:65624cd9070a |
|
2079 | changeset: 0:65624cd9070a | |
2078 | $ hg log -l1 D2 | grep changeset |
|
2080 | $ hg log -l1 D2 | grep changeset | |
2079 | changeset: 0:65624cd9070a |
|
2081 | changeset: 0:65624cd9070a | |
2080 | $ hg log -l1 D2/f1 | grep changeset |
|
2082 | $ hg log -l1 D2/f1 | grep changeset | |
2081 | changeset: 0:65624cd9070a |
|
2083 | changeset: 0:65624cd9070a | |
2082 | $ hg log -l1 D3.i | grep changeset |
|
2084 | $ hg log -l1 D3.i | grep changeset | |
2083 | changeset: 0:65624cd9070a |
|
2085 | changeset: 0:65624cd9070a | |
2084 | $ hg log -l1 D3.i/f1 | grep changeset |
|
2086 | $ hg log -l1 D3.i/f1 | grep changeset | |
2085 | changeset: 0:65624cd9070a |
|
2087 | changeset: 0:65624cd9070a | |
2086 | $ hg log -l1 d4.hg | grep changeset |
|
2088 | $ hg log -l1 d4.hg | grep changeset | |
2087 | changeset: 0:65624cd9070a |
|
2089 | changeset: 0:65624cd9070a | |
2088 | $ hg log -l1 d4.hg/f1 | grep changeset |
|
2090 | $ hg log -l1 d4.hg/f1 | grep changeset | |
2089 | changeset: 0:65624cd9070a |
|
2091 | changeset: 0:65624cd9070a | |
2090 | $ hg log -l1 d5.d | grep changeset |
|
2092 | $ hg log -l1 d5.d | grep changeset | |
2091 | changeset: 0:65624cd9070a |
|
2093 | changeset: 0:65624cd9070a | |
2092 | $ hg log -l1 d5.d/f1 | grep changeset |
|
2094 | $ hg log -l1 d5.d/f1 | grep changeset | |
2093 | changeset: 0:65624cd9070a |
|
2095 | changeset: 0:65624cd9070a | |
2094 | $ hg log -l1 .d6 | grep changeset |
|
2096 | $ hg log -l1 .d6 | grep changeset | |
2095 | changeset: 0:65624cd9070a |
|
2097 | changeset: 0:65624cd9070a | |
2096 | $ hg log -l1 .d6/f1 | grep changeset |
|
2098 | $ hg log -l1 .d6/f1 | grep changeset | |
2097 | changeset: 0:65624cd9070a |
|
2099 | changeset: 0:65624cd9070a | |
2098 |
|
2100 | |||
2099 | issue3772: hg log -r :null showing revision 0 as well |
|
2101 | issue3772: hg log -r :null showing revision 0 as well | |
2100 |
|
2102 | |||
2101 | $ hg log -r :null |
|
2103 | $ hg log -r :null | |
2102 | changeset: 0:65624cd9070a |
|
2104 | changeset: 0:65624cd9070a | |
2103 | tag: tip |
|
2105 | tag: tip | |
2104 | user: test |
|
2106 | user: test | |
2105 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2107 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2106 | summary: a bunch of weird directories |
|
2108 | summary: a bunch of weird directories | |
2107 |
|
2109 | |||
2108 | changeset: -1:000000000000 |
|
2110 | changeset: -1:000000000000 | |
2109 | user: |
|
2111 | user: | |
2110 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2112 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2111 |
|
2113 | |||
2112 | $ hg log -r null:null |
|
2114 | $ hg log -r null:null | |
2113 | changeset: -1:000000000000 |
|
2115 | changeset: -1:000000000000 | |
2114 | user: |
|
2116 | user: | |
2115 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2117 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2116 |
|
2118 | |||
2117 | working-directory revision requires special treatment |
|
2119 | working-directory revision requires special treatment | |
2118 |
|
2120 | |||
2119 | clean: |
|
2121 | clean: | |
2120 |
|
2122 | |||
2121 | $ hg log -r 'wdir()' --debug |
|
2123 | $ hg log -r 'wdir()' --debug | |
2122 | changeset: 2147483647:ffffffffffffffffffffffffffffffffffffffff |
|
2124 | changeset: 2147483647:ffffffffffffffffffffffffffffffffffffffff | |
2123 | phase: draft |
|
2125 | phase: draft | |
2124 | parent: 0:65624cd9070a035fa7191a54f2b8af39f16b0c08 |
|
2126 | parent: 0:65624cd9070a035fa7191a54f2b8af39f16b0c08 | |
2125 | parent: -1:0000000000000000000000000000000000000000 |
|
2127 | parent: -1:0000000000000000000000000000000000000000 | |
2126 | user: test |
|
2128 | user: test | |
2127 | date: [A-Za-z0-9:+ ]+ (re) |
|
2129 | date: [A-Za-z0-9:+ ]+ (re) | |
2128 | extra: branch=default |
|
2130 | extra: branch=default | |
2129 |
|
2131 | |||
2130 | $ hg log -r 'wdir()' -p --stat |
|
2132 | $ hg log -r 'wdir()' -p --stat | |
2131 | changeset: 2147483647:ffffffffffff |
|
2133 | changeset: 2147483647:ffffffffffff | |
2132 | parent: 0:65624cd9070a |
|
2134 | parent: 0:65624cd9070a | |
2133 | user: test |
|
2135 | user: test | |
2134 | date: [A-Za-z0-9:+ ]+ (re) |
|
2136 | date: [A-Za-z0-9:+ ]+ (re) | |
2135 |
|
2137 | |||
2136 |
|
2138 | |||
2137 |
|
2139 | |||
2138 |
|
2140 | |||
2139 | dirty: |
|
2141 | dirty: | |
2140 |
|
2142 | |||
2141 | $ echo 2 >> d1/f1 |
|
2143 | $ echo 2 >> d1/f1 | |
2142 | $ echo 2 > d1/f2 |
|
2144 | $ echo 2 > d1/f2 | |
2143 | $ hg add d1/f2 |
|
2145 | $ hg add d1/f2 | |
2144 | $ hg remove .d6/f1 |
|
2146 | $ hg remove .d6/f1 | |
2145 | $ hg status |
|
2147 | $ hg status | |
2146 | M d1/f1 |
|
2148 | M d1/f1 | |
2147 | A d1/f2 |
|
2149 | A d1/f2 | |
2148 | R .d6/f1 |
|
2150 | R .d6/f1 | |
2149 |
|
2151 | |||
2150 | $ hg log -r 'wdir()' |
|
2152 | $ hg log -r 'wdir()' | |
2151 | changeset: 2147483647:ffffffffffff |
|
2153 | changeset: 2147483647:ffffffffffff | |
2152 | parent: 0:65624cd9070a |
|
2154 | parent: 0:65624cd9070a | |
2153 | user: test |
|
2155 | user: test | |
2154 | date: [A-Za-z0-9:+ ]+ (re) |
|
2156 | date: [A-Za-z0-9:+ ]+ (re) | |
2155 |
|
2157 | |||
2156 | $ hg log -r 'wdir()' -q |
|
2158 | $ hg log -r 'wdir()' -q | |
2157 | 2147483647:ffffffffffff |
|
2159 | 2147483647:ffffffffffff | |
2158 |
|
2160 | |||
2159 | $ hg log -r 'wdir()' --debug |
|
2161 | $ hg log -r 'wdir()' --debug | |
2160 | changeset: 2147483647:ffffffffffffffffffffffffffffffffffffffff |
|
2162 | changeset: 2147483647:ffffffffffffffffffffffffffffffffffffffff | |
2161 | phase: draft |
|
2163 | phase: draft | |
2162 | parent: 0:65624cd9070a035fa7191a54f2b8af39f16b0c08 |
|
2164 | parent: 0:65624cd9070a035fa7191a54f2b8af39f16b0c08 | |
2163 | parent: -1:0000000000000000000000000000000000000000 |
|
2165 | parent: -1:0000000000000000000000000000000000000000 | |
2164 | user: test |
|
2166 | user: test | |
2165 | date: [A-Za-z0-9:+ ]+ (re) |
|
2167 | date: [A-Za-z0-9:+ ]+ (re) | |
2166 | files: d1/f1 |
|
2168 | files: d1/f1 | |
2167 | files+: d1/f2 |
|
2169 | files+: d1/f2 | |
2168 | files-: .d6/f1 |
|
2170 | files-: .d6/f1 | |
2169 | extra: branch=default |
|
2171 | extra: branch=default | |
2170 |
|
2172 | |||
2171 | $ hg log -r 'wdir()' -p --stat --git |
|
2173 | $ hg log -r 'wdir()' -p --stat --git | |
2172 | changeset: 2147483647:ffffffffffff |
|
2174 | changeset: 2147483647:ffffffffffff | |
2173 | parent: 0:65624cd9070a |
|
2175 | parent: 0:65624cd9070a | |
2174 | user: test |
|
2176 | user: test | |
2175 | date: [A-Za-z0-9:+ ]+ (re) |
|
2177 | date: [A-Za-z0-9:+ ]+ (re) | |
2176 |
|
2178 | |||
2177 | .d6/f1 | 1 - |
|
2179 | .d6/f1 | 1 - | |
2178 | d1/f1 | 1 + |
|
2180 | d1/f1 | 1 + | |
2179 | d1/f2 | 1 + |
|
2181 | d1/f2 | 1 + | |
2180 | 3 files changed, 2 insertions(+), 1 deletions(-) |
|
2182 | 3 files changed, 2 insertions(+), 1 deletions(-) | |
2181 |
|
2183 | |||
2182 | diff --git a/.d6/f1 b/.d6/f1 |
|
2184 | diff --git a/.d6/f1 b/.d6/f1 | |
2183 | deleted file mode 100644 |
|
2185 | deleted file mode 100644 | |
2184 | --- a/.d6/f1 |
|
2186 | --- a/.d6/f1 | |
2185 | +++ /dev/null |
|
2187 | +++ /dev/null | |
2186 | @@ -1,1 +0,0 @@ |
|
2188 | @@ -1,1 +0,0 @@ | |
2187 | -1 |
|
2189 | -1 | |
2188 | diff --git a/d1/f1 b/d1/f1 |
|
2190 | diff --git a/d1/f1 b/d1/f1 | |
2189 | --- a/d1/f1 |
|
2191 | --- a/d1/f1 | |
2190 | +++ b/d1/f1 |
|
2192 | +++ b/d1/f1 | |
2191 | @@ -1,1 +1,2 @@ |
|
2193 | @@ -1,1 +1,2 @@ | |
2192 | 1 |
|
2194 | 1 | |
2193 | +2 |
|
2195 | +2 | |
2194 | diff --git a/d1/f2 b/d1/f2 |
|
2196 | diff --git a/d1/f2 b/d1/f2 | |
2195 | new file mode 100644 |
|
2197 | new file mode 100644 | |
2196 | --- /dev/null |
|
2198 | --- /dev/null | |
2197 | +++ b/d1/f2 |
|
2199 | +++ b/d1/f2 | |
2198 | @@ -0,0 +1,1 @@ |
|
2200 | @@ -0,0 +1,1 @@ | |
2199 | +2 |
|
2201 | +2 | |
2200 |
|
2202 | |||
2201 | $ hg log -r 'wdir()' -Tjson |
|
2203 | $ hg log -r 'wdir()' -Tjson | |
2202 | [ |
|
2204 | [ | |
2203 | { |
|
2205 | { | |
2204 | "rev": null, |
|
2206 | "rev": null, | |
2205 | "node": null, |
|
2207 | "node": null, | |
2206 | "branch": "default", |
|
2208 | "branch": "default", | |
2207 | "phase": "draft", |
|
2209 | "phase": "draft", | |
2208 | "user": "test", |
|
2210 | "user": "test", | |
2209 | "date": [*, 0], (glob) |
|
2211 | "date": [*, 0], (glob) | |
2210 | "desc": "", |
|
2212 | "desc": "", | |
2211 | "bookmarks": [], |
|
2213 | "bookmarks": [], | |
2212 | "tags": [], |
|
2214 | "tags": [], | |
2213 | "parents": ["65624cd9070a035fa7191a54f2b8af39f16b0c08"] |
|
2215 | "parents": ["65624cd9070a035fa7191a54f2b8af39f16b0c08"] | |
2214 | } |
|
2216 | } | |
2215 | ] |
|
2217 | ] | |
2216 |
|
2218 | |||
2217 | $ hg log -r 'wdir()' -Tjson -q |
|
2219 | $ hg log -r 'wdir()' -Tjson -q | |
2218 | [ |
|
2220 | [ | |
2219 | { |
|
2221 | { | |
2220 | "rev": null, |
|
2222 | "rev": null, | |
2221 | "node": null |
|
2223 | "node": null | |
2222 | } |
|
2224 | } | |
2223 | ] |
|
2225 | ] | |
2224 |
|
2226 | |||
2225 | $ hg log -r 'wdir()' -Tjson --debug |
|
2227 | $ hg log -r 'wdir()' -Tjson --debug | |
2226 | [ |
|
2228 | [ | |
2227 | { |
|
2229 | { | |
2228 | "rev": null, |
|
2230 | "rev": null, | |
2229 | "node": null, |
|
2231 | "node": null, | |
2230 | "branch": "default", |
|
2232 | "branch": "default", | |
2231 | "phase": "draft", |
|
2233 | "phase": "draft", | |
2232 | "user": "test", |
|
2234 | "user": "test", | |
2233 | "date": [*, 0], (glob) |
|
2235 | "date": [*, 0], (glob) | |
2234 | "desc": "", |
|
2236 | "desc": "", | |
2235 | "bookmarks": [], |
|
2237 | "bookmarks": [], | |
2236 | "tags": [], |
|
2238 | "tags": [], | |
2237 | "parents": ["65624cd9070a035fa7191a54f2b8af39f16b0c08"], |
|
2239 | "parents": ["65624cd9070a035fa7191a54f2b8af39f16b0c08"], | |
2238 | "manifest": null, |
|
2240 | "manifest": null, | |
2239 | "extra": {"branch": "default"}, |
|
2241 | "extra": {"branch": "default"}, | |
2240 | "modified": ["d1/f1"], |
|
2242 | "modified": ["d1/f1"], | |
2241 | "added": ["d1/f2"], |
|
2243 | "added": ["d1/f2"], | |
2242 | "removed": [".d6/f1"] |
|
2244 | "removed": [".d6/f1"] | |
2243 | } |
|
2245 | } | |
2244 | ] |
|
2246 | ] | |
2245 |
|
2247 | |||
2246 | $ hg revert -aqC |
|
2248 | $ hg revert -aqC | |
2247 |
|
2249 | |||
2248 | Check that adding an arbitrary name shows up in log automatically |
|
2250 | Check that adding an arbitrary name shows up in log automatically | |
2249 |
|
2251 | |||
2250 | $ cat > ../names.py <<EOF |
|
2252 | $ cat > ../names.py <<EOF | |
2251 | > """A small extension to test adding arbitrary names to a repo""" |
|
2253 | > """A small extension to test adding arbitrary names to a repo""" | |
2252 | > from __future__ import absolute_import |
|
2254 | > from __future__ import absolute_import | |
2253 | > from mercurial import namespaces |
|
2255 | > from mercurial import namespaces | |
2254 | > |
|
2256 | > | |
2255 | > def reposetup(ui, repo): |
|
2257 | > def reposetup(ui, repo): | |
2256 | > foo = {'foo': repo[0].node()} |
|
2258 | > foo = {'foo': repo[0].node()} | |
2257 | > names = lambda r: foo.keys() |
|
2259 | > names = lambda r: foo.keys() | |
2258 | > namemap = lambda r, name: foo.get(name) |
|
2260 | > namemap = lambda r, name: foo.get(name) | |
2259 | > nodemap = lambda r, node: [name for name, n in foo.iteritems() |
|
2261 | > nodemap = lambda r, node: [name for name, n in foo.iteritems() | |
2260 | > if n == node] |
|
2262 | > if n == node] | |
2261 | > ns = namespaces.namespace( |
|
2263 | > ns = namespaces.namespace( | |
2262 | > "bars", templatename="bar", logname="barlog", |
|
2264 | > "bars", templatename="bar", logname="barlog", | |
2263 | > colorname="barcolor", listnames=names, namemap=namemap, |
|
2265 | > colorname="barcolor", listnames=names, namemap=namemap, | |
2264 | > nodemap=nodemap) |
|
2266 | > nodemap=nodemap) | |
2265 | > |
|
2267 | > | |
2266 | > repo.names.addnamespace(ns) |
|
2268 | > repo.names.addnamespace(ns) | |
2267 | > EOF |
|
2269 | > EOF | |
2268 |
|
2270 | |||
2269 | $ hg --config extensions.names=../names.py log -r 0 |
|
2271 | $ hg --config extensions.names=../names.py log -r 0 | |
2270 | changeset: 0:65624cd9070a |
|
2272 | changeset: 0:65624cd9070a | |
2271 | tag: tip |
|
2273 | tag: tip | |
2272 | barlog: foo |
|
2274 | barlog: foo | |
2273 | user: test |
|
2275 | user: test | |
2274 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2276 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2275 | summary: a bunch of weird directories |
|
2277 | summary: a bunch of weird directories | |
2276 |
|
2278 | |||
2277 | $ hg --config extensions.names=../names.py \ |
|
2279 | $ hg --config extensions.names=../names.py \ | |
2278 | > --config extensions.color= --config color.log.barcolor=red \ |
|
2280 | > --config extensions.color= --config color.log.barcolor=red \ | |
2279 | > --color=always log -r 0 |
|
2281 | > --color=always log -r 0 | |
2280 | \x1b[0;33mchangeset: 0:65624cd9070a\x1b[0m (esc) |
|
2282 | \x1b[0;33mchangeset: 0:65624cd9070a\x1b[0m (esc) | |
2281 | tag: tip |
|
2283 | tag: tip | |
2282 | \x1b[0;31mbarlog: foo\x1b[0m (esc) |
|
2284 | \x1b[0;31mbarlog: foo\x1b[0m (esc) | |
2283 | user: test |
|
2285 | user: test | |
2284 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2286 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2285 | summary: a bunch of weird directories |
|
2287 | summary: a bunch of weird directories | |
2286 |
|
2288 | |||
2287 | $ hg --config extensions.names=../names.py log -r 0 --template '{bars}\n' |
|
2289 | $ hg --config extensions.names=../names.py log -r 0 --template '{bars}\n' | |
2288 | foo |
|
2290 | foo | |
2289 |
|
2291 | |||
2290 | $ cd .. |
|
2292 | $ cd .. | |
2291 |
|
2293 | |||
2292 | hg log -f dir across branches |
|
2294 | hg log -f dir across branches | |
2293 |
|
2295 | |||
2294 | $ hg init acrossbranches |
|
2296 | $ hg init acrossbranches | |
2295 | $ cd acrossbranches |
|
2297 | $ cd acrossbranches | |
2296 | $ mkdir d |
|
2298 | $ mkdir d | |
2297 | $ echo a > d/a && hg ci -Aqm a |
|
2299 | $ echo a > d/a && hg ci -Aqm a | |
2298 | $ echo b > d/a && hg ci -Aqm b |
|
2300 | $ echo b > d/a && hg ci -Aqm b | |
2299 | $ hg up -q 0 |
|
2301 | $ hg up -q 0 | |
2300 | $ echo b > d/a && hg ci -Aqm c |
|
2302 | $ echo b > d/a && hg ci -Aqm c | |
2301 | $ hg log -f d -T '{desc}' -G |
|
2303 | $ hg log -f d -T '{desc}' -G | |
2302 | @ c |
|
2304 | @ c | |
2303 | | |
|
2305 | | | |
2304 | o a |
|
2306 | o a | |
2305 |
|
2307 | |||
2306 | Ensure that largefiles doesn't interfere with following a normal file |
|
2308 | Ensure that largefiles doesn't interfere with following a normal file | |
2307 | $ hg --config extensions.largefiles= log -f d -T '{desc}' -G |
|
2309 | $ hg --config extensions.largefiles= log -f d -T '{desc}' -G | |
2308 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) |
|
2310 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) | |
2309 | @ c |
|
2311 | @ c | |
2310 | | |
|
2312 | | | |
2311 | o a |
|
2313 | o a | |
2312 |
|
2314 | |||
2313 | $ hg log -f d/a -T '{desc}' -G |
|
2315 | $ hg log -f d/a -T '{desc}' -G | |
2314 | @ c |
|
2316 | @ c | |
2315 | | |
|
2317 | | | |
2316 | o a |
|
2318 | o a | |
2317 |
|
2319 | |||
2318 | $ cd .. |
|
2320 | $ cd .. | |
2319 |
|
2321 | |||
2320 | hg log -f with linkrev pointing to another branch |
|
2322 | hg log -f with linkrev pointing to another branch | |
2321 | ------------------------------------------------- |
|
2323 | ------------------------------------------------- | |
2322 |
|
2324 | |||
2323 | create history with a filerev whose linkrev points to another branch |
|
2325 | create history with a filerev whose linkrev points to another branch | |
2324 |
|
2326 | |||
2325 | $ hg init branchedlinkrev |
|
2327 | $ hg init branchedlinkrev | |
2326 | $ cd branchedlinkrev |
|
2328 | $ cd branchedlinkrev | |
2327 | $ echo 1 > a |
|
2329 | $ echo 1 > a | |
2328 | $ hg commit -Am 'content1' |
|
2330 | $ hg commit -Am 'content1' | |
2329 | adding a |
|
2331 | adding a | |
2330 | $ echo 2 > a |
|
2332 | $ echo 2 > a | |
2331 | $ hg commit -m 'content2' |
|
2333 | $ hg commit -m 'content2' | |
2332 | $ hg up --rev 'desc(content1)' |
|
2334 | $ hg up --rev 'desc(content1)' | |
2333 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
2335 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
2334 | $ echo unrelated > unrelated |
|
2336 | $ echo unrelated > unrelated | |
2335 | $ hg commit -Am 'unrelated' |
|
2337 | $ hg commit -Am 'unrelated' | |
2336 | adding unrelated |
|
2338 | adding unrelated | |
2337 | created new head |
|
2339 | created new head | |
2338 | $ hg graft -r 'desc(content2)' |
|
2340 | $ hg graft -r 'desc(content2)' | |
2339 | grafting 1:2294ae80ad84 "content2" |
|
2341 | grafting 1:2294ae80ad84 "content2" | |
2340 | $ echo 3 > a |
|
2342 | $ echo 3 > a | |
2341 | $ hg commit -m 'content3' |
|
2343 | $ hg commit -m 'content3' | |
2342 | $ hg log -G |
|
2344 | $ hg log -G | |
2343 | @ changeset: 4:50b9b36e9c5d |
|
2345 | @ changeset: 4:50b9b36e9c5d | |
2344 | | tag: tip |
|
2346 | | tag: tip | |
2345 | | user: test |
|
2347 | | user: test | |
2346 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2348 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2347 | | summary: content3 |
|
2349 | | summary: content3 | |
2348 | | |
|
2350 | | | |
2349 | o changeset: 3:15b2327059e5 |
|
2351 | o changeset: 3:15b2327059e5 | |
2350 | | user: test |
|
2352 | | user: test | |
2351 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2353 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2352 | | summary: content2 |
|
2354 | | summary: content2 | |
2353 | | |
|
2355 | | | |
2354 | o changeset: 2:2029acd1168c |
|
2356 | o changeset: 2:2029acd1168c | |
2355 | | parent: 0:ae0a3c9f9e95 |
|
2357 | | parent: 0:ae0a3c9f9e95 | |
2356 | | user: test |
|
2358 | | user: test | |
2357 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2359 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2358 | | summary: unrelated |
|
2360 | | summary: unrelated | |
2359 | | |
|
2361 | | | |
2360 | | o changeset: 1:2294ae80ad84 |
|
2362 | | o changeset: 1:2294ae80ad84 | |
2361 | |/ user: test |
|
2363 | |/ user: test | |
2362 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2364 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2363 | | summary: content2 |
|
2365 | | summary: content2 | |
2364 | | |
|
2366 | | | |
2365 | o changeset: 0:ae0a3c9f9e95 |
|
2367 | o changeset: 0:ae0a3c9f9e95 | |
2366 | user: test |
|
2368 | user: test | |
2367 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2369 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2368 | summary: content1 |
|
2370 | summary: content1 | |
2369 |
|
2371 | |||
2370 |
|
2372 | |||
2371 | log -f on the file should list the graft result. |
|
2373 | log -f on the file should list the graft result. | |
2372 |
|
2374 | |||
2373 | $ hg log -Gf a |
|
2375 | $ hg log -Gf a | |
2374 | @ changeset: 4:50b9b36e9c5d |
|
2376 | @ changeset: 4:50b9b36e9c5d | |
2375 | | tag: tip |
|
2377 | | tag: tip | |
2376 | | user: test |
|
2378 | | user: test | |
2377 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2379 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2378 | | summary: content3 |
|
2380 | | summary: content3 | |
2379 | | |
|
2381 | | | |
2380 | o changeset: 3:15b2327059e5 |
|
2382 | o changeset: 3:15b2327059e5 | |
2381 | : user: test |
|
2383 | : user: test | |
2382 | : date: Thu Jan 01 00:00:00 1970 +0000 |
|
2384 | : date: Thu Jan 01 00:00:00 1970 +0000 | |
2383 | : summary: content2 |
|
2385 | : summary: content2 | |
2384 | : |
|
2386 | : | |
2385 | o changeset: 0:ae0a3c9f9e95 |
|
2387 | o changeset: 0:ae0a3c9f9e95 | |
2386 | user: test |
|
2388 | user: test | |
2387 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2389 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2388 | summary: content1 |
|
2390 | summary: content1 | |
2389 |
|
2391 | |||
2390 |
|
2392 | |||
2391 | plain log lists the original version |
|
2393 | plain log lists the original version | |
2392 | (XXX we should probably list both) |
|
2394 | (XXX we should probably list both) | |
2393 |
|
2395 | |||
2394 | $ hg log -G a |
|
2396 | $ hg log -G a | |
2395 | @ changeset: 4:50b9b36e9c5d |
|
2397 | @ changeset: 4:50b9b36e9c5d | |
2396 | : tag: tip |
|
2398 | : tag: tip | |
2397 | : user: test |
|
2399 | : user: test | |
2398 | : date: Thu Jan 01 00:00:00 1970 +0000 |
|
2400 | : date: Thu Jan 01 00:00:00 1970 +0000 | |
2399 | : summary: content3 |
|
2401 | : summary: content3 | |
2400 | : |
|
2402 | : | |
2401 | : o changeset: 1:2294ae80ad84 |
|
2403 | : o changeset: 1:2294ae80ad84 | |
2402 | :/ user: test |
|
2404 | :/ user: test | |
2403 | : date: Thu Jan 01 00:00:00 1970 +0000 |
|
2405 | : date: Thu Jan 01 00:00:00 1970 +0000 | |
2404 | : summary: content2 |
|
2406 | : summary: content2 | |
2405 | : |
|
2407 | : | |
2406 | o changeset: 0:ae0a3c9f9e95 |
|
2408 | o changeset: 0:ae0a3c9f9e95 | |
2407 | user: test |
|
2409 | user: test | |
2408 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2410 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2409 | summary: content1 |
|
2411 | summary: content1 | |
2410 |
|
2412 | |||
2411 |
|
2413 | |||
2412 | hg log -f from the grafted changeset |
|
2414 | hg log -f from the grafted changeset | |
2413 | (The bootstrap should properly take the topology in account) |
|
2415 | (The bootstrap should properly take the topology in account) | |
2414 |
|
2416 | |||
2415 | $ hg up 'desc(content3)^' |
|
2417 | $ hg up 'desc(content3)^' | |
2416 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
2418 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
2417 | $ hg log -Gf a |
|
2419 | $ hg log -Gf a | |
2418 | @ changeset: 3:15b2327059e5 |
|
2420 | @ changeset: 3:15b2327059e5 | |
2419 | : user: test |
|
2421 | : user: test | |
2420 | : date: Thu Jan 01 00:00:00 1970 +0000 |
|
2422 | : date: Thu Jan 01 00:00:00 1970 +0000 | |
2421 | : summary: content2 |
|
2423 | : summary: content2 | |
2422 | : |
|
2424 | : | |
2423 | o changeset: 0:ae0a3c9f9e95 |
|
2425 | o changeset: 0:ae0a3c9f9e95 | |
2424 | user: test |
|
2426 | user: test | |
2425 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2427 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2426 | summary: content1 |
|
2428 | summary: content1 | |
2427 |
|
2429 | |||
2428 |
|
2430 | |||
2429 | Test that we use the first non-hidden changeset in that case. |
|
2431 | Test that we use the first non-hidden changeset in that case. | |
2430 |
|
2432 | |||
2431 | (hide the changeset) |
|
2433 | (hide the changeset) | |
2432 |
|
2434 | |||
2433 | $ hg log -T '{node}\n' -r 1 |
|
2435 | $ hg log -T '{node}\n' -r 1 | |
2434 | 2294ae80ad8447bc78383182eeac50cb049df623 |
|
2436 | 2294ae80ad8447bc78383182eeac50cb049df623 | |
2435 | $ hg debugobsolete 2294ae80ad8447bc78383182eeac50cb049df623 |
|
2437 | $ hg debugobsolete 2294ae80ad8447bc78383182eeac50cb049df623 | |
2436 | obsoleted 1 changesets |
|
2438 | obsoleted 1 changesets | |
2437 | $ hg log -G |
|
2439 | $ hg log -G | |
2438 | o changeset: 4:50b9b36e9c5d |
|
2440 | o changeset: 4:50b9b36e9c5d | |
2439 | | tag: tip |
|
2441 | | tag: tip | |
2440 | | user: test |
|
2442 | | user: test | |
2441 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2443 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2442 | | summary: content3 |
|
2444 | | summary: content3 | |
2443 | | |
|
2445 | | | |
2444 | @ changeset: 3:15b2327059e5 |
|
2446 | @ changeset: 3:15b2327059e5 | |
2445 | | user: test |
|
2447 | | user: test | |
2446 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2448 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2447 | | summary: content2 |
|
2449 | | summary: content2 | |
2448 | | |
|
2450 | | | |
2449 | o changeset: 2:2029acd1168c |
|
2451 | o changeset: 2:2029acd1168c | |
2450 | | parent: 0:ae0a3c9f9e95 |
|
2452 | | parent: 0:ae0a3c9f9e95 | |
2451 | | user: test |
|
2453 | | user: test | |
2452 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2454 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2453 | | summary: unrelated |
|
2455 | | summary: unrelated | |
2454 | | |
|
2456 | | | |
2455 | o changeset: 0:ae0a3c9f9e95 |
|
2457 | o changeset: 0:ae0a3c9f9e95 | |
2456 | user: test |
|
2458 | user: test | |
2457 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2459 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2458 | summary: content1 |
|
2460 | summary: content1 | |
2459 |
|
2461 | |||
2460 |
|
2462 | |||
2461 | Check that log on the file does not drop the file revision. |
|
2463 | Check that log on the file does not drop the file revision. | |
2462 |
|
2464 | |||
2463 | $ hg log -G a |
|
2465 | $ hg log -G a | |
2464 | o changeset: 4:50b9b36e9c5d |
|
2466 | o changeset: 4:50b9b36e9c5d | |
2465 | | tag: tip |
|
2467 | | tag: tip | |
2466 | | user: test |
|
2468 | | user: test | |
2467 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2469 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2468 | | summary: content3 |
|
2470 | | summary: content3 | |
2469 | | |
|
2471 | | | |
2470 | @ changeset: 3:15b2327059e5 |
|
2472 | @ changeset: 3:15b2327059e5 | |
2471 | : user: test |
|
2473 | : user: test | |
2472 | : date: Thu Jan 01 00:00:00 1970 +0000 |
|
2474 | : date: Thu Jan 01 00:00:00 1970 +0000 | |
2473 | : summary: content2 |
|
2475 | : summary: content2 | |
2474 | : |
|
2476 | : | |
2475 | o changeset: 0:ae0a3c9f9e95 |
|
2477 | o changeset: 0:ae0a3c9f9e95 | |
2476 | user: test |
|
2478 | user: test | |
2477 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2479 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2478 | summary: content1 |
|
2480 | summary: content1 | |
2479 |
|
2481 | |||
2480 |
|
2482 | |||
2481 | Even when a head revision is linkrev-shadowed. |
|
2483 | Even when a head revision is linkrev-shadowed. | |
2482 |
|
2484 | |||
2483 | $ hg log -T '{node}\n' -r 4 |
|
2485 | $ hg log -T '{node}\n' -r 4 | |
2484 | 50b9b36e9c5df2c6fc6dcefa8ad0da929e84aed2 |
|
2486 | 50b9b36e9c5df2c6fc6dcefa8ad0da929e84aed2 | |
2485 | $ hg debugobsolete 50b9b36e9c5df2c6fc6dcefa8ad0da929e84aed2 |
|
2487 | $ hg debugobsolete 50b9b36e9c5df2c6fc6dcefa8ad0da929e84aed2 | |
2486 | obsoleted 1 changesets |
|
2488 | obsoleted 1 changesets | |
2487 | $ hg log -G a |
|
2489 | $ hg log -G a | |
2488 | @ changeset: 3:15b2327059e5 |
|
2490 | @ changeset: 3:15b2327059e5 | |
2489 | : tag: tip |
|
2491 | : tag: tip | |
2490 | : user: test |
|
2492 | : user: test | |
2491 | : date: Thu Jan 01 00:00:00 1970 +0000 |
|
2493 | : date: Thu Jan 01 00:00:00 1970 +0000 | |
2492 | : summary: content2 |
|
2494 | : summary: content2 | |
2493 | : |
|
2495 | : | |
2494 | o changeset: 0:ae0a3c9f9e95 |
|
2496 | o changeset: 0:ae0a3c9f9e95 | |
2495 | user: test |
|
2497 | user: test | |
2496 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2498 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2497 | summary: content1 |
|
2499 | summary: content1 | |
2498 |
|
2500 | |||
2499 |
|
2501 | |||
2500 | $ cd .. |
|
2502 | $ cd .. | |
2501 |
|
2503 | |||
2502 | Even when the file revision is missing from some head: |
|
2504 | Even when the file revision is missing from some head: | |
2503 |
|
2505 | |||
2504 | $ hg init issue4490 |
|
2506 | $ hg init issue4490 | |
2505 | $ cd issue4490 |
|
2507 | $ cd issue4490 | |
2506 | $ echo '[experimental]' >> .hg/hgrc |
|
2508 | $ echo '[experimental]' >> .hg/hgrc | |
2507 | $ echo 'evolution.createmarkers=True' >> .hg/hgrc |
|
2509 | $ echo 'evolution.createmarkers=True' >> .hg/hgrc | |
2508 | $ echo a > a |
|
2510 | $ echo a > a | |
2509 | $ hg ci -Am0 |
|
2511 | $ hg ci -Am0 | |
2510 | adding a |
|
2512 | adding a | |
2511 | $ echo b > b |
|
2513 | $ echo b > b | |
2512 | $ hg ci -Am1 |
|
2514 | $ hg ci -Am1 | |
2513 | adding b |
|
2515 | adding b | |
2514 | $ echo B > b |
|
2516 | $ echo B > b | |
2515 | $ hg ci --amend -m 1 |
|
2517 | $ hg ci --amend -m 1 | |
2516 | $ hg up 0 |
|
2518 | $ hg up 0 | |
2517 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
2519 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
2518 | $ echo c > c |
|
2520 | $ echo c > c | |
2519 | $ hg ci -Am2 |
|
2521 | $ hg ci -Am2 | |
2520 | adding c |
|
2522 | adding c | |
2521 | created new head |
|
2523 | created new head | |
2522 | $ hg up 'head() and not .' |
|
2524 | $ hg up 'head() and not .' | |
2523 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
2525 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
2524 | $ hg log -G |
|
2526 | $ hg log -G | |
2525 | o changeset: 3:db815d6d32e6 |
|
2527 | o changeset: 3:db815d6d32e6 | |
2526 | | tag: tip |
|
2528 | | tag: tip | |
2527 | | parent: 0:f7b1eb17ad24 |
|
2529 | | parent: 0:f7b1eb17ad24 | |
2528 | | user: test |
|
2530 | | user: test | |
2529 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2531 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2530 | | summary: 2 |
|
2532 | | summary: 2 | |
2531 | | |
|
2533 | | | |
2532 | | @ changeset: 2:9bc8ce7f9356 |
|
2534 | | @ changeset: 2:9bc8ce7f9356 | |
2533 | |/ parent: 0:f7b1eb17ad24 |
|
2535 | |/ parent: 0:f7b1eb17ad24 | |
2534 | | user: test |
|
2536 | | user: test | |
2535 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2537 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2536 | | summary: 1 |
|
2538 | | summary: 1 | |
2537 | | |
|
2539 | | | |
2538 | o changeset: 0:f7b1eb17ad24 |
|
2540 | o changeset: 0:f7b1eb17ad24 | |
2539 | user: test |
|
2541 | user: test | |
2540 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2542 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2541 | summary: 0 |
|
2543 | summary: 0 | |
2542 |
|
2544 | |||
2543 | $ hg log -f -G b |
|
2545 | $ hg log -f -G b | |
2544 | @ changeset: 2:9bc8ce7f9356 |
|
2546 | @ changeset: 2:9bc8ce7f9356 | |
2545 | | parent: 0:f7b1eb17ad24 |
|
2547 | | parent: 0:f7b1eb17ad24 | |
2546 | ~ user: test |
|
2548 | ~ user: test | |
2547 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2549 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2548 | summary: 1 |
|
2550 | summary: 1 | |
2549 |
|
2551 | |||
2550 | $ hg log -G b |
|
2552 | $ hg log -G b | |
2551 | @ changeset: 2:9bc8ce7f9356 |
|
2553 | @ changeset: 2:9bc8ce7f9356 | |
2552 | | parent: 0:f7b1eb17ad24 |
|
2554 | | parent: 0:f7b1eb17ad24 | |
2553 | ~ user: test |
|
2555 | ~ user: test | |
2554 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2556 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2555 | summary: 1 |
|
2557 | summary: 1 | |
2556 |
|
2558 | |||
2557 | $ cd .. |
|
2559 | $ cd .. | |
2558 |
|
2560 | |||
2559 | Check proper report when the manifest changes but not the file issue4499 |
|
2561 | Check proper report when the manifest changes but not the file issue4499 | |
2560 | ------------------------------------------------------------------------ |
|
2562 | ------------------------------------------------------------------------ | |
2561 |
|
2563 | |||
2562 | $ hg init issue4499 |
|
2564 | $ hg init issue4499 | |
2563 | $ cd issue4499 |
|
2565 | $ cd issue4499 | |
2564 | $ for f in A B C D F E G H I J K L M N O P Q R S T U; do |
|
2566 | $ for f in A B C D F E G H I J K L M N O P Q R S T U; do | |
2565 | > echo 1 > $f; |
|
2567 | > echo 1 > $f; | |
2566 | > hg add $f; |
|
2568 | > hg add $f; | |
2567 | > done |
|
2569 | > done | |
2568 | $ hg commit -m 'A1B1C1' |
|
2570 | $ hg commit -m 'A1B1C1' | |
2569 | $ echo 2 > A |
|
2571 | $ echo 2 > A | |
2570 | $ echo 2 > B |
|
2572 | $ echo 2 > B | |
2571 | $ echo 2 > C |
|
2573 | $ echo 2 > C | |
2572 | $ hg commit -m 'A2B2C2' |
|
2574 | $ hg commit -m 'A2B2C2' | |
2573 | $ hg up 0 |
|
2575 | $ hg up 0 | |
2574 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
2576 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
2575 | $ echo 3 > A |
|
2577 | $ echo 3 > A | |
2576 | $ echo 2 > B |
|
2578 | $ echo 2 > B | |
2577 | $ echo 2 > C |
|
2579 | $ echo 2 > C | |
2578 | $ hg commit -m 'A3B2C2' |
|
2580 | $ hg commit -m 'A3B2C2' | |
2579 | created new head |
|
2581 | created new head | |
2580 |
|
2582 | |||
2581 | $ hg log -G |
|
2583 | $ hg log -G | |
2582 | @ changeset: 2:fe5fc3d0eb17 |
|
2584 | @ changeset: 2:fe5fc3d0eb17 | |
2583 | | tag: tip |
|
2585 | | tag: tip | |
2584 | | parent: 0:abf4f0e38563 |
|
2586 | | parent: 0:abf4f0e38563 | |
2585 | | user: test |
|
2587 | | user: test | |
2586 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2588 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2587 | | summary: A3B2C2 |
|
2589 | | summary: A3B2C2 | |
2588 | | |
|
2590 | | | |
2589 | | o changeset: 1:07dcc6b312c0 |
|
2591 | | o changeset: 1:07dcc6b312c0 | |
2590 | |/ user: test |
|
2592 | |/ user: test | |
2591 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2593 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2592 | | summary: A2B2C2 |
|
2594 | | summary: A2B2C2 | |
2593 | | |
|
2595 | | | |
2594 | o changeset: 0:abf4f0e38563 |
|
2596 | o changeset: 0:abf4f0e38563 | |
2595 | user: test |
|
2597 | user: test | |
2596 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2598 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2597 | summary: A1B1C1 |
|
2599 | summary: A1B1C1 | |
2598 |
|
2600 | |||
2599 |
|
2601 | |||
2600 | Log -f on B should reports current changesets |
|
2602 | Log -f on B should reports current changesets | |
2601 |
|
2603 | |||
2602 | $ hg log -fG B |
|
2604 | $ hg log -fG B | |
2603 | @ changeset: 2:fe5fc3d0eb17 |
|
2605 | @ changeset: 2:fe5fc3d0eb17 | |
2604 | | tag: tip |
|
2606 | | tag: tip | |
2605 | | parent: 0:abf4f0e38563 |
|
2607 | | parent: 0:abf4f0e38563 | |
2606 | | user: test |
|
2608 | | user: test | |
2607 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2609 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2608 | | summary: A3B2C2 |
|
2610 | | summary: A3B2C2 | |
2609 | | |
|
2611 | | | |
2610 | o changeset: 0:abf4f0e38563 |
|
2612 | o changeset: 0:abf4f0e38563 | |
2611 | user: test |
|
2613 | user: test | |
2612 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2614 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2613 | summary: A1B1C1 |
|
2615 | summary: A1B1C1 | |
2614 |
|
2616 | |||
2615 | $ cd .. |
|
2617 | $ cd .. |
@@ -1,1582 +1,1583 b'' | |||||
1 | $ cat >> $HGRCPATH << EOF |
|
1 | $ cat >> $HGRCPATH << EOF | |
2 | > [phases] |
|
2 | > [phases] | |
3 | > # public changeset are not obsolete |
|
3 | > # public changeset are not obsolete | |
4 | > publish=false |
|
4 | > publish=false | |
5 | > [ui] |
|
5 | > [ui] | |
6 | > logtemplate="{rev}:{node|short} ({phase}{if(obsolete, ' *{obsolete}*')}{if(instabilities, ' {instabilities}')}) [{tags} {bookmarks}] {desc|firstline}{if(obsfate, " [{join(obsfate, "; ")}]")}\n" |
|
6 | > logtemplate="{rev}:{node|short} ({phase}{if(obsolete, ' *{obsolete}*')}{if(instabilities, ' {instabilities}')}) [{tags} {bookmarks}] {desc|firstline}{if(obsfate, " [{join(obsfate, "; ")}]")}\n" | |
7 | > EOF |
|
7 | > EOF | |
8 | $ mkcommit() { |
|
8 | $ mkcommit() { | |
9 | > echo "$1" > "$1" |
|
9 | > echo "$1" > "$1" | |
10 | > hg add "$1" |
|
10 | > hg add "$1" | |
11 | > hg ci -m "add $1" |
|
11 | > hg ci -m "add $1" | |
12 | > } |
|
12 | > } | |
13 | $ getid() { |
|
13 | $ getid() { | |
14 | > hg log -T "{node}\n" --hidden -r "desc('$1')" |
|
14 | > hg log -T "{node}\n" --hidden -r "desc('$1')" | |
15 | > } |
|
15 | > } | |
16 |
|
16 | |||
17 | $ cat > debugkeys.py <<EOF |
|
17 | $ cat > debugkeys.py <<EOF | |
18 | > def reposetup(ui, repo): |
|
18 | > def reposetup(ui, repo): | |
19 | > class debugkeysrepo(repo.__class__): |
|
19 | > class debugkeysrepo(repo.__class__): | |
20 | > def listkeys(self, namespace): |
|
20 | > def listkeys(self, namespace): | |
21 | > ui.write('listkeys %s\n' % (namespace,)) |
|
21 | > ui.write('listkeys %s\n' % (namespace,)) | |
22 | > return super(debugkeysrepo, self).listkeys(namespace) |
|
22 | > return super(debugkeysrepo, self).listkeys(namespace) | |
23 | > |
|
23 | > | |
24 | > if repo.local(): |
|
24 | > if repo.local(): | |
25 | > repo.__class__ = debugkeysrepo |
|
25 | > repo.__class__ = debugkeysrepo | |
26 | > EOF |
|
26 | > EOF | |
27 |
|
27 | |||
28 | $ hg init tmpa |
|
28 | $ hg init tmpa | |
29 | $ cd tmpa |
|
29 | $ cd tmpa | |
30 | $ mkcommit kill_me |
|
30 | $ mkcommit kill_me | |
31 |
|
31 | |||
32 | Checking that the feature is properly disabled |
|
32 | Checking that the feature is properly disabled | |
33 |
|
33 | |||
34 | $ hg debugobsolete -d '0 0' `getid kill_me` -u babar |
|
34 | $ hg debugobsolete -d '0 0' `getid kill_me` -u babar | |
35 | abort: creating obsolete markers is not enabled on this repo |
|
35 | abort: creating obsolete markers is not enabled on this repo | |
36 | [255] |
|
36 | [255] | |
37 |
|
37 | |||
38 | Enabling it |
|
38 | Enabling it | |
39 |
|
39 | |||
40 | $ cat >> $HGRCPATH << EOF |
|
40 | $ cat >> $HGRCPATH << EOF | |
41 | > [experimental] |
|
41 | > [experimental] | |
42 | > evolution=exchange |
|
42 | > evolution=exchange | |
43 | > evolution.createmarkers=True |
|
43 | > evolution.createmarkers=True | |
44 | > EOF |
|
44 | > EOF | |
45 |
|
45 | |||
46 | Killing a single changeset without replacement |
|
46 | Killing a single changeset without replacement | |
47 |
|
47 | |||
48 | $ hg debugobsolete 0 |
|
48 | $ hg debugobsolete 0 | |
49 | abort: changeset references must be full hexadecimal node identifiers |
|
49 | abort: changeset references must be full hexadecimal node identifiers | |
50 | [255] |
|
50 | [255] | |
51 | $ hg debugobsolete '00' |
|
51 | $ hg debugobsolete '00' | |
52 | abort: changeset references must be full hexadecimal node identifiers |
|
52 | abort: changeset references must be full hexadecimal node identifiers | |
53 | [255] |
|
53 | [255] | |
54 | $ hg debugobsolete -d '0 0' `getid kill_me` -u babar |
|
54 | $ hg debugobsolete -d '0 0' `getid kill_me` -u babar | |
55 | obsoleted 1 changesets |
|
55 | obsoleted 1 changesets | |
56 | $ hg debugobsolete |
|
56 | $ hg debugobsolete | |
57 | 97b7c2d76b1845ed3eb988cd612611e72406cef0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'babar'} |
|
57 | 97b7c2d76b1845ed3eb988cd612611e72406cef0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'babar'} | |
58 |
|
58 | |||
59 | (test that mercurial is not confused) |
|
59 | (test that mercurial is not confused) | |
60 |
|
60 | |||
61 | $ hg up null --quiet # having 0 as parent prevents it to be hidden |
|
61 | $ hg up null --quiet # having 0 as parent prevents it to be hidden | |
62 | $ hg tip |
|
62 | $ hg tip | |
63 | -1:000000000000 (public) [tip ] |
|
63 | -1:000000000000 (public) [tip ] | |
64 | $ hg up --hidden tip --quiet |
|
64 | $ hg up --hidden tip --quiet | |
65 | updating to a hidden changeset 97b7c2d76b18 |
|
65 | updating to a hidden changeset 97b7c2d76b18 | |
66 | (hidden revision '97b7c2d76b18' is pruned) |
|
66 | (hidden revision '97b7c2d76b18' is pruned) | |
67 |
|
67 | |||
68 | Killing a single changeset with itself should fail |
|
68 | Killing a single changeset with itself should fail | |
69 | (simple local safeguard) |
|
69 | (simple local safeguard) | |
70 |
|
70 | |||
71 | $ hg debugobsolete `getid kill_me` `getid kill_me` |
|
71 | $ hg debugobsolete `getid kill_me` `getid kill_me` | |
72 | abort: bad obsmarker input: in-marker cycle with 97b7c2d76b1845ed3eb988cd612611e72406cef0 |
|
72 | abort: bad obsmarker input: in-marker cycle with 97b7c2d76b1845ed3eb988cd612611e72406cef0 | |
73 | [255] |
|
73 | [255] | |
74 |
|
74 | |||
75 | $ cd .. |
|
75 | $ cd .. | |
76 |
|
76 | |||
77 | Killing a single changeset with replacement |
|
77 | Killing a single changeset with replacement | |
78 | (and testing the format option) |
|
78 | (and testing the format option) | |
79 |
|
79 | |||
80 | $ hg init tmpb |
|
80 | $ hg init tmpb | |
81 | $ cd tmpb |
|
81 | $ cd tmpb | |
82 | $ mkcommit a |
|
82 | $ mkcommit a | |
83 | $ mkcommit b |
|
83 | $ mkcommit b | |
84 | $ mkcommit original_c |
|
84 | $ mkcommit original_c | |
85 | $ hg up "desc('b')" |
|
85 | $ hg up "desc('b')" | |
86 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
86 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
87 | $ mkcommit new_c |
|
87 | $ mkcommit new_c | |
88 | created new head |
|
88 | created new head | |
89 | $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden |
|
89 | $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden | |
90 | $ hg debugobsolete --config format.obsstore-version=0 --flag 12 `getid original_c` `getid new_c` -d '121 120' |
|
90 | $ hg debugobsolete --config format.obsstore-version=0 --flag 12 `getid original_c` `getid new_c` -d '121 120' | |
91 | obsoleted 1 changesets |
|
91 | obsoleted 1 changesets | |
92 | $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden |
|
92 | $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden | |
93 | 2:245bde4270cd add original_c |
|
93 | 2:245bde4270cd add original_c | |
94 | $ hg debugrevlog -cd |
|
94 | $ hg debugrevlog -cd | |
95 | # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen |
|
95 | # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen | |
96 | 0 -1 -1 0 59 0 0 0 0 58 58 0 1 0 |
|
96 | 0 -1 -1 0 59 0 0 0 0 58 58 0 1 0 | |
97 | 1 0 -1 59 118 59 59 0 0 58 116 0 1 0 |
|
97 | 1 0 -1 59 118 59 59 0 0 58 116 0 1 0 | |
98 | 2 1 -1 118 193 118 118 59 0 76 192 0 1 0 |
|
98 | 2 1 -1 118 193 118 118 59 0 76 192 0 1 0 | |
99 | 3 1 -1 193 260 193 193 59 0 66 258 0 2 0 |
|
99 | 3 1 -1 193 260 193 193 59 0 66 258 0 2 0 | |
100 | $ hg debugobsolete |
|
100 | $ hg debugobsolete | |
101 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
101 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
102 |
|
102 | |||
103 | (check for version number of the obsstore) |
|
103 | (check for version number of the obsstore) | |
104 |
|
104 | |||
105 | $ dd bs=1 count=1 if=.hg/store/obsstore 2>/dev/null |
|
105 | $ dd bs=1 count=1 if=.hg/store/obsstore 2>/dev/null | |
106 | \x00 (no-eol) (esc) |
|
106 | \x00 (no-eol) (esc) | |
107 |
|
107 | |||
108 | do it again (it read the obsstore before adding new changeset) |
|
108 | do it again (it read the obsstore before adding new changeset) | |
109 |
|
109 | |||
110 | $ hg up '.^' |
|
110 | $ hg up '.^' | |
111 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
111 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
112 | $ mkcommit new_2_c |
|
112 | $ mkcommit new_2_c | |
113 | created new head |
|
113 | created new head | |
114 | $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c` |
|
114 | $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c` | |
115 | obsoleted 1 changesets |
|
115 | obsoleted 1 changesets | |
116 | $ hg debugobsolete |
|
116 | $ hg debugobsolete | |
117 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
117 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
118 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
118 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
119 |
|
119 | |||
120 | Register two markers with a missing node |
|
120 | Register two markers with a missing node | |
121 |
|
121 | |||
122 | $ hg up '.^' |
|
122 | $ hg up '.^' | |
123 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
123 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
124 | $ mkcommit new_3_c |
|
124 | $ mkcommit new_3_c | |
125 | created new head |
|
125 | created new head | |
126 | $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337 |
|
126 | $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337 | |
127 | obsoleted 1 changesets |
|
127 | obsoleted 1 changesets | |
128 | $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c` |
|
128 | $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c` | |
129 | $ hg debugobsolete |
|
129 | $ hg debugobsolete | |
130 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
130 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
131 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
131 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
132 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
132 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
133 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
133 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
134 |
|
134 | |||
135 | Test the --index option of debugobsolete command |
|
135 | Test the --index option of debugobsolete command | |
136 | $ hg debugobsolete --index |
|
136 | $ hg debugobsolete --index | |
137 | 0 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
137 | 0 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
138 | 1 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
138 | 1 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
139 | 2 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
139 | 2 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
140 | 3 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
140 | 3 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
141 |
|
141 | |||
142 | Refuse pathological nullid successors |
|
142 | Refuse pathological nullid successors | |
143 | $ hg debugobsolete -d '9001 0' 1337133713371337133713371337133713371337 0000000000000000000000000000000000000000 |
|
143 | $ hg debugobsolete -d '9001 0' 1337133713371337133713371337133713371337 0000000000000000000000000000000000000000 | |
144 | transaction abort! |
|
144 | transaction abort! | |
145 | rollback completed |
|
145 | rollback completed | |
146 | abort: bad obsolescence marker detected: invalid successors nullid |
|
146 | abort: bad obsolescence marker detected: invalid successors nullid | |
147 | [255] |
|
147 | [255] | |
148 |
|
148 | |||
149 | Check that graphlog detect that a changeset is obsolete: |
|
149 | Check that graphlog detect that a changeset is obsolete: | |
150 |
|
150 | |||
151 | $ hg log -G |
|
151 | $ hg log -G | |
152 | @ 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
152 | @ 5:5601fb93a350 (draft) [tip ] add new_3_c | |
153 | | |
|
153 | | | |
154 | o 1:7c3bad9141dc (draft) [ ] add b |
|
154 | o 1:7c3bad9141dc (draft) [ ] add b | |
155 | | |
|
155 | | | |
156 | o 0:1f0dee641bb7 (draft) [ ] add a |
|
156 | o 0:1f0dee641bb7 (draft) [ ] add a | |
157 |
|
157 | |||
158 |
|
158 | |||
159 | check that heads does not report them |
|
159 | check that heads does not report them | |
160 |
|
160 | |||
161 | $ hg heads |
|
161 | $ hg heads | |
162 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
162 | 5:5601fb93a350 (draft) [tip ] add new_3_c | |
163 | $ hg heads --hidden |
|
163 | $ hg heads --hidden | |
164 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
164 | 5:5601fb93a350 (draft) [tip ] add new_3_c | |
165 | 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350] |
|
165 | 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350] | |
166 | 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9] |
|
166 | 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9] | |
167 | 2:245bde4270cd (draft *obsolete*) [ ] add original_c [rewritten as 3:cdbce2fbb163] |
|
167 | 2:245bde4270cd (draft *obsolete*) [ ] add original_c [rewritten as 3:cdbce2fbb163] | |
168 |
|
168 | |||
169 |
|
169 | |||
170 | check that summary does not report them |
|
170 | check that summary does not report them | |
171 |
|
171 | |||
172 | $ hg init ../sink |
|
172 | $ hg init ../sink | |
173 | $ echo '[paths]' >> .hg/hgrc |
|
173 | $ echo '[paths]' >> .hg/hgrc | |
174 | $ echo 'default=../sink' >> .hg/hgrc |
|
174 | $ echo 'default=../sink' >> .hg/hgrc | |
175 | $ hg summary --remote |
|
175 | $ hg summary --remote | |
176 | parent: 5:5601fb93a350 tip |
|
176 | parent: 5:5601fb93a350 tip | |
177 | add new_3_c |
|
177 | add new_3_c | |
178 | branch: default |
|
178 | branch: default | |
179 | commit: (clean) |
|
179 | commit: (clean) | |
180 | update: (current) |
|
180 | update: (current) | |
181 | phases: 3 draft |
|
181 | phases: 3 draft | |
182 | remote: 3 outgoing |
|
182 | remote: 3 outgoing | |
183 |
|
183 | |||
184 | $ hg summary --remote --hidden |
|
184 | $ hg summary --remote --hidden | |
185 | parent: 5:5601fb93a350 tip |
|
185 | parent: 5:5601fb93a350 tip | |
186 | add new_3_c |
|
186 | add new_3_c | |
187 | branch: default |
|
187 | branch: default | |
188 | commit: (clean) |
|
188 | commit: (clean) | |
189 | update: 3 new changesets, 4 branch heads (merge) |
|
189 | update: 3 new changesets, 4 branch heads (merge) | |
190 | phases: 6 draft |
|
190 | phases: 6 draft | |
191 | remote: 3 outgoing |
|
191 | remote: 3 outgoing | |
192 |
|
192 | |||
193 | check that various commands work well with filtering |
|
193 | check that various commands work well with filtering | |
194 |
|
194 | |||
195 | $ hg tip |
|
195 | $ hg tip | |
196 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
196 | 5:5601fb93a350 (draft) [tip ] add new_3_c | |
197 | $ hg log -r 6 |
|
197 | $ hg log -r 6 | |
198 | abort: unknown revision '6'! |
|
198 | abort: unknown revision '6'! | |
199 | [255] |
|
199 | [255] | |
200 | $ hg log -r 4 |
|
200 | $ hg log -r 4 | |
201 | abort: hidden revision '4' was rewritten as: 5601fb93a350! |
|
201 | abort: hidden revision '4' was rewritten as: 5601fb93a350! | |
202 | (use --hidden to access hidden revisions) |
|
202 | (use --hidden to access hidden revisions) | |
203 | [255] |
|
203 | [255] | |
204 | $ hg debugrevspec 'rev(6)' |
|
204 | $ hg debugrevspec 'rev(6)' | |
205 | $ hg debugrevspec 'rev(4)' |
|
205 | $ hg debugrevspec 'rev(4)' | |
206 | $ hg debugrevspec 'null' |
|
206 | $ hg debugrevspec 'null' | |
207 | -1 |
|
207 | -1 | |
208 |
|
208 | |||
209 | Check that public changeset are not accounted as obsolete: |
|
209 | Check that public changeset are not accounted as obsolete: | |
210 |
|
210 | |||
211 | $ hg --hidden phase --public 2 |
|
211 | $ hg --hidden phase --public 2 | |
212 | 1 new phase-divergent changesets |
|
212 | 1 new phase-divergent changesets | |
213 | $ hg log -G |
|
213 | $ hg log -G | |
214 | @ 5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c |
|
214 | @ 5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c | |
215 | | |
|
215 | | | |
216 | | o 2:245bde4270cd (public) [ ] add original_c |
|
216 | | o 2:245bde4270cd (public) [ ] add original_c | |
217 | |/ |
|
217 | |/ | |
218 | o 1:7c3bad9141dc (public) [ ] add b |
|
218 | o 1:7c3bad9141dc (public) [ ] add b | |
219 | | |
|
219 | | | |
220 | o 0:1f0dee641bb7 (public) [ ] add a |
|
220 | o 0:1f0dee641bb7 (public) [ ] add a | |
221 |
|
221 | |||
222 |
|
222 | |||
223 | And that bumped changeset are detected |
|
223 | And that bumped changeset are detected | |
224 | -------------------------------------- |
|
224 | -------------------------------------- | |
225 |
|
225 | |||
226 | If we didn't filtered obsolete changesets out, 3 and 4 would show up too. Also |
|
226 | If we didn't filtered obsolete changesets out, 3 and 4 would show up too. Also | |
227 | note that the bumped changeset (5:5601fb93a350) is not a direct successor of |
|
227 | note that the bumped changeset (5:5601fb93a350) is not a direct successor of | |
228 | the public changeset |
|
228 | the public changeset | |
229 |
|
229 | |||
230 | $ hg log --hidden -r 'phasedivergent()' |
|
230 | $ hg log --hidden -r 'phasedivergent()' | |
231 | 5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c |
|
231 | 5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c | |
232 |
|
232 | |||
233 | And that we can't push bumped changeset |
|
233 | And that we can't push bumped changeset | |
234 |
|
234 | |||
235 | $ hg push ../tmpa -r 0 --force #(make repo related) |
|
235 | $ hg push ../tmpa -r 0 --force #(make repo related) | |
236 | pushing to ../tmpa |
|
236 | pushing to ../tmpa | |
237 | searching for changes |
|
237 | searching for changes | |
238 | warning: repository is unrelated |
|
238 | warning: repository is unrelated | |
239 | adding changesets |
|
239 | adding changesets | |
240 | adding manifests |
|
240 | adding manifests | |
241 | adding file changes |
|
241 | adding file changes | |
242 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
242 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
243 | $ hg push ../tmpa |
|
243 | $ hg push ../tmpa | |
244 | pushing to ../tmpa |
|
244 | pushing to ../tmpa | |
245 | searching for changes |
|
245 | searching for changes | |
246 | abort: push includes phase-divergent changeset: 5601fb93a350! |
|
246 | abort: push includes phase-divergent changeset: 5601fb93a350! | |
247 | [255] |
|
247 | [255] | |
248 |
|
248 | |||
249 | Fixing "bumped" situation |
|
249 | Fixing "bumped" situation | |
250 | We need to create a clone of 5 and add a special marker with a flag |
|
250 | We need to create a clone of 5 and add a special marker with a flag | |
251 |
|
251 | |||
252 | $ hg summary |
|
252 | $ hg summary | |
253 | parent: 5:5601fb93a350 tip (phase-divergent) |
|
253 | parent: 5:5601fb93a350 tip (phase-divergent) | |
254 | add new_3_c |
|
254 | add new_3_c | |
255 | branch: default |
|
255 | branch: default | |
256 | commit: (clean) |
|
256 | commit: (clean) | |
257 | update: 1 new changesets, 2 branch heads (merge) |
|
257 | update: 1 new changesets, 2 branch heads (merge) | |
258 | phases: 1 draft |
|
258 | phases: 1 draft | |
259 | phase-divergent: 1 changesets |
|
259 | phase-divergent: 1 changesets | |
260 | $ hg up '5^' |
|
260 | $ hg up '5^' | |
261 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
261 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
262 | $ hg revert -ar 5 |
|
262 | $ hg revert -ar 5 | |
263 | adding new_3_c |
|
263 | adding new_3_c | |
264 | $ hg ci -m 'add n3w_3_c' |
|
264 | $ hg ci -m 'add n3w_3_c' | |
265 | created new head |
|
265 | created new head | |
266 | $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c` |
|
266 | $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c` | |
267 | obsoleted 1 changesets |
|
267 | obsoleted 1 changesets | |
268 | $ hg log -r 'phasedivergent()' |
|
268 | $ hg log -r 'phasedivergent()' | |
269 | $ hg log -G |
|
269 | $ hg log -G | |
270 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
270 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c | |
271 | | |
|
271 | | | |
272 | | o 2:245bde4270cd (public) [ ] add original_c |
|
272 | | o 2:245bde4270cd (public) [ ] add original_c | |
273 | |/ |
|
273 | |/ | |
274 | o 1:7c3bad9141dc (public) [ ] add b |
|
274 | o 1:7c3bad9141dc (public) [ ] add b | |
275 | | |
|
275 | | | |
276 | o 0:1f0dee641bb7 (public) [ ] add a |
|
276 | o 0:1f0dee641bb7 (public) [ ] add a | |
277 |
|
277 | |||
278 |
|
278 | |||
279 | Basic exclusive testing |
|
279 | Basic exclusive testing | |
280 |
|
280 | |||
281 | $ hg log -G --hidden |
|
281 | $ hg log -G --hidden | |
282 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
282 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c | |
283 | | |
|
283 | | | |
284 | | x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c [rewritten as 6:6f9641995072] |
|
284 | | x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c [rewritten as 6:6f9641995072] | |
285 | |/ |
|
285 | |/ | |
286 | | x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350] |
|
286 | | x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350] | |
287 | |/ |
|
287 | |/ | |
288 | | x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9] |
|
288 | | x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9] | |
289 | |/ |
|
289 | |/ | |
290 | | o 2:245bde4270cd (public) [ ] add original_c |
|
290 | | o 2:245bde4270cd (public) [ ] add original_c | |
291 | |/ |
|
291 | |/ | |
292 | o 1:7c3bad9141dc (public) [ ] add b |
|
292 | o 1:7c3bad9141dc (public) [ ] add b | |
293 | | |
|
293 | | | |
294 | o 0:1f0dee641bb7 (public) [ ] add a |
|
294 | o 0:1f0dee641bb7 (public) [ ] add a | |
295 |
|
295 | |||
296 | $ hg debugobsolete --rev 6f9641995072 |
|
296 | $ hg debugobsolete --rev 6f9641995072 | |
297 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
297 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
298 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
298 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
299 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
299 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
300 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
300 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
301 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
301 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
302 | $ hg debugobsolete --rev 6f9641995072 --exclusive |
|
302 | $ hg debugobsolete --rev 6f9641995072 --exclusive | |
303 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
303 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
304 | $ hg debugobsolete --rev 5601fb93a350 --hidden |
|
304 | $ hg debugobsolete --rev 5601fb93a350 --hidden | |
305 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
305 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
306 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
306 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
307 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
307 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
308 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
308 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
309 | $ hg debugobsolete --rev 5601fb93a350 --hidden --exclusive |
|
309 | $ hg debugobsolete --rev 5601fb93a350 --hidden --exclusive | |
310 | $ hg debugobsolete --rev 5601fb93a350+6f9641995072 --hidden --exclusive |
|
310 | $ hg debugobsolete --rev 5601fb93a350+6f9641995072 --hidden --exclusive | |
311 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
311 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
312 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
312 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
313 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
313 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
314 |
|
314 | |||
315 | $ cd .. |
|
315 | $ cd .. | |
316 |
|
316 | |||
317 | Revision 0 is hidden |
|
317 | Revision 0 is hidden | |
318 | -------------------- |
|
318 | -------------------- | |
319 |
|
319 | |||
320 | $ hg init rev0hidden |
|
320 | $ hg init rev0hidden | |
321 | $ cd rev0hidden |
|
321 | $ cd rev0hidden | |
322 |
|
322 | |||
323 | $ mkcommit kill0 |
|
323 | $ mkcommit kill0 | |
324 | $ hg up -q null |
|
324 | $ hg up -q null | |
325 | $ hg debugobsolete `getid kill0` |
|
325 | $ hg debugobsolete `getid kill0` | |
326 | obsoleted 1 changesets |
|
326 | obsoleted 1 changesets | |
327 | $ mkcommit a |
|
327 | $ mkcommit a | |
328 | $ mkcommit b |
|
328 | $ mkcommit b | |
329 |
|
329 | |||
330 | Should pick the first visible revision as "repo" node |
|
330 | Should pick the first visible revision as "repo" node | |
331 |
|
331 | |||
332 | $ hg archive ../archive-null |
|
332 | $ hg archive ../archive-null | |
333 | $ cat ../archive-null/.hg_archival.txt |
|
333 | $ cat ../archive-null/.hg_archival.txt | |
334 | repo: 1f0dee641bb7258c56bd60e93edfa2405381c41e |
|
334 | repo: 1f0dee641bb7258c56bd60e93edfa2405381c41e | |
335 | node: 7c3bad9141dcb46ff89abf5f61856facd56e476c |
|
335 | node: 7c3bad9141dcb46ff89abf5f61856facd56e476c | |
336 | branch: default |
|
336 | branch: default | |
337 | latesttag: null |
|
337 | latesttag: null | |
338 | latesttagdistance: 2 |
|
338 | latesttagdistance: 2 | |
339 | changessincelatesttag: 2 |
|
339 | changessincelatesttag: 2 | |
340 |
|
340 | |||
341 |
|
341 | |||
342 | $ cd .. |
|
342 | $ cd .. | |
343 |
|
343 | |||
344 | Can disable transaction summary report |
|
344 | Can disable transaction summary report | |
345 |
|
345 | |||
346 | $ hg init transaction-summary |
|
346 | $ hg init transaction-summary | |
347 | $ cd transaction-summary |
|
347 | $ cd transaction-summary | |
348 | $ mkcommit a |
|
348 | $ mkcommit a | |
349 | $ mkcommit b |
|
349 | $ mkcommit b | |
350 | $ hg up -q null |
|
350 | $ hg up -q null | |
351 | $ hg --config experimental.evolution.report-instabilities=false debugobsolete `getid a` |
|
351 | $ hg --config experimental.evolution.report-instabilities=false debugobsolete `getid a` | |
352 | obsoleted 1 changesets |
|
352 | obsoleted 1 changesets | |
353 | $ cd .. |
|
353 | $ cd .. | |
354 |
|
354 | |||
355 | Exchange Test |
|
355 | Exchange Test | |
356 | ============================ |
|
356 | ============================ | |
357 |
|
357 | |||
358 | Destination repo does not have any data |
|
358 | Destination repo does not have any data | |
359 | --------------------------------------- |
|
359 | --------------------------------------- | |
360 |
|
360 | |||
361 | Simple incoming test |
|
361 | Simple incoming test | |
362 |
|
362 | |||
363 | $ hg init tmpc |
|
363 | $ hg init tmpc | |
364 | $ cd tmpc |
|
364 | $ cd tmpc | |
365 | $ hg incoming ../tmpb |
|
365 | $ hg incoming ../tmpb | |
366 | comparing with ../tmpb |
|
366 | comparing with ../tmpb | |
367 | 0:1f0dee641bb7 (public) [ ] add a |
|
367 | 0:1f0dee641bb7 (public) [ ] add a | |
368 | 1:7c3bad9141dc (public) [ ] add b |
|
368 | 1:7c3bad9141dc (public) [ ] add b | |
369 | 2:245bde4270cd (public) [ ] add original_c |
|
369 | 2:245bde4270cd (public) [ ] add original_c | |
370 | 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
370 | 6:6f9641995072 (draft) [tip ] add n3w_3_c | |
371 |
|
371 | |||
372 | Try to pull markers |
|
372 | Try to pull markers | |
373 | (extinct changeset are excluded but marker are pushed) |
|
373 | (extinct changeset are excluded but marker are pushed) | |
374 |
|
374 | |||
375 | $ hg pull ../tmpb |
|
375 | $ hg pull ../tmpb | |
376 | pulling from ../tmpb |
|
376 | pulling from ../tmpb | |
377 | requesting all changes |
|
377 | requesting all changes | |
378 | adding changesets |
|
378 | adding changesets | |
379 | adding manifests |
|
379 | adding manifests | |
380 | adding file changes |
|
380 | adding file changes | |
381 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
381 | added 4 changesets with 4 changes to 4 files (+1 heads) | |
382 | 5 new obsolescence markers |
|
382 | 5 new obsolescence markers | |
383 | new changesets 1f0dee641bb7:6f9641995072 |
|
383 | new changesets 1f0dee641bb7:6f9641995072 | |
384 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
384 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
385 | $ hg debugobsolete |
|
385 | $ hg debugobsolete | |
386 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
386 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
387 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
387 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
388 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
388 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
389 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
389 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
390 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
390 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
391 |
|
391 | |||
392 | Rollback//Transaction support |
|
392 | Rollback//Transaction support | |
393 |
|
393 | |||
394 | $ hg debugobsolete -d '1340 0' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb |
|
394 | $ hg debugobsolete -d '1340 0' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb | |
395 | $ hg debugobsolete |
|
395 | $ hg debugobsolete | |
396 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
396 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
397 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
397 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
398 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
398 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
399 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
399 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
400 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
400 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
401 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:22:20 1970 +0000) {'user': 'test'} |
|
401 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:22:20 1970 +0000) {'user': 'test'} | |
402 | $ hg rollback -n |
|
402 | $ hg rollback -n | |
403 | repository tip rolled back to revision 3 (undo debugobsolete) |
|
403 | repository tip rolled back to revision 3 (undo debugobsolete) | |
404 | $ hg rollback |
|
404 | $ hg rollback | |
405 | repository tip rolled back to revision 3 (undo debugobsolete) |
|
405 | repository tip rolled back to revision 3 (undo debugobsolete) | |
406 | $ hg debugobsolete |
|
406 | $ hg debugobsolete | |
407 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
407 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
408 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
408 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
409 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
409 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
410 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
410 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
411 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
411 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
412 |
|
412 | |||
413 | $ cd .. |
|
413 | $ cd .. | |
414 |
|
414 | |||
415 | Try to push markers |
|
415 | Try to push markers | |
416 |
|
416 | |||
417 | $ hg init tmpd |
|
417 | $ hg init tmpd | |
418 | $ hg -R tmpb push tmpd |
|
418 | $ hg -R tmpb push tmpd | |
419 | pushing to tmpd |
|
419 | pushing to tmpd | |
420 | searching for changes |
|
420 | searching for changes | |
421 | adding changesets |
|
421 | adding changesets | |
422 | adding manifests |
|
422 | adding manifests | |
423 | adding file changes |
|
423 | adding file changes | |
424 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
424 | added 4 changesets with 4 changes to 4 files (+1 heads) | |
425 | 5 new obsolescence markers |
|
425 | 5 new obsolescence markers | |
426 | $ hg -R tmpd debugobsolete | sort |
|
426 | $ hg -R tmpd debugobsolete | sort | |
427 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
427 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
428 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
428 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
429 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
429 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
430 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
430 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
431 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
431 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
432 |
|
432 | |||
433 | Check obsolete keys are exchanged only if source has an obsolete store |
|
433 | Check obsolete keys are exchanged only if source has an obsolete store | |
434 |
|
434 | |||
435 | $ hg init empty |
|
435 | $ hg init empty | |
436 | $ hg --config extensions.debugkeys=debugkeys.py -R empty push tmpd |
|
436 | $ hg --config extensions.debugkeys=debugkeys.py -R empty push tmpd | |
437 | pushing to tmpd |
|
437 | pushing to tmpd | |
438 | listkeys phases |
|
438 | listkeys phases | |
439 | listkeys bookmarks |
|
439 | listkeys bookmarks | |
440 | no changes found |
|
440 | no changes found | |
441 | listkeys phases |
|
441 | listkeys phases | |
442 | [1] |
|
442 | [1] | |
443 |
|
443 | |||
444 | clone support |
|
444 | clone support | |
445 | (markers are copied and extinct changesets are included to allow hardlinks) |
|
445 | (markers are copied and extinct changesets are included to allow hardlinks) | |
446 |
|
446 | |||
447 | $ hg clone tmpb clone-dest |
|
447 | $ hg clone tmpb clone-dest | |
448 | updating to branch default |
|
448 | updating to branch default | |
449 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
449 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
450 | $ hg -R clone-dest log -G --hidden |
|
450 | $ hg -R clone-dest log -G --hidden | |
451 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
451 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c | |
452 | | |
|
452 | | | |
453 | | x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c [rewritten as 6:6f9641995072] |
|
453 | | x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c [rewritten as 6:6f9641995072] | |
454 | |/ |
|
454 | |/ | |
455 | | x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350] |
|
455 | | x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350] | |
456 | |/ |
|
456 | |/ | |
457 | | x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9] |
|
457 | | x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9] | |
458 | |/ |
|
458 | |/ | |
459 | | o 2:245bde4270cd (public) [ ] add original_c |
|
459 | | o 2:245bde4270cd (public) [ ] add original_c | |
460 | |/ |
|
460 | |/ | |
461 | o 1:7c3bad9141dc (public) [ ] add b |
|
461 | o 1:7c3bad9141dc (public) [ ] add b | |
462 | | |
|
462 | | | |
463 | o 0:1f0dee641bb7 (public) [ ] add a |
|
463 | o 0:1f0dee641bb7 (public) [ ] add a | |
464 |
|
464 | |||
465 | $ hg -R clone-dest debugobsolete |
|
465 | $ hg -R clone-dest debugobsolete | |
466 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
466 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
467 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
467 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
468 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
468 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
469 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
469 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
470 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
470 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
471 |
|
471 | |||
472 |
|
472 | |||
473 | Destination repo have existing data |
|
473 | Destination repo have existing data | |
474 | --------------------------------------- |
|
474 | --------------------------------------- | |
475 |
|
475 | |||
476 | On pull |
|
476 | On pull | |
477 |
|
477 | |||
478 | $ hg init tmpe |
|
478 | $ hg init tmpe | |
479 | $ cd tmpe |
|
479 | $ cd tmpe | |
480 | $ hg debugobsolete -d '1339 0' 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 |
|
480 | $ hg debugobsolete -d '1339 0' 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 | |
481 | $ hg pull ../tmpb |
|
481 | $ hg pull ../tmpb | |
482 | pulling from ../tmpb |
|
482 | pulling from ../tmpb | |
483 | requesting all changes |
|
483 | requesting all changes | |
484 | adding changesets |
|
484 | adding changesets | |
485 | adding manifests |
|
485 | adding manifests | |
486 | adding file changes |
|
486 | adding file changes | |
487 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
487 | added 4 changesets with 4 changes to 4 files (+1 heads) | |
488 | 5 new obsolescence markers |
|
488 | 5 new obsolescence markers | |
489 | new changesets 1f0dee641bb7:6f9641995072 |
|
489 | new changesets 1f0dee641bb7:6f9641995072 | |
490 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
490 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
491 | $ hg debugobsolete |
|
491 | $ hg debugobsolete | |
492 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
492 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
493 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
493 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
494 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
494 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
495 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
495 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
496 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
496 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
497 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
497 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
498 |
|
498 | |||
499 |
|
499 | |||
500 | On push |
|
500 | On push | |
501 |
|
501 | |||
502 | $ hg push ../tmpc |
|
502 | $ hg push ../tmpc | |
503 | pushing to ../tmpc |
|
503 | pushing to ../tmpc | |
504 | searching for changes |
|
504 | searching for changes | |
505 | no changes found |
|
505 | no changes found | |
506 | 1 new obsolescence markers |
|
506 | 1 new obsolescence markers | |
507 | [1] |
|
507 | [1] | |
508 | $ hg -R ../tmpc debugobsolete |
|
508 | $ hg -R ../tmpc debugobsolete | |
509 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
509 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
510 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
510 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
511 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
511 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
512 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
512 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
513 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
513 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
514 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
514 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
515 |
|
515 | |||
516 | detect outgoing obsolete and unstable |
|
516 | detect outgoing obsolete and unstable | |
517 | --------------------------------------- |
|
517 | --------------------------------------- | |
518 |
|
518 | |||
519 |
|
519 | |||
520 | $ hg log -G |
|
520 | $ hg log -G | |
521 | o 3:6f9641995072 (draft) [tip ] add n3w_3_c |
|
521 | o 3:6f9641995072 (draft) [tip ] add n3w_3_c | |
522 | | |
|
522 | | | |
523 | | o 2:245bde4270cd (public) [ ] add original_c |
|
523 | | o 2:245bde4270cd (public) [ ] add original_c | |
524 | |/ |
|
524 | |/ | |
525 | o 1:7c3bad9141dc (public) [ ] add b |
|
525 | o 1:7c3bad9141dc (public) [ ] add b | |
526 | | |
|
526 | | | |
527 | o 0:1f0dee641bb7 (public) [ ] add a |
|
527 | o 0:1f0dee641bb7 (public) [ ] add a | |
528 |
|
528 | |||
529 | $ hg up 'desc("n3w_3_c")' |
|
529 | $ hg up 'desc("n3w_3_c")' | |
530 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
530 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
531 | $ mkcommit original_d |
|
531 | $ mkcommit original_d | |
532 | $ mkcommit original_e |
|
532 | $ mkcommit original_e | |
533 | $ hg debugobsolete --record-parents `getid original_d` -d '0 0' |
|
533 | $ hg debugobsolete --record-parents `getid original_d` -d '0 0' | |
534 | obsoleted 1 changesets |
|
534 | obsoleted 1 changesets | |
535 | 1 new orphan changesets |
|
535 | 1 new orphan changesets | |
536 | $ hg debugobsolete | grep `getid original_d` |
|
536 | $ hg debugobsolete | grep `getid original_d` | |
537 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
537 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
538 | $ hg log -r 'obsolete()' |
|
538 | $ hg log -r 'obsolete()' | |
539 | 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned] |
|
539 | 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned] | |
540 | $ hg summary |
|
540 | $ hg summary | |
541 | parent: 5:cda648ca50f5 tip (orphan) |
|
541 | parent: 5:cda648ca50f5 tip (orphan) | |
542 | add original_e |
|
542 | add original_e | |
543 | branch: default |
|
543 | branch: default | |
544 | commit: (clean) |
|
544 | commit: (clean) | |
545 | update: 1 new changesets, 2 branch heads (merge) |
|
545 | update: 1 new changesets, 2 branch heads (merge) | |
546 | phases: 3 draft |
|
546 | phases: 3 draft | |
547 | orphan: 1 changesets |
|
547 | orphan: 1 changesets | |
548 | $ hg log -G -r '::orphan()' |
|
548 | $ hg log -G -r '::orphan()' | |
549 | @ 5:cda648ca50f5 (draft orphan) [tip ] add original_e |
|
549 | @ 5:cda648ca50f5 (draft orphan) [tip ] add original_e | |
550 | | |
|
550 | | | |
551 | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned] |
|
551 | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned] | |
552 | | |
|
552 | | | |
553 | o 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
553 | o 3:6f9641995072 (draft) [ ] add n3w_3_c | |
554 | | |
|
554 | | | |
555 | o 1:7c3bad9141dc (public) [ ] add b |
|
555 | o 1:7c3bad9141dc (public) [ ] add b | |
556 | | |
|
556 | | | |
557 | o 0:1f0dee641bb7 (public) [ ] add a |
|
557 | o 0:1f0dee641bb7 (public) [ ] add a | |
558 |
|
558 | |||
559 |
|
559 | |||
560 | refuse to push obsolete changeset |
|
560 | refuse to push obsolete changeset | |
561 |
|
561 | |||
562 | $ hg push ../tmpc/ -r 'desc("original_d")' |
|
562 | $ hg push ../tmpc/ -r 'desc("original_d")' | |
563 | pushing to ../tmpc/ |
|
563 | pushing to ../tmpc/ | |
564 | searching for changes |
|
564 | searching for changes | |
565 | abort: push includes obsolete changeset: 94b33453f93b! |
|
565 | abort: push includes obsolete changeset: 94b33453f93b! | |
566 | [255] |
|
566 | [255] | |
567 |
|
567 | |||
568 | refuse to push unstable changeset |
|
568 | refuse to push unstable changeset | |
569 |
|
569 | |||
570 | $ hg push ../tmpc/ |
|
570 | $ hg push ../tmpc/ | |
571 | pushing to ../tmpc/ |
|
571 | pushing to ../tmpc/ | |
572 | searching for changes |
|
572 | searching for changes | |
573 | abort: push includes orphan changeset: cda648ca50f5! |
|
573 | abort: push includes orphan changeset: cda648ca50f5! | |
574 | [255] |
|
574 | [255] | |
575 |
|
575 | |||
576 | Test that extinct changeset are properly detected |
|
576 | Test that extinct changeset are properly detected | |
577 |
|
577 | |||
578 | $ hg log -r 'extinct()' |
|
578 | $ hg log -r 'extinct()' | |
579 |
|
579 | |||
580 | Don't try to push extinct changeset |
|
580 | Don't try to push extinct changeset | |
581 |
|
581 | |||
582 | $ hg init ../tmpf |
|
582 | $ hg init ../tmpf | |
583 | $ hg out ../tmpf |
|
583 | $ hg out ../tmpf | |
584 | comparing with ../tmpf |
|
584 | comparing with ../tmpf | |
585 | searching for changes |
|
585 | searching for changes | |
586 | 0:1f0dee641bb7 (public) [ ] add a |
|
586 | 0:1f0dee641bb7 (public) [ ] add a | |
587 | 1:7c3bad9141dc (public) [ ] add b |
|
587 | 1:7c3bad9141dc (public) [ ] add b | |
588 | 2:245bde4270cd (public) [ ] add original_c |
|
588 | 2:245bde4270cd (public) [ ] add original_c | |
589 | 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
589 | 3:6f9641995072 (draft) [ ] add n3w_3_c | |
590 | 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned] |
|
590 | 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned] | |
591 | 5:cda648ca50f5 (draft orphan) [tip ] add original_e |
|
591 | 5:cda648ca50f5 (draft orphan) [tip ] add original_e | |
592 | $ hg push ../tmpf -f # -f because be push unstable too |
|
592 | $ hg push ../tmpf -f # -f because be push unstable too | |
593 | pushing to ../tmpf |
|
593 | pushing to ../tmpf | |
594 | searching for changes |
|
594 | searching for changes | |
595 | adding changesets |
|
595 | adding changesets | |
596 | adding manifests |
|
596 | adding manifests | |
597 | adding file changes |
|
597 | adding file changes | |
598 | added 6 changesets with 6 changes to 6 files (+1 heads) |
|
598 | added 6 changesets with 6 changes to 6 files (+1 heads) | |
599 | 7 new obsolescence markers |
|
599 | 7 new obsolescence markers | |
600 | 1 new orphan changesets |
|
600 | 1 new orphan changesets | |
601 |
|
601 | |||
602 | no warning displayed |
|
602 | no warning displayed | |
603 |
|
603 | |||
604 | $ hg push ../tmpf |
|
604 | $ hg push ../tmpf | |
605 | pushing to ../tmpf |
|
605 | pushing to ../tmpf | |
606 | searching for changes |
|
606 | searching for changes | |
607 | no changes found |
|
607 | no changes found | |
608 | [1] |
|
608 | [1] | |
609 |
|
609 | |||
610 | Do not warn about new head when the new head is a successors of a remote one |
|
610 | Do not warn about new head when the new head is a successors of a remote one | |
611 |
|
611 | |||
612 | $ hg log -G |
|
612 | $ hg log -G | |
613 | @ 5:cda648ca50f5 (draft orphan) [tip ] add original_e |
|
613 | @ 5:cda648ca50f5 (draft orphan) [tip ] add original_e | |
614 | | |
|
614 | | | |
615 | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned] |
|
615 | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned] | |
616 | | |
|
616 | | | |
617 | o 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
617 | o 3:6f9641995072 (draft) [ ] add n3w_3_c | |
618 | | |
|
618 | | | |
619 | | o 2:245bde4270cd (public) [ ] add original_c |
|
619 | | o 2:245bde4270cd (public) [ ] add original_c | |
620 | |/ |
|
620 | |/ | |
621 | o 1:7c3bad9141dc (public) [ ] add b |
|
621 | o 1:7c3bad9141dc (public) [ ] add b | |
622 | | |
|
622 | | | |
623 | o 0:1f0dee641bb7 (public) [ ] add a |
|
623 | o 0:1f0dee641bb7 (public) [ ] add a | |
624 |
|
624 | |||
625 | $ hg up -q 'desc(n3w_3_c)' |
|
625 | $ hg up -q 'desc(n3w_3_c)' | |
626 | $ mkcommit obsolete_e |
|
626 | $ mkcommit obsolete_e | |
627 | created new head |
|
627 | created new head | |
628 | $ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'` \ |
|
628 | $ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'` \ | |
629 | > -u 'test <test@example.net>' |
|
629 | > -u 'test <test@example.net>' | |
630 | obsoleted 1 changesets |
|
630 | obsoleted 1 changesets | |
631 | $ hg outgoing ../tmpf # parasite hg outgoing testin |
|
631 | $ hg outgoing ../tmpf # parasite hg outgoing testin | |
632 | comparing with ../tmpf |
|
632 | comparing with ../tmpf | |
633 | searching for changes |
|
633 | searching for changes | |
634 | 6:3de5eca88c00 (draft) [tip ] add obsolete_e |
|
634 | 6:3de5eca88c00 (draft) [tip ] add obsolete_e | |
635 | $ hg push ../tmpf |
|
635 | $ hg push ../tmpf | |
636 | pushing to ../tmpf |
|
636 | pushing to ../tmpf | |
637 | searching for changes |
|
637 | searching for changes | |
638 | adding changesets |
|
638 | adding changesets | |
639 | adding manifests |
|
639 | adding manifests | |
640 | adding file changes |
|
640 | adding file changes | |
641 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
641 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
642 | 1 new obsolescence markers |
|
642 | 1 new obsolescence markers | |
643 | obsoleted 1 changesets |
|
643 | obsoleted 1 changesets | |
644 |
|
644 | |||
645 | test relevance computation |
|
645 | test relevance computation | |
646 | --------------------------------------- |
|
646 | --------------------------------------- | |
647 |
|
647 | |||
648 | Checking simple case of "marker relevance". |
|
648 | Checking simple case of "marker relevance". | |
649 |
|
649 | |||
650 |
|
650 | |||
651 | Reminder of the repo situation |
|
651 | Reminder of the repo situation | |
652 |
|
652 | |||
653 | $ hg log --hidden --graph |
|
653 | $ hg log --hidden --graph | |
654 | @ 6:3de5eca88c00 (draft) [tip ] add obsolete_e |
|
654 | @ 6:3de5eca88c00 (draft) [tip ] add obsolete_e | |
655 | | |
|
655 | | | |
656 | | x 5:cda648ca50f5 (draft *obsolete*) [ ] add original_e [rewritten as 6:3de5eca88c00 by test <test@example.net>] |
|
656 | | x 5:cda648ca50f5 (draft *obsolete*) [ ] add original_e [rewritten as 6:3de5eca88c00 by test <test@example.net>] | |
657 | | | |
|
657 | | | | |
658 | | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned] |
|
658 | | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned] | |
659 | |/ |
|
659 | |/ | |
660 | o 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
660 | o 3:6f9641995072 (draft) [ ] add n3w_3_c | |
661 | | |
|
661 | | | |
662 | | o 2:245bde4270cd (public) [ ] add original_c |
|
662 | | o 2:245bde4270cd (public) [ ] add original_c | |
663 | |/ |
|
663 | |/ | |
664 | o 1:7c3bad9141dc (public) [ ] add b |
|
664 | o 1:7c3bad9141dc (public) [ ] add b | |
665 | | |
|
665 | | | |
666 | o 0:1f0dee641bb7 (public) [ ] add a |
|
666 | o 0:1f0dee641bb7 (public) [ ] add a | |
667 |
|
667 | |||
668 |
|
668 | |||
669 | List of all markers |
|
669 | List of all markers | |
670 |
|
670 | |||
671 | $ hg debugobsolete |
|
671 | $ hg debugobsolete | |
672 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
672 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
673 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
673 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
674 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
674 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
675 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
675 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
676 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
676 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
677 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
677 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
678 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
678 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
679 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) |
|
679 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) | |
680 |
|
680 | |||
681 | List of changesets with no chain |
|
681 | List of changesets with no chain | |
682 |
|
682 | |||
683 | $ hg debugobsolete --hidden --rev ::2 |
|
683 | $ hg debugobsolete --hidden --rev ::2 | |
684 |
|
684 | |||
685 | List of changesets that are included on marker chain |
|
685 | List of changesets that are included on marker chain | |
686 |
|
686 | |||
687 | $ hg debugobsolete --hidden --rev 6 |
|
687 | $ hg debugobsolete --hidden --rev 6 | |
688 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) |
|
688 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) | |
689 |
|
689 | |||
690 | List of changesets with a longer chain, (including a pruned children) |
|
690 | List of changesets with a longer chain, (including a pruned children) | |
691 |
|
691 | |||
692 | $ hg debugobsolete --hidden --rev 3 |
|
692 | $ hg debugobsolete --hidden --rev 3 | |
693 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
693 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
694 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
694 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
695 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
695 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
696 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
696 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
697 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
697 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
698 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
698 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
699 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
699 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
700 |
|
700 | |||
701 | List of both |
|
701 | List of both | |
702 |
|
702 | |||
703 | $ hg debugobsolete --hidden --rev 3::6 |
|
703 | $ hg debugobsolete --hidden --rev 3::6 | |
704 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
704 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
705 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
705 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
706 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
706 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
707 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
707 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
708 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
708 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
709 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
709 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
710 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) |
|
710 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) | |
711 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
711 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
712 |
|
712 | |||
713 | List of all markers in JSON |
|
713 | List of all markers in JSON | |
714 |
|
714 | |||
715 | $ hg debugobsolete -Tjson |
|
715 | $ hg debugobsolete -Tjson | |
716 | [ |
|
716 | [ | |
717 | { |
|
717 | { | |
718 | "date": [1339.0, 0], |
|
718 | "date": [1339.0, 0], | |
719 | "flag": 0, |
|
719 | "flag": 0, | |
720 | "metadata": {"user": "test"}, |
|
720 | "metadata": {"user": "test"}, | |
721 | "prednode": "1339133913391339133913391339133913391339", |
|
721 | "prednode": "1339133913391339133913391339133913391339", | |
722 | "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"] |
|
722 | "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"] | |
723 | }, |
|
723 | }, | |
724 | { |
|
724 | { | |
725 | "date": [1339.0, 0], |
|
725 | "date": [1339.0, 0], | |
726 | "flag": 0, |
|
726 | "flag": 0, | |
727 | "metadata": {"user": "test"}, |
|
727 | "metadata": {"user": "test"}, | |
728 | "prednode": "1337133713371337133713371337133713371337", |
|
728 | "prednode": "1337133713371337133713371337133713371337", | |
729 | "succnodes": ["5601fb93a350734d935195fee37f4054c529ff39"] |
|
729 | "succnodes": ["5601fb93a350734d935195fee37f4054c529ff39"] | |
730 | }, |
|
730 | }, | |
731 | { |
|
731 | { | |
732 | "date": [121.0, 120], |
|
732 | "date": [121.0, 120], | |
733 | "flag": 12, |
|
733 | "flag": 12, | |
734 | "metadata": {"user": "test"}, |
|
734 | "metadata": {"user": "test"}, | |
735 | "prednode": "245bde4270cd1072a27757984f9cda8ba26f08ca", |
|
735 | "prednode": "245bde4270cd1072a27757984f9cda8ba26f08ca", | |
736 | "succnodes": ["cdbce2fbb16313928851e97e0d85413f3f7eb77f"] |
|
736 | "succnodes": ["cdbce2fbb16313928851e97e0d85413f3f7eb77f"] | |
737 | }, |
|
737 | }, | |
738 | { |
|
738 | { | |
739 | "date": [1338.0, 0], |
|
739 | "date": [1338.0, 0], | |
740 | "flag": 1, |
|
740 | "flag": 1, | |
741 | "metadata": {"user": "test"}, |
|
741 | "metadata": {"user": "test"}, | |
742 | "prednode": "5601fb93a350734d935195fee37f4054c529ff39", |
|
742 | "prednode": "5601fb93a350734d935195fee37f4054c529ff39", | |
743 | "succnodes": ["6f96419950729f3671185b847352890f074f7557"] |
|
743 | "succnodes": ["6f96419950729f3671185b847352890f074f7557"] | |
744 | }, |
|
744 | }, | |
745 | { |
|
745 | { | |
746 | "date": [1338.0, 0], |
|
746 | "date": [1338.0, 0], | |
747 | "flag": 0, |
|
747 | "flag": 0, | |
748 | "metadata": {"user": "test"}, |
|
748 | "metadata": {"user": "test"}, | |
749 | "prednode": "ca819180edb99ed25ceafb3e9584ac287e240b00", |
|
749 | "prednode": "ca819180edb99ed25ceafb3e9584ac287e240b00", | |
750 | "succnodes": ["1337133713371337133713371337133713371337"] |
|
750 | "succnodes": ["1337133713371337133713371337133713371337"] | |
751 | }, |
|
751 | }, | |
752 | { |
|
752 | { | |
753 | "date": [1337.0, 0], |
|
753 | "date": [1337.0, 0], | |
754 | "flag": 0, |
|
754 | "flag": 0, | |
755 | "metadata": {"user": "test"}, |
|
755 | "metadata": {"user": "test"}, | |
756 | "prednode": "cdbce2fbb16313928851e97e0d85413f3f7eb77f", |
|
756 | "prednode": "cdbce2fbb16313928851e97e0d85413f3f7eb77f", | |
757 | "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"] |
|
757 | "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"] | |
758 | }, |
|
758 | }, | |
759 | { |
|
759 | { | |
760 | "date": [0.0, 0], |
|
760 | "date": [0.0, 0], | |
761 | "flag": 0, |
|
761 | "flag": 0, | |
762 | "metadata": {"user": "test"}, |
|
762 | "metadata": {"user": "test"}, | |
763 | "parentnodes": ["6f96419950729f3671185b847352890f074f7557"], |
|
763 | "parentnodes": ["6f96419950729f3671185b847352890f074f7557"], | |
764 | "prednode": "94b33453f93bdb8d457ef9b770851a618bf413e1", |
|
764 | "prednode": "94b33453f93bdb8d457ef9b770851a618bf413e1", | |
765 | "succnodes": [] |
|
765 | "succnodes": [] | |
766 | }, |
|
766 | }, | |
767 | { |
|
767 | { | |
768 | "date": *, (glob) |
|
768 | "date": *, (glob) | |
769 | "flag": 0, |
|
769 | "flag": 0, | |
770 | "metadata": {"user": "test <test@example.net>"}, |
|
770 | "metadata": {"user": "test <test@example.net>"}, | |
771 | "prednode": "cda648ca50f50482b7055c0b0c4c117bba6733d9", |
|
771 | "prednode": "cda648ca50f50482b7055c0b0c4c117bba6733d9", | |
772 | "succnodes": ["3de5eca88c00aa039da7399a220f4a5221faa585"] |
|
772 | "succnodes": ["3de5eca88c00aa039da7399a220f4a5221faa585"] | |
773 | } |
|
773 | } | |
774 | ] |
|
774 | ] | |
775 |
|
775 | |||
776 | Template keywords |
|
776 | Template keywords | |
777 |
|
777 | |||
778 | $ hg debugobsolete -r6 -T '{succnodes % "{node|short}"} {date|shortdate}\n' |
|
778 | $ hg debugobsolete -r6 -T '{succnodes % "{node|short}"} {date|shortdate}\n' | |
779 | 3de5eca88c00 ????-??-?? (glob) |
|
779 | 3de5eca88c00 ????-??-?? (glob) | |
780 | $ hg debugobsolete -r6 -T '{join(metadata % "{key}={value}", " ")}\n' |
|
780 | $ hg debugobsolete -r6 -T '{join(metadata % "{key}={value}", " ")}\n' | |
781 | user=test <test@example.net> |
|
781 | user=test <test@example.net> | |
782 | $ hg debugobsolete -r6 -T '{metadata}\n{metadata}\n' |
|
782 | $ hg debugobsolete -r6 -T '{metadata}\n{metadata}\n' | |
783 | 'user': 'test <test@example.net>' |
|
783 | 'user': 'test <test@example.net>' | |
784 | 'user': 'test <test@example.net>' |
|
784 | 'user': 'test <test@example.net>' | |
785 | $ hg debugobsolete -r6 -T '{succnodes}\n{succnodes}\n' |
|
785 | $ hg debugobsolete -r6 -T '{succnodes}\n{succnodes}\n' | |
786 | 3de5eca88c00aa039da7399a220f4a5221faa585 |
|
786 | 3de5eca88c00aa039da7399a220f4a5221faa585 | |
787 | 3de5eca88c00aa039da7399a220f4a5221faa585 |
|
787 | 3de5eca88c00aa039da7399a220f4a5221faa585 | |
788 | $ hg debugobsolete -r6 -T '{flag} {get(metadata, "user")}\n' |
|
788 | $ hg debugobsolete -r6 -T '{flag} {get(metadata, "user")}\n' | |
789 | 0 test <test@example.net> |
|
789 | 0 test <test@example.net> | |
790 |
|
790 | |||
791 | Test the debug output for exchange |
|
791 | Test the debug output for exchange | |
792 | ---------------------------------- |
|
792 | ---------------------------------- | |
793 |
|
793 | |||
794 | $ hg pull ../tmpb --config 'experimental.obsmarkers-exchange-debug=True' # bundle2 |
|
794 | $ hg pull ../tmpb --config 'experimental.obsmarkers-exchange-debug=True' # bundle2 | |
795 | pulling from ../tmpb |
|
795 | pulling from ../tmpb | |
796 | searching for changes |
|
796 | searching for changes | |
797 | no changes found |
|
797 | no changes found | |
798 | obsmarker-exchange: 346 bytes received |
|
798 | obsmarker-exchange: 346 bytes received | |
799 |
|
799 | |||
800 | check hgweb does not explode |
|
800 | check hgweb does not explode | |
801 | ==================================== |
|
801 | ==================================== | |
802 |
|
802 | |||
803 | $ hg unbundle $TESTDIR/bundles/hgweb+obs.hg |
|
803 | $ hg unbundle $TESTDIR/bundles/hgweb+obs.hg | |
804 | adding changesets |
|
804 | adding changesets | |
805 | adding manifests |
|
805 | adding manifests | |
806 | adding file changes |
|
806 | adding file changes | |
807 | added 62 changesets with 63 changes to 9 files (+60 heads) |
|
807 | added 62 changesets with 63 changes to 9 files (+60 heads) | |
808 | new changesets 50c51b361e60:c15e9edfca13 |
|
808 | new changesets 50c51b361e60:c15e9edfca13 | |
809 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
809 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
810 | $ for node in `hg log -r 'desc(babar_)' --template '{node}\n'`; |
|
810 | $ for node in `hg log -r 'desc(babar_)' --template '{node}\n'`; | |
811 | > do |
|
811 | > do | |
812 | > hg debugobsolete $node |
|
812 | > hg debugobsolete $node | |
813 | > done |
|
813 | > done | |
814 | obsoleted 1 changesets |
|
814 | obsoleted 1 changesets | |
815 | obsoleted 1 changesets |
|
815 | obsoleted 1 changesets | |
816 | obsoleted 1 changesets |
|
816 | obsoleted 1 changesets | |
817 | obsoleted 1 changesets |
|
817 | obsoleted 1 changesets | |
818 | obsoleted 1 changesets |
|
818 | obsoleted 1 changesets | |
819 | obsoleted 1 changesets |
|
819 | obsoleted 1 changesets | |
820 | obsoleted 1 changesets |
|
820 | obsoleted 1 changesets | |
821 | obsoleted 1 changesets |
|
821 | obsoleted 1 changesets | |
822 | obsoleted 1 changesets |
|
822 | obsoleted 1 changesets | |
823 | obsoleted 1 changesets |
|
823 | obsoleted 1 changesets | |
824 | obsoleted 1 changesets |
|
824 | obsoleted 1 changesets | |
825 | obsoleted 1 changesets |
|
825 | obsoleted 1 changesets | |
826 | obsoleted 1 changesets |
|
826 | obsoleted 1 changesets | |
827 | obsoleted 1 changesets |
|
827 | obsoleted 1 changesets | |
828 | obsoleted 1 changesets |
|
828 | obsoleted 1 changesets | |
829 | obsoleted 1 changesets |
|
829 | obsoleted 1 changesets | |
830 | obsoleted 1 changesets |
|
830 | obsoleted 1 changesets | |
831 | obsoleted 1 changesets |
|
831 | obsoleted 1 changesets | |
832 | obsoleted 1 changesets |
|
832 | obsoleted 1 changesets | |
833 | obsoleted 1 changesets |
|
833 | obsoleted 1 changesets | |
834 | obsoleted 1 changesets |
|
834 | obsoleted 1 changesets | |
835 | obsoleted 1 changesets |
|
835 | obsoleted 1 changesets | |
836 | obsoleted 1 changesets |
|
836 | obsoleted 1 changesets | |
837 | obsoleted 1 changesets |
|
837 | obsoleted 1 changesets | |
838 | obsoleted 1 changesets |
|
838 | obsoleted 1 changesets | |
839 | obsoleted 1 changesets |
|
839 | obsoleted 1 changesets | |
840 | obsoleted 1 changesets |
|
840 | obsoleted 1 changesets | |
841 | obsoleted 1 changesets |
|
841 | obsoleted 1 changesets | |
842 | obsoleted 1 changesets |
|
842 | obsoleted 1 changesets | |
843 | obsoleted 1 changesets |
|
843 | obsoleted 1 changesets | |
844 | obsoleted 1 changesets |
|
844 | obsoleted 1 changesets | |
845 | obsoleted 1 changesets |
|
845 | obsoleted 1 changesets | |
846 | obsoleted 1 changesets |
|
846 | obsoleted 1 changesets | |
847 | obsoleted 1 changesets |
|
847 | obsoleted 1 changesets | |
848 | obsoleted 1 changesets |
|
848 | obsoleted 1 changesets | |
849 | obsoleted 1 changesets |
|
849 | obsoleted 1 changesets | |
850 | obsoleted 1 changesets |
|
850 | obsoleted 1 changesets | |
851 | obsoleted 1 changesets |
|
851 | obsoleted 1 changesets | |
852 | obsoleted 1 changesets |
|
852 | obsoleted 1 changesets | |
853 | obsoleted 1 changesets |
|
853 | obsoleted 1 changesets | |
854 | obsoleted 1 changesets |
|
854 | obsoleted 1 changesets | |
855 | obsoleted 1 changesets |
|
855 | obsoleted 1 changesets | |
856 | obsoleted 1 changesets |
|
856 | obsoleted 1 changesets | |
857 | obsoleted 1 changesets |
|
857 | obsoleted 1 changesets | |
858 | obsoleted 1 changesets |
|
858 | obsoleted 1 changesets | |
859 | obsoleted 1 changesets |
|
859 | obsoleted 1 changesets | |
860 | obsoleted 1 changesets |
|
860 | obsoleted 1 changesets | |
861 | obsoleted 1 changesets |
|
861 | obsoleted 1 changesets | |
862 | obsoleted 1 changesets |
|
862 | obsoleted 1 changesets | |
863 | obsoleted 1 changesets |
|
863 | obsoleted 1 changesets | |
864 | obsoleted 1 changesets |
|
864 | obsoleted 1 changesets | |
865 | obsoleted 1 changesets |
|
865 | obsoleted 1 changesets | |
866 | obsoleted 1 changesets |
|
866 | obsoleted 1 changesets | |
867 | obsoleted 1 changesets |
|
867 | obsoleted 1 changesets | |
868 | obsoleted 1 changesets |
|
868 | obsoleted 1 changesets | |
869 | obsoleted 1 changesets |
|
869 | obsoleted 1 changesets | |
870 | obsoleted 1 changesets |
|
870 | obsoleted 1 changesets | |
871 | obsoleted 1 changesets |
|
871 | obsoleted 1 changesets | |
872 | obsoleted 1 changesets |
|
872 | obsoleted 1 changesets | |
873 | obsoleted 1 changesets |
|
873 | obsoleted 1 changesets | |
874 | $ hg up tip |
|
874 | $ hg up tip | |
875 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
875 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
876 |
|
876 | |||
877 | #if serve |
|
877 | #if serve | |
878 |
|
878 | |||
879 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
879 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
880 | $ cat hg.pid >> $DAEMON_PIDS |
|
880 | $ cat hg.pid >> $DAEMON_PIDS | |
881 |
|
881 | |||
882 | check changelog view |
|
882 | check changelog view | |
883 |
|
883 | |||
884 | $ get-with-headers.py --headeronly localhost:$HGPORT 'shortlog/' |
|
884 | $ get-with-headers.py --headeronly localhost:$HGPORT 'shortlog/' | |
885 | 200 Script output follows |
|
885 | 200 Script output follows | |
886 |
|
886 | |||
887 | check graph view |
|
887 | check graph view | |
888 |
|
888 | |||
889 | $ get-with-headers.py --headeronly localhost:$HGPORT 'graph' |
|
889 | $ get-with-headers.py --headeronly localhost:$HGPORT 'graph' | |
890 | 200 Script output follows |
|
890 | 200 Script output follows | |
891 |
|
891 | |||
892 | check filelog view |
|
892 | check filelog view | |
893 |
|
893 | |||
894 | $ get-with-headers.py --headeronly localhost:$HGPORT 'log/'`hg log -r . -T "{node}"`/'babar' |
|
894 | $ get-with-headers.py --headeronly localhost:$HGPORT 'log/'`hg log -r . -T "{node}"`/'babar' | |
895 | 200 Script output follows |
|
895 | 200 Script output follows | |
896 |
|
896 | |||
897 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/68' |
|
897 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/68' | |
898 | 200 Script output follows |
|
898 | 200 Script output follows | |
899 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67' |
|
899 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67' | |
900 | 404 Not Found |
|
900 | 404 Not Found | |
901 | [1] |
|
901 | [1] | |
902 |
|
902 | |||
903 | check that web.view config option: |
|
903 | check that web.view config option: | |
904 |
|
904 | |||
905 | $ killdaemons.py hg.pid |
|
905 | $ killdaemons.py hg.pid | |
906 | $ cat >> .hg/hgrc << EOF |
|
906 | $ cat >> .hg/hgrc << EOF | |
907 | > [web] |
|
907 | > [web] | |
908 | > view=all |
|
908 | > view=all | |
909 | > EOF |
|
909 | > EOF | |
910 | $ wait |
|
910 | $ wait | |
911 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
911 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
912 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67' |
|
912 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67' | |
913 | 200 Script output follows |
|
913 | 200 Script output follows | |
914 | $ killdaemons.py hg.pid |
|
914 | $ killdaemons.py hg.pid | |
915 |
|
915 | |||
916 | Checking _enable=False warning if obsolete marker exists |
|
916 | Checking _enable=False warning if obsolete marker exists | |
917 |
|
917 | |||
918 | $ echo '[experimental]' >> $HGRCPATH |
|
918 | $ echo '[experimental]' >> $HGRCPATH | |
919 | $ echo "evolution=" >> $HGRCPATH |
|
919 | $ echo "evolution=" >> $HGRCPATH | |
920 | $ hg log -r tip |
|
920 | $ hg log -r tip | |
921 | 68:c15e9edfca13 (draft) [tip ] add celestine |
|
921 | 68:c15e9edfca13 (draft) [tip ] add celestine | |
922 |
|
922 | |||
923 | reenable for later test |
|
923 | reenable for later test | |
924 |
|
924 | |||
925 | $ echo '[experimental]' >> $HGRCPATH |
|
925 | $ echo '[experimental]' >> $HGRCPATH | |
926 | $ echo "evolution.exchange=True" >> $HGRCPATH |
|
926 | $ echo "evolution.exchange=True" >> $HGRCPATH | |
927 | $ echo "evolution.createmarkers=True" >> $HGRCPATH |
|
927 | $ echo "evolution.createmarkers=True" >> $HGRCPATH | |
928 |
|
928 | |||
929 | $ rm hg.pid access.log errors.log |
|
929 | $ rm hg.pid access.log errors.log | |
930 | #endif |
|
930 | #endif | |
931 |
|
931 | |||
932 | Several troubles on the same changeset (create an unstable and bumped changeset) |
|
932 | Several troubles on the same changeset (create an unstable and bumped changeset) | |
933 |
|
933 | |||
934 | $ hg debugobsolete `getid obsolete_e` |
|
934 | $ hg debugobsolete `getid obsolete_e` | |
935 | obsoleted 1 changesets |
|
935 | obsoleted 1 changesets | |
936 | 2 new orphan changesets |
|
936 | 2 new orphan changesets | |
937 | $ hg debugobsolete `getid original_c` `getid babar` |
|
937 | $ hg debugobsolete `getid original_c` `getid babar` | |
938 | 1 new phase-divergent changesets |
|
938 | 1 new phase-divergent changesets | |
939 | $ hg log --config ui.logtemplate= -r 'phasedivergent() and orphan()' |
|
939 | $ hg log --config ui.logtemplate= -r 'phasedivergent() and orphan()' | |
940 | changeset: 7:50c51b361e60 |
|
940 | changeset: 7:50c51b361e60 | |
941 | user: test |
|
941 | user: test | |
942 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
942 | date: Thu Jan 01 00:00:00 1970 +0000 | |
943 | instability: orphan, phase-divergent |
|
943 | instability: orphan, phase-divergent | |
944 | summary: add babar |
|
944 | summary: add babar | |
945 |
|
945 | |||
946 |
|
946 | |||
947 | test the "obsolete" templatekw |
|
947 | test the "obsolete" templatekw | |
948 |
|
948 | |||
949 | $ hg log -r 'obsolete()' |
|
949 | $ hg log -r 'obsolete()' | |
950 | 6:3de5eca88c00 (draft *obsolete*) [ ] add obsolete_e [pruned] |
|
950 | 6:3de5eca88c00 (draft *obsolete*) [ ] add obsolete_e [pruned] | |
951 |
|
951 | |||
952 | test the "troubles" templatekw |
|
952 | test the "troubles" templatekw | |
953 |
|
953 | |||
954 | $ hg log -r 'phasedivergent() and orphan()' |
|
954 | $ hg log -r 'phasedivergent() and orphan()' | |
955 | 7:50c51b361e60 (draft orphan phase-divergent) [ ] add babar |
|
955 | 7:50c51b361e60 (draft orphan phase-divergent) [ ] add babar | |
956 |
|
956 | |||
957 | test the default cmdline template |
|
957 | test the default cmdline template | |
958 |
|
958 | |||
959 | $ hg log -T default -r 'phasedivergent()' |
|
959 | $ hg log -T default -r 'phasedivergent()' | |
960 | changeset: 7:50c51b361e60 |
|
960 | changeset: 7:50c51b361e60 | |
961 | user: test |
|
961 | user: test | |
962 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
962 | date: Thu Jan 01 00:00:00 1970 +0000 | |
963 | instability: orphan, phase-divergent |
|
963 | instability: orphan, phase-divergent | |
964 | summary: add babar |
|
964 | summary: add babar | |
965 |
|
965 | |||
966 | $ hg log -T default -r 'obsolete()' |
|
966 | $ hg log -T default -r 'obsolete()' | |
967 | changeset: 6:3de5eca88c00 |
|
967 | changeset: 6:3de5eca88c00 | |
968 | parent: 3:6f9641995072 |
|
968 | parent: 3:6f9641995072 | |
969 | user: test |
|
969 | user: test | |
970 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
970 | date: Thu Jan 01 00:00:00 1970 +0000 | |
971 | obsolete: pruned |
|
971 | obsolete: pruned | |
972 | summary: add obsolete_e |
|
972 | summary: add obsolete_e | |
973 |
|
973 | |||
974 |
|
974 | |||
975 | test the obsolete labels |
|
975 | test the obsolete labels | |
976 |
|
976 | |||
977 | $ hg log --config ui.logtemplate= --color=debug -r 'phasedivergent()' |
|
977 | $ hg log --config ui.logtemplate= --color=debug -r 'phasedivergent()' | |
978 | [log.changeset changeset.draft changeset.unstable instability.orphan instability.phase-divergent|changeset: 7:50c51b361e60] |
|
978 | [log.changeset changeset.draft changeset.unstable instability.orphan instability.phase-divergent|changeset: 7:50c51b361e60] | |
979 | [log.user|user: test] |
|
979 | [log.user|user: test] | |
980 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
980 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
981 | [log.instability|instability: orphan, phase-divergent] |
|
981 | [log.instability|instability: orphan, phase-divergent] | |
982 | [log.summary|summary: add babar] |
|
982 | [log.summary|summary: add babar] | |
983 |
|
983 | |||
984 |
|
984 | |||
985 | $ hg log -T default -r 'phasedivergent()' --color=debug |
|
985 | $ hg log -T default -r 'phasedivergent()' --color=debug | |
986 | [log.changeset changeset.draft changeset.unstable instability.orphan instability.phase-divergent|changeset: 7:50c51b361e60] |
|
986 | [log.changeset changeset.draft changeset.unstable instability.orphan instability.phase-divergent|changeset: 7:50c51b361e60] | |
987 | [log.user|user: test] |
|
987 | [log.user|user: test] | |
988 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
988 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
989 | [log.instability|instability: orphan, phase-divergent] |
|
989 | [log.instability|instability: orphan, phase-divergent] | |
990 | [log.summary|summary: add babar] |
|
990 | [log.summary|summary: add babar] | |
991 |
|
991 | |||
992 |
|
992 | |||
993 | $ hg log --config ui.logtemplate= --color=debug -r "obsolete()" |
|
993 | $ hg log --config ui.logtemplate= --color=debug -r "obsolete()" | |
994 | [log.changeset changeset.draft changeset.obsolete|changeset: 6:3de5eca88c00] |
|
994 | [log.changeset changeset.draft changeset.obsolete|changeset: 6:3de5eca88c00] | |
995 | [log.parent changeset.draft|parent: 3:6f9641995072] |
|
995 | [log.parent changeset.draft|parent: 3:6f9641995072] | |
996 | [log.user|user: test] |
|
996 | [log.user|user: test] | |
997 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
997 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
998 | [log.obsfate|obsolete: pruned] |
|
998 | [log.obsfate|obsolete: pruned] | |
999 | [log.summary|summary: add obsolete_e] |
|
999 | [log.summary|summary: add obsolete_e] | |
1000 |
|
1000 | |||
1001 |
|
1001 | |||
1002 | $ hg log -T default -r 'obsolete()' --color=debug |
|
1002 | $ hg log -T default -r 'obsolete()' --color=debug | |
1003 | [log.changeset changeset.draft changeset.obsolete|changeset: 6:3de5eca88c00] |
|
1003 | [log.changeset changeset.draft changeset.obsolete|changeset: 6:3de5eca88c00] | |
1004 | [log.parent changeset.draft|parent: 3:6f9641995072] |
|
1004 | [log.parent changeset.draft|parent: 3:6f9641995072] | |
1005 | [log.user|user: test] |
|
1005 | [log.user|user: test] | |
1006 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
1006 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
1007 | [log.obsfate|obsolete: pruned] |
|
1007 | [log.obsfate|obsolete: pruned] | |
1008 | [log.summary|summary: add obsolete_e] |
|
1008 | [log.summary|summary: add obsolete_e] | |
1009 |
|
1009 | |||
1010 |
|
1010 | |||
1011 | test summary output |
|
1011 | test summary output | |
1012 |
|
1012 | |||
1013 | $ hg up -r 'phasedivergent() and orphan()' |
|
1013 | $ hg up -r 'phasedivergent() and orphan()' | |
1014 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1014 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1015 | $ hg summary |
|
1015 | $ hg summary | |
1016 | parent: 7:50c51b361e60 (orphan, phase-divergent) |
|
1016 | parent: 7:50c51b361e60 (orphan, phase-divergent) | |
1017 | add babar |
|
1017 | add babar | |
1018 | branch: default |
|
1018 | branch: default | |
1019 | commit: (clean) |
|
1019 | commit: (clean) | |
1020 | update: 2 new changesets (update) |
|
1020 | update: 2 new changesets (update) | |
1021 | phases: 4 draft |
|
1021 | phases: 4 draft | |
1022 | orphan: 2 changesets |
|
1022 | orphan: 2 changesets | |
1023 | phase-divergent: 1 changesets |
|
1023 | phase-divergent: 1 changesets | |
1024 | $ hg up -r 'obsolete()' |
|
1024 | $ hg up -r 'obsolete()' | |
1025 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1025 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1026 | $ hg summary |
|
1026 | $ hg summary | |
1027 | parent: 6:3de5eca88c00 (obsolete) |
|
1027 | parent: 6:3de5eca88c00 (obsolete) | |
1028 | add obsolete_e |
|
1028 | add obsolete_e | |
1029 | branch: default |
|
1029 | branch: default | |
1030 | commit: (clean) |
|
1030 | commit: (clean) | |
1031 | update: 3 new changesets (update) |
|
1031 | update: 3 new changesets (update) | |
1032 | phases: 4 draft |
|
1032 | phases: 4 draft | |
1033 | orphan: 2 changesets |
|
1033 | orphan: 2 changesets | |
1034 | phase-divergent: 1 changesets |
|
1034 | phase-divergent: 1 changesets | |
1035 |
|
1035 | |||
1036 | #if serve |
|
1036 | #if serve | |
1037 |
|
1037 | |||
1038 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
1038 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
1039 | $ cat hg.pid >> $DAEMON_PIDS |
|
1039 | $ cat hg.pid >> $DAEMON_PIDS | |
1040 |
|
1040 | |||
1041 | check obsolete changeset |
|
1041 | check obsolete changeset | |
1042 |
|
1042 | |||
1043 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=paper' | grep '<span class="obsolete">' |
|
1043 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=paper' | grep '<span class="obsolete">' | |
1044 | <span class="phase">draft</span> <span class="obsolete">obsolete</span> |
|
1044 | <span class="phase">draft</span> <span class="obsolete">obsolete</span> | |
1045 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=coal' | grep '<span class="obsolete">' |
|
1045 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=coal' | grep '<span class="obsolete">' | |
1046 | <span class="phase">draft</span> <span class="obsolete">obsolete</span> |
|
1046 | <span class="phase">draft</span> <span class="obsolete">obsolete</span> | |
1047 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=gitweb' | grep '<span class="logtags">' |
|
1047 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=gitweb' | grep '<span class="logtags">' | |
1048 | <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="obsoletetag" title="obsolete">obsolete</span> </span> |
|
1048 | <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="obsoletetag" title="obsolete">obsolete</span> </span> | |
1049 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=monoblue' | grep '<span class="logtags">' |
|
1049 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=monoblue' | grep '<span class="logtags">' | |
1050 | <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="obsoletetag" title="obsolete">obsolete</span> </span> |
|
1050 | <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="obsoletetag" title="obsolete">obsolete</span> </span> | |
1051 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=spartan' | grep 'class="obsolete"' |
|
1051 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=spartan' | grep 'class="obsolete"' | |
1052 | <th class="obsolete">obsolete:</th> |
|
1052 | <th class="obsolete">obsolete:</th> | |
1053 | <td class="obsolete">pruned</td> |
|
1053 | <td class="obsolete">pruned</td> | |
1054 |
|
1054 | |||
1055 | check an obsolete changeset that has been rewritten |
|
1055 | check an obsolete changeset that has been rewritten | |
1056 | $ get-with-headers.py localhost:$HGPORT 'rev/cda648ca50f5?style=paper' | grep rewritten |
|
1056 | $ get-with-headers.py localhost:$HGPORT 'rev/cda648ca50f5?style=paper' | grep rewritten | |
1057 | <td>rewritten as <a href="/rev/3de5eca88c00?style=paper">3de5eca88c00</a> </td> |
|
1057 | <td>rewritten as <a href="/rev/3de5eca88c00?style=paper">3de5eca88c00</a> </td> | |
1058 | $ get-with-headers.py localhost:$HGPORT 'rev/cda648ca50f5?style=coal' | grep rewritten |
|
1058 | $ get-with-headers.py localhost:$HGPORT 'rev/cda648ca50f5?style=coal' | grep rewritten | |
1059 | <td>rewritten as <a href="/rev/3de5eca88c00?style=coal">3de5eca88c00</a> </td> |
|
1059 | <td>rewritten as <a href="/rev/3de5eca88c00?style=coal">3de5eca88c00</a> </td> | |
1060 | $ get-with-headers.py localhost:$HGPORT 'rev/cda648ca50f5?style=gitweb' | grep rewritten |
|
1060 | $ get-with-headers.py localhost:$HGPORT 'rev/cda648ca50f5?style=gitweb' | grep rewritten | |
1061 | <tr><td>obsolete</td><td>rewritten as <a class="list" href="/rev/3de5eca88c00?style=gitweb">3de5eca88c00</a> </td></tr> |
|
1061 | <tr><td>obsolete</td><td>rewritten as <a class="list" href="/rev/3de5eca88c00?style=gitweb">3de5eca88c00</a> </td></tr> | |
1062 | $ get-with-headers.py localhost:$HGPORT 'rev/cda648ca50f5?style=monoblue' | grep rewritten |
|
1062 | $ get-with-headers.py localhost:$HGPORT 'rev/cda648ca50f5?style=monoblue' | grep rewritten | |
1063 | <dt>obsolete</dt><dd>rewritten as <a href="/rev/3de5eca88c00?style=monoblue">3de5eca88c00</a> </dd> |
|
1063 | <dt>obsolete</dt><dd>rewritten as <a href="/rev/3de5eca88c00?style=monoblue">3de5eca88c00</a> </dd> | |
1064 | $ get-with-headers.py localhost:$HGPORT 'rev/cda648ca50f5?style=spartan' | grep rewritten |
|
1064 | $ get-with-headers.py localhost:$HGPORT 'rev/cda648ca50f5?style=spartan' | grep rewritten | |
1065 | <td class="obsolete">rewritten as <a href="/rev/3de5eca88c00?style=spartan">3de5eca88c00</a> </td> |
|
1065 | <td class="obsolete">rewritten as <a href="/rev/3de5eca88c00?style=spartan">3de5eca88c00</a> </td> | |
1066 |
|
1066 | |||
1067 | check changeset with instabilities |
|
1067 | check changeset with instabilities | |
1068 |
|
1068 | |||
1069 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=paper' | grep '<span class="instability">' |
|
1069 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=paper' | grep '<span class="instability">' | |
1070 | <span class="phase">draft</span> <span class="instability">orphan</span> <span class="instability">phase-divergent</span> |
|
1070 | <span class="phase">draft</span> <span class="instability">orphan</span> <span class="instability">phase-divergent</span> | |
1071 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=coal' | grep '<span class="instability">' |
|
1071 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=coal' | grep '<span class="instability">' | |
1072 | <span class="phase">draft</span> <span class="instability">orphan</span> <span class="instability">phase-divergent</span> |
|
1072 | <span class="phase">draft</span> <span class="instability">orphan</span> <span class="instability">phase-divergent</span> | |
1073 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=gitweb' | grep '<span class="logtags">' |
|
1073 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=gitweb' | grep '<span class="logtags">' | |
1074 | <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="instabilitytag" title="orphan">orphan</span> <span class="instabilitytag" title="phase-divergent">phase-divergent</span> </span> |
|
1074 | <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="instabilitytag" title="orphan">orphan</span> <span class="instabilitytag" title="phase-divergent">phase-divergent</span> </span> | |
1075 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=monoblue' | grep '<span class="logtags">' |
|
1075 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=monoblue' | grep '<span class="logtags">' | |
1076 | <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="instabilitytag" title="orphan">orphan</span> <span class="instabilitytag" title="phase-divergent">phase-divergent</span> </span> |
|
1076 | <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="instabilitytag" title="orphan">orphan</span> <span class="instabilitytag" title="phase-divergent">phase-divergent</span> </span> | |
1077 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=spartan' | grep 'class="instabilities"' |
|
1077 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=spartan' | grep 'class="instabilities"' | |
1078 | <th class="instabilities">instabilities:</th> |
|
1078 | <th class="instabilities">instabilities:</th> | |
1079 | <td class="instabilities">orphan phase-divergent </td> |
|
1079 | <td class="instabilities">orphan phase-divergent </td> | |
1080 |
|
1080 | |||
1081 | $ killdaemons.py |
|
1081 | $ killdaemons.py | |
1082 |
|
1082 | |||
1083 | $ rm hg.pid access.log errors.log |
|
1083 | $ rm hg.pid access.log errors.log | |
1084 | #endif |
|
1084 | #endif | |
1085 |
|
1085 | |||
1086 | Test incoming/outcoming with changesets obsoleted remotely, known locally |
|
1086 | Test incoming/outcoming with changesets obsoleted remotely, known locally | |
1087 | =============================================================================== |
|
1087 | =============================================================================== | |
1088 |
|
1088 | |||
1089 | This test issue 3805 |
|
1089 | This test issue 3805 | |
1090 |
|
1090 | |||
1091 | $ hg init repo-issue3805 |
|
1091 | $ hg init repo-issue3805 | |
1092 | $ cd repo-issue3805 |
|
1092 | $ cd repo-issue3805 | |
1093 | $ echo "base" > base |
|
1093 | $ echo "base" > base | |
1094 | $ hg ci -Am "base" |
|
1094 | $ hg ci -Am "base" | |
1095 | adding base |
|
1095 | adding base | |
1096 | $ echo "foo" > foo |
|
1096 | $ echo "foo" > foo | |
1097 | $ hg ci -Am "A" |
|
1097 | $ hg ci -Am "A" | |
1098 | adding foo |
|
1098 | adding foo | |
1099 | $ hg clone . ../other-issue3805 |
|
1099 | $ hg clone . ../other-issue3805 | |
1100 | updating to branch default |
|
1100 | updating to branch default | |
1101 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1101 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1102 | $ echo "bar" >> foo |
|
1102 | $ echo "bar" >> foo | |
1103 | $ hg ci --amend |
|
1103 | $ hg ci --amend | |
1104 | $ cd ../other-issue3805 |
|
1104 | $ cd ../other-issue3805 | |
1105 | $ hg log -G |
|
1105 | $ hg log -G | |
1106 | @ 1:29f0c6921ddd (draft) [tip ] A |
|
1106 | @ 1:29f0c6921ddd (draft) [tip ] A | |
1107 | | |
|
1107 | | | |
1108 | o 0:d20a80d4def3 (draft) [ ] base |
|
1108 | o 0:d20a80d4def3 (draft) [ ] base | |
1109 |
|
1109 | |||
1110 | $ hg log -G -R ../repo-issue3805 |
|
1110 | $ hg log -G -R ../repo-issue3805 | |
1111 | @ 2:323a9c3ddd91 (draft) [tip ] A |
|
1111 | @ 2:323a9c3ddd91 (draft) [tip ] A | |
1112 | | |
|
1112 | | | |
1113 | o 0:d20a80d4def3 (draft) [ ] base |
|
1113 | o 0:d20a80d4def3 (draft) [ ] base | |
1114 |
|
1114 | |||
1115 | $ hg incoming |
|
1115 | $ hg incoming | |
1116 | comparing with $TESTTMP/tmpe/repo-issue3805 |
|
1116 | comparing with $TESTTMP/tmpe/repo-issue3805 | |
1117 | searching for changes |
|
1117 | searching for changes | |
1118 | 2:323a9c3ddd91 (draft) [tip ] A |
|
1118 | 2:323a9c3ddd91 (draft) [tip ] A | |
1119 | $ hg incoming --bundle ../issue3805.hg |
|
1119 | $ hg incoming --bundle ../issue3805.hg | |
1120 | comparing with $TESTTMP/tmpe/repo-issue3805 |
|
1120 | comparing with $TESTTMP/tmpe/repo-issue3805 | |
1121 | searching for changes |
|
1121 | searching for changes | |
1122 | 2:323a9c3ddd91 (draft) [tip ] A |
|
1122 | 2:323a9c3ddd91 (draft) [tip ] A | |
1123 | $ hg outgoing |
|
1123 | $ hg outgoing | |
1124 | comparing with $TESTTMP/tmpe/repo-issue3805 |
|
1124 | comparing with $TESTTMP/tmpe/repo-issue3805 | |
1125 | searching for changes |
|
1125 | searching for changes | |
1126 | 1:29f0c6921ddd (draft) [tip ] A |
|
1126 | 1:29f0c6921ddd (draft) [tip ] A | |
1127 |
|
1127 | |||
1128 | #if serve |
|
1128 | #if serve | |
1129 |
|
1129 | |||
1130 | $ hg serve -R ../repo-issue3805 -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
1130 | $ hg serve -R ../repo-issue3805 -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
1131 | $ cat hg.pid >> $DAEMON_PIDS |
|
1131 | $ cat hg.pid >> $DAEMON_PIDS | |
1132 |
|
1132 | |||
1133 | $ hg incoming http://localhost:$HGPORT |
|
1133 | $ hg incoming http://localhost:$HGPORT | |
1134 | comparing with http://localhost:$HGPORT/ |
|
1134 | comparing with http://localhost:$HGPORT/ | |
1135 | searching for changes |
|
1135 | searching for changes | |
1136 | 2:323a9c3ddd91 (draft) [tip ] A |
|
1136 | 2:323a9c3ddd91 (draft) [tip ] A | |
1137 | $ hg outgoing http://localhost:$HGPORT |
|
1137 | $ hg outgoing http://localhost:$HGPORT | |
1138 | comparing with http://localhost:$HGPORT/ |
|
1138 | comparing with http://localhost:$HGPORT/ | |
1139 | searching for changes |
|
1139 | searching for changes | |
1140 | 1:29f0c6921ddd (draft) [tip ] A |
|
1140 | 1:29f0c6921ddd (draft) [tip ] A | |
1141 |
|
1141 | |||
1142 | $ killdaemons.py |
|
1142 | $ killdaemons.py | |
1143 |
|
1143 | |||
1144 | #endif |
|
1144 | #endif | |
1145 |
|
1145 | |||
1146 | This test issue 3814 |
|
1146 | This test issue 3814 | |
1147 |
|
1147 | |||
1148 | (nothing to push but locally hidden changeset) |
|
1148 | (nothing to push but locally hidden changeset) | |
1149 |
|
1149 | |||
1150 | $ cd .. |
|
1150 | $ cd .. | |
1151 | $ hg init repo-issue3814 |
|
1151 | $ hg init repo-issue3814 | |
1152 | $ cd repo-issue3805 |
|
1152 | $ cd repo-issue3805 | |
1153 | $ hg push -r 323a9c3ddd91 ../repo-issue3814 |
|
1153 | $ hg push -r 323a9c3ddd91 ../repo-issue3814 | |
1154 | pushing to ../repo-issue3814 |
|
1154 | pushing to ../repo-issue3814 | |
1155 | searching for changes |
|
1155 | searching for changes | |
1156 | adding changesets |
|
1156 | adding changesets | |
1157 | adding manifests |
|
1157 | adding manifests | |
1158 | adding file changes |
|
1158 | adding file changes | |
1159 | added 2 changesets with 2 changes to 2 files |
|
1159 | added 2 changesets with 2 changes to 2 files | |
1160 | 1 new obsolescence markers |
|
1160 | 1 new obsolescence markers | |
1161 | $ hg out ../repo-issue3814 |
|
1161 | $ hg out ../repo-issue3814 | |
1162 | comparing with ../repo-issue3814 |
|
1162 | comparing with ../repo-issue3814 | |
1163 | searching for changes |
|
1163 | searching for changes | |
1164 | no changes found |
|
1164 | no changes found | |
1165 | [1] |
|
1165 | [1] | |
1166 |
|
1166 | |||
1167 | Test that a local tag blocks a changeset from being hidden |
|
1167 | Test that a local tag blocks a changeset from being hidden | |
1168 |
|
1168 | |||
1169 | $ hg tag -l visible -r 1 --hidden |
|
1169 | $ hg tag -l visible -r 1 --hidden | |
1170 | $ hg log -G |
|
1170 | $ hg log -G | |
1171 | @ 2:323a9c3ddd91 (draft) [tip ] A |
|
1171 | @ 2:323a9c3ddd91 (draft) [tip ] A | |
1172 | | |
|
1172 | | | |
1173 | | x 1:29f0c6921ddd (draft *obsolete*) [visible ] A [rewritten using amend as 2:323a9c3ddd91] |
|
1173 | | x 1:29f0c6921ddd (draft *obsolete*) [visible ] A [rewritten using amend as 2:323a9c3ddd91] | |
1174 | |/ |
|
1174 | |/ | |
1175 | o 0:d20a80d4def3 (draft) [ ] base |
|
1175 | o 0:d20a80d4def3 (draft) [ ] base | |
1176 |
|
1176 | |||
1177 | Test that removing a local tag does not cause some commands to fail |
|
1177 | Test that removing a local tag does not cause some commands to fail | |
1178 |
|
1178 | |||
1179 | $ hg tag -l -r tip tiptag |
|
1179 | $ hg tag -l -r tip tiptag | |
1180 | $ hg tags |
|
1180 | $ hg tags | |
1181 | tiptag 2:323a9c3ddd91 |
|
1181 | tiptag 2:323a9c3ddd91 | |
1182 | tip 2:323a9c3ddd91 |
|
1182 | tip 2:323a9c3ddd91 | |
1183 | visible 1:29f0c6921ddd |
|
1183 | visible 1:29f0c6921ddd | |
1184 | $ hg --config extensions.strip= strip -r tip --no-backup |
|
1184 | $ hg --config extensions.strip= strip -r tip --no-backup | |
1185 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1185 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1186 | $ hg tags |
|
1186 | $ hg tags | |
1187 | visible 1:29f0c6921ddd |
|
1187 | visible 1:29f0c6921ddd | |
1188 | tip 1:29f0c6921ddd |
|
1188 | tip 1:29f0c6921ddd | |
1189 |
|
1189 | |||
1190 | Test bundle overlay onto hidden revision |
|
1190 | Test bundle overlay onto hidden revision | |
1191 |
|
1191 | |||
1192 | $ cd .. |
|
1192 | $ cd .. | |
1193 | $ hg init repo-bundleoverlay |
|
1193 | $ hg init repo-bundleoverlay | |
1194 | $ cd repo-bundleoverlay |
|
1194 | $ cd repo-bundleoverlay | |
1195 | $ echo "A" > foo |
|
1195 | $ echo "A" > foo | |
1196 | $ hg ci -Am "A" |
|
1196 | $ hg ci -Am "A" | |
1197 | adding foo |
|
1197 | adding foo | |
1198 | $ echo "B" >> foo |
|
1198 | $ echo "B" >> foo | |
1199 | $ hg ci -m "B" |
|
1199 | $ hg ci -m "B" | |
1200 | $ hg up 0 |
|
1200 | $ hg up 0 | |
1201 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1201 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1202 | $ echo "C" >> foo |
|
1202 | $ echo "C" >> foo | |
1203 | $ hg ci -m "C" |
|
1203 | $ hg ci -m "C" | |
1204 | created new head |
|
1204 | created new head | |
1205 | $ hg log -G |
|
1205 | $ hg log -G | |
1206 | @ 2:c186d7714947 (draft) [tip ] C |
|
1206 | @ 2:c186d7714947 (draft) [tip ] C | |
1207 | | |
|
1207 | | | |
1208 | | o 1:44526ebb0f98 (draft) [ ] B |
|
1208 | | o 1:44526ebb0f98 (draft) [ ] B | |
1209 | |/ |
|
1209 | |/ | |
1210 | o 0:4b34ecfb0d56 (draft) [ ] A |
|
1210 | o 0:4b34ecfb0d56 (draft) [ ] A | |
1211 |
|
1211 | |||
1212 |
|
1212 | |||
1213 | $ hg clone -r1 . ../other-bundleoverlay |
|
1213 | $ hg clone -r1 . ../other-bundleoverlay | |
1214 | adding changesets |
|
1214 | adding changesets | |
1215 | adding manifests |
|
1215 | adding manifests | |
1216 | adding file changes |
|
1216 | adding file changes | |
1217 | added 2 changesets with 2 changes to 1 files |
|
1217 | added 2 changesets with 2 changes to 1 files | |
1218 | new changesets 4b34ecfb0d56:44526ebb0f98 |
|
1218 | new changesets 4b34ecfb0d56:44526ebb0f98 | |
1219 | updating to branch default |
|
1219 | updating to branch default | |
1220 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1220 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1221 | $ cd ../other-bundleoverlay |
|
1221 | $ cd ../other-bundleoverlay | |
1222 | $ echo "B+" >> foo |
|
1222 | $ echo "B+" >> foo | |
1223 | $ hg ci --amend -m "B+" |
|
1223 | $ hg ci --amend -m "B+" | |
1224 | $ hg log -G --hidden |
|
1224 | $ hg log -G --hidden | |
1225 | @ 2:b7d587542d40 (draft) [tip ] B+ |
|
1225 | @ 2:b7d587542d40 (draft) [tip ] B+ | |
1226 | | |
|
1226 | | | |
1227 | | x 1:44526ebb0f98 (draft *obsolete*) [ ] B [rewritten using amend as 2:b7d587542d40] |
|
1227 | | x 1:44526ebb0f98 (draft *obsolete*) [ ] B [rewritten using amend as 2:b7d587542d40] | |
1228 | |/ |
|
1228 | |/ | |
1229 | o 0:4b34ecfb0d56 (draft) [ ] A |
|
1229 | o 0:4b34ecfb0d56 (draft) [ ] A | |
1230 |
|
1230 | |||
1231 |
|
1231 | |||
1232 | $ hg incoming ../repo-bundleoverlay --bundle ../bundleoverlay.hg |
|
1232 | $ hg incoming ../repo-bundleoverlay --bundle ../bundleoverlay.hg | |
1233 | comparing with ../repo-bundleoverlay |
|
1233 | comparing with ../repo-bundleoverlay | |
1234 | searching for changes |
|
1234 | searching for changes | |
1235 | 1:44526ebb0f98 (draft) [ ] B |
|
1235 | 1:44526ebb0f98 (draft) [ ] B | |
1236 | 2:c186d7714947 (draft) [tip ] C |
|
1236 | 2:c186d7714947 (draft) [tip ] C | |
1237 | $ hg log -G -R ../bundleoverlay.hg |
|
1237 | $ hg log -G -R ../bundleoverlay.hg | |
1238 | o 3:c186d7714947 (draft) [tip ] C |
|
1238 | o 3:c186d7714947 (draft) [tip ] C | |
1239 | | |
|
1239 | | | |
1240 | | @ 2:b7d587542d40 (draft) [ ] B+ |
|
1240 | | @ 2:b7d587542d40 (draft) [ ] B+ | |
1241 | |/ |
|
1241 | |/ | |
1242 | o 0:4b34ecfb0d56 (draft) [ ] A |
|
1242 | o 0:4b34ecfb0d56 (draft) [ ] A | |
1243 |
|
1243 | |||
1244 |
|
1244 | |||
1245 | #if serve |
|
1245 | #if serve | |
1246 |
|
1246 | |||
1247 | Test issue 4506 |
|
1247 | Test issue 4506 | |
1248 |
|
1248 | |||
1249 | $ cd .. |
|
1249 | $ cd .. | |
1250 | $ hg init repo-issue4506 |
|
1250 | $ hg init repo-issue4506 | |
1251 | $ cd repo-issue4506 |
|
1251 | $ cd repo-issue4506 | |
1252 | $ echo "0" > foo |
|
1252 | $ echo "0" > foo | |
1253 | $ hg add foo |
|
1253 | $ hg add foo | |
1254 | $ hg ci -m "content-0" |
|
1254 | $ hg ci -m "content-0" | |
1255 |
|
1255 | |||
1256 | $ hg up null |
|
1256 | $ hg up null | |
1257 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1257 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1258 | $ echo "1" > bar |
|
1258 | $ echo "1" > bar | |
1259 | $ hg add bar |
|
1259 | $ hg add bar | |
1260 | $ hg ci -m "content-1" |
|
1260 | $ hg ci -m "content-1" | |
1261 | created new head |
|
1261 | created new head | |
1262 | $ hg up 0 |
|
1262 | $ hg up 0 | |
1263 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1263 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1264 | $ hg graft 1 |
|
1264 | $ hg graft 1 | |
1265 | grafting 1:1c9eddb02162 "content-1" (tip) |
|
1265 | grafting 1:1c9eddb02162 "content-1" (tip) | |
1266 |
|
1266 | |||
1267 | $ hg debugobsolete `hg log -r1 -T'{node}'` `hg log -r2 -T'{node}'` |
|
1267 | $ hg debugobsolete `hg log -r1 -T'{node}'` `hg log -r2 -T'{node}'` | |
1268 | obsoleted 1 changesets |
|
1268 | obsoleted 1 changesets | |
1269 |
|
1269 | |||
1270 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
1270 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
1271 | $ cat hg.pid >> $DAEMON_PIDS |
|
1271 | $ cat hg.pid >> $DAEMON_PIDS | |
1272 |
|
1272 | |||
1273 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/1' |
|
1273 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/1' | |
1274 | 404 Not Found |
|
1274 | 404 Not Found | |
1275 | [1] |
|
1275 | [1] | |
1276 | $ get-with-headers.py --headeronly localhost:$HGPORT 'file/tip/bar' |
|
1276 | $ get-with-headers.py --headeronly localhost:$HGPORT 'file/tip/bar' | |
1277 | 200 Script output follows |
|
1277 | 200 Script output follows | |
1278 | $ get-with-headers.py --headeronly localhost:$HGPORT 'annotate/tip/bar' |
|
1278 | $ get-with-headers.py --headeronly localhost:$HGPORT 'annotate/tip/bar' | |
1279 | 200 Script output follows |
|
1279 | 200 Script output follows | |
1280 |
|
1280 | |||
1281 | $ killdaemons.py |
|
1281 | $ killdaemons.py | |
1282 |
|
1282 | |||
1283 | #endif |
|
1283 | #endif | |
1284 |
|
1284 | |||
1285 | Test heads computation on pending index changes with obsolescence markers |
|
1285 | Test heads computation on pending index changes with obsolescence markers | |
1286 | $ cd .. |
|
1286 | $ cd .. | |
1287 | $ cat >$TESTTMP/test_extension.py << EOF |
|
1287 | $ cat >$TESTTMP/test_extension.py << EOF | |
1288 | > from __future__ import absolute_import |
|
1288 | > from __future__ import absolute_import | |
1289 | > from mercurial.i18n import _ |
|
1289 | > from mercurial.i18n import _ | |
1290 | > from mercurial import cmdutil, registrar |
|
1290 | > from mercurial import cmdutil, registrar | |
1291 | > |
|
1291 | > | |
1292 | > cmdtable = {} |
|
1292 | > cmdtable = {} | |
1293 | > command = registrar.command(cmdtable) |
|
1293 | > command = registrar.command(cmdtable) | |
1294 | > @command(b"amendtransient",[], _('hg amendtransient [rev]')) |
|
1294 | > @command(b"amendtransient",[], _('hg amendtransient [rev]')) | |
1295 | > def amend(ui, repo, *pats, **opts): |
|
1295 | > def amend(ui, repo, *pats, **opts): | |
1296 | > opts['message'] = 'Test' |
|
1296 | > opts['message'] = 'Test' | |
1297 | > opts['logfile'] = None |
|
1297 | > opts['logfile'] = None | |
1298 | > cmdutil.amend(ui, repo, repo['.'], {}, pats, opts) |
|
1298 | > cmdutil.amend(ui, repo, repo['.'], {}, pats, opts) | |
1299 | > ui.write('%s\n' % repo.changelog.headrevs()) |
|
1299 | > ui.write('%s\n' % repo.changelog.headrevs()) | |
1300 | > EOF |
|
1300 | > EOF | |
1301 | $ cat >> $HGRCPATH << EOF |
|
1301 | $ cat >> $HGRCPATH << EOF | |
1302 | > [extensions] |
|
1302 | > [extensions] | |
1303 | > testextension=$TESTTMP/test_extension.py |
|
1303 | > testextension=$TESTTMP/test_extension.py | |
1304 | > EOF |
|
1304 | > EOF | |
1305 | $ hg init repo-issue-nativerevs-pending-changes |
|
1305 | $ hg init repo-issue-nativerevs-pending-changes | |
1306 | $ cd repo-issue-nativerevs-pending-changes |
|
1306 | $ cd repo-issue-nativerevs-pending-changes | |
1307 | $ mkcommit a |
|
1307 | $ mkcommit a | |
1308 | $ mkcommit b |
|
1308 | $ mkcommit b | |
1309 | $ hg up ".^" |
|
1309 | $ hg up ".^" | |
1310 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1310 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1311 | $ echo aa > a |
|
1311 | $ echo aa > a | |
1312 | $ hg amendtransient |
|
1312 | $ hg amendtransient | |
1313 | 1 new orphan changesets |
|
1313 | 1 new orphan changesets | |
1314 | [1, 2] |
|
1314 | [1, 2] | |
1315 |
|
1315 | |||
1316 | Test cache consistency for the visible filter |
|
1316 | Test cache consistency for the visible filter | |
1317 | 1) We want to make sure that the cached filtered revs are invalidated when |
|
1317 | 1) We want to make sure that the cached filtered revs are invalidated when | |
1318 | bookmarks change |
|
1318 | bookmarks change | |
1319 | $ cd .. |
|
1319 | $ cd .. | |
1320 | $ cat >$TESTTMP/test_extension.py << EOF |
|
1320 | $ cat >$TESTTMP/test_extension.py << EOF | |
1321 | > from __future__ import absolute_import, print_function |
|
1321 | > from __future__ import absolute_import, print_function | |
1322 | > import weakref |
|
1322 | > import weakref | |
1323 | > from mercurial import ( |
|
1323 | > from mercurial import ( | |
1324 | > bookmarks, |
|
1324 | > bookmarks, | |
1325 | > cmdutil, |
|
1325 | > cmdutil, | |
1326 | > extensions, |
|
1326 | > extensions, | |
1327 | > repoview, |
|
1327 | > repoview, | |
1328 | > ) |
|
1328 | > ) | |
1329 | > def _bookmarkchanged(orig, bkmstoreinst, *args, **kwargs): |
|
1329 | > def _bookmarkchanged(orig, bkmstoreinst, *args, **kwargs): | |
1330 | > reporef = weakref.ref(bkmstoreinst._repo) |
|
1330 | > reporef = weakref.ref(bkmstoreinst._repo) | |
1331 | > def trhook(tr): |
|
1331 | > def trhook(tr): | |
1332 | > repo = reporef() |
|
1332 | > repo = reporef() | |
1333 | > hidden1 = repoview.computehidden(repo) |
|
1333 | > hidden1 = repoview.computehidden(repo) | |
1334 | > hidden = repoview.filterrevs(repo, 'visible') |
|
1334 | > hidden = repoview.filterrevs(repo, 'visible') | |
1335 | > if sorted(hidden1) != sorted(hidden): |
|
1335 | > if sorted(hidden1) != sorted(hidden): | |
1336 | > print("cache inconsistency") |
|
1336 | > print("cache inconsistency") | |
1337 | > bkmstoreinst._repo.currenttransaction().addpostclose('test_extension', trhook) |
|
1337 | > bkmstoreinst._repo.currenttransaction().addpostclose('test_extension', trhook) | |
1338 | > orig(bkmstoreinst, *args, **kwargs) |
|
1338 | > orig(bkmstoreinst, *args, **kwargs) | |
1339 | > def extsetup(ui): |
|
1339 | > def extsetup(ui): | |
1340 | > extensions.wrapfunction(bookmarks.bmstore, '_recordchange', |
|
1340 | > extensions.wrapfunction(bookmarks.bmstore, '_recordchange', | |
1341 | > _bookmarkchanged) |
|
1341 | > _bookmarkchanged) | |
1342 | > EOF |
|
1342 | > EOF | |
1343 |
|
1343 | |||
1344 | $ hg init repo-cache-inconsistency |
|
1344 | $ hg init repo-cache-inconsistency | |
1345 | $ cd repo-issue-nativerevs-pending-changes |
|
1345 | $ cd repo-issue-nativerevs-pending-changes | |
1346 | $ mkcommit a |
|
1346 | $ mkcommit a | |
1347 | a already tracked! |
|
1347 | a already tracked! | |
1348 | $ mkcommit b |
|
1348 | $ mkcommit b | |
1349 | $ hg id |
|
1349 | $ hg id | |
1350 | 13bedc178fce tip |
|
1350 | 13bedc178fce tip | |
1351 | $ echo "hello" > b |
|
1351 | $ echo "hello" > b | |
1352 | $ hg commit --amend -m "message" |
|
1352 | $ hg commit --amend -m "message" | |
1353 | $ hg book bookb -r 13bedc178fce --hidden |
|
1353 | $ hg book bookb -r 13bedc178fce --hidden | |
1354 | bookmarking hidden changeset 13bedc178fce |
|
1354 | bookmarking hidden changeset 13bedc178fce | |
|
1355 | (hidden revision '13bedc178fce' was rewritten as: a9b1f8652753) | |||
1355 | $ hg log -r 13bedc178fce |
|
1356 | $ hg log -r 13bedc178fce | |
1356 | 4:13bedc178fce (draft *obsolete*) [ bookb] add b [rewritten using amend as 5:a9b1f8652753] |
|
1357 | 4:13bedc178fce (draft *obsolete*) [ bookb] add b [rewritten using amend as 5:a9b1f8652753] | |
1357 | $ hg book -d bookb |
|
1358 | $ hg book -d bookb | |
1358 | $ hg log -r 13bedc178fce |
|
1359 | $ hg log -r 13bedc178fce | |
1359 | abort: hidden revision '13bedc178fce' was rewritten as: a9b1f8652753! |
|
1360 | abort: hidden revision '13bedc178fce' was rewritten as: a9b1f8652753! | |
1360 | (use --hidden to access hidden revisions) |
|
1361 | (use --hidden to access hidden revisions) | |
1361 | [255] |
|
1362 | [255] | |
1362 |
|
1363 | |||
1363 | Empty out the test extension, as it isn't compatible with later parts |
|
1364 | Empty out the test extension, as it isn't compatible with later parts | |
1364 | of the test. |
|
1365 | of the test. | |
1365 | $ echo > $TESTTMP/test_extension.py |
|
1366 | $ echo > $TESTTMP/test_extension.py | |
1366 |
|
1367 | |||
1367 | Test ability to pull changeset with locally applying obsolescence markers |
|
1368 | Test ability to pull changeset with locally applying obsolescence markers | |
1368 | (issue4945) |
|
1369 | (issue4945) | |
1369 |
|
1370 | |||
1370 | $ cd .. |
|
1371 | $ cd .. | |
1371 | $ hg init issue4845 |
|
1372 | $ hg init issue4845 | |
1372 | $ cd issue4845 |
|
1373 | $ cd issue4845 | |
1373 |
|
1374 | |||
1374 | $ echo foo > f0 |
|
1375 | $ echo foo > f0 | |
1375 | $ hg add f0 |
|
1376 | $ hg add f0 | |
1376 | $ hg ci -m '0' |
|
1377 | $ hg ci -m '0' | |
1377 | $ echo foo > f1 |
|
1378 | $ echo foo > f1 | |
1378 | $ hg add f1 |
|
1379 | $ hg add f1 | |
1379 | $ hg ci -m '1' |
|
1380 | $ hg ci -m '1' | |
1380 | $ echo foo > f2 |
|
1381 | $ echo foo > f2 | |
1381 | $ hg add f2 |
|
1382 | $ hg add f2 | |
1382 | $ hg ci -m '2' |
|
1383 | $ hg ci -m '2' | |
1383 |
|
1384 | |||
1384 | $ echo bar > f2 |
|
1385 | $ echo bar > f2 | |
1385 | $ hg commit --amend --config experimental.evolution.createmarkers=True |
|
1386 | $ hg commit --amend --config experimental.evolution.createmarkers=True | |
1386 | $ hg log -G |
|
1387 | $ hg log -G | |
1387 | @ 3:b0551702f918 (draft) [tip ] 2 |
|
1388 | @ 3:b0551702f918 (draft) [tip ] 2 | |
1388 | | |
|
1389 | | | |
1389 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1390 | o 1:e016b03fd86f (draft) [ ] 1 | |
1390 | | |
|
1391 | | | |
1391 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1392 | o 0:a78f55e5508c (draft) [ ] 0 | |
1392 |
|
1393 | |||
1393 | $ hg log -G --hidden |
|
1394 | $ hg log -G --hidden | |
1394 | @ 3:b0551702f918 (draft) [tip ] 2 |
|
1395 | @ 3:b0551702f918 (draft) [tip ] 2 | |
1395 | | |
|
1396 | | | |
1396 | | x 2:e008cf283490 (draft *obsolete*) [ ] 2 [rewritten using amend as 3:b0551702f918] |
|
1397 | | x 2:e008cf283490 (draft *obsolete*) [ ] 2 [rewritten using amend as 3:b0551702f918] | |
1397 | |/ |
|
1398 | |/ | |
1398 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1399 | o 1:e016b03fd86f (draft) [ ] 1 | |
1399 | | |
|
1400 | | | |
1400 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1401 | o 0:a78f55e5508c (draft) [ ] 0 | |
1401 |
|
1402 | |||
1402 |
|
1403 | |||
1403 | $ hg strip --hidden -r 2 --config extensions.strip= --config devel.strip-obsmarkers=no |
|
1404 | $ hg strip --hidden -r 2 --config extensions.strip= --config devel.strip-obsmarkers=no | |
1404 | saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e008cf283490-ede36964-backup.hg |
|
1405 | saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e008cf283490-ede36964-backup.hg | |
1405 | $ hg debugobsolete |
|
1406 | $ hg debugobsolete | |
1406 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} |
|
1407 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} | |
1407 | $ hg log -G |
|
1408 | $ hg log -G | |
1408 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1409 | @ 2:b0551702f918 (draft) [tip ] 2 | |
1409 | | |
|
1410 | | | |
1410 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1411 | o 1:e016b03fd86f (draft) [ ] 1 | |
1411 | | |
|
1412 | | | |
1412 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1413 | o 0:a78f55e5508c (draft) [ ] 0 | |
1413 |
|
1414 | |||
1414 | $ hg log -G --hidden |
|
1415 | $ hg log -G --hidden | |
1415 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1416 | @ 2:b0551702f918 (draft) [tip ] 2 | |
1416 | | |
|
1417 | | | |
1417 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1418 | o 1:e016b03fd86f (draft) [ ] 1 | |
1418 | | |
|
1419 | | | |
1419 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1420 | o 0:a78f55e5508c (draft) [ ] 0 | |
1420 |
|
1421 | |||
1421 | $ hg debugbundle .hg/strip-backup/e008cf283490-*-backup.hg |
|
1422 | $ hg debugbundle .hg/strip-backup/e008cf283490-*-backup.hg | |
1422 | Stream params: {Compression: BZ} |
|
1423 | Stream params: {Compression: BZ} | |
1423 | changegroup -- {nbchanges: 1, version: 02} |
|
1424 | changegroup -- {nbchanges: 1, version: 02} | |
1424 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 |
|
1425 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 | |
1425 | phase-heads -- {} |
|
1426 | phase-heads -- {} | |
1426 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 draft |
|
1427 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 draft | |
1427 |
|
1428 | |||
1428 | $ hg pull .hg/strip-backup/e008cf283490-*-backup.hg |
|
1429 | $ hg pull .hg/strip-backup/e008cf283490-*-backup.hg | |
1429 | pulling from .hg/strip-backup/e008cf283490-ede36964-backup.hg |
|
1430 | pulling from .hg/strip-backup/e008cf283490-ede36964-backup.hg | |
1430 | searching for changes |
|
1431 | searching for changes | |
1431 | no changes found |
|
1432 | no changes found | |
1432 | $ hg debugobsolete |
|
1433 | $ hg debugobsolete | |
1433 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} |
|
1434 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} | |
1434 | $ hg log -G |
|
1435 | $ hg log -G | |
1435 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1436 | @ 2:b0551702f918 (draft) [tip ] 2 | |
1436 | | |
|
1437 | | | |
1437 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1438 | o 1:e016b03fd86f (draft) [ ] 1 | |
1438 | | |
|
1439 | | | |
1439 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1440 | o 0:a78f55e5508c (draft) [ ] 0 | |
1440 |
|
1441 | |||
1441 | $ hg log -G --hidden |
|
1442 | $ hg log -G --hidden | |
1442 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1443 | @ 2:b0551702f918 (draft) [tip ] 2 | |
1443 | | |
|
1444 | | | |
1444 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1445 | o 1:e016b03fd86f (draft) [ ] 1 | |
1445 | | |
|
1446 | | | |
1446 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1447 | o 0:a78f55e5508c (draft) [ ] 0 | |
1447 |
|
1448 | |||
1448 |
|
1449 | |||
1449 | Testing that strip remove markers: |
|
1450 | Testing that strip remove markers: | |
1450 |
|
1451 | |||
1451 | $ hg strip -r 1 --config extensions.strip= |
|
1452 | $ hg strip -r 1 --config extensions.strip= | |
1452 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1453 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
1453 | saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e016b03fd86f-65ede734-backup.hg |
|
1454 | saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e016b03fd86f-65ede734-backup.hg | |
1454 | $ hg debugobsolete |
|
1455 | $ hg debugobsolete | |
1455 | $ hg log -G |
|
1456 | $ hg log -G | |
1456 | @ 0:a78f55e5508c (draft) [tip ] 0 |
|
1457 | @ 0:a78f55e5508c (draft) [tip ] 0 | |
1457 |
|
1458 | |||
1458 | $ hg log -G --hidden |
|
1459 | $ hg log -G --hidden | |
1459 | @ 0:a78f55e5508c (draft) [tip ] 0 |
|
1460 | @ 0:a78f55e5508c (draft) [tip ] 0 | |
1460 |
|
1461 | |||
1461 | $ hg debugbundle .hg/strip-backup/e016b03fd86f-*-backup.hg |
|
1462 | $ hg debugbundle .hg/strip-backup/e016b03fd86f-*-backup.hg | |
1462 | Stream params: {Compression: BZ} |
|
1463 | Stream params: {Compression: BZ} | |
1463 | changegroup -- {nbchanges: 2, version: 02} |
|
1464 | changegroup -- {nbchanges: 2, version: 02} | |
1464 | e016b03fd86fcccc54817d120b90b751aaf367d6 |
|
1465 | e016b03fd86fcccc54817d120b90b751aaf367d6 | |
1465 | b0551702f918510f01ae838ab03a463054c67b46 |
|
1466 | b0551702f918510f01ae838ab03a463054c67b46 | |
1466 | obsmarkers -- {} |
|
1467 | obsmarkers -- {} | |
1467 | version: 1 (92 bytes) |
|
1468 | version: 1 (92 bytes) | |
1468 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} |
|
1469 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} | |
1469 | phase-heads -- {} |
|
1470 | phase-heads -- {} | |
1470 | b0551702f918510f01ae838ab03a463054c67b46 draft |
|
1471 | b0551702f918510f01ae838ab03a463054c67b46 draft | |
1471 |
|
1472 | |||
1472 | $ hg unbundle .hg/strip-backup/e016b03fd86f-*-backup.hg |
|
1473 | $ hg unbundle .hg/strip-backup/e016b03fd86f-*-backup.hg | |
1473 | adding changesets |
|
1474 | adding changesets | |
1474 | adding manifests |
|
1475 | adding manifests | |
1475 | adding file changes |
|
1476 | adding file changes | |
1476 | added 2 changesets with 2 changes to 2 files |
|
1477 | added 2 changesets with 2 changes to 2 files | |
1477 | 1 new obsolescence markers |
|
1478 | 1 new obsolescence markers | |
1478 | new changesets e016b03fd86f:b0551702f918 |
|
1479 | new changesets e016b03fd86f:b0551702f918 | |
1479 | (run 'hg update' to get a working copy) |
|
1480 | (run 'hg update' to get a working copy) | |
1480 | $ hg debugobsolete | sort |
|
1481 | $ hg debugobsolete | sort | |
1481 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} |
|
1482 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} | |
1482 | $ hg log -G |
|
1483 | $ hg log -G | |
1483 | o 2:b0551702f918 (draft) [tip ] 2 |
|
1484 | o 2:b0551702f918 (draft) [tip ] 2 | |
1484 | | |
|
1485 | | | |
1485 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1486 | o 1:e016b03fd86f (draft) [ ] 1 | |
1486 | | |
|
1487 | | | |
1487 | @ 0:a78f55e5508c (draft) [ ] 0 |
|
1488 | @ 0:a78f55e5508c (draft) [ ] 0 | |
1488 |
|
1489 | |||
1489 | $ hg log -G --hidden |
|
1490 | $ hg log -G --hidden | |
1490 | o 2:b0551702f918 (draft) [tip ] 2 |
|
1491 | o 2:b0551702f918 (draft) [tip ] 2 | |
1491 | | |
|
1492 | | | |
1492 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1493 | o 1:e016b03fd86f (draft) [ ] 1 | |
1493 | | |
|
1494 | | | |
1494 | @ 0:a78f55e5508c (draft) [ ] 0 |
|
1495 | @ 0:a78f55e5508c (draft) [ ] 0 | |
1495 |
|
1496 | |||
1496 | Test that 'hg debugobsolete --index --rev' can show indices of obsmarkers when |
|
1497 | Test that 'hg debugobsolete --index --rev' can show indices of obsmarkers when | |
1497 | only a subset of those are displayed (because of --rev option) |
|
1498 | only a subset of those are displayed (because of --rev option) | |
1498 | $ hg init doindexrev |
|
1499 | $ hg init doindexrev | |
1499 | $ cd doindexrev |
|
1500 | $ cd doindexrev | |
1500 | $ echo a > a |
|
1501 | $ echo a > a | |
1501 | $ hg ci -Am a |
|
1502 | $ hg ci -Am a | |
1502 | adding a |
|
1503 | adding a | |
1503 | $ hg ci --amend -m aa |
|
1504 | $ hg ci --amend -m aa | |
1504 | $ echo b > b |
|
1505 | $ echo b > b | |
1505 | $ hg ci -Am b |
|
1506 | $ hg ci -Am b | |
1506 | adding b |
|
1507 | adding b | |
1507 | $ hg ci --amend -m bb |
|
1508 | $ hg ci --amend -m bb | |
1508 | $ echo c > c |
|
1509 | $ echo c > c | |
1509 | $ hg ci -Am c |
|
1510 | $ hg ci -Am c | |
1510 | adding c |
|
1511 | adding c | |
1511 | $ hg ci --amend -m cc |
|
1512 | $ hg ci --amend -m cc | |
1512 | $ echo d > d |
|
1513 | $ echo d > d | |
1513 | $ hg ci -Am d |
|
1514 | $ hg ci -Am d | |
1514 | adding d |
|
1515 | adding d | |
1515 | $ hg ci --amend -m dd --config experimental.evolution.track-operation=1 |
|
1516 | $ hg ci --amend -m dd --config experimental.evolution.track-operation=1 | |
1516 | $ hg debugobsolete --index --rev "3+7" |
|
1517 | $ hg debugobsolete --index --rev "3+7" | |
1517 | 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} |
|
1518 | 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} | |
1518 | 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} |
|
1519 | 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} | |
1519 | $ hg debugobsolete --index --rev "3+7" -Tjson |
|
1520 | $ hg debugobsolete --index --rev "3+7" -Tjson | |
1520 | [ |
|
1521 | [ | |
1521 | { |
|
1522 | { | |
1522 | "date": [0.0, 0], |
|
1523 | "date": [0.0, 0], | |
1523 | "flag": 0, |
|
1524 | "flag": 0, | |
1524 | "index": 1, |
|
1525 | "index": 1, | |
1525 | "metadata": {"ef1": "1", "operation": "amend", "user": "test"}, |
|
1526 | "metadata": {"ef1": "1", "operation": "amend", "user": "test"}, | |
1526 | "prednode": "6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1", |
|
1527 | "prednode": "6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1", | |
1527 | "succnodes": ["d27fb9b066076fd921277a4b9e8b9cb48c95bc6a"] |
|
1528 | "succnodes": ["d27fb9b066076fd921277a4b9e8b9cb48c95bc6a"] | |
1528 | }, |
|
1529 | }, | |
1529 | { |
|
1530 | { | |
1530 | "date": [0.0, 0], |
|
1531 | "date": [0.0, 0], | |
1531 | "flag": 0, |
|
1532 | "flag": 0, | |
1532 | "index": 3, |
|
1533 | "index": 3, | |
1533 | "metadata": {"ef1": "1", "operation": "amend", "user": "test"}, |
|
1534 | "metadata": {"ef1": "1", "operation": "amend", "user": "test"}, | |
1534 | "prednode": "4715cf767440ed891755448016c2b8cf70760c30", |
|
1535 | "prednode": "4715cf767440ed891755448016c2b8cf70760c30", | |
1535 | "succnodes": ["7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d"] |
|
1536 | "succnodes": ["7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d"] | |
1536 | } |
|
1537 | } | |
1537 | ] |
|
1538 | ] | |
1538 |
|
1539 | |||
1539 | Test the --delete option of debugobsolete command |
|
1540 | Test the --delete option of debugobsolete command | |
1540 | $ hg debugobsolete --index |
|
1541 | $ hg debugobsolete --index | |
1541 | 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} |
|
1542 | 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} | |
1542 | 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} |
|
1543 | 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} | |
1543 | 2 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} |
|
1544 | 2 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} | |
1544 | 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} |
|
1545 | 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} | |
1545 | $ hg debugobsolete --delete 1 --delete 3 |
|
1546 | $ hg debugobsolete --delete 1 --delete 3 | |
1546 | deleted 2 obsolescence markers |
|
1547 | deleted 2 obsolescence markers | |
1547 | $ hg debugobsolete |
|
1548 | $ hg debugobsolete | |
1548 | cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} |
|
1549 | cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} | |
1549 | 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} |
|
1550 | 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} | |
1550 |
|
1551 | |||
1551 | Test adding changeset after obsmarkers affecting it |
|
1552 | Test adding changeset after obsmarkers affecting it | |
1552 | (eg: during pull, or unbundle) |
|
1553 | (eg: during pull, or unbundle) | |
1553 |
|
1554 | |||
1554 | $ mkcommit e |
|
1555 | $ mkcommit e | |
1555 | $ hg bundle -r . --base .~1 ../bundle-2.hg |
|
1556 | $ hg bundle -r . --base .~1 ../bundle-2.hg | |
1556 | 1 changesets found |
|
1557 | 1 changesets found | |
1557 | $ getid . |
|
1558 | $ getid . | |
1558 | $ hg --config extensions.strip= strip -r . |
|
1559 | $ hg --config extensions.strip= strip -r . | |
1559 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1560 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1560 | saved backup bundle to $TESTTMP/tmpe/issue4845/doindexrev/.hg/strip-backup/9bc153528424-ee80edd4-backup.hg |
|
1561 | saved backup bundle to $TESTTMP/tmpe/issue4845/doindexrev/.hg/strip-backup/9bc153528424-ee80edd4-backup.hg | |
1561 | $ hg debugobsolete 9bc153528424ea266d13e57f9ff0d799dfe61e4b |
|
1562 | $ hg debugobsolete 9bc153528424ea266d13e57f9ff0d799dfe61e4b | |
1562 | $ hg unbundle ../bundle-2.hg |
|
1563 | $ hg unbundle ../bundle-2.hg | |
1563 | adding changesets |
|
1564 | adding changesets | |
1564 | adding manifests |
|
1565 | adding manifests | |
1565 | adding file changes |
|
1566 | adding file changes | |
1566 | added 1 changesets with 1 changes to 1 files |
|
1567 | added 1 changesets with 1 changes to 1 files | |
1567 | (run 'hg update' to get a working copy) |
|
1568 | (run 'hg update' to get a working copy) | |
1568 | $ hg log -G |
|
1569 | $ hg log -G | |
1569 | @ 7:7ae79c5d60f0 (draft) [tip ] dd |
|
1570 | @ 7:7ae79c5d60f0 (draft) [tip ] dd | |
1570 | | |
|
1571 | | | |
1571 | | o 6:4715cf767440 (draft) [ ] d |
|
1572 | | o 6:4715cf767440 (draft) [ ] d | |
1572 | |/ |
|
1573 | |/ | |
1573 | o 5:29346082e4a9 (draft) [ ] cc |
|
1574 | o 5:29346082e4a9 (draft) [ ] cc | |
1574 | | |
|
1575 | | | |
1575 | o 3:d27fb9b06607 (draft) [ ] bb |
|
1576 | o 3:d27fb9b06607 (draft) [ ] bb | |
1576 | | |
|
1577 | | | |
1577 | | o 2:6fdef60fcbab (draft) [ ] b |
|
1578 | | o 2:6fdef60fcbab (draft) [ ] b | |
1578 | |/ |
|
1579 | |/ | |
1579 | o 1:f9bd49731b0b (draft) [ ] aa |
|
1580 | o 1:f9bd49731b0b (draft) [ ] aa | |
1580 |
|
1581 | |||
1581 |
|
1582 | |||
1582 | $ cd .. |
|
1583 | $ cd .. |
@@ -1,1689 +1,1690 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 | > EOF |
|
18 | > EOF | |
19 |
|
19 | |||
20 | Setup rebase canonical repo |
|
20 | Setup rebase canonical repo | |
21 |
|
21 | |||
22 | $ hg init base |
|
22 | $ hg init base | |
23 | $ cd base |
|
23 | $ cd base | |
24 | $ hg unbundle "$TESTDIR/bundles/rebase.hg" |
|
24 | $ hg unbundle "$TESTDIR/bundles/rebase.hg" | |
25 | adding changesets |
|
25 | adding changesets | |
26 | adding manifests |
|
26 | adding manifests | |
27 | adding file changes |
|
27 | adding file changes | |
28 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
28 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
29 | new changesets cd010b8cd998:02de42196ebe |
|
29 | new changesets cd010b8cd998:02de42196ebe | |
30 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
30 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
31 | $ hg up tip |
|
31 | $ hg up tip | |
32 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
32 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
33 | $ hg log -G |
|
33 | $ hg log -G | |
34 | @ 7:02de42196ebe H |
|
34 | @ 7:02de42196ebe H | |
35 | | |
|
35 | | | |
36 | | o 6:eea13746799a G |
|
36 | | o 6:eea13746799a G | |
37 | |/| |
|
37 | |/| | |
38 | o | 5:24b6387c8c8c F |
|
38 | o | 5:24b6387c8c8c F | |
39 | | | |
|
39 | | | | |
40 | | o 4:9520eea781bc E |
|
40 | | o 4:9520eea781bc E | |
41 | |/ |
|
41 | |/ | |
42 | | o 3:32af7686d403 D |
|
42 | | o 3:32af7686d403 D | |
43 | | | |
|
43 | | | | |
44 | | o 2:5fddd98957c8 C |
|
44 | | o 2:5fddd98957c8 C | |
45 | | | |
|
45 | | | | |
46 | | o 1:42ccdea3bb16 B |
|
46 | | o 1:42ccdea3bb16 B | |
47 | |/ |
|
47 | |/ | |
48 | o 0:cd010b8cd998 A |
|
48 | o 0:cd010b8cd998 A | |
49 |
|
49 | |||
50 | $ cd .. |
|
50 | $ cd .. | |
51 |
|
51 | |||
52 | simple rebase |
|
52 | simple rebase | |
53 | --------------------------------- |
|
53 | --------------------------------- | |
54 |
|
54 | |||
55 | $ hg clone base simple |
|
55 | $ hg clone base simple | |
56 | updating to branch default |
|
56 | updating to branch default | |
57 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
57 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
58 | $ cd simple |
|
58 | $ cd simple | |
59 | $ hg up 32af7686d403 |
|
59 | $ hg up 32af7686d403 | |
60 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
60 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
61 | $ hg rebase -d eea13746799a |
|
61 | $ hg rebase -d eea13746799a | |
62 | rebasing 1:42ccdea3bb16 "B" |
|
62 | rebasing 1:42ccdea3bb16 "B" | |
63 | rebasing 2:5fddd98957c8 "C" |
|
63 | rebasing 2:5fddd98957c8 "C" | |
64 | rebasing 3:32af7686d403 "D" |
|
64 | rebasing 3:32af7686d403 "D" | |
65 | $ hg log -G |
|
65 | $ hg log -G | |
66 | @ 10:8eeb3c33ad33 D |
|
66 | @ 10:8eeb3c33ad33 D | |
67 | | |
|
67 | | | |
68 | o 9:2327fea05063 C |
|
68 | o 9:2327fea05063 C | |
69 | | |
|
69 | | | |
70 | o 8:e4e5be0395b2 B |
|
70 | o 8:e4e5be0395b2 B | |
71 | | |
|
71 | | | |
72 | | o 7:02de42196ebe H |
|
72 | | o 7:02de42196ebe H | |
73 | | | |
|
73 | | | | |
74 | o | 6:eea13746799a G |
|
74 | o | 6:eea13746799a G | |
75 | |\| |
|
75 | |\| | |
76 | | o 5:24b6387c8c8c F |
|
76 | | o 5:24b6387c8c8c F | |
77 | | | |
|
77 | | | | |
78 | o | 4:9520eea781bc E |
|
78 | o | 4:9520eea781bc E | |
79 | |/ |
|
79 | |/ | |
80 | o 0:cd010b8cd998 A |
|
80 | o 0:cd010b8cd998 A | |
81 |
|
81 | |||
82 | $ hg log --hidden -G |
|
82 | $ hg log --hidden -G | |
83 | @ 10:8eeb3c33ad33 D |
|
83 | @ 10:8eeb3c33ad33 D | |
84 | | |
|
84 | | | |
85 | o 9:2327fea05063 C |
|
85 | o 9:2327fea05063 C | |
86 | | |
|
86 | | | |
87 | o 8:e4e5be0395b2 B |
|
87 | o 8:e4e5be0395b2 B | |
88 | | |
|
88 | | | |
89 | | o 7:02de42196ebe H |
|
89 | | o 7:02de42196ebe H | |
90 | | | |
|
90 | | | | |
91 | o | 6:eea13746799a G |
|
91 | o | 6:eea13746799a G | |
92 | |\| |
|
92 | |\| | |
93 | | o 5:24b6387c8c8c F |
|
93 | | o 5:24b6387c8c8c F | |
94 | | | |
|
94 | | | | |
95 | o | 4:9520eea781bc E |
|
95 | o | 4:9520eea781bc E | |
96 | |/ |
|
96 | |/ | |
97 | | x 3:32af7686d403 D (rewritten using rebase as 10:8eeb3c33ad33) |
|
97 | | x 3:32af7686d403 D (rewritten using rebase as 10:8eeb3c33ad33) | |
98 | | | |
|
98 | | | | |
99 | | x 2:5fddd98957c8 C (rewritten using rebase as 9:2327fea05063) |
|
99 | | x 2:5fddd98957c8 C (rewritten using rebase as 9:2327fea05063) | |
100 | | | |
|
100 | | | | |
101 | | x 1:42ccdea3bb16 B (rewritten using rebase as 8:e4e5be0395b2) |
|
101 | | x 1:42ccdea3bb16 B (rewritten using rebase as 8:e4e5be0395b2) | |
102 | |/ |
|
102 | |/ | |
103 | o 0:cd010b8cd998 A |
|
103 | o 0:cd010b8cd998 A | |
104 |
|
104 | |||
105 | $ hg debugobsolete |
|
105 | $ hg debugobsolete | |
106 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 e4e5be0395b2cbd471ed22a26b1b6a1a0658a794 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
106 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 e4e5be0395b2cbd471ed22a26b1b6a1a0658a794 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
107 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 2327fea05063f39961b14cb69435a9898dc9a245 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
107 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 2327fea05063f39961b14cb69435a9898dc9a245 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
108 | 32af7686d403cf45b5d95f2d70cebea587ac806a 8eeb3c33ad33d452c89e5dcf611c347f978fb42b 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
108 | 32af7686d403cf45b5d95f2d70cebea587ac806a 8eeb3c33ad33d452c89e5dcf611c347f978fb42b 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
109 |
|
109 | |||
110 |
|
110 | |||
111 | $ cd .. |
|
111 | $ cd .. | |
112 |
|
112 | |||
113 | empty changeset |
|
113 | empty changeset | |
114 | --------------------------------- |
|
114 | --------------------------------- | |
115 |
|
115 | |||
116 | $ hg clone base empty |
|
116 | $ hg clone base empty | |
117 | updating to branch default |
|
117 | updating to branch default | |
118 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
118 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
119 | $ cd empty |
|
119 | $ cd empty | |
120 | $ hg up eea13746799a |
|
120 | $ hg up eea13746799a | |
121 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
121 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
122 |
|
122 | |||
123 | We make a copy of both the first changeset in the rebased and some other in the |
|
123 | We make a copy of both the first changeset in the rebased and some other in the | |
124 | set. |
|
124 | set. | |
125 |
|
125 | |||
126 | $ hg graft 42ccdea3bb16 32af7686d403 |
|
126 | $ hg graft 42ccdea3bb16 32af7686d403 | |
127 | grafting 1:42ccdea3bb16 "B" |
|
127 | grafting 1:42ccdea3bb16 "B" | |
128 | grafting 3:32af7686d403 "D" |
|
128 | grafting 3:32af7686d403 "D" | |
129 | $ hg rebase -s 42ccdea3bb16 -d . |
|
129 | $ hg rebase -s 42ccdea3bb16 -d . | |
130 | rebasing 1:42ccdea3bb16 "B" |
|
130 | rebasing 1:42ccdea3bb16 "B" | |
131 | note: rebase of 1:42ccdea3bb16 created no changes to commit |
|
131 | note: rebase of 1:42ccdea3bb16 created no changes to commit | |
132 | rebasing 2:5fddd98957c8 "C" |
|
132 | rebasing 2:5fddd98957c8 "C" | |
133 | rebasing 3:32af7686d403 "D" |
|
133 | rebasing 3:32af7686d403 "D" | |
134 | note: rebase of 3:32af7686d403 created no changes to commit |
|
134 | note: rebase of 3:32af7686d403 created no changes to commit | |
135 | $ hg log -G |
|
135 | $ hg log -G | |
136 | o 10:5ae4c968c6ac C |
|
136 | o 10:5ae4c968c6ac C | |
137 | | |
|
137 | | | |
138 | @ 9:08483444fef9 D |
|
138 | @ 9:08483444fef9 D | |
139 | | |
|
139 | | | |
140 | o 8:8877864f1edb B |
|
140 | o 8:8877864f1edb B | |
141 | | |
|
141 | | | |
142 | | o 7:02de42196ebe H |
|
142 | | o 7:02de42196ebe H | |
143 | | | |
|
143 | | | | |
144 | o | 6:eea13746799a G |
|
144 | o | 6:eea13746799a G | |
145 | |\| |
|
145 | |\| | |
146 | | o 5:24b6387c8c8c F |
|
146 | | o 5:24b6387c8c8c F | |
147 | | | |
|
147 | | | | |
148 | o | 4:9520eea781bc E |
|
148 | o | 4:9520eea781bc E | |
149 | |/ |
|
149 | |/ | |
150 | o 0:cd010b8cd998 A |
|
150 | o 0:cd010b8cd998 A | |
151 |
|
151 | |||
152 | $ hg log --hidden -G |
|
152 | $ hg log --hidden -G | |
153 | o 10:5ae4c968c6ac C |
|
153 | o 10:5ae4c968c6ac C | |
154 | | |
|
154 | | | |
155 | @ 9:08483444fef9 D |
|
155 | @ 9:08483444fef9 D | |
156 | | |
|
156 | | | |
157 | o 8:8877864f1edb B |
|
157 | o 8:8877864f1edb B | |
158 | | |
|
158 | | | |
159 | | o 7:02de42196ebe H |
|
159 | | o 7:02de42196ebe H | |
160 | | | |
|
160 | | | | |
161 | o | 6:eea13746799a G |
|
161 | o | 6:eea13746799a G | |
162 | |\| |
|
162 | |\| | |
163 | | o 5:24b6387c8c8c F |
|
163 | | o 5:24b6387c8c8c F | |
164 | | | |
|
164 | | | | |
165 | o | 4:9520eea781bc E |
|
165 | o | 4:9520eea781bc E | |
166 | |/ |
|
166 | |/ | |
167 | | x 3:32af7686d403 D (pruned using rebase) |
|
167 | | x 3:32af7686d403 D (pruned using rebase) | |
168 | | | |
|
168 | | | | |
169 | | x 2:5fddd98957c8 C (rewritten using rebase as 10:5ae4c968c6ac) |
|
169 | | x 2:5fddd98957c8 C (rewritten using rebase as 10:5ae4c968c6ac) | |
170 | | | |
|
170 | | | | |
171 | | x 1:42ccdea3bb16 B (pruned using rebase) |
|
171 | | x 1:42ccdea3bb16 B (pruned using rebase) | |
172 | |/ |
|
172 | |/ | |
173 | o 0:cd010b8cd998 A |
|
173 | o 0:cd010b8cd998 A | |
174 |
|
174 | |||
175 | $ hg debugobsolete |
|
175 | $ hg debugobsolete | |
176 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} |
|
176 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} | |
177 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
177 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
178 | 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} |
|
178 | 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} | |
179 |
|
179 | |||
180 |
|
180 | |||
181 | More complex case where part of the rebase set were already rebased |
|
181 | More complex case where part of the rebase set were already rebased | |
182 |
|
182 | |||
183 | $ hg rebase --rev 'desc(D)' --dest 'desc(H)' |
|
183 | $ hg rebase --rev 'desc(D)' --dest 'desc(H)' | |
184 | rebasing 9:08483444fef9 "D" |
|
184 | rebasing 9:08483444fef9 "D" | |
185 | 1 new orphan changesets |
|
185 | 1 new orphan changesets | |
186 | $ hg debugobsolete |
|
186 | $ hg debugobsolete | |
187 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} |
|
187 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} | |
188 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
188 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
189 | 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} |
|
189 | 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} | |
190 | 08483444fef91d6224f6655ee586a65d263ad34c 4596109a6a4328c398bde3a4a3b6737cfade3003 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
190 | 08483444fef91d6224f6655ee586a65d263ad34c 4596109a6a4328c398bde3a4a3b6737cfade3003 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
191 | $ hg log -G |
|
191 | $ hg log -G | |
192 | @ 11:4596109a6a43 D |
|
192 | @ 11:4596109a6a43 D | |
193 | | |
|
193 | | | |
194 | | * 10:5ae4c968c6ac C |
|
194 | | * 10:5ae4c968c6ac C | |
195 | | | |
|
195 | | | | |
196 | | x 9:08483444fef9 D (rewritten using rebase as 11:4596109a6a43) |
|
196 | | x 9:08483444fef9 D (rewritten using rebase as 11:4596109a6a43) | |
197 | | | |
|
197 | | | | |
198 | | o 8:8877864f1edb B |
|
198 | | o 8:8877864f1edb B | |
199 | | | |
|
199 | | | | |
200 | o | 7:02de42196ebe H |
|
200 | o | 7:02de42196ebe H | |
201 | | | |
|
201 | | | | |
202 | | o 6:eea13746799a G |
|
202 | | o 6:eea13746799a G | |
203 | |/| |
|
203 | |/| | |
204 | o | 5:24b6387c8c8c F |
|
204 | o | 5:24b6387c8c8c F | |
205 | | | |
|
205 | | | | |
206 | | o 4:9520eea781bc E |
|
206 | | o 4:9520eea781bc E | |
207 | |/ |
|
207 | |/ | |
208 | o 0:cd010b8cd998 A |
|
208 | o 0:cd010b8cd998 A | |
209 |
|
209 | |||
210 | $ hg rebase --source 'desc(B)' --dest 'tip' --config experimental.rebaseskipobsolete=True |
|
210 | $ hg rebase --source 'desc(B)' --dest 'tip' --config experimental.rebaseskipobsolete=True | |
211 | rebasing 8:8877864f1edb "B" |
|
211 | rebasing 8:8877864f1edb "B" | |
212 | note: not rebasing 9:08483444fef9 "D", already in destination as 11:4596109a6a43 "D" (tip) |
|
212 | note: not rebasing 9:08483444fef9 "D", already in destination as 11:4596109a6a43 "D" (tip) | |
213 | rebasing 10:5ae4c968c6ac "C" |
|
213 | rebasing 10:5ae4c968c6ac "C" | |
214 | $ hg debugobsolete |
|
214 | $ hg debugobsolete | |
215 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} |
|
215 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} | |
216 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
216 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
217 | 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} |
|
217 | 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} | |
218 | 08483444fef91d6224f6655ee586a65d263ad34c 4596109a6a4328c398bde3a4a3b6737cfade3003 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
218 | 08483444fef91d6224f6655ee586a65d263ad34c 4596109a6a4328c398bde3a4a3b6737cfade3003 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
219 | 8877864f1edb05d0e07dc4ba77b67a80a7b86672 462a34d07e599b87ea08676a449373fe4e2e1347 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
219 | 8877864f1edb05d0e07dc4ba77b67a80a7b86672 462a34d07e599b87ea08676a449373fe4e2e1347 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
220 | 5ae4c968c6aca831df823664e706c9d4aa34473d 98f6af4ee9539e14da4465128f894c274900b6e5 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
220 | 5ae4c968c6aca831df823664e706c9d4aa34473d 98f6af4ee9539e14da4465128f894c274900b6e5 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
221 | $ hg log --rev 'contentdivergent()' |
|
221 | $ hg log --rev 'contentdivergent()' | |
222 | $ hg log -G |
|
222 | $ hg log -G | |
223 | o 13:98f6af4ee953 C |
|
223 | o 13:98f6af4ee953 C | |
224 | | |
|
224 | | | |
225 | o 12:462a34d07e59 B |
|
225 | o 12:462a34d07e59 B | |
226 | | |
|
226 | | | |
227 | @ 11:4596109a6a43 D |
|
227 | @ 11:4596109a6a43 D | |
228 | | |
|
228 | | | |
229 | o 7:02de42196ebe H |
|
229 | o 7:02de42196ebe H | |
230 | | |
|
230 | | | |
231 | | o 6:eea13746799a G |
|
231 | | o 6:eea13746799a G | |
232 | |/| |
|
232 | |/| | |
233 | o | 5:24b6387c8c8c F |
|
233 | o | 5:24b6387c8c8c F | |
234 | | | |
|
234 | | | | |
235 | | o 4:9520eea781bc E |
|
235 | | o 4:9520eea781bc E | |
236 | |/ |
|
236 | |/ | |
237 | o 0:cd010b8cd998 A |
|
237 | o 0:cd010b8cd998 A | |
238 |
|
238 | |||
239 | $ hg log --style default --debug -r 4596109a6a4328c398bde3a4a3b6737cfade3003 |
|
239 | $ hg log --style default --debug -r 4596109a6a4328c398bde3a4a3b6737cfade3003 | |
240 | changeset: 11:4596109a6a4328c398bde3a4a3b6737cfade3003 |
|
240 | changeset: 11:4596109a6a4328c398bde3a4a3b6737cfade3003 | |
241 | phase: draft |
|
241 | phase: draft | |
242 | parent: 7:02de42196ebee42ef284b6780a87cdc96e8eaab6 |
|
242 | parent: 7:02de42196ebee42ef284b6780a87cdc96e8eaab6 | |
243 | parent: -1:0000000000000000000000000000000000000000 |
|
243 | parent: -1:0000000000000000000000000000000000000000 | |
244 | manifest: 11:a91006e3a02f1edf631f7018e6e5684cf27dd905 |
|
244 | manifest: 11:a91006e3a02f1edf631f7018e6e5684cf27dd905 | |
245 | user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
|
245 | user: Nicolas Dumazet <nicdumz.commits@gmail.com> | |
246 | date: Sat Apr 30 15:24:48 2011 +0200 |
|
246 | date: Sat Apr 30 15:24:48 2011 +0200 | |
247 | files+: D |
|
247 | files+: D | |
248 | extra: branch=default |
|
248 | extra: branch=default | |
249 | extra: rebase_source=08483444fef91d6224f6655ee586a65d263ad34c |
|
249 | extra: rebase_source=08483444fef91d6224f6655ee586a65d263ad34c | |
250 | extra: source=32af7686d403cf45b5d95f2d70cebea587ac806a |
|
250 | extra: source=32af7686d403cf45b5d95f2d70cebea587ac806a | |
251 | description: |
|
251 | description: | |
252 | D |
|
252 | D | |
253 |
|
253 | |||
254 |
|
254 | |||
255 | $ hg up -qr 'desc(G)' |
|
255 | $ hg up -qr 'desc(G)' | |
256 | $ hg graft 4596109a6a4328c398bde3a4a3b6737cfade3003 |
|
256 | $ hg graft 4596109a6a4328c398bde3a4a3b6737cfade3003 | |
257 | grafting 11:4596109a6a43 "D" |
|
257 | grafting 11:4596109a6a43 "D" | |
258 | $ hg up -qr 'desc(E)' |
|
258 | $ hg up -qr 'desc(E)' | |
259 | $ hg rebase -s tip -d . |
|
259 | $ hg rebase -s tip -d . | |
260 | rebasing 14:9e36056a46e3 "D" (tip) |
|
260 | rebasing 14:9e36056a46e3 "D" (tip) | |
261 | $ hg log --style default --debug -r tip |
|
261 | $ hg log --style default --debug -r tip | |
262 | changeset: 15:627d4614809036ba22b9e7cb31638ddc06ab99ab |
|
262 | changeset: 15:627d4614809036ba22b9e7cb31638ddc06ab99ab | |
263 | tag: tip |
|
263 | tag: tip | |
264 | phase: draft |
|
264 | phase: draft | |
265 | parent: 4:9520eea781bcca16c1e15acc0ba14335a0e8e5ba |
|
265 | parent: 4:9520eea781bcca16c1e15acc0ba14335a0e8e5ba | |
266 | parent: -1:0000000000000000000000000000000000000000 |
|
266 | parent: -1:0000000000000000000000000000000000000000 | |
267 | manifest: 15:648e8ede73ae3e497d093d3a4c8fcc2daa864f42 |
|
267 | manifest: 15:648e8ede73ae3e497d093d3a4c8fcc2daa864f42 | |
268 | user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
|
268 | user: Nicolas Dumazet <nicdumz.commits@gmail.com> | |
269 | date: Sat Apr 30 15:24:48 2011 +0200 |
|
269 | date: Sat Apr 30 15:24:48 2011 +0200 | |
270 | files+: D |
|
270 | files+: D | |
271 | extra: branch=default |
|
271 | extra: branch=default | |
272 | extra: intermediate-source=4596109a6a4328c398bde3a4a3b6737cfade3003 |
|
272 | extra: intermediate-source=4596109a6a4328c398bde3a4a3b6737cfade3003 | |
273 | extra: rebase_source=9e36056a46e37c9776168c7375734eebc70e294f |
|
273 | extra: rebase_source=9e36056a46e37c9776168c7375734eebc70e294f | |
274 | extra: source=32af7686d403cf45b5d95f2d70cebea587ac806a |
|
274 | extra: source=32af7686d403cf45b5d95f2d70cebea587ac806a | |
275 | description: |
|
275 | description: | |
276 | D |
|
276 | D | |
277 |
|
277 | |||
278 |
|
278 | |||
279 | Start rebase from a commit that is obsolete but not hidden only because it's |
|
279 | Start rebase from a commit that is obsolete but not hidden only because it's | |
280 | a working copy parent. We should be moved back to the starting commit as usual |
|
280 | a working copy parent. We should be moved back to the starting commit as usual | |
281 | even though it is hidden (until we're moved there). |
|
281 | even though it is hidden (until we're moved there). | |
282 |
|
282 | |||
283 | $ hg --hidden up -qr 'first(hidden())' |
|
283 | $ hg --hidden up -qr 'first(hidden())' | |
284 | updating to a hidden changeset 42ccdea3bb16 |
|
284 | updating to a hidden changeset 42ccdea3bb16 | |
285 | (hidden revision '42ccdea3bb16' is pruned) |
|
285 | (hidden revision '42ccdea3bb16' is pruned) | |
286 | $ hg rebase --rev 13 --dest 15 |
|
286 | $ hg rebase --rev 13 --dest 15 | |
287 | rebasing 13:98f6af4ee953 "C" |
|
287 | rebasing 13:98f6af4ee953 "C" | |
288 | $ hg log -G |
|
288 | $ hg log -G | |
289 | o 16:294a2b93eb4d C |
|
289 | o 16:294a2b93eb4d C | |
290 | | |
|
290 | | | |
291 | o 15:627d46148090 D |
|
291 | o 15:627d46148090 D | |
292 | | |
|
292 | | | |
293 | | o 12:462a34d07e59 B |
|
293 | | o 12:462a34d07e59 B | |
294 | | | |
|
294 | | | | |
295 | | o 11:4596109a6a43 D |
|
295 | | o 11:4596109a6a43 D | |
296 | | | |
|
296 | | | | |
297 | | o 7:02de42196ebe H |
|
297 | | o 7:02de42196ebe H | |
298 | | | |
|
298 | | | | |
299 | +---o 6:eea13746799a G |
|
299 | +---o 6:eea13746799a G | |
300 | | |/ |
|
300 | | |/ | |
301 | | o 5:24b6387c8c8c F |
|
301 | | o 5:24b6387c8c8c F | |
302 | | | |
|
302 | | | | |
303 | o | 4:9520eea781bc E |
|
303 | o | 4:9520eea781bc E | |
304 | |/ |
|
304 | |/ | |
305 | | @ 1:42ccdea3bb16 B (pruned using rebase) |
|
305 | | @ 1:42ccdea3bb16 B (pruned using rebase) | |
306 | |/ |
|
306 | |/ | |
307 | o 0:cd010b8cd998 A |
|
307 | o 0:cd010b8cd998 A | |
308 |
|
308 | |||
309 |
|
309 | |||
310 | $ cd .. |
|
310 | $ cd .. | |
311 |
|
311 | |||
312 | collapse rebase |
|
312 | collapse rebase | |
313 | --------------------------------- |
|
313 | --------------------------------- | |
314 |
|
314 | |||
315 | $ hg clone base collapse |
|
315 | $ hg clone base collapse | |
316 | updating to branch default |
|
316 | updating to branch default | |
317 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
317 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
318 | $ cd collapse |
|
318 | $ cd collapse | |
319 | $ hg rebase -s 42ccdea3bb16 -d eea13746799a --collapse |
|
319 | $ hg rebase -s 42ccdea3bb16 -d eea13746799a --collapse | |
320 | rebasing 1:42ccdea3bb16 "B" |
|
320 | rebasing 1:42ccdea3bb16 "B" | |
321 | rebasing 2:5fddd98957c8 "C" |
|
321 | rebasing 2:5fddd98957c8 "C" | |
322 | rebasing 3:32af7686d403 "D" |
|
322 | rebasing 3:32af7686d403 "D" | |
323 | $ hg log -G |
|
323 | $ hg log -G | |
324 | o 8:4dc2197e807b Collapsed revision |
|
324 | o 8:4dc2197e807b Collapsed revision | |
325 | | |
|
325 | | | |
326 | | @ 7:02de42196ebe H |
|
326 | | @ 7:02de42196ebe H | |
327 | | | |
|
327 | | | | |
328 | o | 6:eea13746799a G |
|
328 | o | 6:eea13746799a G | |
329 | |\| |
|
329 | |\| | |
330 | | o 5:24b6387c8c8c F |
|
330 | | o 5:24b6387c8c8c F | |
331 | | | |
|
331 | | | | |
332 | o | 4:9520eea781bc E |
|
332 | o | 4:9520eea781bc E | |
333 | |/ |
|
333 | |/ | |
334 | o 0:cd010b8cd998 A |
|
334 | o 0:cd010b8cd998 A | |
335 |
|
335 | |||
336 | $ hg log --hidden -G |
|
336 | $ hg log --hidden -G | |
337 | o 8:4dc2197e807b Collapsed revision |
|
337 | o 8:4dc2197e807b Collapsed revision | |
338 | | |
|
338 | | | |
339 | | @ 7:02de42196ebe H |
|
339 | | @ 7:02de42196ebe H | |
340 | | | |
|
340 | | | | |
341 | o | 6:eea13746799a G |
|
341 | o | 6:eea13746799a G | |
342 | |\| |
|
342 | |\| | |
343 | | o 5:24b6387c8c8c F |
|
343 | | o 5:24b6387c8c8c F | |
344 | | | |
|
344 | | | | |
345 | o | 4:9520eea781bc E |
|
345 | o | 4:9520eea781bc E | |
346 | |/ |
|
346 | |/ | |
347 | | x 3:32af7686d403 D (rewritten using rebase as 8:4dc2197e807b) |
|
347 | | x 3:32af7686d403 D (rewritten using rebase as 8:4dc2197e807b) | |
348 | | | |
|
348 | | | | |
349 | | x 2:5fddd98957c8 C (rewritten using rebase as 8:4dc2197e807b) |
|
349 | | x 2:5fddd98957c8 C (rewritten using rebase as 8:4dc2197e807b) | |
350 | | | |
|
350 | | | | |
351 | | x 1:42ccdea3bb16 B (rewritten using rebase as 8:4dc2197e807b) |
|
351 | | x 1:42ccdea3bb16 B (rewritten using rebase as 8:4dc2197e807b) | |
352 | |/ |
|
352 | |/ | |
353 | o 0:cd010b8cd998 A |
|
353 | o 0:cd010b8cd998 A | |
354 |
|
354 | |||
355 | $ hg id --debug -r tip |
|
355 | $ hg id --debug -r tip | |
356 | 4dc2197e807bae9817f09905b50ab288be2dbbcf tip |
|
356 | 4dc2197e807bae9817f09905b50ab288be2dbbcf tip | |
357 | $ hg debugobsolete |
|
357 | $ hg debugobsolete | |
358 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'rebase', 'user': 'test'} |
|
358 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'rebase', 'user': 'test'} | |
359 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'rebase', 'user': 'test'} |
|
359 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'rebase', 'user': 'test'} | |
360 | 32af7686d403cf45b5d95f2d70cebea587ac806a 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'rebase', 'user': 'test'} |
|
360 | 32af7686d403cf45b5d95f2d70cebea587ac806a 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'rebase', 'user': 'test'} | |
361 |
|
361 | |||
362 | $ cd .. |
|
362 | $ cd .. | |
363 |
|
363 | |||
364 | Rebase set has hidden descendants |
|
364 | Rebase set has hidden descendants | |
365 | --------------------------------- |
|
365 | --------------------------------- | |
366 |
|
366 | |||
367 | We rebase a changeset which has hidden descendants. Hidden changesets must not |
|
367 | We rebase a changeset which has hidden descendants. Hidden changesets must not | |
368 | be rebased. |
|
368 | be rebased. | |
369 |
|
369 | |||
370 | $ hg clone base hidden |
|
370 | $ hg clone base hidden | |
371 | updating to branch default |
|
371 | updating to branch default | |
372 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
372 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
373 | $ cd hidden |
|
373 | $ cd hidden | |
374 | $ hg log -G |
|
374 | $ hg log -G | |
375 | @ 7:02de42196ebe H |
|
375 | @ 7:02de42196ebe H | |
376 | | |
|
376 | | | |
377 | | o 6:eea13746799a G |
|
377 | | o 6:eea13746799a G | |
378 | |/| |
|
378 | |/| | |
379 | o | 5:24b6387c8c8c F |
|
379 | o | 5:24b6387c8c8c F | |
380 | | | |
|
380 | | | | |
381 | | o 4:9520eea781bc E |
|
381 | | o 4:9520eea781bc E | |
382 | |/ |
|
382 | |/ | |
383 | | o 3:32af7686d403 D |
|
383 | | o 3:32af7686d403 D | |
384 | | | |
|
384 | | | | |
385 | | o 2:5fddd98957c8 C |
|
385 | | o 2:5fddd98957c8 C | |
386 | | | |
|
386 | | | | |
387 | | o 1:42ccdea3bb16 B |
|
387 | | o 1:42ccdea3bb16 B | |
388 | |/ |
|
388 | |/ | |
389 | o 0:cd010b8cd998 A |
|
389 | o 0:cd010b8cd998 A | |
390 |
|
390 | |||
391 | $ hg rebase -s 5fddd98957c8 -d eea13746799a |
|
391 | $ hg rebase -s 5fddd98957c8 -d eea13746799a | |
392 | rebasing 2:5fddd98957c8 "C" |
|
392 | rebasing 2:5fddd98957c8 "C" | |
393 | rebasing 3:32af7686d403 "D" |
|
393 | rebasing 3:32af7686d403 "D" | |
394 | $ hg log -G |
|
394 | $ hg log -G | |
395 | o 9:cf44d2f5a9f4 D |
|
395 | o 9:cf44d2f5a9f4 D | |
396 | | |
|
396 | | | |
397 | o 8:e273c5e7d2d2 C |
|
397 | o 8:e273c5e7d2d2 C | |
398 | | |
|
398 | | | |
399 | | @ 7:02de42196ebe H |
|
399 | | @ 7:02de42196ebe H | |
400 | | | |
|
400 | | | | |
401 | o | 6:eea13746799a G |
|
401 | o | 6:eea13746799a G | |
402 | |\| |
|
402 | |\| | |
403 | | o 5:24b6387c8c8c F |
|
403 | | o 5:24b6387c8c8c F | |
404 | | | |
|
404 | | | | |
405 | o | 4:9520eea781bc E |
|
405 | o | 4:9520eea781bc E | |
406 | |/ |
|
406 | |/ | |
407 | | o 1:42ccdea3bb16 B |
|
407 | | o 1:42ccdea3bb16 B | |
408 | |/ |
|
408 | |/ | |
409 | o 0:cd010b8cd998 A |
|
409 | o 0:cd010b8cd998 A | |
410 |
|
410 | |||
411 | $ hg rebase -s 42ccdea3bb16 -d 02de42196ebe |
|
411 | $ hg rebase -s 42ccdea3bb16 -d 02de42196ebe | |
412 | rebasing 1:42ccdea3bb16 "B" |
|
412 | rebasing 1:42ccdea3bb16 "B" | |
413 | $ hg log -G |
|
413 | $ hg log -G | |
414 | o 10:7c6027df6a99 B |
|
414 | o 10:7c6027df6a99 B | |
415 | | |
|
415 | | | |
416 | | o 9:cf44d2f5a9f4 D |
|
416 | | o 9:cf44d2f5a9f4 D | |
417 | | | |
|
417 | | | | |
418 | | o 8:e273c5e7d2d2 C |
|
418 | | o 8:e273c5e7d2d2 C | |
419 | | | |
|
419 | | | | |
420 | @ | 7:02de42196ebe H |
|
420 | @ | 7:02de42196ebe H | |
421 | | | |
|
421 | | | | |
422 | | o 6:eea13746799a G |
|
422 | | o 6:eea13746799a G | |
423 | |/| |
|
423 | |/| | |
424 | o | 5:24b6387c8c8c F |
|
424 | o | 5:24b6387c8c8c F | |
425 | | | |
|
425 | | | | |
426 | | o 4:9520eea781bc E |
|
426 | | o 4:9520eea781bc E | |
427 | |/ |
|
427 | |/ | |
428 | o 0:cd010b8cd998 A |
|
428 | o 0:cd010b8cd998 A | |
429 |
|
429 | |||
430 | $ hg log --hidden -G |
|
430 | $ hg log --hidden -G | |
431 | o 10:7c6027df6a99 B |
|
431 | o 10:7c6027df6a99 B | |
432 | | |
|
432 | | | |
433 | | o 9:cf44d2f5a9f4 D |
|
433 | | o 9:cf44d2f5a9f4 D | |
434 | | | |
|
434 | | | | |
435 | | o 8:e273c5e7d2d2 C |
|
435 | | o 8:e273c5e7d2d2 C | |
436 | | | |
|
436 | | | | |
437 | @ | 7:02de42196ebe H |
|
437 | @ | 7:02de42196ebe H | |
438 | | | |
|
438 | | | | |
439 | | o 6:eea13746799a G |
|
439 | | o 6:eea13746799a G | |
440 | |/| |
|
440 | |/| | |
441 | o | 5:24b6387c8c8c F |
|
441 | o | 5:24b6387c8c8c F | |
442 | | | |
|
442 | | | | |
443 | | o 4:9520eea781bc E |
|
443 | | o 4:9520eea781bc E | |
444 | |/ |
|
444 | |/ | |
445 | | x 3:32af7686d403 D (rewritten using rebase as 9:cf44d2f5a9f4) |
|
445 | | x 3:32af7686d403 D (rewritten using rebase as 9:cf44d2f5a9f4) | |
446 | | | |
|
446 | | | | |
447 | | x 2:5fddd98957c8 C (rewritten using rebase as 8:e273c5e7d2d2) |
|
447 | | x 2:5fddd98957c8 C (rewritten using rebase as 8:e273c5e7d2d2) | |
448 | | | |
|
448 | | | | |
449 | | x 1:42ccdea3bb16 B (rewritten using rebase as 10:7c6027df6a99) |
|
449 | | x 1:42ccdea3bb16 B (rewritten using rebase as 10:7c6027df6a99) | |
450 | |/ |
|
450 | |/ | |
451 | o 0:cd010b8cd998 A |
|
451 | o 0:cd010b8cd998 A | |
452 |
|
452 | |||
453 | $ hg debugobsolete |
|
453 | $ hg debugobsolete | |
454 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b e273c5e7d2d29df783dce9f9eaa3ac4adc69c15d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
454 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b e273c5e7d2d29df783dce9f9eaa3ac4adc69c15d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
455 | 32af7686d403cf45b5d95f2d70cebea587ac806a cf44d2f5a9f4297a62be94cbdd3dff7c7dc54258 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
455 | 32af7686d403cf45b5d95f2d70cebea587ac806a cf44d2f5a9f4297a62be94cbdd3dff7c7dc54258 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
456 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 7c6027df6a99d93f461868e5433f63bde20b6dfb 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
456 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 7c6027df6a99d93f461868e5433f63bde20b6dfb 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
457 |
|
457 | |||
458 | Test that rewriting leaving instability behind is allowed |
|
458 | Test that rewriting leaving instability behind is allowed | |
459 | --------------------------------------------------------------------- |
|
459 | --------------------------------------------------------------------- | |
460 |
|
460 | |||
461 | $ hg log -r 'children(8)' |
|
461 | $ hg log -r 'children(8)' | |
462 | 9:cf44d2f5a9f4 D (no-eol) |
|
462 | 9:cf44d2f5a9f4 D (no-eol) | |
463 | $ hg rebase -r 8 |
|
463 | $ hg rebase -r 8 | |
464 | rebasing 8:e273c5e7d2d2 "C" |
|
464 | rebasing 8:e273c5e7d2d2 "C" | |
465 | 1 new orphan changesets |
|
465 | 1 new orphan changesets | |
466 | $ hg log -G |
|
466 | $ hg log -G | |
467 | o 11:0d8f238b634c C |
|
467 | o 11:0d8f238b634c C | |
468 | | |
|
468 | | | |
469 | o 10:7c6027df6a99 B |
|
469 | o 10:7c6027df6a99 B | |
470 | | |
|
470 | | | |
471 | | * 9:cf44d2f5a9f4 D |
|
471 | | * 9:cf44d2f5a9f4 D | |
472 | | | |
|
472 | | | | |
473 | | x 8:e273c5e7d2d2 C (rewritten using rebase as 11:0d8f238b634c) |
|
473 | | x 8:e273c5e7d2d2 C (rewritten using rebase as 11:0d8f238b634c) | |
474 | | | |
|
474 | | | | |
475 | @ | 7:02de42196ebe H |
|
475 | @ | 7:02de42196ebe H | |
476 | | | |
|
476 | | | | |
477 | | o 6:eea13746799a G |
|
477 | | o 6:eea13746799a G | |
478 | |/| |
|
478 | |/| | |
479 | o | 5:24b6387c8c8c F |
|
479 | o | 5:24b6387c8c8c F | |
480 | | | |
|
480 | | | | |
481 | | o 4:9520eea781bc E |
|
481 | | o 4:9520eea781bc E | |
482 | |/ |
|
482 | |/ | |
483 | o 0:cd010b8cd998 A |
|
483 | o 0:cd010b8cd998 A | |
484 |
|
484 | |||
485 |
|
485 | |||
486 |
|
486 | |||
487 | Test multiple root handling |
|
487 | Test multiple root handling | |
488 | ------------------------------------ |
|
488 | ------------------------------------ | |
489 |
|
489 | |||
490 | $ hg rebase --dest 4 --rev '7+11+9' |
|
490 | $ hg rebase --dest 4 --rev '7+11+9' | |
491 | rebasing 9:cf44d2f5a9f4 "D" |
|
491 | rebasing 9:cf44d2f5a9f4 "D" | |
492 | rebasing 7:02de42196ebe "H" |
|
492 | rebasing 7:02de42196ebe "H" | |
493 | rebasing 11:0d8f238b634c "C" (tip) |
|
493 | rebasing 11:0d8f238b634c "C" (tip) | |
494 | $ hg log -G |
|
494 | $ hg log -G | |
495 | o 14:1e8370e38cca C |
|
495 | o 14:1e8370e38cca C | |
496 | | |
|
496 | | | |
497 | @ 13:bfe264faf697 H |
|
497 | @ 13:bfe264faf697 H | |
498 | | |
|
498 | | | |
499 | | o 12:102b4c1d889b D |
|
499 | | o 12:102b4c1d889b D | |
500 | |/ |
|
500 | |/ | |
501 | | * 10:7c6027df6a99 B |
|
501 | | * 10:7c6027df6a99 B | |
502 | | | |
|
502 | | | | |
503 | | x 7:02de42196ebe H (rewritten using rebase as 13:bfe264faf697) |
|
503 | | x 7:02de42196ebe H (rewritten using rebase as 13:bfe264faf697) | |
504 | | | |
|
504 | | | | |
505 | +---o 6:eea13746799a G |
|
505 | +---o 6:eea13746799a G | |
506 | | |/ |
|
506 | | |/ | |
507 | | o 5:24b6387c8c8c F |
|
507 | | o 5:24b6387c8c8c F | |
508 | | | |
|
508 | | | | |
509 | o | 4:9520eea781bc E |
|
509 | o | 4:9520eea781bc E | |
510 | |/ |
|
510 | |/ | |
511 | o 0:cd010b8cd998 A |
|
511 | o 0:cd010b8cd998 A | |
512 |
|
512 | |||
513 | $ cd .. |
|
513 | $ cd .. | |
514 |
|
514 | |||
515 | Detach both parents |
|
515 | Detach both parents | |
516 |
|
516 | |||
517 | $ hg init double-detach |
|
517 | $ hg init double-detach | |
518 | $ cd double-detach |
|
518 | $ cd double-detach | |
519 |
|
519 | |||
520 | $ hg debugdrawdag <<EOF |
|
520 | $ hg debugdrawdag <<EOF | |
521 | > F |
|
521 | > F | |
522 | > /| |
|
522 | > /| | |
523 | > C E |
|
523 | > C E | |
524 | > | | |
|
524 | > | | | |
525 | > B D G |
|
525 | > B D G | |
526 | > \|/ |
|
526 | > \|/ | |
527 | > A |
|
527 | > A | |
528 | > EOF |
|
528 | > EOF | |
529 |
|
529 | |||
530 | $ hg rebase -d G -r 'B + D + F' |
|
530 | $ hg rebase -d G -r 'B + D + F' | |
531 | rebasing 1:112478962961 "B" (B) |
|
531 | rebasing 1:112478962961 "B" (B) | |
532 | rebasing 2:b18e25de2cf5 "D" (D) |
|
532 | rebasing 2:b18e25de2cf5 "D" (D) | |
533 | rebasing 6:f15c3adaf214 "F" (F tip) |
|
533 | rebasing 6:f15c3adaf214 "F" (F tip) | |
534 | abort: cannot rebase 6:f15c3adaf214 without moving at least one of its parents |
|
534 | abort: cannot rebase 6:f15c3adaf214 without moving at least one of its parents | |
535 | [255] |
|
535 | [255] | |
536 |
|
536 | |||
537 | $ cd .. |
|
537 | $ cd .. | |
538 |
|
538 | |||
539 | test on rebase dropping a merge |
|
539 | test on rebase dropping a merge | |
540 |
|
540 | |||
541 | (setup) |
|
541 | (setup) | |
542 |
|
542 | |||
543 | $ hg init dropmerge |
|
543 | $ hg init dropmerge | |
544 | $ cd dropmerge |
|
544 | $ cd dropmerge | |
545 | $ hg unbundle "$TESTDIR/bundles/rebase.hg" |
|
545 | $ hg unbundle "$TESTDIR/bundles/rebase.hg" | |
546 | adding changesets |
|
546 | adding changesets | |
547 | adding manifests |
|
547 | adding manifests | |
548 | adding file changes |
|
548 | adding file changes | |
549 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
549 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
550 | new changesets cd010b8cd998:02de42196ebe |
|
550 | new changesets cd010b8cd998:02de42196ebe | |
551 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
551 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
552 | $ hg up 3 |
|
552 | $ hg up 3 | |
553 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
553 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
554 | $ hg merge 7 |
|
554 | $ hg merge 7 | |
555 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
555 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
556 | (branch merge, don't forget to commit) |
|
556 | (branch merge, don't forget to commit) | |
557 | $ hg ci -m 'M' |
|
557 | $ hg ci -m 'M' | |
558 | $ echo I > I |
|
558 | $ echo I > I | |
559 | $ hg add I |
|
559 | $ hg add I | |
560 | $ hg ci -m I |
|
560 | $ hg ci -m I | |
561 | $ hg log -G |
|
561 | $ hg log -G | |
562 | @ 9:4bde274eefcf I |
|
562 | @ 9:4bde274eefcf I | |
563 | | |
|
563 | | | |
564 | o 8:53a6a128b2b7 M |
|
564 | o 8:53a6a128b2b7 M | |
565 | |\ |
|
565 | |\ | |
566 | | o 7:02de42196ebe H |
|
566 | | o 7:02de42196ebe H | |
567 | | | |
|
567 | | | | |
568 | | | o 6:eea13746799a G |
|
568 | | | o 6:eea13746799a G | |
569 | | |/| |
|
569 | | |/| | |
570 | | o | 5:24b6387c8c8c F |
|
570 | | o | 5:24b6387c8c8c F | |
571 | | | | |
|
571 | | | | | |
572 | | | o 4:9520eea781bc E |
|
572 | | | o 4:9520eea781bc E | |
573 | | |/ |
|
573 | | |/ | |
574 | o | 3:32af7686d403 D |
|
574 | o | 3:32af7686d403 D | |
575 | | | |
|
575 | | | | |
576 | o | 2:5fddd98957c8 C |
|
576 | o | 2:5fddd98957c8 C | |
577 | | | |
|
577 | | | | |
578 | o | 1:42ccdea3bb16 B |
|
578 | o | 1:42ccdea3bb16 B | |
579 | |/ |
|
579 | |/ | |
580 | o 0:cd010b8cd998 A |
|
580 | o 0:cd010b8cd998 A | |
581 |
|
581 | |||
582 | (actual test) |
|
582 | (actual test) | |
583 |
|
583 | |||
584 | $ hg rebase --dest 6 --rev '((desc(H) + desc(D))::) - desc(M)' |
|
584 | $ hg rebase --dest 6 --rev '((desc(H) + desc(D))::) - desc(M)' | |
585 | rebasing 3:32af7686d403 "D" |
|
585 | rebasing 3:32af7686d403 "D" | |
586 | rebasing 7:02de42196ebe "H" |
|
586 | rebasing 7:02de42196ebe "H" | |
587 | rebasing 9:4bde274eefcf "I" (tip) |
|
587 | rebasing 9:4bde274eefcf "I" (tip) | |
588 | 1 new orphan changesets |
|
588 | 1 new orphan changesets | |
589 | $ hg log -G |
|
589 | $ hg log -G | |
590 | @ 12:acd174b7ab39 I |
|
590 | @ 12:acd174b7ab39 I | |
591 | | |
|
591 | | | |
592 | o 11:6c11a6218c97 H |
|
592 | o 11:6c11a6218c97 H | |
593 | | |
|
593 | | | |
594 | | o 10:b5313c85b22e D |
|
594 | | o 10:b5313c85b22e D | |
595 | |/ |
|
595 | |/ | |
596 | | * 8:53a6a128b2b7 M |
|
596 | | * 8:53a6a128b2b7 M | |
597 | | |\ |
|
597 | | |\ | |
598 | | | x 7:02de42196ebe H (rewritten using rebase as 11:6c11a6218c97) |
|
598 | | | x 7:02de42196ebe H (rewritten using rebase as 11:6c11a6218c97) | |
599 | | | | |
|
599 | | | | | |
600 | o---+ 6:eea13746799a G |
|
600 | o---+ 6:eea13746799a G | |
601 | | | | |
|
601 | | | | | |
602 | | | o 5:24b6387c8c8c F |
|
602 | | | o 5:24b6387c8c8c F | |
603 | | | | |
|
603 | | | | | |
604 | o---+ 4:9520eea781bc E |
|
604 | o---+ 4:9520eea781bc E | |
605 | / / |
|
605 | / / | |
606 | x | 3:32af7686d403 D (rewritten using rebase as 10:b5313c85b22e) |
|
606 | x | 3:32af7686d403 D (rewritten using rebase as 10:b5313c85b22e) | |
607 | | | |
|
607 | | | | |
608 | o | 2:5fddd98957c8 C |
|
608 | o | 2:5fddd98957c8 C | |
609 | | | |
|
609 | | | | |
610 | o | 1:42ccdea3bb16 B |
|
610 | o | 1:42ccdea3bb16 B | |
611 | |/ |
|
611 | |/ | |
612 | o 0:cd010b8cd998 A |
|
612 | o 0:cd010b8cd998 A | |
613 |
|
613 | |||
614 |
|
614 | |||
615 | Test hidden changesets in the rebase set (issue4504) |
|
615 | Test hidden changesets in the rebase set (issue4504) | |
616 |
|
616 | |||
617 | $ hg up --hidden 9 |
|
617 | $ hg up --hidden 9 | |
618 | updating to a hidden changeset 4bde274eefcf |
|
618 | updating to a hidden changeset 4bde274eefcf | |
619 | (hidden revision '4bde274eefcf' was rewritten as: acd174b7ab39) |
|
619 | (hidden revision '4bde274eefcf' was rewritten as: acd174b7ab39) | |
620 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
620 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
621 | $ echo J > J |
|
621 | $ echo J > J | |
622 | $ hg add J |
|
622 | $ hg add J | |
623 | $ hg commit -m J |
|
623 | $ hg commit -m J | |
624 | 1 new orphan changesets |
|
624 | 1 new orphan changesets | |
625 | $ hg debugobsolete `hg log --rev . -T '{node}'` |
|
625 | $ hg debugobsolete `hg log --rev . -T '{node}'` | |
626 | obsoleted 1 changesets |
|
626 | obsoleted 1 changesets | |
627 |
|
627 | |||
628 | $ hg rebase --rev .~1::. --dest 'max(desc(D))' --traceback --config experimental.rebaseskipobsolete=off |
|
628 | $ hg rebase --rev .~1::. --dest 'max(desc(D))' --traceback --config experimental.rebaseskipobsolete=off | |
629 | rebasing 9:4bde274eefcf "I" |
|
629 | rebasing 9:4bde274eefcf "I" | |
630 | rebasing 13:06edfc82198f "J" (tip) |
|
630 | rebasing 13:06edfc82198f "J" (tip) | |
631 | 2 new content-divergent changesets |
|
631 | 2 new content-divergent changesets | |
632 | $ hg log -G |
|
632 | $ hg log -G | |
633 | @ 15:5ae8a643467b J |
|
633 | @ 15:5ae8a643467b J | |
634 | | |
|
634 | | | |
635 | * 14:9ad579b4a5de I |
|
635 | * 14:9ad579b4a5de I | |
636 | | |
|
636 | | | |
637 | | * 12:acd174b7ab39 I |
|
637 | | * 12:acd174b7ab39 I | |
638 | | | |
|
638 | | | | |
639 | | o 11:6c11a6218c97 H |
|
639 | | o 11:6c11a6218c97 H | |
640 | | | |
|
640 | | | | |
641 | o | 10:b5313c85b22e D |
|
641 | o | 10:b5313c85b22e D | |
642 | |/ |
|
642 | |/ | |
643 | | * 8:53a6a128b2b7 M |
|
643 | | * 8:53a6a128b2b7 M | |
644 | | |\ |
|
644 | | |\ | |
645 | | | x 7:02de42196ebe H (rewritten using rebase as 11:6c11a6218c97) |
|
645 | | | x 7:02de42196ebe H (rewritten using rebase as 11:6c11a6218c97) | |
646 | | | | |
|
646 | | | | | |
647 | o---+ 6:eea13746799a G |
|
647 | o---+ 6:eea13746799a G | |
648 | | | | |
|
648 | | | | | |
649 | | | o 5:24b6387c8c8c F |
|
649 | | | o 5:24b6387c8c8c F | |
650 | | | | |
|
650 | | | | | |
651 | o---+ 4:9520eea781bc E |
|
651 | o---+ 4:9520eea781bc E | |
652 | / / |
|
652 | / / | |
653 | x | 3:32af7686d403 D (rewritten using rebase as 10:b5313c85b22e) |
|
653 | x | 3:32af7686d403 D (rewritten using rebase as 10:b5313c85b22e) | |
654 | | | |
|
654 | | | | |
655 | o | 2:5fddd98957c8 C |
|
655 | o | 2:5fddd98957c8 C | |
656 | | | |
|
656 | | | | |
657 | o | 1:42ccdea3bb16 B |
|
657 | o | 1:42ccdea3bb16 B | |
658 | |/ |
|
658 | |/ | |
659 | o 0:cd010b8cd998 A |
|
659 | o 0:cd010b8cd998 A | |
660 |
|
660 | |||
661 | $ hg up 14 -C |
|
661 | $ hg up 14 -C | |
662 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
662 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
663 | $ echo "K" > K |
|
663 | $ echo "K" > K | |
664 | $ hg add K |
|
664 | $ hg add K | |
665 | $ hg commit --amend -m "K" |
|
665 | $ hg commit --amend -m "K" | |
666 | 1 new orphan changesets |
|
666 | 1 new orphan changesets | |
667 | $ echo "L" > L |
|
667 | $ echo "L" > L | |
668 | $ hg add L |
|
668 | $ hg add L | |
669 | $ hg commit -m "L" |
|
669 | $ hg commit -m "L" | |
670 | $ hg up '.^' |
|
670 | $ hg up '.^' | |
671 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
671 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
672 | $ echo "M" > M |
|
672 | $ echo "M" > M | |
673 | $ hg add M |
|
673 | $ hg add M | |
674 | $ hg commit --amend -m "M" |
|
674 | $ hg commit --amend -m "M" | |
675 | 1 new orphan changesets |
|
675 | 1 new orphan changesets | |
676 | $ hg log -G |
|
676 | $ hg log -G | |
677 | @ 18:bfaedf8eb73b M |
|
677 | @ 18:bfaedf8eb73b M | |
678 | | |
|
678 | | | |
679 | | * 17:97219452e4bd L |
|
679 | | * 17:97219452e4bd L | |
680 | | | |
|
680 | | | | |
681 | | x 16:fc37a630c901 K (rewritten using amend as 18:bfaedf8eb73b) |
|
681 | | x 16:fc37a630c901 K (rewritten using amend as 18:bfaedf8eb73b) | |
682 | |/ |
|
682 | |/ | |
683 | | * 15:5ae8a643467b J |
|
683 | | * 15:5ae8a643467b J | |
684 | | | |
|
684 | | | | |
685 | | x 14:9ad579b4a5de I (rewritten using amend as 16:fc37a630c901) |
|
685 | | x 14:9ad579b4a5de I (rewritten using amend as 16:fc37a630c901) | |
686 | |/ |
|
686 | |/ | |
687 | | * 12:acd174b7ab39 I |
|
687 | | * 12:acd174b7ab39 I | |
688 | | | |
|
688 | | | | |
689 | | o 11:6c11a6218c97 H |
|
689 | | o 11:6c11a6218c97 H | |
690 | | | |
|
690 | | | | |
691 | o | 10:b5313c85b22e D |
|
691 | o | 10:b5313c85b22e D | |
692 | |/ |
|
692 | |/ | |
693 | | * 8:53a6a128b2b7 M |
|
693 | | * 8:53a6a128b2b7 M | |
694 | | |\ |
|
694 | | |\ | |
695 | | | x 7:02de42196ebe H (rewritten using rebase as 11:6c11a6218c97) |
|
695 | | | x 7:02de42196ebe H (rewritten using rebase as 11:6c11a6218c97) | |
696 | | | | |
|
696 | | | | | |
697 | o---+ 6:eea13746799a G |
|
697 | o---+ 6:eea13746799a G | |
698 | | | | |
|
698 | | | | | |
699 | | | o 5:24b6387c8c8c F |
|
699 | | | o 5:24b6387c8c8c F | |
700 | | | | |
|
700 | | | | | |
701 | o---+ 4:9520eea781bc E |
|
701 | o---+ 4:9520eea781bc E | |
702 | / / |
|
702 | / / | |
703 | x | 3:32af7686d403 D (rewritten using rebase as 10:b5313c85b22e) |
|
703 | x | 3:32af7686d403 D (rewritten using rebase as 10:b5313c85b22e) | |
704 | | | |
|
704 | | | | |
705 | o | 2:5fddd98957c8 C |
|
705 | o | 2:5fddd98957c8 C | |
706 | | | |
|
706 | | | | |
707 | o | 1:42ccdea3bb16 B |
|
707 | o | 1:42ccdea3bb16 B | |
708 | |/ |
|
708 | |/ | |
709 | o 0:cd010b8cd998 A |
|
709 | o 0:cd010b8cd998 A | |
710 |
|
710 | |||
711 | $ hg rebase -s 14 -d 17 --config experimental.rebaseskipobsolete=True |
|
711 | $ hg rebase -s 14 -d 17 --config experimental.rebaseskipobsolete=True | |
712 | note: not rebasing 14:9ad579b4a5de "I", already in destination as 16:fc37a630c901 "K" |
|
712 | note: not rebasing 14:9ad579b4a5de "I", already in destination as 16:fc37a630c901 "K" | |
713 | rebasing 15:5ae8a643467b "J" |
|
713 | rebasing 15:5ae8a643467b "J" | |
714 | 1 new orphan changesets |
|
714 | 1 new orphan changesets | |
715 |
|
715 | |||
716 | $ cd .. |
|
716 | $ cd .. | |
717 |
|
717 | |||
718 | Skip obsolete changeset even with multiple hops |
|
718 | Skip obsolete changeset even with multiple hops | |
719 | ----------------------------------------------- |
|
719 | ----------------------------------------------- | |
720 |
|
720 | |||
721 | setup |
|
721 | setup | |
722 |
|
722 | |||
723 | $ hg init obsskip |
|
723 | $ hg init obsskip | |
724 | $ cd obsskip |
|
724 | $ cd obsskip | |
725 | $ cat << EOF >> .hg/hgrc |
|
725 | $ cat << EOF >> .hg/hgrc | |
726 | > [experimental] |
|
726 | > [experimental] | |
727 | > rebaseskipobsolete = True |
|
727 | > rebaseskipobsolete = True | |
728 | > [extensions] |
|
728 | > [extensions] | |
729 | > strip = |
|
729 | > strip = | |
730 | > EOF |
|
730 | > EOF | |
731 | $ echo A > A |
|
731 | $ echo A > A | |
732 | $ hg add A |
|
732 | $ hg add A | |
733 | $ hg commit -m A |
|
733 | $ hg commit -m A | |
734 | $ echo B > B |
|
734 | $ echo B > B | |
735 | $ hg add B |
|
735 | $ hg add B | |
736 | $ hg commit -m B0 |
|
736 | $ hg commit -m B0 | |
737 | $ hg commit --amend -m B1 |
|
737 | $ hg commit --amend -m B1 | |
738 | $ hg commit --amend -m B2 |
|
738 | $ hg commit --amend -m B2 | |
739 | $ hg up --hidden 'desc(B0)' |
|
739 | $ hg up --hidden 'desc(B0)' | |
740 | updating to a hidden changeset a8b11f55fb19 |
|
740 | updating to a hidden changeset a8b11f55fb19 | |
741 | (hidden revision 'a8b11f55fb19' was rewritten as: 261e70097290) |
|
741 | (hidden revision 'a8b11f55fb19' was rewritten as: 261e70097290) | |
742 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
742 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
743 | $ echo C > C |
|
743 | $ echo C > C | |
744 | $ hg add C |
|
744 | $ hg add C | |
745 | $ hg commit -m C |
|
745 | $ hg commit -m C | |
746 | 1 new orphan changesets |
|
746 | 1 new orphan changesets | |
747 | $ hg log -G |
|
747 | $ hg log -G | |
748 | @ 4:212cb178bcbb C |
|
748 | @ 4:212cb178bcbb C | |
749 | | |
|
749 | | | |
750 | | o 3:261e70097290 B2 |
|
750 | | o 3:261e70097290 B2 | |
751 | | | |
|
751 | | | | |
752 | x | 1:a8b11f55fb19 B0 (rewritten using amend as 3:261e70097290) |
|
752 | x | 1:a8b11f55fb19 B0 (rewritten using amend as 3:261e70097290) | |
753 | |/ |
|
753 | |/ | |
754 | o 0:4a2df7238c3b A |
|
754 | o 0:4a2df7238c3b A | |
755 |
|
755 | |||
756 |
|
756 | |||
757 | Rebase finds its way in a chain of marker |
|
757 | Rebase finds its way in a chain of marker | |
758 |
|
758 | |||
759 | $ hg rebase -d 'desc(B2)' |
|
759 | $ hg rebase -d 'desc(B2)' | |
760 | note: not rebasing 1:a8b11f55fb19 "B0", already in destination as 3:261e70097290 "B2" |
|
760 | note: not rebasing 1:a8b11f55fb19 "B0", already in destination as 3:261e70097290 "B2" | |
761 | rebasing 4:212cb178bcbb "C" (tip) |
|
761 | rebasing 4:212cb178bcbb "C" (tip) | |
762 |
|
762 | |||
763 | Even when the chain include missing node |
|
763 | Even when the chain include missing node | |
764 |
|
764 | |||
765 | $ hg up --hidden 'desc(B0)' |
|
765 | $ hg up --hidden 'desc(B0)' | |
766 | updating to a hidden changeset a8b11f55fb19 |
|
766 | updating to a hidden changeset a8b11f55fb19 | |
767 | (hidden revision 'a8b11f55fb19' was rewritten as: 261e70097290) |
|
767 | (hidden revision 'a8b11f55fb19' was rewritten as: 261e70097290) | |
768 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
768 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
769 | $ echo D > D |
|
769 | $ echo D > D | |
770 | $ hg add D |
|
770 | $ hg add D | |
771 | $ hg commit -m D |
|
771 | $ hg commit -m D | |
772 | 1 new orphan changesets |
|
772 | 1 new orphan changesets | |
773 | $ hg --hidden strip -r 'desc(B1)' |
|
773 | $ hg --hidden strip -r 'desc(B1)' | |
774 | saved backup bundle to $TESTTMP/obsskip/.hg/strip-backup/86f6414ccda7-b1c452ee-backup.hg |
|
774 | saved backup bundle to $TESTTMP/obsskip/.hg/strip-backup/86f6414ccda7-b1c452ee-backup.hg | |
775 | $ hg log -G |
|
775 | $ hg log -G | |
776 | @ 5:1a79b7535141 D |
|
776 | @ 5:1a79b7535141 D | |
777 | | |
|
777 | | | |
778 | | o 4:ff2c4d47b71d C |
|
778 | | o 4:ff2c4d47b71d C | |
779 | | | |
|
779 | | | | |
780 | | o 2:261e70097290 B2 |
|
780 | | o 2:261e70097290 B2 | |
781 | | | |
|
781 | | | | |
782 | x | 1:a8b11f55fb19 B0 (rewritten using amend as 2:261e70097290) |
|
782 | x | 1:a8b11f55fb19 B0 (rewritten using amend as 2:261e70097290) | |
783 | |/ |
|
783 | |/ | |
784 | o 0:4a2df7238c3b A |
|
784 | o 0:4a2df7238c3b A | |
785 |
|
785 | |||
786 |
|
786 | |||
787 | $ hg rebase -d 'desc(B2)' |
|
787 | $ hg rebase -d 'desc(B2)' | |
788 | note: not rebasing 1:a8b11f55fb19 "B0", already in destination as 2:261e70097290 "B2" |
|
788 | note: not rebasing 1:a8b11f55fb19 "B0", already in destination as 2:261e70097290 "B2" | |
789 | rebasing 5:1a79b7535141 "D" (tip) |
|
789 | rebasing 5:1a79b7535141 "D" (tip) | |
790 | $ hg up 4 |
|
790 | $ hg up 4 | |
791 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
791 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
792 | $ echo "O" > O |
|
792 | $ echo "O" > O | |
793 | $ hg add O |
|
793 | $ hg add O | |
794 | $ hg commit -m O |
|
794 | $ hg commit -m O | |
795 | $ echo "P" > P |
|
795 | $ echo "P" > P | |
796 | $ hg add P |
|
796 | $ hg add P | |
797 | $ hg commit -m P |
|
797 | $ hg commit -m P | |
798 | $ hg log -G |
|
798 | $ hg log -G | |
799 | @ 8:8d47583e023f P |
|
799 | @ 8:8d47583e023f P | |
800 | | |
|
800 | | | |
801 | o 7:360bbaa7d3ce O |
|
801 | o 7:360bbaa7d3ce O | |
802 | | |
|
802 | | | |
803 | | o 6:9c48361117de D |
|
803 | | o 6:9c48361117de D | |
804 | | | |
|
804 | | | | |
805 | o | 4:ff2c4d47b71d C |
|
805 | o | 4:ff2c4d47b71d C | |
806 | |/ |
|
806 | |/ | |
807 | o 2:261e70097290 B2 |
|
807 | o 2:261e70097290 B2 | |
808 | | |
|
808 | | | |
809 | o 0:4a2df7238c3b A |
|
809 | o 0:4a2df7238c3b A | |
810 |
|
810 | |||
811 | $ hg debugobsolete `hg log -r 7 -T '{node}\n'` --config experimental.evolution=true |
|
811 | $ hg debugobsolete `hg log -r 7 -T '{node}\n'` --config experimental.evolution=true | |
812 | obsoleted 1 changesets |
|
812 | obsoleted 1 changesets | |
813 | 1 new orphan changesets |
|
813 | 1 new orphan changesets | |
814 | $ hg rebase -d 6 -r "4::" |
|
814 | $ hg rebase -d 6 -r "4::" | |
815 | rebasing 4:ff2c4d47b71d "C" |
|
815 | rebasing 4:ff2c4d47b71d "C" | |
816 | note: not rebasing 7:360bbaa7d3ce "O", it has no successor |
|
816 | note: not rebasing 7:360bbaa7d3ce "O", it has no successor | |
817 | rebasing 8:8d47583e023f "P" (tip) |
|
817 | rebasing 8:8d47583e023f "P" (tip) | |
818 |
|
818 | |||
819 | If all the changeset to be rebased are obsolete and present in the destination, we |
|
819 | If all the changeset to be rebased are obsolete and present in the destination, we | |
820 | should display a friendly error message |
|
820 | should display a friendly error message | |
821 |
|
821 | |||
822 | $ hg log -G |
|
822 | $ hg log -G | |
823 | @ 10:121d9e3bc4c6 P |
|
823 | @ 10:121d9e3bc4c6 P | |
824 | | |
|
824 | | | |
825 | o 9:4be60e099a77 C |
|
825 | o 9:4be60e099a77 C | |
826 | | |
|
826 | | | |
827 | o 6:9c48361117de D |
|
827 | o 6:9c48361117de D | |
828 | | |
|
828 | | | |
829 | o 2:261e70097290 B2 |
|
829 | o 2:261e70097290 B2 | |
830 | | |
|
830 | | | |
831 | o 0:4a2df7238c3b A |
|
831 | o 0:4a2df7238c3b A | |
832 |
|
832 | |||
833 |
|
833 | |||
834 | $ hg up 9 |
|
834 | $ hg up 9 | |
835 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
835 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
836 | $ echo "non-relevant change" > nonrelevant |
|
836 | $ echo "non-relevant change" > nonrelevant | |
837 | $ hg add nonrelevant |
|
837 | $ hg add nonrelevant | |
838 | $ hg commit -m nonrelevant |
|
838 | $ hg commit -m nonrelevant | |
839 | created new head |
|
839 | created new head | |
840 | $ hg debugobsolete `hg log -r 11 -T '{node}\n'` --config experimental.evolution=true |
|
840 | $ hg debugobsolete `hg log -r 11 -T '{node}\n'` --config experimental.evolution=true | |
841 | obsoleted 1 changesets |
|
841 | obsoleted 1 changesets | |
842 | $ hg log -G |
|
842 | $ hg log -G | |
843 | @ 11:f44da1f4954c nonrelevant (pruned) |
|
843 | @ 11:f44da1f4954c nonrelevant (pruned) | |
844 | | |
|
844 | | | |
845 | | o 10:121d9e3bc4c6 P |
|
845 | | o 10:121d9e3bc4c6 P | |
846 | |/ |
|
846 | |/ | |
847 | o 9:4be60e099a77 C |
|
847 | o 9:4be60e099a77 C | |
848 | | |
|
848 | | | |
849 | o 6:9c48361117de D |
|
849 | o 6:9c48361117de D | |
850 | | |
|
850 | | | |
851 | o 2:261e70097290 B2 |
|
851 | o 2:261e70097290 B2 | |
852 | | |
|
852 | | | |
853 | o 0:4a2df7238c3b A |
|
853 | o 0:4a2df7238c3b A | |
854 |
|
854 | |||
855 | $ hg rebase -r . -d 10 |
|
855 | $ hg rebase -r . -d 10 | |
856 | note: not rebasing 11:f44da1f4954c "nonrelevant" (tip), it has no successor |
|
856 | note: not rebasing 11:f44da1f4954c "nonrelevant" (tip), it has no successor | |
857 |
|
857 | |||
858 | If a rebase is going to create divergence, it should abort |
|
858 | If a rebase is going to create divergence, it should abort | |
859 |
|
859 | |||
860 | $ hg log -G |
|
860 | $ hg log -G | |
861 | @ 10:121d9e3bc4c6 P |
|
861 | @ 10:121d9e3bc4c6 P | |
862 | | |
|
862 | | | |
863 | o 9:4be60e099a77 C |
|
863 | o 9:4be60e099a77 C | |
864 | | |
|
864 | | | |
865 | o 6:9c48361117de D |
|
865 | o 6:9c48361117de D | |
866 | | |
|
866 | | | |
867 | o 2:261e70097290 B2 |
|
867 | o 2:261e70097290 B2 | |
868 | | |
|
868 | | | |
869 | o 0:4a2df7238c3b A |
|
869 | o 0:4a2df7238c3b A | |
870 |
|
870 | |||
871 |
|
871 | |||
872 | $ hg up 9 |
|
872 | $ hg up 9 | |
873 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
873 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
874 | $ echo "john" > doe |
|
874 | $ echo "john" > doe | |
875 | $ hg add doe |
|
875 | $ hg add doe | |
876 | $ hg commit -m "john doe" |
|
876 | $ hg commit -m "john doe" | |
877 | created new head |
|
877 | created new head | |
878 | $ hg up 10 |
|
878 | $ hg up 10 | |
879 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
879 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
880 | $ echo "foo" > bar |
|
880 | $ echo "foo" > bar | |
881 | $ hg add bar |
|
881 | $ hg add bar | |
882 | $ hg commit --amend -m "10'" |
|
882 | $ hg commit --amend -m "10'" | |
883 | $ hg up 10 --hidden |
|
883 | $ hg up 10 --hidden | |
884 | updating to a hidden changeset 121d9e3bc4c6 |
|
884 | updating to a hidden changeset 121d9e3bc4c6 | |
885 | (hidden revision '121d9e3bc4c6' was rewritten as: 77d874d096a2) |
|
885 | (hidden revision '121d9e3bc4c6' was rewritten as: 77d874d096a2) | |
886 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
886 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
887 | $ echo "bar" > foo |
|
887 | $ echo "bar" > foo | |
888 | $ hg add foo |
|
888 | $ hg add foo | |
889 | $ hg commit -m "bar foo" |
|
889 | $ hg commit -m "bar foo" | |
890 | 1 new orphan changesets |
|
890 | 1 new orphan changesets | |
891 | $ hg log -G |
|
891 | $ hg log -G | |
892 | @ 14:73568ab6879d bar foo |
|
892 | @ 14:73568ab6879d bar foo | |
893 | | |
|
893 | | | |
894 | | o 13:77d874d096a2 10' |
|
894 | | o 13:77d874d096a2 10' | |
895 | | | |
|
895 | | | | |
896 | | | o 12:3eb461388009 john doe |
|
896 | | | o 12:3eb461388009 john doe | |
897 | | |/ |
|
897 | | |/ | |
898 | x | 10:121d9e3bc4c6 P (rewritten using amend as 13:77d874d096a2) |
|
898 | x | 10:121d9e3bc4c6 P (rewritten using amend as 13:77d874d096a2) | |
899 | |/ |
|
899 | |/ | |
900 | o 9:4be60e099a77 C |
|
900 | o 9:4be60e099a77 C | |
901 | | |
|
901 | | | |
902 | o 6:9c48361117de D |
|
902 | o 6:9c48361117de D | |
903 | | |
|
903 | | | |
904 | o 2:261e70097290 B2 |
|
904 | o 2:261e70097290 B2 | |
905 | | |
|
905 | | | |
906 | o 0:4a2df7238c3b A |
|
906 | o 0:4a2df7238c3b A | |
907 |
|
907 | |||
908 | $ hg summary |
|
908 | $ hg summary | |
909 | parent: 14:73568ab6879d tip (orphan) |
|
909 | parent: 14:73568ab6879d tip (orphan) | |
910 | bar foo |
|
910 | bar foo | |
911 | branch: default |
|
911 | branch: default | |
912 | commit: (clean) |
|
912 | commit: (clean) | |
913 | update: 2 new changesets, 3 branch heads (merge) |
|
913 | update: 2 new changesets, 3 branch heads (merge) | |
914 | phases: 8 draft |
|
914 | phases: 8 draft | |
915 | orphan: 1 changesets |
|
915 | orphan: 1 changesets | |
916 | $ hg rebase -s 10 -d 12 |
|
916 | $ hg rebase -s 10 -d 12 | |
917 | abort: this rebase will cause divergences from: 121d9e3bc4c6 |
|
917 | abort: this rebase will cause divergences from: 121d9e3bc4c6 | |
918 | (to force the rebase please set experimental.evolution.allowdivergence=True) |
|
918 | (to force the rebase please set experimental.evolution.allowdivergence=True) | |
919 | [255] |
|
919 | [255] | |
920 | $ hg log -G |
|
920 | $ hg log -G | |
921 | @ 14:73568ab6879d bar foo |
|
921 | @ 14:73568ab6879d bar foo | |
922 | | |
|
922 | | | |
923 | | o 13:77d874d096a2 10' |
|
923 | | o 13:77d874d096a2 10' | |
924 | | | |
|
924 | | | | |
925 | | | o 12:3eb461388009 john doe |
|
925 | | | o 12:3eb461388009 john doe | |
926 | | |/ |
|
926 | | |/ | |
927 | x | 10:121d9e3bc4c6 P (rewritten using amend as 13:77d874d096a2) |
|
927 | x | 10:121d9e3bc4c6 P (rewritten using amend as 13:77d874d096a2) | |
928 | |/ |
|
928 | |/ | |
929 | o 9:4be60e099a77 C |
|
929 | o 9:4be60e099a77 C | |
930 | | |
|
930 | | | |
931 | o 6:9c48361117de D |
|
931 | o 6:9c48361117de D | |
932 | | |
|
932 | | | |
933 | o 2:261e70097290 B2 |
|
933 | o 2:261e70097290 B2 | |
934 | | |
|
934 | | | |
935 | o 0:4a2df7238c3b A |
|
935 | o 0:4a2df7238c3b A | |
936 |
|
936 | |||
937 | With experimental.evolution.allowdivergence=True, rebase can create divergence |
|
937 | With experimental.evolution.allowdivergence=True, rebase can create divergence | |
938 |
|
938 | |||
939 | $ hg rebase -s 10 -d 12 --config experimental.evolution.allowdivergence=True |
|
939 | $ hg rebase -s 10 -d 12 --config experimental.evolution.allowdivergence=True | |
940 | rebasing 10:121d9e3bc4c6 "P" |
|
940 | rebasing 10:121d9e3bc4c6 "P" | |
941 | rebasing 14:73568ab6879d "bar foo" (tip) |
|
941 | rebasing 14:73568ab6879d "bar foo" (tip) | |
942 | 2 new content-divergent changesets |
|
942 | 2 new content-divergent changesets | |
943 | $ hg summary |
|
943 | $ hg summary | |
944 | parent: 16:61bd55f69bc4 tip |
|
944 | parent: 16:61bd55f69bc4 tip | |
945 | bar foo |
|
945 | bar foo | |
946 | branch: default |
|
946 | branch: default | |
947 | commit: (clean) |
|
947 | commit: (clean) | |
948 | update: 1 new changesets, 2 branch heads (merge) |
|
948 | update: 1 new changesets, 2 branch heads (merge) | |
949 | phases: 8 draft |
|
949 | phases: 8 draft | |
950 | content-divergent: 2 changesets |
|
950 | content-divergent: 2 changesets | |
951 |
|
951 | |||
952 | rebase --continue + skipped rev because their successors are in destination |
|
952 | rebase --continue + skipped rev because their successors are in destination | |
953 | we make a change in trunk and work on conflicting changes to make rebase abort. |
|
953 | we make a change in trunk and work on conflicting changes to make rebase abort. | |
954 |
|
954 | |||
955 | $ hg log -G -r 16:: |
|
955 | $ hg log -G -r 16:: | |
956 | @ 16:61bd55f69bc4 bar foo |
|
956 | @ 16:61bd55f69bc4 bar foo | |
957 | | |
|
957 | | | |
958 | ~ |
|
958 | ~ | |
959 |
|
959 | |||
960 | Create the two changes in trunk |
|
960 | Create the two changes in trunk | |
961 | $ printf "a" > willconflict |
|
961 | $ printf "a" > willconflict | |
962 | $ hg add willconflict |
|
962 | $ hg add willconflict | |
963 | $ hg commit -m "willconflict first version" |
|
963 | $ hg commit -m "willconflict first version" | |
964 |
|
964 | |||
965 | $ printf "dummy" > C |
|
965 | $ printf "dummy" > C | |
966 | $ hg commit -m "dummy change successor" |
|
966 | $ hg commit -m "dummy change successor" | |
967 |
|
967 | |||
968 | Create the changes that we will rebase |
|
968 | Create the changes that we will rebase | |
969 | $ hg update -C 16 -q |
|
969 | $ hg update -C 16 -q | |
970 | $ printf "b" > willconflict |
|
970 | $ printf "b" > willconflict | |
971 | $ hg add willconflict |
|
971 | $ hg add willconflict | |
972 | $ hg commit -m "willconflict second version" |
|
972 | $ hg commit -m "willconflict second version" | |
973 | created new head |
|
973 | created new head | |
974 | $ printf "dummy" > K |
|
974 | $ printf "dummy" > K | |
975 | $ hg add K |
|
975 | $ hg add K | |
976 | $ hg commit -m "dummy change" |
|
976 | $ hg commit -m "dummy change" | |
977 | $ printf "dummy" > L |
|
977 | $ printf "dummy" > L | |
978 | $ hg add L |
|
978 | $ hg add L | |
979 | $ hg commit -m "dummy change" |
|
979 | $ hg commit -m "dummy change" | |
980 | $ hg debugobsolete `hg log -r ".^" -T '{node}'` `hg log -r 18 -T '{node}'` --config experimental.evolution=true |
|
980 | $ hg debugobsolete `hg log -r ".^" -T '{node}'` `hg log -r 18 -T '{node}'` --config experimental.evolution=true | |
981 | obsoleted 1 changesets |
|
981 | obsoleted 1 changesets | |
982 | 1 new orphan changesets |
|
982 | 1 new orphan changesets | |
983 |
|
983 | |||
984 | $ hg log -G -r 16:: |
|
984 | $ hg log -G -r 16:: | |
985 | @ 21:7bdc8a87673d dummy change |
|
985 | @ 21:7bdc8a87673d dummy change | |
986 | | |
|
986 | | | |
987 | x 20:8b31da3c4919 dummy change (rewritten as 18:601db7a18f51) |
|
987 | x 20:8b31da3c4919 dummy change (rewritten as 18:601db7a18f51) | |
988 | | |
|
988 | | | |
989 | o 19:b82fb57ea638 willconflict second version |
|
989 | o 19:b82fb57ea638 willconflict second version | |
990 | | |
|
990 | | | |
991 | | o 18:601db7a18f51 dummy change successor |
|
991 | | o 18:601db7a18f51 dummy change successor | |
992 | | | |
|
992 | | | | |
993 | | o 17:357ddf1602d5 willconflict first version |
|
993 | | o 17:357ddf1602d5 willconflict first version | |
994 | |/ |
|
994 | |/ | |
995 | o 16:61bd55f69bc4 bar foo |
|
995 | o 16:61bd55f69bc4 bar foo | |
996 | | |
|
996 | | | |
997 | ~ |
|
997 | ~ | |
998 | $ hg rebase -r ".^^ + .^ + ." -d 18 |
|
998 | $ hg rebase -r ".^^ + .^ + ." -d 18 | |
999 | rebasing 19:b82fb57ea638 "willconflict second version" |
|
999 | rebasing 19:b82fb57ea638 "willconflict second version" | |
1000 | merging willconflict |
|
1000 | merging willconflict | |
1001 | warning: conflicts while merging willconflict! (edit, then use 'hg resolve --mark') |
|
1001 | warning: conflicts while merging willconflict! (edit, then use 'hg resolve --mark') | |
1002 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
1002 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
1003 | [1] |
|
1003 | [1] | |
1004 |
|
1004 | |||
1005 | $ hg resolve --mark willconflict |
|
1005 | $ hg resolve --mark willconflict | |
1006 | (no more unresolved files) |
|
1006 | (no more unresolved files) | |
1007 | continue: hg rebase --continue |
|
1007 | continue: hg rebase --continue | |
1008 | $ hg rebase --continue |
|
1008 | $ hg rebase --continue | |
1009 | rebasing 19:b82fb57ea638 "willconflict second version" |
|
1009 | rebasing 19:b82fb57ea638 "willconflict second version" | |
1010 | note: not rebasing 20:8b31da3c4919 "dummy change", already in destination as 18:601db7a18f51 "dummy change successor" |
|
1010 | note: not rebasing 20:8b31da3c4919 "dummy change", already in destination as 18:601db7a18f51 "dummy change successor" | |
1011 | rebasing 21:7bdc8a87673d "dummy change" (tip) |
|
1011 | rebasing 21:7bdc8a87673d "dummy change" (tip) | |
1012 | $ cd .. |
|
1012 | $ cd .. | |
1013 |
|
1013 | |||
1014 | Divergence cases due to obsolete changesets |
|
1014 | Divergence cases due to obsolete changesets | |
1015 | ------------------------------------------- |
|
1015 | ------------------------------------------- | |
1016 |
|
1016 | |||
1017 | We should ignore branches with unstable changesets when they are based on an |
|
1017 | We should ignore branches with unstable changesets when they are based on an | |
1018 | obsolete changeset which successor is in rebase set. |
|
1018 | obsolete changeset which successor is in rebase set. | |
1019 |
|
1019 | |||
1020 | $ hg init divergence |
|
1020 | $ hg init divergence | |
1021 | $ cd divergence |
|
1021 | $ cd divergence | |
1022 | $ cat >> .hg/hgrc << EOF |
|
1022 | $ cat >> .hg/hgrc << EOF | |
1023 | > [extensions] |
|
1023 | > [extensions] | |
1024 | > strip = |
|
1024 | > strip = | |
1025 | > [alias] |
|
1025 | > [alias] | |
1026 | > strip = strip --no-backup --quiet |
|
1026 | > strip = strip --no-backup --quiet | |
1027 | > [templates] |
|
1027 | > [templates] | |
1028 | > instabilities = '{rev}:{node|short} {desc|firstline}{if(instabilities," ({instabilities})")}\n' |
|
1028 | > instabilities = '{rev}:{node|short} {desc|firstline}{if(instabilities," ({instabilities})")}\n' | |
1029 | > EOF |
|
1029 | > EOF | |
1030 |
|
1030 | |||
1031 | $ hg debugdrawdag <<EOF |
|
1031 | $ hg debugdrawdag <<EOF | |
1032 | > e f |
|
1032 | > e f | |
1033 | > | | |
|
1033 | > | | | |
1034 | > d' d # replace: d -> d' |
|
1034 | > d' d # replace: d -> d' | |
1035 | > \ / |
|
1035 | > \ / | |
1036 | > c |
|
1036 | > c | |
1037 | > | |
|
1037 | > | | |
1038 | > x b |
|
1038 | > x b | |
1039 | > \| |
|
1039 | > \| | |
1040 | > a |
|
1040 | > a | |
1041 | > EOF |
|
1041 | > EOF | |
1042 | 1 new orphan changesets |
|
1042 | 1 new orphan changesets | |
1043 | $ hg log -G -r 'a':: |
|
1043 | $ hg log -G -r 'a':: | |
1044 | * 7:1143e9adc121 f |
|
1044 | * 7:1143e9adc121 f | |
1045 | | |
|
1045 | | | |
1046 | | o 6:d60ebfa0f1cb e |
|
1046 | | o 6:d60ebfa0f1cb e | |
1047 | | | |
|
1047 | | | | |
1048 | | o 5:027ad6c5830d d' |
|
1048 | | o 5:027ad6c5830d d' | |
1049 | | | |
|
1049 | | | | |
1050 | x | 4:76be324c128b d (rewritten using replace as 5:027ad6c5830d) |
|
1050 | x | 4:76be324c128b d (rewritten using replace as 5:027ad6c5830d) | |
1051 | |/ |
|
1051 | |/ | |
1052 | o 3:a82ac2b38757 c |
|
1052 | o 3:a82ac2b38757 c | |
1053 | | |
|
1053 | | | |
1054 | | o 2:630d7c95eff7 x |
|
1054 | | o 2:630d7c95eff7 x | |
1055 | | | |
|
1055 | | | | |
1056 | o | 1:488e1b7e7341 b |
|
1056 | o | 1:488e1b7e7341 b | |
1057 | |/ |
|
1057 | |/ | |
1058 | o 0:b173517d0057 a |
|
1058 | o 0:b173517d0057 a | |
1059 |
|
1059 | |||
1060 |
|
1060 | |||
1061 | Changeset d and its descendants are excluded to avoid divergence of d, which |
|
1061 | Changeset d and its descendants are excluded to avoid divergence of d, which | |
1062 | would occur because the successor of d (d') is also in rebaseset. As a |
|
1062 | would occur because the successor of d (d') is also in rebaseset. As a | |
1063 | consequence f (descendant of d) is left behind. |
|
1063 | consequence f (descendant of d) is left behind. | |
1064 |
|
1064 | |||
1065 | $ hg rebase -b 'e' -d 'x' |
|
1065 | $ hg rebase -b 'e' -d 'x' | |
1066 | rebasing 1:488e1b7e7341 "b" (b) |
|
1066 | rebasing 1:488e1b7e7341 "b" (b) | |
1067 | rebasing 3:a82ac2b38757 "c" (c) |
|
1067 | rebasing 3:a82ac2b38757 "c" (c) | |
1068 | rebasing 5:027ad6c5830d "d'" (d') |
|
1068 | rebasing 5:027ad6c5830d "d'" (d') | |
1069 | rebasing 6:d60ebfa0f1cb "e" (e) |
|
1069 | rebasing 6:d60ebfa0f1cb "e" (e) | |
1070 | note: not rebasing 4:76be324c128b "d" (d) and its descendants as this would cause divergence |
|
1070 | note: not rebasing 4:76be324c128b "d" (d) and its descendants as this would cause divergence | |
1071 | $ hg log -G -r 'a':: |
|
1071 | $ hg log -G -r 'a':: | |
1072 | o 11:eb6d63fc4ed5 e |
|
1072 | o 11:eb6d63fc4ed5 e | |
1073 | | |
|
1073 | | | |
1074 | o 10:44d8c724a70c d' |
|
1074 | o 10:44d8c724a70c d' | |
1075 | | |
|
1075 | | | |
1076 | o 9:d008e6b4d3fd c |
|
1076 | o 9:d008e6b4d3fd c | |
1077 | | |
|
1077 | | | |
1078 | o 8:67e8f4a16c49 b |
|
1078 | o 8:67e8f4a16c49 b | |
1079 | | |
|
1079 | | | |
1080 | | * 7:1143e9adc121 f |
|
1080 | | * 7:1143e9adc121 f | |
1081 | | | |
|
1081 | | | | |
1082 | | | x 6:d60ebfa0f1cb e (rewritten using rebase as 11:eb6d63fc4ed5) |
|
1082 | | | x 6:d60ebfa0f1cb e (rewritten using rebase as 11:eb6d63fc4ed5) | |
1083 | | | | |
|
1083 | | | | | |
1084 | | | x 5:027ad6c5830d d' (rewritten using rebase as 10:44d8c724a70c) |
|
1084 | | | x 5:027ad6c5830d d' (rewritten using rebase as 10:44d8c724a70c) | |
1085 | | | | |
|
1085 | | | | | |
1086 | | x | 4:76be324c128b d (rewritten using replace as 5:027ad6c5830d) |
|
1086 | | x | 4:76be324c128b d (rewritten using replace as 5:027ad6c5830d) | |
1087 | | |/ |
|
1087 | | |/ | |
1088 | | x 3:a82ac2b38757 c (rewritten using rebase as 9:d008e6b4d3fd) |
|
1088 | | x 3:a82ac2b38757 c (rewritten using rebase as 9:d008e6b4d3fd) | |
1089 | | | |
|
1089 | | | | |
1090 | o | 2:630d7c95eff7 x |
|
1090 | o | 2:630d7c95eff7 x | |
1091 | | | |
|
1091 | | | | |
1092 | | x 1:488e1b7e7341 b (rewritten using rebase as 8:67e8f4a16c49) |
|
1092 | | x 1:488e1b7e7341 b (rewritten using rebase as 8:67e8f4a16c49) | |
1093 | |/ |
|
1093 | |/ | |
1094 | o 0:b173517d0057 a |
|
1094 | o 0:b173517d0057 a | |
1095 |
|
1095 | |||
1096 | $ hg strip -r 8: |
|
1096 | $ hg strip -r 8: | |
1097 |
|
1097 | |||
1098 | If the rebase set has an obsolete (d) with a successor (d') outside the rebase |
|
1098 | If the rebase set has an obsolete (d) with a successor (d') outside the rebase | |
1099 | set and none in destination, we still get the divergence warning. |
|
1099 | set and none in destination, we still get the divergence warning. | |
1100 | By allowing divergence, we can perform the rebase. |
|
1100 | By allowing divergence, we can perform the rebase. | |
1101 |
|
1101 | |||
1102 | $ hg rebase -r 'c'::'f' -d 'x' |
|
1102 | $ hg rebase -r 'c'::'f' -d 'x' | |
1103 | abort: this rebase will cause divergences from: 76be324c128b |
|
1103 | abort: this rebase will cause divergences from: 76be324c128b | |
1104 | (to force the rebase please set experimental.evolution.allowdivergence=True) |
|
1104 | (to force the rebase please set experimental.evolution.allowdivergence=True) | |
1105 | [255] |
|
1105 | [255] | |
1106 | $ hg rebase --config experimental.evolution.allowdivergence=true -r 'c'::'f' -d 'x' |
|
1106 | $ hg rebase --config experimental.evolution.allowdivergence=true -r 'c'::'f' -d 'x' | |
1107 | rebasing 3:a82ac2b38757 "c" (c) |
|
1107 | rebasing 3:a82ac2b38757 "c" (c) | |
1108 | rebasing 4:76be324c128b "d" (d) |
|
1108 | rebasing 4:76be324c128b "d" (d) | |
1109 | rebasing 7:1143e9adc121 "f" (f tip) |
|
1109 | rebasing 7:1143e9adc121 "f" (f tip) | |
1110 | 1 new orphan changesets |
|
1110 | 1 new orphan changesets | |
1111 | 2 new content-divergent changesets |
|
1111 | 2 new content-divergent changesets | |
1112 | $ hg log -G -r 'a':: -T instabilities |
|
1112 | $ hg log -G -r 'a':: -T instabilities | |
1113 | o 10:e1744ea07510 f |
|
1113 | o 10:e1744ea07510 f | |
1114 | | |
|
1114 | | | |
1115 | * 9:e2b36ea9a0a0 d (content-divergent) |
|
1115 | * 9:e2b36ea9a0a0 d (content-divergent) | |
1116 | | |
|
1116 | | | |
1117 | o 8:6a0376de376e c |
|
1117 | o 8:6a0376de376e c | |
1118 | | |
|
1118 | | | |
1119 | | x 7:1143e9adc121 f |
|
1119 | | x 7:1143e9adc121 f | |
1120 | | | |
|
1120 | | | | |
1121 | | | * 6:d60ebfa0f1cb e (orphan) |
|
1121 | | | * 6:d60ebfa0f1cb e (orphan) | |
1122 | | | | |
|
1122 | | | | | |
1123 | | | * 5:027ad6c5830d d' (orphan content-divergent) |
|
1123 | | | * 5:027ad6c5830d d' (orphan content-divergent) | |
1124 | | | | |
|
1124 | | | | | |
1125 | | x | 4:76be324c128b d |
|
1125 | | x | 4:76be324c128b d | |
1126 | | |/ |
|
1126 | | |/ | |
1127 | | x 3:a82ac2b38757 c |
|
1127 | | x 3:a82ac2b38757 c | |
1128 | | | |
|
1128 | | | | |
1129 | o | 2:630d7c95eff7 x |
|
1129 | o | 2:630d7c95eff7 x | |
1130 | | | |
|
1130 | | | | |
1131 | | o 1:488e1b7e7341 b |
|
1131 | | o 1:488e1b7e7341 b | |
1132 | |/ |
|
1132 | |/ | |
1133 | o 0:b173517d0057 a |
|
1133 | o 0:b173517d0057 a | |
1134 |
|
1134 | |||
1135 | $ hg strip -r 8: |
|
1135 | $ hg strip -r 8: | |
1136 |
|
1136 | |||
1137 | (Not skipping obsoletes means that divergence is allowed.) |
|
1137 | (Not skipping obsoletes means that divergence is allowed.) | |
1138 |
|
1138 | |||
1139 | $ hg rebase --config experimental.rebaseskipobsolete=false -r 'c'::'f' -d 'x' |
|
1139 | $ hg rebase --config experimental.rebaseskipobsolete=false -r 'c'::'f' -d 'x' | |
1140 | rebasing 3:a82ac2b38757 "c" (c) |
|
1140 | rebasing 3:a82ac2b38757 "c" (c) | |
1141 | rebasing 4:76be324c128b "d" (d) |
|
1141 | rebasing 4:76be324c128b "d" (d) | |
1142 | rebasing 7:1143e9adc121 "f" (f tip) |
|
1142 | rebasing 7:1143e9adc121 "f" (f tip) | |
1143 | 1 new orphan changesets |
|
1143 | 1 new orphan changesets | |
1144 | 2 new content-divergent changesets |
|
1144 | 2 new content-divergent changesets | |
1145 |
|
1145 | |||
1146 | $ hg strip -r 0: |
|
1146 | $ hg strip -r 0: | |
1147 |
|
1147 | |||
1148 | Similar test on a more complex graph |
|
1148 | Similar test on a more complex graph | |
1149 |
|
1149 | |||
1150 | $ hg debugdrawdag <<EOF |
|
1150 | $ hg debugdrawdag <<EOF | |
1151 | > g |
|
1151 | > g | |
1152 | > | |
|
1152 | > | | |
1153 | > f e |
|
1153 | > f e | |
1154 | > | | |
|
1154 | > | | | |
1155 | > e' d # replace: e -> e' |
|
1155 | > e' d # replace: e -> e' | |
1156 | > \ / |
|
1156 | > \ / | |
1157 | > c |
|
1157 | > c | |
1158 | > | |
|
1158 | > | | |
1159 | > x b |
|
1159 | > x b | |
1160 | > \| |
|
1160 | > \| | |
1161 | > a |
|
1161 | > a | |
1162 | > EOF |
|
1162 | > EOF | |
1163 | 1 new orphan changesets |
|
1163 | 1 new orphan changesets | |
1164 | $ hg log -G -r 'a': |
|
1164 | $ hg log -G -r 'a': | |
1165 | * 8:2876ce66c6eb g |
|
1165 | * 8:2876ce66c6eb g | |
1166 | | |
|
1166 | | | |
1167 | | o 7:3ffec603ab53 f |
|
1167 | | o 7:3ffec603ab53 f | |
1168 | | | |
|
1168 | | | | |
1169 | x | 6:e36fae928aec e (rewritten using replace as 5:63324dc512ea) |
|
1169 | x | 6:e36fae928aec e (rewritten using replace as 5:63324dc512ea) | |
1170 | | | |
|
1170 | | | | |
1171 | | o 5:63324dc512ea e' |
|
1171 | | o 5:63324dc512ea e' | |
1172 | | | |
|
1172 | | | | |
1173 | o | 4:76be324c128b d |
|
1173 | o | 4:76be324c128b d | |
1174 | |/ |
|
1174 | |/ | |
1175 | o 3:a82ac2b38757 c |
|
1175 | o 3:a82ac2b38757 c | |
1176 | | |
|
1176 | | | |
1177 | | o 2:630d7c95eff7 x |
|
1177 | | o 2:630d7c95eff7 x | |
1178 | | | |
|
1178 | | | | |
1179 | o | 1:488e1b7e7341 b |
|
1179 | o | 1:488e1b7e7341 b | |
1180 | |/ |
|
1180 | |/ | |
1181 | o 0:b173517d0057 a |
|
1181 | o 0:b173517d0057 a | |
1182 |
|
1182 | |||
1183 | $ hg rebase -b 'f' -d 'x' |
|
1183 | $ hg rebase -b 'f' -d 'x' | |
1184 | rebasing 1:488e1b7e7341 "b" (b) |
|
1184 | rebasing 1:488e1b7e7341 "b" (b) | |
1185 | rebasing 3:a82ac2b38757 "c" (c) |
|
1185 | rebasing 3:a82ac2b38757 "c" (c) | |
1186 | rebasing 5:63324dc512ea "e'" (e') |
|
1186 | rebasing 5:63324dc512ea "e'" (e') | |
1187 | rebasing 7:3ffec603ab53 "f" (f) |
|
1187 | rebasing 7:3ffec603ab53 "f" (f) | |
1188 | rebasing 4:76be324c128b "d" (d) |
|
1188 | rebasing 4:76be324c128b "d" (d) | |
1189 | note: not rebasing 6:e36fae928aec "e" (e) and its descendants as this would cause divergence |
|
1189 | note: not rebasing 6:e36fae928aec "e" (e) and its descendants as this would cause divergence | |
1190 | $ hg log -G -r 'a': |
|
1190 | $ hg log -G -r 'a': | |
1191 | o 13:a1707a5b7c2c d |
|
1191 | o 13:a1707a5b7c2c d | |
1192 | | |
|
1192 | | | |
1193 | | o 12:ef6251596616 f |
|
1193 | | o 12:ef6251596616 f | |
1194 | | | |
|
1194 | | | | |
1195 | | o 11:b6f172e64af9 e' |
|
1195 | | o 11:b6f172e64af9 e' | |
1196 | |/ |
|
1196 | |/ | |
1197 | o 10:d008e6b4d3fd c |
|
1197 | o 10:d008e6b4d3fd c | |
1198 | | |
|
1198 | | | |
1199 | o 9:67e8f4a16c49 b |
|
1199 | o 9:67e8f4a16c49 b | |
1200 | | |
|
1200 | | | |
1201 | | * 8:2876ce66c6eb g |
|
1201 | | * 8:2876ce66c6eb g | |
1202 | | | |
|
1202 | | | | |
1203 | | | x 7:3ffec603ab53 f (rewritten using rebase as 12:ef6251596616) |
|
1203 | | | x 7:3ffec603ab53 f (rewritten using rebase as 12:ef6251596616) | |
1204 | | | | |
|
1204 | | | | | |
1205 | | x | 6:e36fae928aec e (rewritten using replace as 5:63324dc512ea) |
|
1205 | | x | 6:e36fae928aec e (rewritten using replace as 5:63324dc512ea) | |
1206 | | | | |
|
1206 | | | | | |
1207 | | | x 5:63324dc512ea e' (rewritten using rebase as 11:b6f172e64af9) |
|
1207 | | | x 5:63324dc512ea e' (rewritten using rebase as 11:b6f172e64af9) | |
1208 | | | | |
|
1208 | | | | | |
1209 | | x | 4:76be324c128b d (rewritten using rebase as 13:a1707a5b7c2c) |
|
1209 | | x | 4:76be324c128b d (rewritten using rebase as 13:a1707a5b7c2c) | |
1210 | | |/ |
|
1210 | | |/ | |
1211 | | x 3:a82ac2b38757 c (rewritten using rebase as 10:d008e6b4d3fd) |
|
1211 | | x 3:a82ac2b38757 c (rewritten using rebase as 10:d008e6b4d3fd) | |
1212 | | | |
|
1212 | | | | |
1213 | o | 2:630d7c95eff7 x |
|
1213 | o | 2:630d7c95eff7 x | |
1214 | | | |
|
1214 | | | | |
1215 | | x 1:488e1b7e7341 b (rewritten using rebase as 9:67e8f4a16c49) |
|
1215 | | x 1:488e1b7e7341 b (rewritten using rebase as 9:67e8f4a16c49) | |
1216 | |/ |
|
1216 | |/ | |
1217 | o 0:b173517d0057 a |
|
1217 | o 0:b173517d0057 a | |
1218 |
|
1218 | |||
1219 |
|
1219 | |||
1220 | $ cd .. |
|
1220 | $ cd .. | |
1221 |
|
1221 | |||
1222 | Rebase merge where successor of one parent is equal to destination (issue5198) |
|
1222 | Rebase merge where successor of one parent is equal to destination (issue5198) | |
1223 |
|
1223 | |||
1224 | $ hg init p1-succ-is-dest |
|
1224 | $ hg init p1-succ-is-dest | |
1225 | $ cd p1-succ-is-dest |
|
1225 | $ cd p1-succ-is-dest | |
1226 |
|
1226 | |||
1227 | $ hg debugdrawdag <<EOF |
|
1227 | $ hg debugdrawdag <<EOF | |
1228 | > F |
|
1228 | > F | |
1229 | > /| |
|
1229 | > /| | |
1230 | > E D B # replace: D -> B |
|
1230 | > E D B # replace: D -> B | |
1231 | > \|/ |
|
1231 | > \|/ | |
1232 | > A |
|
1232 | > A | |
1233 | > EOF |
|
1233 | > EOF | |
1234 | 1 new orphan changesets |
|
1234 | 1 new orphan changesets | |
1235 |
|
1235 | |||
1236 | $ hg rebase -d B -s D |
|
1236 | $ hg rebase -d B -s D | |
1237 | note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B) |
|
1237 | note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B) | |
1238 | rebasing 4:66f1a38021c9 "F" (F tip) |
|
1238 | rebasing 4:66f1a38021c9 "F" (F tip) | |
1239 | $ hg log -G |
|
1239 | $ hg log -G | |
1240 | o 5:50e9d60b99c6 F |
|
1240 | o 5:50e9d60b99c6 F | |
1241 | |\ |
|
1241 | |\ | |
1242 | | | x 4:66f1a38021c9 F (rewritten using rebase as 5:50e9d60b99c6) |
|
1242 | | | x 4:66f1a38021c9 F (rewritten using rebase as 5:50e9d60b99c6) | |
1243 | | |/| |
|
1243 | | |/| | |
1244 | | o | 3:7fb047a69f22 E |
|
1244 | | o | 3:7fb047a69f22 E | |
1245 | | | | |
|
1245 | | | | | |
1246 | | | x 2:b18e25de2cf5 D (rewritten using replace as 1:112478962961) |
|
1246 | | | x 2:b18e25de2cf5 D (rewritten using replace as 1:112478962961) | |
1247 | | |/ |
|
1247 | | |/ | |
1248 | o | 1:112478962961 B |
|
1248 | o | 1:112478962961 B | |
1249 | |/ |
|
1249 | |/ | |
1250 | o 0:426bada5c675 A |
|
1250 | o 0:426bada5c675 A | |
1251 |
|
1251 | |||
1252 | $ cd .. |
|
1252 | $ cd .. | |
1253 |
|
1253 | |||
1254 | Rebase merge where successor of other parent is equal to destination |
|
1254 | Rebase merge where successor of other parent is equal to destination | |
1255 |
|
1255 | |||
1256 | $ hg init p2-succ-is-dest |
|
1256 | $ hg init p2-succ-is-dest | |
1257 | $ cd p2-succ-is-dest |
|
1257 | $ cd p2-succ-is-dest | |
1258 |
|
1258 | |||
1259 | $ hg debugdrawdag <<EOF |
|
1259 | $ hg debugdrawdag <<EOF | |
1260 | > F |
|
1260 | > F | |
1261 | > /| |
|
1261 | > /| | |
1262 | > E D B # replace: E -> B |
|
1262 | > E D B # replace: E -> B | |
1263 | > \|/ |
|
1263 | > \|/ | |
1264 | > A |
|
1264 | > A | |
1265 | > EOF |
|
1265 | > EOF | |
1266 | 1 new orphan changesets |
|
1266 | 1 new orphan changesets | |
1267 |
|
1267 | |||
1268 | $ hg rebase -d B -s E |
|
1268 | $ hg rebase -d B -s E | |
1269 | note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B) |
|
1269 | note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B) | |
1270 | rebasing 4:66f1a38021c9 "F" (F tip) |
|
1270 | rebasing 4:66f1a38021c9 "F" (F tip) | |
1271 | $ hg log -G |
|
1271 | $ hg log -G | |
1272 | o 5:aae1787dacee F |
|
1272 | o 5:aae1787dacee F | |
1273 | |\ |
|
1273 | |\ | |
1274 | | | x 4:66f1a38021c9 F (rewritten using rebase as 5:aae1787dacee) |
|
1274 | | | x 4:66f1a38021c9 F (rewritten using rebase as 5:aae1787dacee) | |
1275 | | |/| |
|
1275 | | |/| | |
1276 | | | x 3:7fb047a69f22 E (rewritten using replace as 1:112478962961) |
|
1276 | | | x 3:7fb047a69f22 E (rewritten using replace as 1:112478962961) | |
1277 | | | | |
|
1277 | | | | | |
1278 | | o | 2:b18e25de2cf5 D |
|
1278 | | o | 2:b18e25de2cf5 D | |
1279 | | |/ |
|
1279 | | |/ | |
1280 | o / 1:112478962961 B |
|
1280 | o / 1:112478962961 B | |
1281 | |/ |
|
1281 | |/ | |
1282 | o 0:426bada5c675 A |
|
1282 | o 0:426bada5c675 A | |
1283 |
|
1283 | |||
1284 | $ cd .. |
|
1284 | $ cd .. | |
1285 |
|
1285 | |||
1286 | Rebase merge where successor of one parent is ancestor of destination |
|
1286 | Rebase merge where successor of one parent is ancestor of destination | |
1287 |
|
1287 | |||
1288 | $ hg init p1-succ-in-dest |
|
1288 | $ hg init p1-succ-in-dest | |
1289 | $ cd p1-succ-in-dest |
|
1289 | $ cd p1-succ-in-dest | |
1290 |
|
1290 | |||
1291 | $ hg debugdrawdag <<EOF |
|
1291 | $ hg debugdrawdag <<EOF | |
1292 | > F C |
|
1292 | > F C | |
1293 | > /| | |
|
1293 | > /| | | |
1294 | > E D B # replace: D -> B |
|
1294 | > E D B # replace: D -> B | |
1295 | > \|/ |
|
1295 | > \|/ | |
1296 | > A |
|
1296 | > A | |
1297 | > EOF |
|
1297 | > EOF | |
1298 | 1 new orphan changesets |
|
1298 | 1 new orphan changesets | |
1299 |
|
1299 | |||
1300 | $ hg rebase -d C -s D |
|
1300 | $ hg rebase -d C -s D | |
1301 | note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B) |
|
1301 | note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B) | |
1302 | rebasing 5:66f1a38021c9 "F" (F tip) |
|
1302 | rebasing 5:66f1a38021c9 "F" (F tip) | |
1303 |
|
1303 | |||
1304 | $ hg log -G |
|
1304 | $ hg log -G | |
1305 | o 6:0913febf6439 F |
|
1305 | o 6:0913febf6439 F | |
1306 | |\ |
|
1306 | |\ | |
1307 | +---x 5:66f1a38021c9 F (rewritten using rebase as 6:0913febf6439) |
|
1307 | +---x 5:66f1a38021c9 F (rewritten using rebase as 6:0913febf6439) | |
1308 | | | | |
|
1308 | | | | | |
1309 | | o | 4:26805aba1e60 C |
|
1309 | | o | 4:26805aba1e60 C | |
1310 | | | | |
|
1310 | | | | | |
1311 | o | | 3:7fb047a69f22 E |
|
1311 | o | | 3:7fb047a69f22 E | |
1312 | | | | |
|
1312 | | | | | |
1313 | +---x 2:b18e25de2cf5 D (rewritten using replace as 1:112478962961) |
|
1313 | +---x 2:b18e25de2cf5 D (rewritten using replace as 1:112478962961) | |
1314 | | | |
|
1314 | | | | |
1315 | | o 1:112478962961 B |
|
1315 | | o 1:112478962961 B | |
1316 | |/ |
|
1316 | |/ | |
1317 | o 0:426bada5c675 A |
|
1317 | o 0:426bada5c675 A | |
1318 |
|
1318 | |||
1319 | $ cd .. |
|
1319 | $ cd .. | |
1320 |
|
1320 | |||
1321 | Rebase merge where successor of other parent is ancestor of destination |
|
1321 | Rebase merge where successor of other parent is ancestor of destination | |
1322 |
|
1322 | |||
1323 | $ hg init p2-succ-in-dest |
|
1323 | $ hg init p2-succ-in-dest | |
1324 | $ cd p2-succ-in-dest |
|
1324 | $ cd p2-succ-in-dest | |
1325 |
|
1325 | |||
1326 | $ hg debugdrawdag <<EOF |
|
1326 | $ hg debugdrawdag <<EOF | |
1327 | > F C |
|
1327 | > F C | |
1328 | > /| | |
|
1328 | > /| | | |
1329 | > E D B # replace: E -> B |
|
1329 | > E D B # replace: E -> B | |
1330 | > \|/ |
|
1330 | > \|/ | |
1331 | > A |
|
1331 | > A | |
1332 | > EOF |
|
1332 | > EOF | |
1333 | 1 new orphan changesets |
|
1333 | 1 new orphan changesets | |
1334 |
|
1334 | |||
1335 | $ hg rebase -d C -s E |
|
1335 | $ hg rebase -d C -s E | |
1336 | note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B) |
|
1336 | note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B) | |
1337 | rebasing 5:66f1a38021c9 "F" (F tip) |
|
1337 | rebasing 5:66f1a38021c9 "F" (F tip) | |
1338 | $ hg log -G |
|
1338 | $ hg log -G | |
1339 | o 6:c6ab0cc6d220 F |
|
1339 | o 6:c6ab0cc6d220 F | |
1340 | |\ |
|
1340 | |\ | |
1341 | +---x 5:66f1a38021c9 F (rewritten using rebase as 6:c6ab0cc6d220) |
|
1341 | +---x 5:66f1a38021c9 F (rewritten using rebase as 6:c6ab0cc6d220) | |
1342 | | | | |
|
1342 | | | | | |
1343 | | o | 4:26805aba1e60 C |
|
1343 | | o | 4:26805aba1e60 C | |
1344 | | | | |
|
1344 | | | | | |
1345 | | | x 3:7fb047a69f22 E (rewritten using replace as 1:112478962961) |
|
1345 | | | x 3:7fb047a69f22 E (rewritten using replace as 1:112478962961) | |
1346 | | | | |
|
1346 | | | | | |
1347 | o---+ 2:b18e25de2cf5 D |
|
1347 | o---+ 2:b18e25de2cf5 D | |
1348 | / / |
|
1348 | / / | |
1349 | o / 1:112478962961 B |
|
1349 | o / 1:112478962961 B | |
1350 | |/ |
|
1350 | |/ | |
1351 | o 0:426bada5c675 A |
|
1351 | o 0:426bada5c675 A | |
1352 |
|
1352 | |||
1353 | $ cd .. |
|
1353 | $ cd .. | |
1354 |
|
1354 | |||
1355 | Rebase merge where successor of one parent is ancestor of destination |
|
1355 | Rebase merge where successor of one parent is ancestor of destination | |
1356 |
|
1356 | |||
1357 | $ hg init p1-succ-in-dest-b |
|
1357 | $ hg init p1-succ-in-dest-b | |
1358 | $ cd p1-succ-in-dest-b |
|
1358 | $ cd p1-succ-in-dest-b | |
1359 |
|
1359 | |||
1360 | $ hg debugdrawdag <<EOF |
|
1360 | $ hg debugdrawdag <<EOF | |
1361 | > F C |
|
1361 | > F C | |
1362 | > /| | |
|
1362 | > /| | | |
1363 | > E D B # replace: E -> B |
|
1363 | > E D B # replace: E -> B | |
1364 | > \|/ |
|
1364 | > \|/ | |
1365 | > A |
|
1365 | > A | |
1366 | > EOF |
|
1366 | > EOF | |
1367 | 1 new orphan changesets |
|
1367 | 1 new orphan changesets | |
1368 |
|
1368 | |||
1369 | $ hg rebase -d C -b F |
|
1369 | $ hg rebase -d C -b F | |
1370 | rebasing 2:b18e25de2cf5 "D" (D) |
|
1370 | rebasing 2:b18e25de2cf5 "D" (D) | |
1371 | note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B) |
|
1371 | note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B) | |
1372 | rebasing 5:66f1a38021c9 "F" (F tip) |
|
1372 | rebasing 5:66f1a38021c9 "F" (F tip) | |
1373 | note: rebase of 5:66f1a38021c9 created no changes to commit |
|
1373 | note: rebase of 5:66f1a38021c9 created no changes to commit | |
1374 | $ hg log -G |
|
1374 | $ hg log -G | |
1375 | o 6:8f47515dda15 D |
|
1375 | o 6:8f47515dda15 D | |
1376 | | |
|
1376 | | | |
1377 | | x 5:66f1a38021c9 F (pruned using rebase) |
|
1377 | | x 5:66f1a38021c9 F (pruned using rebase) | |
1378 | | |\ |
|
1378 | | |\ | |
1379 | o | | 4:26805aba1e60 C |
|
1379 | o | | 4:26805aba1e60 C | |
1380 | | | | |
|
1380 | | | | | |
1381 | | | x 3:7fb047a69f22 E (rewritten using replace as 1:112478962961) |
|
1381 | | | x 3:7fb047a69f22 E (rewritten using replace as 1:112478962961) | |
1382 | | | | |
|
1382 | | | | | |
1383 | | x | 2:b18e25de2cf5 D (rewritten using rebase as 6:8f47515dda15) |
|
1383 | | x | 2:b18e25de2cf5 D (rewritten using rebase as 6:8f47515dda15) | |
1384 | | |/ |
|
1384 | | |/ | |
1385 | o / 1:112478962961 B |
|
1385 | o / 1:112478962961 B | |
1386 | |/ |
|
1386 | |/ | |
1387 | o 0:426bada5c675 A |
|
1387 | o 0:426bada5c675 A | |
1388 |
|
1388 | |||
1389 | $ cd .. |
|
1389 | $ cd .. | |
1390 |
|
1390 | |||
1391 | Rebase merge where successor of other parent is ancestor of destination |
|
1391 | Rebase merge where successor of other parent is ancestor of destination | |
1392 |
|
1392 | |||
1393 | $ hg init p2-succ-in-dest-b |
|
1393 | $ hg init p2-succ-in-dest-b | |
1394 | $ cd p2-succ-in-dest-b |
|
1394 | $ cd p2-succ-in-dest-b | |
1395 |
|
1395 | |||
1396 | $ hg debugdrawdag <<EOF |
|
1396 | $ hg debugdrawdag <<EOF | |
1397 | > F C |
|
1397 | > F C | |
1398 | > /| | |
|
1398 | > /| | | |
1399 | > E D B # replace: D -> B |
|
1399 | > E D B # replace: D -> B | |
1400 | > \|/ |
|
1400 | > \|/ | |
1401 | > A |
|
1401 | > A | |
1402 | > EOF |
|
1402 | > EOF | |
1403 | 1 new orphan changesets |
|
1403 | 1 new orphan changesets | |
1404 |
|
1404 | |||
1405 | $ hg rebase -d C -b F |
|
1405 | $ hg rebase -d C -b F | |
1406 | note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B) |
|
1406 | note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B) | |
1407 | rebasing 3:7fb047a69f22 "E" (E) |
|
1407 | rebasing 3:7fb047a69f22 "E" (E) | |
1408 | rebasing 5:66f1a38021c9 "F" (F tip) |
|
1408 | rebasing 5:66f1a38021c9 "F" (F tip) | |
1409 | note: rebase of 5:66f1a38021c9 created no changes to commit |
|
1409 | note: rebase of 5:66f1a38021c9 created no changes to commit | |
1410 |
|
1410 | |||
1411 | $ hg log -G |
|
1411 | $ hg log -G | |
1412 | o 6:533690786a86 E |
|
1412 | o 6:533690786a86 E | |
1413 | | |
|
1413 | | | |
1414 | | x 5:66f1a38021c9 F (pruned using rebase) |
|
1414 | | x 5:66f1a38021c9 F (pruned using rebase) | |
1415 | | |\ |
|
1415 | | |\ | |
1416 | o | | 4:26805aba1e60 C |
|
1416 | o | | 4:26805aba1e60 C | |
1417 | | | | |
|
1417 | | | | | |
1418 | | | x 3:7fb047a69f22 E (rewritten using rebase as 6:533690786a86) |
|
1418 | | | x 3:7fb047a69f22 E (rewritten using rebase as 6:533690786a86) | |
1419 | | | | |
|
1419 | | | | | |
1420 | | x | 2:b18e25de2cf5 D (rewritten using replace as 1:112478962961) |
|
1420 | | x | 2:b18e25de2cf5 D (rewritten using replace as 1:112478962961) | |
1421 | | |/ |
|
1421 | | |/ | |
1422 | o / 1:112478962961 B |
|
1422 | o / 1:112478962961 B | |
1423 | |/ |
|
1423 | |/ | |
1424 | o 0:426bada5c675 A |
|
1424 | o 0:426bada5c675 A | |
1425 |
|
1425 | |||
1426 | $ cd .. |
|
1426 | $ cd .. | |
1427 |
|
1427 | |||
1428 | Rebase merge where both parents have successors in destination |
|
1428 | Rebase merge where both parents have successors in destination | |
1429 |
|
1429 | |||
1430 | $ hg init p12-succ-in-dest |
|
1430 | $ hg init p12-succ-in-dest | |
1431 | $ cd p12-succ-in-dest |
|
1431 | $ cd p12-succ-in-dest | |
1432 | $ hg debugdrawdag <<'EOS' |
|
1432 | $ hg debugdrawdag <<'EOS' | |
1433 | > E F |
|
1433 | > E F | |
1434 | > /| /| # replace: A -> C |
|
1434 | > /| /| # replace: A -> C | |
1435 | > A B C D # replace: B -> D |
|
1435 | > A B C D # replace: B -> D | |
1436 | > | | |
|
1436 | > | | | |
1437 | > X Y |
|
1437 | > X Y | |
1438 | > EOS |
|
1438 | > EOS | |
1439 | 1 new orphan changesets |
|
1439 | 1 new orphan changesets | |
1440 | $ hg rebase -r A+B+E -d F |
|
1440 | $ hg rebase -r A+B+E -d F | |
1441 | note: not rebasing 4:a3d17304151f "A" (A), already in destination as 0:96cc3511f894 "C" (C) |
|
1441 | note: not rebasing 4:a3d17304151f "A" (A), already in destination as 0:96cc3511f894 "C" (C) | |
1442 | note: not rebasing 5:b23a2cc00842 "B" (B), already in destination as 1:058c1e1fb10a "D" (D) |
|
1442 | note: not rebasing 5:b23a2cc00842 "B" (B), already in destination as 1:058c1e1fb10a "D" (D) | |
1443 | rebasing 7:dac5d11c5a7d "E" (E tip) |
|
1443 | rebasing 7:dac5d11c5a7d "E" (E tip) | |
1444 | abort: rebasing 7:dac5d11c5a7d will include unwanted changes from 3:59c792af609c, 5:b23a2cc00842 or 2:ba2b7fa7166d, 4:a3d17304151f |
|
1444 | abort: rebasing 7:dac5d11c5a7d will include unwanted changes from 3:59c792af609c, 5:b23a2cc00842 or 2:ba2b7fa7166d, 4:a3d17304151f | |
1445 | [255] |
|
1445 | [255] | |
1446 | $ cd .. |
|
1446 | $ cd .. | |
1447 |
|
1447 | |||
1448 | Rebase a non-clean merge. One parent has successor in destination, the other |
|
1448 | Rebase a non-clean merge. One parent has successor in destination, the other | |
1449 | parent moves as requested. |
|
1449 | parent moves as requested. | |
1450 |
|
1450 | |||
1451 | $ hg init p1-succ-p2-move |
|
1451 | $ hg init p1-succ-p2-move | |
1452 | $ cd p1-succ-p2-move |
|
1452 | $ cd p1-succ-p2-move | |
1453 | $ hg debugdrawdag <<'EOS' |
|
1453 | $ hg debugdrawdag <<'EOS' | |
1454 | > D Z |
|
1454 | > D Z | |
1455 | > /| | # replace: A -> C |
|
1455 | > /| | # replace: A -> C | |
1456 | > A B C # D/D = D |
|
1456 | > A B C # D/D = D | |
1457 | > EOS |
|
1457 | > EOS | |
1458 | 1 new orphan changesets |
|
1458 | 1 new orphan changesets | |
1459 | $ hg rebase -r A+B+D -d Z |
|
1459 | $ hg rebase -r A+B+D -d Z | |
1460 | note: not rebasing 0:426bada5c675 "A" (A), already in destination as 2:96cc3511f894 "C" (C) |
|
1460 | note: not rebasing 0:426bada5c675 "A" (A), already in destination as 2:96cc3511f894 "C" (C) | |
1461 | rebasing 1:fc2b737bb2e5 "B" (B) |
|
1461 | rebasing 1:fc2b737bb2e5 "B" (B) | |
1462 | rebasing 3:b8ed089c80ad "D" (D) |
|
1462 | rebasing 3:b8ed089c80ad "D" (D) | |
1463 |
|
1463 | |||
1464 | $ rm .hg/localtags |
|
1464 | $ rm .hg/localtags | |
1465 | $ hg log -G |
|
1465 | $ hg log -G | |
1466 | o 6:e4f78693cc88 D |
|
1466 | o 6:e4f78693cc88 D | |
1467 | | |
|
1467 | | | |
1468 | o 5:76840d832e98 B |
|
1468 | o 5:76840d832e98 B | |
1469 | | |
|
1469 | | | |
1470 | o 4:50e41c1f3950 Z |
|
1470 | o 4:50e41c1f3950 Z | |
1471 | | |
|
1471 | | | |
1472 | o 2:96cc3511f894 C |
|
1472 | o 2:96cc3511f894 C | |
1473 |
|
1473 | |||
1474 | $ hg files -r tip |
|
1474 | $ hg files -r tip | |
1475 | B |
|
1475 | B | |
1476 | C |
|
1476 | C | |
1477 | D |
|
1477 | D | |
1478 | Z |
|
1478 | Z | |
1479 |
|
1479 | |||
1480 | $ cd .. |
|
1480 | $ cd .. | |
1481 |
|
1481 | |||
1482 | $ hg init p1-move-p2-succ |
|
1482 | $ hg init p1-move-p2-succ | |
1483 | $ cd p1-move-p2-succ |
|
1483 | $ cd p1-move-p2-succ | |
1484 | $ hg debugdrawdag <<'EOS' |
|
1484 | $ hg debugdrawdag <<'EOS' | |
1485 | > D Z |
|
1485 | > D Z | |
1486 | > /| | # replace: B -> C |
|
1486 | > /| | # replace: B -> C | |
1487 | > A B C # D/D = D |
|
1487 | > A B C # D/D = D | |
1488 | > EOS |
|
1488 | > EOS | |
1489 | 1 new orphan changesets |
|
1489 | 1 new orphan changesets | |
1490 | $ hg rebase -r B+A+D -d Z |
|
1490 | $ hg rebase -r B+A+D -d Z | |
1491 | rebasing 0:426bada5c675 "A" (A) |
|
1491 | rebasing 0:426bada5c675 "A" (A) | |
1492 | note: not rebasing 1:fc2b737bb2e5 "B" (B), already in destination as 2:96cc3511f894 "C" (C) |
|
1492 | note: not rebasing 1:fc2b737bb2e5 "B" (B), already in destination as 2:96cc3511f894 "C" (C) | |
1493 | rebasing 3:b8ed089c80ad "D" (D) |
|
1493 | rebasing 3:b8ed089c80ad "D" (D) | |
1494 |
|
1494 | |||
1495 | $ rm .hg/localtags |
|
1495 | $ rm .hg/localtags | |
1496 | $ hg log -G |
|
1496 | $ hg log -G | |
1497 | o 6:1b355ed94d82 D |
|
1497 | o 6:1b355ed94d82 D | |
1498 | | |
|
1498 | | | |
1499 | o 5:a81a74d764a6 A |
|
1499 | o 5:a81a74d764a6 A | |
1500 | | |
|
1500 | | | |
1501 | o 4:50e41c1f3950 Z |
|
1501 | o 4:50e41c1f3950 Z | |
1502 | | |
|
1502 | | | |
1503 | o 2:96cc3511f894 C |
|
1503 | o 2:96cc3511f894 C | |
1504 |
|
1504 | |||
1505 | $ hg files -r tip |
|
1505 | $ hg files -r tip | |
1506 | A |
|
1506 | A | |
1507 | C |
|
1507 | C | |
1508 | D |
|
1508 | D | |
1509 | Z |
|
1509 | Z | |
1510 |
|
1510 | |||
1511 | $ cd .. |
|
1511 | $ cd .. | |
1512 |
|
1512 | |||
1513 | Test that bookmark is moved and working dir is updated when all changesets have |
|
1513 | Test that bookmark is moved and working dir is updated when all changesets have | |
1514 | equivalents in destination |
|
1514 | equivalents in destination | |
1515 | $ hg init rbsrepo && cd rbsrepo |
|
1515 | $ hg init rbsrepo && cd rbsrepo | |
1516 | $ echo "[experimental]" > .hg/hgrc |
|
1516 | $ echo "[experimental]" > .hg/hgrc | |
1517 | $ echo "evolution=true" >> .hg/hgrc |
|
1517 | $ echo "evolution=true" >> .hg/hgrc | |
1518 | $ echo "rebaseskipobsolete=on" >> .hg/hgrc |
|
1518 | $ echo "rebaseskipobsolete=on" >> .hg/hgrc | |
1519 | $ echo root > root && hg ci -Am root |
|
1519 | $ echo root > root && hg ci -Am root | |
1520 | adding root |
|
1520 | adding root | |
1521 | $ echo a > a && hg ci -Am a |
|
1521 | $ echo a > a && hg ci -Am a | |
1522 | adding a |
|
1522 | adding a | |
1523 | $ hg up 0 |
|
1523 | $ hg up 0 | |
1524 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1524 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1525 | $ echo b > b && hg ci -Am b |
|
1525 | $ echo b > b && hg ci -Am b | |
1526 | adding b |
|
1526 | adding b | |
1527 | created new head |
|
1527 | created new head | |
1528 | $ hg rebase -r 2 -d 1 |
|
1528 | $ hg rebase -r 2 -d 1 | |
1529 | rebasing 2:1e9a3c00cbe9 "b" (tip) |
|
1529 | rebasing 2:1e9a3c00cbe9 "b" (tip) | |
1530 | $ hg log -r . # working dir is at rev 3 (successor of 2) |
|
1530 | $ hg log -r . # working dir is at rev 3 (successor of 2) | |
1531 | 3:be1832deae9a b (no-eol) |
|
1531 | 3:be1832deae9a b (no-eol) | |
1532 | $ hg book -r 2 mybook --hidden # rev 2 has a bookmark on it now |
|
1532 | $ hg book -r 2 mybook --hidden # rev 2 has a bookmark on it now | |
1533 | bookmarking hidden changeset 1e9a3c00cbe9 |
|
1533 | bookmarking hidden changeset 1e9a3c00cbe9 | |
|
1534 | (hidden revision '1e9a3c00cbe9' was rewritten as: be1832deae9a) | |||
1534 | $ hg up 2 && hg log -r . # working dir is at rev 2 again |
|
1535 | $ hg up 2 && hg log -r . # working dir is at rev 2 again | |
1535 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1536 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1536 | 2:1e9a3c00cbe9 b (rewritten using rebase as 3:be1832deae9a) (no-eol) |
|
1537 | 2:1e9a3c00cbe9 b (rewritten using rebase as 3:be1832deae9a) (no-eol) | |
1537 | $ hg rebase -r 2 -d 3 --config experimental.evolution.track-operation=1 |
|
1538 | $ hg rebase -r 2 -d 3 --config experimental.evolution.track-operation=1 | |
1538 | note: not rebasing 2:1e9a3c00cbe9 "b" (mybook), already in destination as 3:be1832deae9a "b" (tip) |
|
1539 | note: not rebasing 2:1e9a3c00cbe9 "b" (mybook), already in destination as 3:be1832deae9a "b" (tip) | |
1539 | Check that working directory and bookmark was updated to rev 3 although rev 2 |
|
1540 | Check that working directory and bookmark was updated to rev 3 although rev 2 | |
1540 | was skipped |
|
1541 | was skipped | |
1541 | $ hg log -r . |
|
1542 | $ hg log -r . | |
1542 | 3:be1832deae9a b (no-eol) |
|
1543 | 3:be1832deae9a b (no-eol) | |
1543 | $ hg bookmarks |
|
1544 | $ hg bookmarks | |
1544 | mybook 3:be1832deae9a |
|
1545 | mybook 3:be1832deae9a | |
1545 | $ hg debugobsolete --rev tip |
|
1546 | $ hg debugobsolete --rev tip | |
1546 | 1e9a3c00cbe90d236ac05ef61efcc5e40b7412bc be1832deae9ac531caa7438b8dcf6055a122cd8e 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
1547 | 1e9a3c00cbe90d236ac05ef61efcc5e40b7412bc be1832deae9ac531caa7438b8dcf6055a122cd8e 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
1547 |
|
1548 | |||
1548 | Obsoleted working parent and bookmark could be moved if an ancestor of working |
|
1549 | Obsoleted working parent and bookmark could be moved if an ancestor of working | |
1549 | parent gets moved: |
|
1550 | parent gets moved: | |
1550 |
|
1551 | |||
1551 | $ hg init $TESTTMP/ancestor-wd-move |
|
1552 | $ hg init $TESTTMP/ancestor-wd-move | |
1552 | $ cd $TESTTMP/ancestor-wd-move |
|
1553 | $ cd $TESTTMP/ancestor-wd-move | |
1553 | $ hg debugdrawdag <<'EOS' |
|
1554 | $ hg debugdrawdag <<'EOS' | |
1554 | > E D1 # rebase: D1 -> D2 |
|
1555 | > E D1 # rebase: D1 -> D2 | |
1555 | > | | |
|
1556 | > | | | |
1556 | > | C |
|
1557 | > | C | |
1557 | > D2 | |
|
1558 | > D2 | | |
1558 | > | B |
|
1559 | > | B | |
1559 | > |/ |
|
1560 | > |/ | |
1560 | > A |
|
1561 | > A | |
1561 | > EOS |
|
1562 | > EOS | |
1562 | $ hg update D1 -q |
|
1563 | $ hg update D1 -q | |
1563 | $ hg bookmark book -i |
|
1564 | $ hg bookmark book -i | |
1564 | $ hg rebase -r B+D1 -d E |
|
1565 | $ hg rebase -r B+D1 -d E | |
1565 | rebasing 1:112478962961 "B" (B) |
|
1566 | rebasing 1:112478962961 "B" (B) | |
1566 | note: not rebasing 5:15ecf15e0114 "D1" (book D1 tip), already in destination as 2:0807738e0be9 "D2" (D2) |
|
1567 | note: not rebasing 5:15ecf15e0114 "D1" (book D1 tip), already in destination as 2:0807738e0be9 "D2" (D2) | |
1567 | 1 new orphan changesets |
|
1568 | 1 new orphan changesets | |
1568 | $ hg log -G -T '{desc} {bookmarks}' |
|
1569 | $ hg log -G -T '{desc} {bookmarks}' | |
1569 | @ B book |
|
1570 | @ B book | |
1570 | | |
|
1571 | | | |
1571 | | x D1 |
|
1572 | | x D1 | |
1572 | | | |
|
1573 | | | | |
1573 | o | E |
|
1574 | o | E | |
1574 | | | |
|
1575 | | | | |
1575 | | * C |
|
1576 | | * C | |
1576 | | | |
|
1577 | | | | |
1577 | o | D2 |
|
1578 | o | D2 | |
1578 | | | |
|
1579 | | | | |
1579 | | x B |
|
1580 | | x B | |
1580 | |/ |
|
1581 | |/ | |
1581 | o A |
|
1582 | o A | |
1582 |
|
1583 | |||
1583 | Rebasing a merge with one of its parent having a hidden successor |
|
1584 | Rebasing a merge with one of its parent having a hidden successor | |
1584 |
|
1585 | |||
1585 | $ hg init $TESTTMP/merge-p1-hidden-successor |
|
1586 | $ hg init $TESTTMP/merge-p1-hidden-successor | |
1586 | $ cd $TESTTMP/merge-p1-hidden-successor |
|
1587 | $ cd $TESTTMP/merge-p1-hidden-successor | |
1587 |
|
1588 | |||
1588 | $ hg debugdrawdag <<'EOS' |
|
1589 | $ hg debugdrawdag <<'EOS' | |
1589 | > E |
|
1590 | > E | |
1590 | > | |
|
1591 | > | | |
1591 | > B3 B2 # amend: B1 -> B2 -> B3 |
|
1592 | > B3 B2 # amend: B1 -> B2 -> B3 | |
1592 | > |/ # B2 is hidden |
|
1593 | > |/ # B2 is hidden | |
1593 | > | D |
|
1594 | > | D | |
1594 | > | |\ |
|
1595 | > | |\ | |
1595 | > | B1 C |
|
1596 | > | B1 C | |
1596 | > |/ |
|
1597 | > |/ | |
1597 | > A |
|
1598 | > A | |
1598 | > EOS |
|
1599 | > EOS | |
1599 | 1 new orphan changesets |
|
1600 | 1 new orphan changesets | |
1600 |
|
1601 | |||
1601 | $ eval `hg tags -T '{tag}={node}\n'` |
|
1602 | $ eval `hg tags -T '{tag}={node}\n'` | |
1602 | $ rm .hg/localtags |
|
1603 | $ rm .hg/localtags | |
1603 |
|
1604 | |||
1604 | $ hg rebase -r $D -d $E |
|
1605 | $ hg rebase -r $D -d $E | |
1605 | rebasing 5:9e62094e4d94 "D" |
|
1606 | rebasing 5:9e62094e4d94 "D" | |
1606 |
|
1607 | |||
1607 | $ hg log -G |
|
1608 | $ hg log -G | |
1608 | o 7:a699d059adcf D |
|
1609 | o 7:a699d059adcf D | |
1609 | |\ |
|
1610 | |\ | |
1610 | | o 6:ecc93090a95c E |
|
1611 | | o 6:ecc93090a95c E | |
1611 | | | |
|
1612 | | | | |
1612 | | o 4:0dc878468a23 B3 |
|
1613 | | o 4:0dc878468a23 B3 | |
1613 | | | |
|
1614 | | | | |
1614 | o | 1:96cc3511f894 C |
|
1615 | o | 1:96cc3511f894 C | |
1615 | / |
|
1616 | / | |
1616 | o 0:426bada5c675 A |
|
1617 | o 0:426bada5c675 A | |
1617 |
|
1618 | |||
1618 | For some reasons (--hidden, rebaseskipobsolete=0, directaccess, etc.), |
|
1619 | For some reasons (--hidden, rebaseskipobsolete=0, directaccess, etc.), | |
1619 | rebasestate may contain hidden hashes. "rebase --abort" should work regardless. |
|
1620 | rebasestate may contain hidden hashes. "rebase --abort" should work regardless. | |
1620 |
|
1621 | |||
1621 | $ hg init $TESTTMP/hidden-state1 |
|
1622 | $ hg init $TESTTMP/hidden-state1 | |
1622 | $ cd $TESTTMP/hidden-state1 |
|
1623 | $ cd $TESTTMP/hidden-state1 | |
1623 | $ cat >> .hg/hgrc <<EOF |
|
1624 | $ cat >> .hg/hgrc <<EOF | |
1624 | > [experimental] |
|
1625 | > [experimental] | |
1625 | > rebaseskipobsolete=0 |
|
1626 | > rebaseskipobsolete=0 | |
1626 | > EOF |
|
1627 | > EOF | |
1627 |
|
1628 | |||
1628 | $ hg debugdrawdag <<'EOS' |
|
1629 | $ hg debugdrawdag <<'EOS' | |
1629 | > C |
|
1630 | > C | |
1630 | > | |
|
1631 | > | | |
1631 | > D B # prune: B, C |
|
1632 | > D B # prune: B, C | |
1632 | > |/ # B/D=B |
|
1633 | > |/ # B/D=B | |
1633 | > A |
|
1634 | > A | |
1634 | > EOS |
|
1635 | > EOS | |
1635 |
|
1636 | |||
1636 | $ eval `hg tags -T '{tag}={node}\n'` |
|
1637 | $ eval `hg tags -T '{tag}={node}\n'` | |
1637 | $ rm .hg/localtags |
|
1638 | $ rm .hg/localtags | |
1638 |
|
1639 | |||
1639 | $ hg update -q $C --hidden |
|
1640 | $ hg update -q $C --hidden | |
1640 | updating to a hidden changeset 7829726be4dc |
|
1641 | updating to a hidden changeset 7829726be4dc | |
1641 | (hidden revision '7829726be4dc' is pruned) |
|
1642 | (hidden revision '7829726be4dc' is pruned) | |
1642 | $ hg rebase -s $B -d $D |
|
1643 | $ hg rebase -s $B -d $D | |
1643 | rebasing 1:2ec65233581b "B" |
|
1644 | rebasing 1:2ec65233581b "B" | |
1644 | merging D |
|
1645 | merging D | |
1645 | warning: conflicts while merging D! (edit, then use 'hg resolve --mark') |
|
1646 | warning: conflicts while merging D! (edit, then use 'hg resolve --mark') | |
1646 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
1647 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
1647 | [1] |
|
1648 | [1] | |
1648 |
|
1649 | |||
1649 | $ cp -R . $TESTTMP/hidden-state2 |
|
1650 | $ cp -R . $TESTTMP/hidden-state2 | |
1650 |
|
1651 | |||
1651 | $ hg log -G |
|
1652 | $ hg log -G | |
1652 | @ 2:b18e25de2cf5 D |
|
1653 | @ 2:b18e25de2cf5 D | |
1653 | | |
|
1654 | | | |
1654 | | @ 1:2ec65233581b B (pruned using prune) |
|
1655 | | @ 1:2ec65233581b B (pruned using prune) | |
1655 | |/ |
|
1656 | |/ | |
1656 | o 0:426bada5c675 A |
|
1657 | o 0:426bada5c675 A | |
1657 |
|
1658 | |||
1658 | $ hg summary |
|
1659 | $ hg summary | |
1659 | parent: 2:b18e25de2cf5 tip |
|
1660 | parent: 2:b18e25de2cf5 tip | |
1660 | D |
|
1661 | D | |
1661 | parent: 1:2ec65233581b (obsolete) |
|
1662 | parent: 1:2ec65233581b (obsolete) | |
1662 | B |
|
1663 | B | |
1663 | branch: default |
|
1664 | branch: default | |
1664 | commit: 2 modified, 1 unknown, 1 unresolved (merge) |
|
1665 | commit: 2 modified, 1 unknown, 1 unresolved (merge) | |
1665 | update: (current) |
|
1666 | update: (current) | |
1666 | phases: 3 draft |
|
1667 | phases: 3 draft | |
1667 | rebase: 0 rebased, 2 remaining (rebase --continue) |
|
1668 | rebase: 0 rebased, 2 remaining (rebase --continue) | |
1668 |
|
1669 | |||
1669 | $ hg rebase --abort |
|
1670 | $ hg rebase --abort | |
1670 | rebase aborted |
|
1671 | rebase aborted | |
1671 |
|
1672 | |||
1672 | Also test --continue for the above case |
|
1673 | Also test --continue for the above case | |
1673 |
|
1674 | |||
1674 | $ cd $TESTTMP/hidden-state2 |
|
1675 | $ cd $TESTTMP/hidden-state2 | |
1675 | $ hg resolve -m |
|
1676 | $ hg resolve -m | |
1676 | (no more unresolved files) |
|
1677 | (no more unresolved files) | |
1677 | continue: hg rebase --continue |
|
1678 | continue: hg rebase --continue | |
1678 | $ hg rebase --continue |
|
1679 | $ hg rebase --continue | |
1679 | rebasing 1:2ec65233581b "B" |
|
1680 | rebasing 1:2ec65233581b "B" | |
1680 | rebasing 3:7829726be4dc "C" (tip) |
|
1681 | rebasing 3:7829726be4dc "C" (tip) | |
1681 | $ hg log -G |
|
1682 | $ hg log -G | |
1682 | @ 5:1964d5d5b547 C |
|
1683 | @ 5:1964d5d5b547 C | |
1683 | | |
|
1684 | | | |
1684 | o 4:68deb90c12a2 B |
|
1685 | o 4:68deb90c12a2 B | |
1685 | | |
|
1686 | | | |
1686 | o 2:b18e25de2cf5 D |
|
1687 | o 2:b18e25de2cf5 D | |
1687 | | |
|
1688 | | | |
1688 | o 0:426bada5c675 A |
|
1689 | o 0:426bada5c675 A | |
1689 |
|
1690 |
General Comments 0
You need to be logged in to leave comments.
Login now