Show More
@@ -1,373 +1,378 b'' | |||||
1 | # repair.py - functions for repository repair for mercurial |
|
1 | # repair.py - functions for repository repair for mercurial | |
2 | # |
|
2 | # | |
3 | # Copyright 2005, 2006 Chris Mason <mason@suse.com> |
|
3 | # Copyright 2005, 2006 Chris Mason <mason@suse.com> | |
4 | # Copyright 2007 Matt Mackall |
|
4 | # Copyright 2007 Matt Mackall | |
5 | # |
|
5 | # | |
6 | # This software may be used and distributed according to the terms of the |
|
6 | # This software may be used and distributed according to the terms of the | |
7 | # GNU General Public License version 2 or any later version. |
|
7 | # GNU General Public License version 2 or any later version. | |
8 |
|
8 | |||
9 | from __future__ import absolute_import |
|
9 | from __future__ import absolute_import | |
10 |
|
10 | |||
11 | import errno |
|
11 | import errno | |
12 | import hashlib |
|
12 | import hashlib | |
13 |
|
13 | |||
14 | from .i18n import _ |
|
14 | from .i18n import _ | |
15 | from .node import short |
|
15 | from .node import short | |
16 | from . import ( |
|
16 | from . import ( | |
17 | bundle2, |
|
17 | bundle2, | |
18 | changegroup, |
|
18 | changegroup, | |
19 | discovery, |
|
19 | discovery, | |
20 | error, |
|
20 | error, | |
21 | exchange, |
|
21 | exchange, | |
22 | obsolete, |
|
22 | obsolete, | |
23 | util, |
|
23 | util, | |
24 | ) |
|
24 | ) | |
25 |
|
25 | |||
26 | def _bundle(repo, bases, heads, node, suffix, compress=True, obsolescence=True): |
|
26 | def _bundle(repo, bases, heads, node, suffix, compress=True, obsolescence=True): | |
27 | """create a bundle with the specified revisions as a backup""" |
|
27 | """create a bundle with the specified revisions as a backup""" | |
28 |
|
28 | |||
29 | backupdir = "strip-backup" |
|
29 | backupdir = "strip-backup" | |
30 | vfs = repo.vfs |
|
30 | vfs = repo.vfs | |
31 | if not vfs.isdir(backupdir): |
|
31 | if not vfs.isdir(backupdir): | |
32 | vfs.mkdir(backupdir) |
|
32 | vfs.mkdir(backupdir) | |
33 |
|
33 | |||
34 | # Include a hash of all the nodes in the filename for uniqueness |
|
34 | # Include a hash of all the nodes in the filename for uniqueness | |
35 | allcommits = repo.set('%ln::%ln', bases, heads) |
|
35 | allcommits = repo.set('%ln::%ln', bases, heads) | |
36 | allhashes = sorted(c.hex() for c in allcommits) |
|
36 | allhashes = sorted(c.hex() for c in allcommits) | |
37 | totalhash = hashlib.sha1(''.join(allhashes)).hexdigest() |
|
37 | totalhash = hashlib.sha1(''.join(allhashes)).hexdigest() | |
38 | name = "%s/%s-%s-%s.hg" % (backupdir, short(node), totalhash[:8], suffix) |
|
38 | name = "%s/%s-%s-%s.hg" % (backupdir, short(node), totalhash[:8], suffix) | |
39 |
|
39 | |||
40 | cgversion = changegroup.safeversion(repo) |
|
40 | cgversion = changegroup.safeversion(repo) | |
41 | comp = None |
|
41 | comp = None | |
42 | if cgversion != '01': |
|
42 | if cgversion != '01': | |
43 | bundletype = "HG20" |
|
43 | bundletype = "HG20" | |
44 | if compress: |
|
44 | if compress: | |
45 | comp = 'BZ' |
|
45 | comp = 'BZ' | |
46 | elif compress: |
|
46 | elif compress: | |
47 | bundletype = "HG10BZ" |
|
47 | bundletype = "HG10BZ" | |
48 | else: |
|
48 | else: | |
49 | bundletype = "HG10UN" |
|
49 | bundletype = "HG10UN" | |
50 |
|
50 | |||
51 | outgoing = discovery.outgoing(repo, missingroots=bases, missingheads=heads) |
|
51 | outgoing = discovery.outgoing(repo, missingroots=bases, missingheads=heads) | |
52 | contentopts = {'cg.version': cgversion, 'obsolescence': obsolescence} |
|
52 | contentopts = { | |
|
53 | 'cg.version': cgversion, | |||
|
54 | 'obsolescence': obsolescence, | |||
|
55 | 'phases': True, | |||
|
56 | } | |||
53 | return bundle2.writenewbundle(repo.ui, repo, 'strip', name, bundletype, |
|
57 | return bundle2.writenewbundle(repo.ui, repo, 'strip', name, bundletype, | |
54 | outgoing, contentopts, vfs, compression=comp) |
|
58 | outgoing, contentopts, vfs, compression=comp) | |
55 |
|
59 | |||
56 | def _collectfiles(repo, striprev): |
|
60 | def _collectfiles(repo, striprev): | |
57 | """find out the filelogs affected by the strip""" |
|
61 | """find out the filelogs affected by the strip""" | |
58 | files = set() |
|
62 | files = set() | |
59 |
|
63 | |||
60 | for x in xrange(striprev, len(repo)): |
|
64 | for x in xrange(striprev, len(repo)): | |
61 | files.update(repo[x].files()) |
|
65 | files.update(repo[x].files()) | |
62 |
|
66 | |||
63 | return sorted(files) |
|
67 | return sorted(files) | |
64 |
|
68 | |||
65 | def _collectbrokencsets(repo, files, striprev): |
|
69 | def _collectbrokencsets(repo, files, striprev): | |
66 | """return the changesets which will be broken by the truncation""" |
|
70 | """return the changesets which will be broken by the truncation""" | |
67 | s = set() |
|
71 | s = set() | |
68 | def collectone(revlog): |
|
72 | def collectone(revlog): | |
69 | _, brokenset = revlog.getstrippoint(striprev) |
|
73 | _, brokenset = revlog.getstrippoint(striprev) | |
70 | s.update([revlog.linkrev(r) for r in brokenset]) |
|
74 | s.update([revlog.linkrev(r) for r in brokenset]) | |
71 |
|
75 | |||
72 | collectone(repo.manifestlog._revlog) |
|
76 | collectone(repo.manifestlog._revlog) | |
73 | for fname in files: |
|
77 | for fname in files: | |
74 | collectone(repo.file(fname)) |
|
78 | collectone(repo.file(fname)) | |
75 |
|
79 | |||
76 | return s |
|
80 | return s | |
77 |
|
81 | |||
78 | def strip(ui, repo, nodelist, backup=True, topic='backup'): |
|
82 | def strip(ui, repo, nodelist, backup=True, topic='backup'): | |
79 | # This function requires the caller to lock the repo, but it operates |
|
83 | # This function requires the caller to lock the repo, but it operates | |
80 | # within a transaction of its own, and thus requires there to be no current |
|
84 | # within a transaction of its own, and thus requires there to be no current | |
81 | # transaction when it is called. |
|
85 | # transaction when it is called. | |
82 | if repo.currenttransaction() is not None: |
|
86 | if repo.currenttransaction() is not None: | |
83 | raise error.ProgrammingError('cannot strip from inside a transaction') |
|
87 | raise error.ProgrammingError('cannot strip from inside a transaction') | |
84 |
|
88 | |||
85 | # Simple way to maintain backwards compatibility for this |
|
89 | # Simple way to maintain backwards compatibility for this | |
86 | # argument. |
|
90 | # argument. | |
87 | if backup in ['none', 'strip']: |
|
91 | if backup in ['none', 'strip']: | |
88 | backup = False |
|
92 | backup = False | |
89 |
|
93 | |||
90 | repo = repo.unfiltered() |
|
94 | repo = repo.unfiltered() | |
91 | repo.destroying() |
|
95 | repo.destroying() | |
92 |
|
96 | |||
93 | cl = repo.changelog |
|
97 | cl = repo.changelog | |
94 | # TODO handle undo of merge sets |
|
98 | # TODO handle undo of merge sets | |
95 | if isinstance(nodelist, str): |
|
99 | if isinstance(nodelist, str): | |
96 | nodelist = [nodelist] |
|
100 | nodelist = [nodelist] | |
97 | striplist = [cl.rev(node) for node in nodelist] |
|
101 | striplist = [cl.rev(node) for node in nodelist] | |
98 | striprev = min(striplist) |
|
102 | striprev = min(striplist) | |
99 |
|
103 | |||
100 | files = _collectfiles(repo, striprev) |
|
104 | files = _collectfiles(repo, striprev) | |
101 | saverevs = _collectbrokencsets(repo, files, striprev) |
|
105 | saverevs = _collectbrokencsets(repo, files, striprev) | |
102 |
|
106 | |||
103 | # Some revisions with rev > striprev may not be descendants of striprev. |
|
107 | # Some revisions with rev > striprev may not be descendants of striprev. | |
104 | # We have to find these revisions and put them in a bundle, so that |
|
108 | # We have to find these revisions and put them in a bundle, so that | |
105 | # we can restore them after the truncations. |
|
109 | # we can restore them after the truncations. | |
106 | # To create the bundle we use repo.changegroupsubset which requires |
|
110 | # To create the bundle we use repo.changegroupsubset which requires | |
107 | # the list of heads and bases of the set of interesting revisions. |
|
111 | # the list of heads and bases of the set of interesting revisions. | |
108 | # (head = revision in the set that has no descendant in the set; |
|
112 | # (head = revision in the set that has no descendant in the set; | |
109 | # base = revision in the set that has no ancestor in the set) |
|
113 | # base = revision in the set that has no ancestor in the set) | |
110 | tostrip = set(striplist) |
|
114 | tostrip = set(striplist) | |
111 | saveheads = set(saverevs) |
|
115 | saveheads = set(saverevs) | |
112 | for r in cl.revs(start=striprev + 1): |
|
116 | for r in cl.revs(start=striprev + 1): | |
113 | if any(p in tostrip for p in cl.parentrevs(r)): |
|
117 | if any(p in tostrip for p in cl.parentrevs(r)): | |
114 | tostrip.add(r) |
|
118 | tostrip.add(r) | |
115 |
|
119 | |||
116 | if r not in tostrip: |
|
120 | if r not in tostrip: | |
117 | saverevs.add(r) |
|
121 | saverevs.add(r) | |
118 | saveheads.difference_update(cl.parentrevs(r)) |
|
122 | saveheads.difference_update(cl.parentrevs(r)) | |
119 | saveheads.add(r) |
|
123 | saveheads.add(r) | |
120 | saveheads = [cl.node(r) for r in saveheads] |
|
124 | saveheads = [cl.node(r) for r in saveheads] | |
121 |
|
125 | |||
122 | # compute base nodes |
|
126 | # compute base nodes | |
123 | if saverevs: |
|
127 | if saverevs: | |
124 | descendants = set(cl.descendants(saverevs)) |
|
128 | descendants = set(cl.descendants(saverevs)) | |
125 | saverevs.difference_update(descendants) |
|
129 | saverevs.difference_update(descendants) | |
126 | savebases = [cl.node(r) for r in saverevs] |
|
130 | savebases = [cl.node(r) for r in saverevs] | |
127 | stripbases = [cl.node(r) for r in tostrip] |
|
131 | stripbases = [cl.node(r) for r in tostrip] | |
128 |
|
132 | |||
129 | stripobsidx = obsmarkers = () |
|
133 | stripobsidx = obsmarkers = () | |
130 | if repo.ui.configbool('devel', 'strip-obsmarkers', True): |
|
134 | if repo.ui.configbool('devel', 'strip-obsmarkers', True): | |
131 | obsmarkers = obsolete.exclusivemarkers(repo, stripbases) |
|
135 | obsmarkers = obsolete.exclusivemarkers(repo, stripbases) | |
132 | if obsmarkers: |
|
136 | if obsmarkers: | |
133 | stripobsidx = [i for i, m in enumerate(repo.obsstore) |
|
137 | stripobsidx = [i for i, m in enumerate(repo.obsstore) | |
134 | if m in obsmarkers] |
|
138 | if m in obsmarkers] | |
135 |
|
139 | |||
136 | # For a set s, max(parents(s) - s) is the same as max(heads(::s - s)), but |
|
140 | # For a set s, max(parents(s) - s) is the same as max(heads(::s - s)), but | |
137 | # is much faster |
|
141 | # is much faster | |
138 | newbmtarget = repo.revs('max(parents(%ld) - (%ld))', tostrip, tostrip) |
|
142 | newbmtarget = repo.revs('max(parents(%ld) - (%ld))', tostrip, tostrip) | |
139 | if newbmtarget: |
|
143 | if newbmtarget: | |
140 | newbmtarget = repo[newbmtarget.first()].node() |
|
144 | newbmtarget = repo[newbmtarget.first()].node() | |
141 | else: |
|
145 | else: | |
142 | newbmtarget = '.' |
|
146 | newbmtarget = '.' | |
143 |
|
147 | |||
144 | bm = repo._bookmarks |
|
148 | bm = repo._bookmarks | |
145 | updatebm = [] |
|
149 | updatebm = [] | |
146 | for m in bm: |
|
150 | for m in bm: | |
147 | rev = repo[bm[m]].rev() |
|
151 | rev = repo[bm[m]].rev() | |
148 | if rev in tostrip: |
|
152 | if rev in tostrip: | |
149 | updatebm.append(m) |
|
153 | updatebm.append(m) | |
150 |
|
154 | |||
151 | # create a changegroup for all the branches we need to keep |
|
155 | # create a changegroup for all the branches we need to keep | |
152 | backupfile = None |
|
156 | backupfile = None | |
153 | vfs = repo.vfs |
|
157 | vfs = repo.vfs | |
154 | node = nodelist[-1] |
|
158 | node = nodelist[-1] | |
155 | if backup: |
|
159 | if backup: | |
156 | backupfile = _bundle(repo, stripbases, cl.heads(), node, topic) |
|
160 | backupfile = _bundle(repo, stripbases, cl.heads(), node, topic) | |
157 | repo.ui.status(_("saved backup bundle to %s\n") % |
|
161 | repo.ui.status(_("saved backup bundle to %s\n") % | |
158 | vfs.join(backupfile)) |
|
162 | vfs.join(backupfile)) | |
159 | repo.ui.log("backupbundle", "saved backup bundle to %s\n", |
|
163 | repo.ui.log("backupbundle", "saved backup bundle to %s\n", | |
160 | vfs.join(backupfile)) |
|
164 | vfs.join(backupfile)) | |
161 | tmpbundlefile = None |
|
165 | tmpbundlefile = None | |
162 | if saveheads: |
|
166 | if saveheads: | |
163 | # do not compress temporary bundle if we remove it from disk later |
|
167 | # do not compress temporary bundle if we remove it from disk later | |
164 | # |
|
168 | # | |
165 | # We do not include obsolescence, it might re-introduce prune markers |
|
169 | # We do not include obsolescence, it might re-introduce prune markers | |
166 | # we are trying to strip. This is harmless since the stripped markers |
|
170 | # we are trying to strip. This is harmless since the stripped markers | |
167 | # are already backed up and we did not touched the markers for the |
|
171 | # are already backed up and we did not touched the markers for the | |
168 | # saved changesets. |
|
172 | # saved changesets. | |
169 | tmpbundlefile = _bundle(repo, savebases, saveheads, node, 'temp', |
|
173 | tmpbundlefile = _bundle(repo, savebases, saveheads, node, 'temp', | |
170 | compress=False, obsolescence=False) |
|
174 | compress=False, obsolescence=False) | |
171 |
|
175 | |||
172 | mfst = repo.manifestlog._revlog |
|
176 | mfst = repo.manifestlog._revlog | |
173 |
|
177 | |||
174 | try: |
|
178 | try: | |
175 | with repo.transaction("strip") as tr: |
|
179 | with repo.transaction("strip") as tr: | |
176 | offset = len(tr.entries) |
|
180 | offset = len(tr.entries) | |
177 |
|
181 | |||
178 | tr.startgroup() |
|
182 | tr.startgroup() | |
179 | cl.strip(striprev, tr) |
|
183 | cl.strip(striprev, tr) | |
180 | mfst.strip(striprev, tr) |
|
184 | mfst.strip(striprev, tr) | |
181 | striptrees(repo, tr, striprev, files) |
|
185 | striptrees(repo, tr, striprev, files) | |
182 |
|
186 | |||
183 | for fn in files: |
|
187 | for fn in files: | |
184 | repo.file(fn).strip(striprev, tr) |
|
188 | repo.file(fn).strip(striprev, tr) | |
185 | tr.endgroup() |
|
189 | tr.endgroup() | |
186 |
|
190 | |||
187 | for i in xrange(offset, len(tr.entries)): |
|
191 | for i in xrange(offset, len(tr.entries)): | |
188 | file, troffset, ignore = tr.entries[i] |
|
192 | file, troffset, ignore = tr.entries[i] | |
189 | with repo.svfs(file, 'a', checkambig=True) as fp: |
|
193 | with repo.svfs(file, 'a', checkambig=True) as fp: | |
190 | fp.truncate(troffset) |
|
194 | fp.truncate(troffset) | |
191 | if troffset == 0: |
|
195 | if troffset == 0: | |
192 | repo.store.markremoved(file) |
|
196 | repo.store.markremoved(file) | |
193 |
|
197 | |||
194 | deleteobsmarkers(repo.obsstore, stripobsidx) |
|
198 | deleteobsmarkers(repo.obsstore, stripobsidx) | |
195 | del repo.obsstore |
|
199 | del repo.obsstore | |
196 |
|
200 | |||
|
201 | repo._phasecache.filterunknown(repo) | |||
197 | if tmpbundlefile: |
|
202 | if tmpbundlefile: | |
198 | ui.note(_("adding branch\n")) |
|
203 | ui.note(_("adding branch\n")) | |
199 | f = vfs.open(tmpbundlefile, "rb") |
|
204 | f = vfs.open(tmpbundlefile, "rb") | |
200 | gen = exchange.readbundle(ui, f, tmpbundlefile, vfs) |
|
205 | gen = exchange.readbundle(ui, f, tmpbundlefile, vfs) | |
201 | if not repo.ui.verbose: |
|
206 | if not repo.ui.verbose: | |
202 | # silence internal shuffling chatter |
|
207 | # silence internal shuffling chatter | |
203 | repo.ui.pushbuffer() |
|
208 | repo.ui.pushbuffer() | |
204 | tmpbundleurl = 'bundle:' + vfs.join(tmpbundlefile) |
|
209 | tmpbundleurl = 'bundle:' + vfs.join(tmpbundlefile) | |
205 | if isinstance(gen, bundle2.unbundle20): |
|
210 | if isinstance(gen, bundle2.unbundle20): | |
206 | with repo.transaction('strip') as tr: |
|
211 | with repo.transaction('strip') as tr: | |
207 | bundle2.applybundle(repo, gen, tr, source='strip', |
|
212 | bundle2.applybundle(repo, gen, tr, source='strip', | |
208 | url=tmpbundleurl) |
|
213 | url=tmpbundleurl) | |
209 | else: |
|
214 | else: | |
210 | txnname = "strip\n%s" % util.hidepassword(tmpbundleurl) |
|
215 | txnname = "strip\n%s" % util.hidepassword(tmpbundleurl) | |
211 | with repo.transaction(txnname) as tr: |
|
216 | with repo.transaction(txnname) as tr: | |
212 | gen.apply(repo, tr, 'strip', tmpbundleurl, True) |
|
217 | gen.apply(repo, tr, 'strip', tmpbundleurl, True) | |
213 | if not repo.ui.verbose: |
|
218 | if not repo.ui.verbose: | |
214 | repo.ui.popbuffer() |
|
219 | repo.ui.popbuffer() | |
215 | f.close() |
|
220 | f.close() | |
216 | repo._phasecache.invalidate() |
|
221 | repo._phasecache.invalidate() | |
217 |
|
222 | |||
218 | for m in updatebm: |
|
223 | for m in updatebm: | |
219 | bm[m] = repo[newbmtarget].node() |
|
224 | bm[m] = repo[newbmtarget].node() | |
220 |
|
225 | |||
221 | with repo.transaction('repair') as tr: |
|
226 | with repo.transaction('repair') as tr: | |
222 | bm.recordchange(tr) |
|
227 | bm.recordchange(tr) | |
223 |
|
228 | |||
224 | # remove undo files |
|
229 | # remove undo files | |
225 | for undovfs, undofile in repo.undofiles(): |
|
230 | for undovfs, undofile in repo.undofiles(): | |
226 | try: |
|
231 | try: | |
227 | undovfs.unlink(undofile) |
|
232 | undovfs.unlink(undofile) | |
228 | except OSError as e: |
|
233 | except OSError as e: | |
229 | if e.errno != errno.ENOENT: |
|
234 | if e.errno != errno.ENOENT: | |
230 | ui.warn(_('error removing %s: %s\n') % |
|
235 | ui.warn(_('error removing %s: %s\n') % | |
231 | (undovfs.join(undofile), str(e))) |
|
236 | (undovfs.join(undofile), str(e))) | |
232 |
|
237 | |||
233 | except: # re-raises |
|
238 | except: # re-raises | |
234 | if backupfile: |
|
239 | if backupfile: | |
235 | ui.warn(_("strip failed, backup bundle stored in '%s'\n") |
|
240 | ui.warn(_("strip failed, backup bundle stored in '%s'\n") | |
236 | % vfs.join(backupfile)) |
|
241 | % vfs.join(backupfile)) | |
237 | if tmpbundlefile: |
|
242 | if tmpbundlefile: | |
238 | ui.warn(_("strip failed, unrecovered changes stored in '%s'\n") |
|
243 | ui.warn(_("strip failed, unrecovered changes stored in '%s'\n") | |
239 | % vfs.join(tmpbundlefile)) |
|
244 | % vfs.join(tmpbundlefile)) | |
240 | ui.warn(_("(fix the problem, then recover the changesets with " |
|
245 | ui.warn(_("(fix the problem, then recover the changesets with " | |
241 | "\"hg unbundle '%s'\")\n") % vfs.join(tmpbundlefile)) |
|
246 | "\"hg unbundle '%s'\")\n") % vfs.join(tmpbundlefile)) | |
242 | raise |
|
247 | raise | |
243 | else: |
|
248 | else: | |
244 | if tmpbundlefile: |
|
249 | if tmpbundlefile: | |
245 | # Remove temporary bundle only if there were no exceptions |
|
250 | # Remove temporary bundle only if there were no exceptions | |
246 | vfs.unlink(tmpbundlefile) |
|
251 | vfs.unlink(tmpbundlefile) | |
247 |
|
252 | |||
248 | repo.destroyed() |
|
253 | repo.destroyed() | |
249 | # return the backup file path (or None if 'backup' was False) so |
|
254 | # return the backup file path (or None if 'backup' was False) so | |
250 | # extensions can use it |
|
255 | # extensions can use it | |
251 | return backupfile |
|
256 | return backupfile | |
252 |
|
257 | |||
253 | def striptrees(repo, tr, striprev, files): |
|
258 | def striptrees(repo, tr, striprev, files): | |
254 | if 'treemanifest' in repo.requirements: # safe but unnecessary |
|
259 | if 'treemanifest' in repo.requirements: # safe but unnecessary | |
255 | # otherwise |
|
260 | # otherwise | |
256 | for unencoded, encoded, size in repo.store.datafiles(): |
|
261 | for unencoded, encoded, size in repo.store.datafiles(): | |
257 | if (unencoded.startswith('meta/') and |
|
262 | if (unencoded.startswith('meta/') and | |
258 | unencoded.endswith('00manifest.i')): |
|
263 | unencoded.endswith('00manifest.i')): | |
259 | dir = unencoded[5:-12] |
|
264 | dir = unencoded[5:-12] | |
260 | repo.manifestlog._revlog.dirlog(dir).strip(striprev, tr) |
|
265 | repo.manifestlog._revlog.dirlog(dir).strip(striprev, tr) | |
261 |
|
266 | |||
262 | def rebuildfncache(ui, repo): |
|
267 | def rebuildfncache(ui, repo): | |
263 | """Rebuilds the fncache file from repo history. |
|
268 | """Rebuilds the fncache file from repo history. | |
264 |
|
269 | |||
265 | Missing entries will be added. Extra entries will be removed. |
|
270 | Missing entries will be added. Extra entries will be removed. | |
266 | """ |
|
271 | """ | |
267 | repo = repo.unfiltered() |
|
272 | repo = repo.unfiltered() | |
268 |
|
273 | |||
269 | if 'fncache' not in repo.requirements: |
|
274 | if 'fncache' not in repo.requirements: | |
270 | ui.warn(_('(not rebuilding fncache because repository does not ' |
|
275 | ui.warn(_('(not rebuilding fncache because repository does not ' | |
271 | 'support fncache)\n')) |
|
276 | 'support fncache)\n')) | |
272 | return |
|
277 | return | |
273 |
|
278 | |||
274 | with repo.lock(): |
|
279 | with repo.lock(): | |
275 | fnc = repo.store.fncache |
|
280 | fnc = repo.store.fncache | |
276 | # Trigger load of fncache. |
|
281 | # Trigger load of fncache. | |
277 | if 'irrelevant' in fnc: |
|
282 | if 'irrelevant' in fnc: | |
278 | pass |
|
283 | pass | |
279 |
|
284 | |||
280 | oldentries = set(fnc.entries) |
|
285 | oldentries = set(fnc.entries) | |
281 | newentries = set() |
|
286 | newentries = set() | |
282 | seenfiles = set() |
|
287 | seenfiles = set() | |
283 |
|
288 | |||
284 | repolen = len(repo) |
|
289 | repolen = len(repo) | |
285 | for rev in repo: |
|
290 | for rev in repo: | |
286 | ui.progress(_('rebuilding'), rev, total=repolen, |
|
291 | ui.progress(_('rebuilding'), rev, total=repolen, | |
287 | unit=_('changesets')) |
|
292 | unit=_('changesets')) | |
288 |
|
293 | |||
289 | ctx = repo[rev] |
|
294 | ctx = repo[rev] | |
290 | for f in ctx.files(): |
|
295 | for f in ctx.files(): | |
291 | # This is to minimize I/O. |
|
296 | # This is to minimize I/O. | |
292 | if f in seenfiles: |
|
297 | if f in seenfiles: | |
293 | continue |
|
298 | continue | |
294 | seenfiles.add(f) |
|
299 | seenfiles.add(f) | |
295 |
|
300 | |||
296 | i = 'data/%s.i' % f |
|
301 | i = 'data/%s.i' % f | |
297 | d = 'data/%s.d' % f |
|
302 | d = 'data/%s.d' % f | |
298 |
|
303 | |||
299 | if repo.store._exists(i): |
|
304 | if repo.store._exists(i): | |
300 | newentries.add(i) |
|
305 | newentries.add(i) | |
301 | if repo.store._exists(d): |
|
306 | if repo.store._exists(d): | |
302 | newentries.add(d) |
|
307 | newentries.add(d) | |
303 |
|
308 | |||
304 | ui.progress(_('rebuilding'), None) |
|
309 | ui.progress(_('rebuilding'), None) | |
305 |
|
310 | |||
306 | if 'treemanifest' in repo.requirements: # safe but unnecessary otherwise |
|
311 | if 'treemanifest' in repo.requirements: # safe but unnecessary otherwise | |
307 | for dir in util.dirs(seenfiles): |
|
312 | for dir in util.dirs(seenfiles): | |
308 | i = 'meta/%s/00manifest.i' % dir |
|
313 | i = 'meta/%s/00manifest.i' % dir | |
309 | d = 'meta/%s/00manifest.d' % dir |
|
314 | d = 'meta/%s/00manifest.d' % dir | |
310 |
|
315 | |||
311 | if repo.store._exists(i): |
|
316 | if repo.store._exists(i): | |
312 | newentries.add(i) |
|
317 | newentries.add(i) | |
313 | if repo.store._exists(d): |
|
318 | if repo.store._exists(d): | |
314 | newentries.add(d) |
|
319 | newentries.add(d) | |
315 |
|
320 | |||
316 | addcount = len(newentries - oldentries) |
|
321 | addcount = len(newentries - oldentries) | |
317 | removecount = len(oldentries - newentries) |
|
322 | removecount = len(oldentries - newentries) | |
318 | for p in sorted(oldentries - newentries): |
|
323 | for p in sorted(oldentries - newentries): | |
319 | ui.write(_('removing %s\n') % p) |
|
324 | ui.write(_('removing %s\n') % p) | |
320 | for p in sorted(newentries - oldentries): |
|
325 | for p in sorted(newentries - oldentries): | |
321 | ui.write(_('adding %s\n') % p) |
|
326 | ui.write(_('adding %s\n') % p) | |
322 |
|
327 | |||
323 | if addcount or removecount: |
|
328 | if addcount or removecount: | |
324 | ui.write(_('%d items added, %d removed from fncache\n') % |
|
329 | ui.write(_('%d items added, %d removed from fncache\n') % | |
325 | (addcount, removecount)) |
|
330 | (addcount, removecount)) | |
326 | fnc.entries = newentries |
|
331 | fnc.entries = newentries | |
327 | fnc._dirty = True |
|
332 | fnc._dirty = True | |
328 |
|
333 | |||
329 | with repo.transaction('fncache') as tr: |
|
334 | with repo.transaction('fncache') as tr: | |
330 | fnc.write(tr) |
|
335 | fnc.write(tr) | |
331 | else: |
|
336 | else: | |
332 | ui.write(_('fncache already up to date\n')) |
|
337 | ui.write(_('fncache already up to date\n')) | |
333 |
|
338 | |||
334 | def stripbmrevset(repo, mark): |
|
339 | def stripbmrevset(repo, mark): | |
335 | """ |
|
340 | """ | |
336 | The revset to strip when strip is called with -B mark |
|
341 | The revset to strip when strip is called with -B mark | |
337 |
|
342 | |||
338 | Needs to live here so extensions can use it and wrap it even when strip is |
|
343 | Needs to live here so extensions can use it and wrap it even when strip is | |
339 | not enabled or not present on a box. |
|
344 | not enabled or not present on a box. | |
340 | """ |
|
345 | """ | |
341 | return repo.revs("ancestors(bookmark(%s)) - " |
|
346 | return repo.revs("ancestors(bookmark(%s)) - " | |
342 | "ancestors(head() and not bookmark(%s)) - " |
|
347 | "ancestors(head() and not bookmark(%s)) - " | |
343 | "ancestors(bookmark() and not bookmark(%s))", |
|
348 | "ancestors(bookmark() and not bookmark(%s))", | |
344 | mark, mark, mark) |
|
349 | mark, mark, mark) | |
345 |
|
350 | |||
346 | def deleteobsmarkers(obsstore, indices): |
|
351 | def deleteobsmarkers(obsstore, indices): | |
347 | """Delete some obsmarkers from obsstore and return how many were deleted |
|
352 | """Delete some obsmarkers from obsstore and return how many were deleted | |
348 |
|
353 | |||
349 | 'indices' is a list of ints which are the indices |
|
354 | 'indices' is a list of ints which are the indices | |
350 | of the markers to be deleted. |
|
355 | of the markers to be deleted. | |
351 |
|
356 | |||
352 | Every invocation of this function completely rewrites the obsstore file, |
|
357 | Every invocation of this function completely rewrites the obsstore file, | |
353 | skipping the markers we want to be removed. The new temporary file is |
|
358 | skipping the markers we want to be removed. The new temporary file is | |
354 | created, remaining markers are written there and on .close() this file |
|
359 | created, remaining markers are written there and on .close() this file | |
355 | gets atomically renamed to obsstore, thus guaranteeing consistency.""" |
|
360 | gets atomically renamed to obsstore, thus guaranteeing consistency.""" | |
356 | if not indices: |
|
361 | if not indices: | |
357 | # we don't want to rewrite the obsstore with the same content |
|
362 | # we don't want to rewrite the obsstore with the same content | |
358 | return |
|
363 | return | |
359 |
|
364 | |||
360 | left = [] |
|
365 | left = [] | |
361 | current = obsstore._all |
|
366 | current = obsstore._all | |
362 | n = 0 |
|
367 | n = 0 | |
363 | for i, m in enumerate(current): |
|
368 | for i, m in enumerate(current): | |
364 | if i in indices: |
|
369 | if i in indices: | |
365 | n += 1 |
|
370 | n += 1 | |
366 | continue |
|
371 | continue | |
367 | left.append(m) |
|
372 | left.append(m) | |
368 |
|
373 | |||
369 | newobsstorefile = obsstore.svfs('obsstore', 'w', atomictemp=True) |
|
374 | newobsstorefile = obsstore.svfs('obsstore', 'w', atomictemp=True) | |
370 | for bytes in obsolete.encodemarkers(left, True, obsstore._version): |
|
375 | for bytes in obsolete.encodemarkers(left, True, obsstore._version): | |
371 | newobsstorefile.write(bytes) |
|
376 | newobsstorefile.write(bytes) | |
372 | newobsstorefile.close() |
|
377 | newobsstorefile.close() | |
373 | return n |
|
378 | return n |
@@ -1,259 +1,285 b'' | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [experimental] |
|
2 | > [experimental] | |
3 | > bundle-phases=yes |
|
3 | > bundle-phases=yes | |
4 | > [extensions] |
|
4 | > [extensions] | |
5 | > strip= |
|
5 | > strip= | |
6 | > drawdag=$TESTDIR/drawdag.py |
|
6 | > drawdag=$TESTDIR/drawdag.py | |
7 | > EOF |
|
7 | > EOF | |
8 |
|
8 | |||
9 | Set up repo with linear history |
|
9 | Set up repo with linear history | |
10 | $ hg init linear |
|
10 | $ hg init linear | |
11 | $ cd linear |
|
11 | $ cd linear | |
12 | $ hg debugdrawdag <<'EOF' |
|
12 | $ hg debugdrawdag <<'EOF' | |
13 | > E |
|
13 | > E | |
14 | > | |
|
14 | > | | |
15 | > D |
|
15 | > D | |
16 | > | |
|
16 | > | | |
17 | > C |
|
17 | > C | |
18 | > | |
|
18 | > | | |
19 | > B |
|
19 | > B | |
20 | > | |
|
20 | > | | |
21 | > A |
|
21 | > A | |
22 | > EOF |
|
22 | > EOF | |
23 | $ hg phase --public A |
|
23 | $ hg phase --public A | |
24 | $ hg phase --force --secret D |
|
24 | $ hg phase --force --secret D | |
25 | $ hg log -G -T '{desc} {phase}\n' |
|
25 | $ hg log -G -T '{desc} {phase}\n' | |
26 | o E secret |
|
26 | o E secret | |
27 | | |
|
27 | | | |
28 | o D secret |
|
28 | o D secret | |
29 | | |
|
29 | | | |
30 | o C draft |
|
30 | o C draft | |
31 | | |
|
31 | | | |
32 | o B draft |
|
32 | o B draft | |
33 | | |
|
33 | | | |
34 | o A public |
|
34 | o A public | |
35 |
|
35 | |||
36 | Phases are restored when unbundling |
|
36 | Phases are restored when unbundling | |
37 | $ hg bundle --base B -r E bundle |
|
37 | $ hg bundle --base B -r E bundle | |
38 | 3 changesets found |
|
38 | 3 changesets found | |
39 | $ hg debugbundle bundle |
|
39 | $ hg debugbundle bundle | |
40 | Stream params: sortdict([('Compression', 'BZ')]) |
|
40 | Stream params: sortdict([('Compression', 'BZ')]) | |
41 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '3')])" |
|
41 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '3')])" | |
42 | 26805aba1e600a82e93661149f2313866a221a7b |
|
42 | 26805aba1e600a82e93661149f2313866a221a7b | |
43 | f585351a92f85104bff7c284233c338b10eb1df7 |
|
43 | f585351a92f85104bff7c284233c338b10eb1df7 | |
44 | 9bc730a19041f9ec7cb33c626e811aa233efb18c |
|
44 | 9bc730a19041f9ec7cb33c626e811aa233efb18c | |
45 | phase-heads -- 'sortdict()' |
|
45 | phase-heads -- 'sortdict()' | |
46 | 26805aba1e600a82e93661149f2313866a221a7b draft |
|
46 | 26805aba1e600a82e93661149f2313866a221a7b draft | |
47 | $ hg strip --no-backup C |
|
47 | $ hg strip --no-backup C | |
48 | $ hg unbundle -q bundle |
|
48 | $ hg unbundle -q bundle | |
49 | $ rm bundle |
|
49 | $ rm bundle | |
50 | $ hg log -G -T '{desc} {phase}\n' |
|
50 | $ hg log -G -T '{desc} {phase}\n' | |
51 | o E secret |
|
51 | o E secret | |
52 | | |
|
52 | | | |
53 | o D secret |
|
53 | o D secret | |
54 | | |
|
54 | | | |
55 | o C draft |
|
55 | o C draft | |
56 | | |
|
56 | | | |
57 | o B draft |
|
57 | o B draft | |
58 | | |
|
58 | | | |
59 | o A public |
|
59 | o A public | |
60 |
|
60 | |||
61 | Root revision's phase is preserved |
|
61 | Root revision's phase is preserved | |
62 | $ hg bundle -a bundle |
|
62 | $ hg bundle -a bundle | |
63 | 5 changesets found |
|
63 | 5 changesets found | |
64 | $ hg strip --no-backup A |
|
64 | $ hg strip --no-backup A | |
65 | $ hg unbundle -q bundle |
|
65 | $ hg unbundle -q bundle | |
66 | $ rm bundle |
|
66 | $ rm bundle | |
67 | $ hg log -G -T '{desc} {phase}\n' |
|
67 | $ hg log -G -T '{desc} {phase}\n' | |
68 | o E secret |
|
68 | o E secret | |
69 | | |
|
69 | | | |
70 | o D secret |
|
70 | o D secret | |
71 | | |
|
71 | | | |
72 | o C draft |
|
72 | o C draft | |
73 | | |
|
73 | | | |
74 | o B draft |
|
74 | o B draft | |
75 | | |
|
75 | | | |
76 | o A public |
|
76 | o A public | |
77 |
|
77 | |||
78 | Completely public history can be restored |
|
78 | Completely public history can be restored | |
79 | $ hg phase --public E |
|
79 | $ hg phase --public E | |
80 | $ hg bundle -a bundle |
|
80 | $ hg bundle -a bundle | |
81 | 5 changesets found |
|
81 | 5 changesets found | |
82 | $ hg strip --no-backup A |
|
82 | $ hg strip --no-backup A | |
83 | $ hg unbundle -q bundle |
|
83 | $ hg unbundle -q bundle | |
84 | $ rm bundle |
|
84 | $ rm bundle | |
85 | $ hg log -G -T '{desc} {phase}\n' |
|
85 | $ hg log -G -T '{desc} {phase}\n' | |
86 | o E public |
|
86 | o E public | |
87 | | |
|
87 | | | |
88 | o D public |
|
88 | o D public | |
89 | | |
|
89 | | | |
90 | o C public |
|
90 | o C public | |
91 | | |
|
91 | | | |
92 | o B public |
|
92 | o B public | |
93 | | |
|
93 | | | |
94 | o A public |
|
94 | o A public | |
95 |
|
95 | |||
96 | Direct transition from public to secret can be restored |
|
96 | Direct transition from public to secret can be restored | |
97 | $ hg phase --secret --force D |
|
97 | $ hg phase --secret --force D | |
98 | $ hg bundle -a bundle |
|
98 | $ hg bundle -a bundle | |
99 | 5 changesets found |
|
99 | 5 changesets found | |
100 | $ hg strip --no-backup A |
|
100 | $ hg strip --no-backup A | |
101 | $ hg unbundle -q bundle |
|
101 | $ hg unbundle -q bundle | |
102 | $ rm bundle |
|
102 | $ rm bundle | |
103 | $ hg log -G -T '{desc} {phase}\n' |
|
103 | $ hg log -G -T '{desc} {phase}\n' | |
104 | o E secret |
|
104 | o E secret | |
105 | | |
|
105 | | | |
106 | o D secret |
|
106 | o D secret | |
107 | | |
|
107 | | | |
108 | o C public |
|
108 | o C public | |
109 | | |
|
109 | | | |
110 | o B public |
|
110 | o B public | |
111 | | |
|
111 | | | |
112 | o A public |
|
112 | o A public | |
113 |
|
113 | |||
114 | Revisions within bundle preserve their phase even if parent changes its phase |
|
114 | Revisions within bundle preserve their phase even if parent changes its phase | |
115 | $ hg phase --draft --force B |
|
115 | $ hg phase --draft --force B | |
116 | $ hg bundle --base B -r E bundle |
|
116 | $ hg bundle --base B -r E bundle | |
117 | 3 changesets found |
|
117 | 3 changesets found | |
118 | $ hg strip --no-backup C |
|
118 | $ hg strip --no-backup C | |
119 | $ hg phase --public B |
|
119 | $ hg phase --public B | |
120 | $ hg unbundle -q bundle |
|
120 | $ hg unbundle -q bundle | |
121 | $ rm bundle |
|
121 | $ rm bundle | |
122 | $ hg log -G -T '{desc} {phase}\n' |
|
122 | $ hg log -G -T '{desc} {phase}\n' | |
123 | o E secret |
|
123 | o E secret | |
124 | | |
|
124 | | | |
125 | o D secret |
|
125 | o D secret | |
126 | | |
|
126 | | | |
127 | o C draft |
|
127 | o C draft | |
128 | | |
|
128 | | | |
129 | o B public |
|
129 | o B public | |
130 | | |
|
130 | | | |
131 | o A public |
|
131 | o A public | |
132 |
|
132 | |||
133 | Phase of ancestors of stripped node get advanced to accommodate child |
|
133 | Phase of ancestors of stripped node get advanced to accommodate child | |
134 | $ hg bundle --base B -r E bundle |
|
134 | $ hg bundle --base B -r E bundle | |
135 | 3 changesets found |
|
135 | 3 changesets found | |
136 | $ hg strip --no-backup C |
|
136 | $ hg strip --no-backup C | |
137 | $ hg phase --force --secret B |
|
137 | $ hg phase --force --secret B | |
138 | $ hg unbundle -q bundle |
|
138 | $ hg unbundle -q bundle | |
139 | $ rm bundle |
|
139 | $ rm bundle | |
140 | $ hg log -G -T '{desc} {phase}\n' |
|
140 | $ hg log -G -T '{desc} {phase}\n' | |
141 | o E secret |
|
141 | o E secret | |
142 | | |
|
142 | | | |
143 | o D secret |
|
143 | o D secret | |
144 | | |
|
144 | | | |
145 | o C draft |
|
145 | o C draft | |
146 | | |
|
146 | | | |
147 | o B draft |
|
147 | o B draft | |
148 | | |
|
148 | | | |
149 | o A public |
|
149 | o A public | |
150 |
|
150 | |||
151 | Unbundling advances phases of changesets even if they were already in the repo. |
|
151 | Unbundling advances phases of changesets even if they were already in the repo. | |
152 | To test that, create a bundle of everything in draft phase and then unbundle |
|
152 | To test that, create a bundle of everything in draft phase and then unbundle | |
153 | to see that secret becomes draft, but public remains public. |
|
153 | to see that secret becomes draft, but public remains public. | |
154 | $ hg phase --draft --force A |
|
154 | $ hg phase --draft --force A | |
155 | $ hg phase --draft E |
|
155 | $ hg phase --draft E | |
156 | $ hg bundle -a bundle |
|
156 | $ hg bundle -a bundle | |
157 | 5 changesets found |
|
157 | 5 changesets found | |
158 | $ hg phase --public A |
|
158 | $ hg phase --public A | |
159 | $ hg phase --secret --force E |
|
159 | $ hg phase --secret --force E | |
160 | $ hg unbundle -q bundle |
|
160 | $ hg unbundle -q bundle | |
161 | $ rm bundle |
|
161 | $ rm bundle | |
162 | $ hg log -G -T '{desc} {phase}\n' |
|
162 | $ hg log -G -T '{desc} {phase}\n' | |
163 | o E draft |
|
163 | o E draft | |
164 | | |
|
164 | | | |
165 | o D draft |
|
165 | o D draft | |
166 | | |
|
166 | | | |
167 | o C draft |
|
167 | o C draft | |
168 | | |
|
168 | | | |
169 | o B draft |
|
169 | o B draft | |
170 | | |
|
170 | | | |
171 | o A public |
|
171 | o A public | |
172 |
|
172 | |||
|
173 | Unbundling change in the middle of a stack does not affect later changes | |||
|
174 | $ hg strip --no-backup E | |||
|
175 | $ hg phase --secret --force D | |||
|
176 | $ hg log -G -T '{desc} {phase}\n' | |||
|
177 | o D secret | |||
|
178 | | | |||
|
179 | o C draft | |||
|
180 | | | |||
|
181 | o B draft | |||
|
182 | | | |||
|
183 | o A public | |||
|
184 | ||||
|
185 | $ hg bundle --base A -r B bundle | |||
|
186 | 1 changesets found | |||
|
187 | $ hg unbundle -q bundle | |||
|
188 | $ rm bundle | |||
|
189 | $ hg log -G -T '{desc} {phase}\n' | |||
|
190 | o D secret | |||
|
191 | | | |||
|
192 | o C draft | |||
|
193 | | | |||
|
194 | o B draft | |||
|
195 | | | |||
|
196 | o A public | |||
|
197 | ||||
|
198 | ||||
173 | $ cd .. |
|
199 | $ cd .. | |
174 |
|
200 | |||
175 | Set up repo with non-linear history |
|
201 | Set up repo with non-linear history | |
176 | $ hg init non-linear |
|
202 | $ hg init non-linear | |
177 | $ cd non-linear |
|
203 | $ cd non-linear | |
178 | $ hg debugdrawdag <<'EOF' |
|
204 | $ hg debugdrawdag <<'EOF' | |
179 | > D E |
|
205 | > D E | |
180 | > |\| |
|
206 | > |\| | |
181 | > B C |
|
207 | > B C | |
182 | > |/ |
|
208 | > |/ | |
183 | > A |
|
209 | > A | |
184 | > EOF |
|
210 | > EOF | |
185 | $ hg phase --public C |
|
211 | $ hg phase --public C | |
186 | $ hg phase --force --secret B |
|
212 | $ hg phase --force --secret B | |
187 | $ hg log -G -T '{node|short} {desc} {phase}\n' |
|
213 | $ hg log -G -T '{node|short} {desc} {phase}\n' | |
188 | o 03ca77807e91 E draft |
|
214 | o 03ca77807e91 E draft | |
189 | | |
|
215 | | | |
190 | | o 215e7b0814e1 D secret |
|
216 | | o 215e7b0814e1 D secret | |
191 | |/| |
|
217 | |/| | |
192 | o | dc0947a82db8 C public |
|
218 | o | dc0947a82db8 C public | |
193 | | | |
|
219 | | | | |
194 | | o 112478962961 B secret |
|
220 | | o 112478962961 B secret | |
195 | |/ |
|
221 | |/ | |
196 | o 426bada5c675 A public |
|
222 | o 426bada5c675 A public | |
197 |
|
223 | |||
198 |
|
224 | |||
199 | Restore bundle of entire repo |
|
225 | Restore bundle of entire repo | |
200 | $ hg bundle -a bundle |
|
226 | $ hg bundle -a bundle | |
201 | 5 changesets found |
|
227 | 5 changesets found | |
202 | $ hg debugbundle bundle |
|
228 | $ hg debugbundle bundle | |
203 | Stream params: sortdict([('Compression', 'BZ')]) |
|
229 | Stream params: sortdict([('Compression', 'BZ')]) | |
204 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '5')])" |
|
230 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '5')])" | |
205 | 426bada5c67598ca65036d57d9e4b64b0c1ce7a0 |
|
231 | 426bada5c67598ca65036d57d9e4b64b0c1ce7a0 | |
206 | 112478962961147124edd43549aedd1a335e44bf |
|
232 | 112478962961147124edd43549aedd1a335e44bf | |
207 | dc0947a82db884575bb76ea10ac97b08536bfa03 |
|
233 | dc0947a82db884575bb76ea10ac97b08536bfa03 | |
208 | 215e7b0814e1cac8e2614e7284f2a5dc266b4323 |
|
234 | 215e7b0814e1cac8e2614e7284f2a5dc266b4323 | |
209 | 03ca77807e919db8807c3749086dc36fb478cac0 |
|
235 | 03ca77807e919db8807c3749086dc36fb478cac0 | |
210 | phase-heads -- 'sortdict()' |
|
236 | phase-heads -- 'sortdict()' | |
211 | dc0947a82db884575bb76ea10ac97b08536bfa03 public |
|
237 | dc0947a82db884575bb76ea10ac97b08536bfa03 public | |
212 | 03ca77807e919db8807c3749086dc36fb478cac0 draft |
|
238 | 03ca77807e919db8807c3749086dc36fb478cac0 draft | |
213 | $ hg strip --no-backup A |
|
239 | $ hg strip --no-backup A | |
214 | $ hg unbundle -q bundle |
|
240 | $ hg unbundle -q bundle | |
215 | $ rm bundle |
|
241 | $ rm bundle | |
216 | $ hg log -G -T '{node|short} {desc} {phase}\n' |
|
242 | $ hg log -G -T '{node|short} {desc} {phase}\n' | |
217 | o 03ca77807e91 E draft |
|
243 | o 03ca77807e91 E draft | |
218 | | |
|
244 | | | |
219 | | o 215e7b0814e1 D secret |
|
245 | | o 215e7b0814e1 D secret | |
220 | |/| |
|
246 | |/| | |
221 | o | dc0947a82db8 C public |
|
247 | o | dc0947a82db8 C public | |
222 | | | |
|
248 | | | | |
223 | | o 112478962961 B secret |
|
249 | | o 112478962961 B secret | |
224 | |/ |
|
250 | |/ | |
225 | o 426bada5c675 A public |
|
251 | o 426bada5c675 A public | |
226 |
|
252 | |||
227 |
|
253 | |||
228 | $ hg bundle --base 'A + C' -r D bundle |
|
254 | $ hg bundle --base 'A + C' -r D bundle | |
229 | 2 changesets found |
|
255 | 2 changesets found | |
230 | $ hg debugbundle bundle |
|
256 | $ hg debugbundle bundle | |
231 | Stream params: sortdict([('Compression', 'BZ')]) |
|
257 | Stream params: sortdict([('Compression', 'BZ')]) | |
232 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '2')])" |
|
258 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '2')])" | |
233 | 112478962961147124edd43549aedd1a335e44bf |
|
259 | 112478962961147124edd43549aedd1a335e44bf | |
234 | 215e7b0814e1cac8e2614e7284f2a5dc266b4323 |
|
260 | 215e7b0814e1cac8e2614e7284f2a5dc266b4323 | |
235 | phase-heads -- 'sortdict()' |
|
261 | phase-heads -- 'sortdict()' | |
236 | $ rm bundle |
|
262 | $ rm bundle | |
237 |
|
263 | |||
238 | $ hg bundle --base A -r D bundle |
|
264 | $ hg bundle --base A -r D bundle | |
239 | 3 changesets found |
|
265 | 3 changesets found | |
240 | $ hg debugbundle bundle |
|
266 | $ hg debugbundle bundle | |
241 | Stream params: sortdict([('Compression', 'BZ')]) |
|
267 | Stream params: sortdict([('Compression', 'BZ')]) | |
242 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '3')])" |
|
268 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '3')])" | |
243 | 112478962961147124edd43549aedd1a335e44bf |
|
269 | 112478962961147124edd43549aedd1a335e44bf | |
244 | dc0947a82db884575bb76ea10ac97b08536bfa03 |
|
270 | dc0947a82db884575bb76ea10ac97b08536bfa03 | |
245 | 215e7b0814e1cac8e2614e7284f2a5dc266b4323 |
|
271 | 215e7b0814e1cac8e2614e7284f2a5dc266b4323 | |
246 | phase-heads -- 'sortdict()' |
|
272 | phase-heads -- 'sortdict()' | |
247 | dc0947a82db884575bb76ea10ac97b08536bfa03 public |
|
273 | dc0947a82db884575bb76ea10ac97b08536bfa03 public | |
248 | $ rm bundle |
|
274 | $ rm bundle | |
249 |
|
275 | |||
250 | $ hg bundle --base 'B + C' -r 'D + E' bundle |
|
276 | $ hg bundle --base 'B + C' -r 'D + E' bundle | |
251 | 2 changesets found |
|
277 | 2 changesets found | |
252 | $ hg debugbundle bundle |
|
278 | $ hg debugbundle bundle | |
253 | Stream params: sortdict([('Compression', 'BZ')]) |
|
279 | Stream params: sortdict([('Compression', 'BZ')]) | |
254 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '2')])" |
|
280 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '2')])" | |
255 | 215e7b0814e1cac8e2614e7284f2a5dc266b4323 |
|
281 | 215e7b0814e1cac8e2614e7284f2a5dc266b4323 | |
256 | 03ca77807e919db8807c3749086dc36fb478cac0 |
|
282 | 03ca77807e919db8807c3749086dc36fb478cac0 | |
257 | phase-heads -- 'sortdict()' |
|
283 | phase-heads -- 'sortdict()' | |
258 | 03ca77807e919db8807c3749086dc36fb478cac0 draft |
|
284 | 03ca77807e919db8807c3749086dc36fb478cac0 draft | |
259 | $ rm bundle |
|
285 | $ rm bundle |
@@ -1,161 +1,163 b'' | |||||
1 | Check whether size of generaldelta revlog is not bigger than its |
|
1 | Check whether size of generaldelta revlog is not bigger than its | |
2 | regular equivalent. Test would fail if generaldelta was naive |
|
2 | regular equivalent. Test would fail if generaldelta was naive | |
3 | implementation of parentdelta: third manifest revision would be fully |
|
3 | implementation of parentdelta: third manifest revision would be fully | |
4 | inserted due to big distance from its paren revision (zero). |
|
4 | inserted due to big distance from its paren revision (zero). | |
5 |
|
5 | |||
6 | $ hg init repo --config format.generaldelta=no --config format.usegeneraldelta=no |
|
6 | $ hg init repo --config format.generaldelta=no --config format.usegeneraldelta=no | |
7 | $ cd repo |
|
7 | $ cd repo | |
8 | $ echo foo > foo |
|
8 | $ echo foo > foo | |
9 | $ echo bar > bar |
|
9 | $ echo bar > bar | |
10 | $ echo baz > baz |
|
10 | $ echo baz > baz | |
11 | $ hg commit -q -Am boo |
|
11 | $ hg commit -q -Am boo | |
12 | $ hg clone --pull . ../gdrepo -q --config format.generaldelta=yes |
|
12 | $ hg clone --pull . ../gdrepo -q --config format.generaldelta=yes | |
13 | $ for r in 1 2 3; do |
|
13 | $ for r in 1 2 3; do | |
14 | > echo $r > foo |
|
14 | > echo $r > foo | |
15 | > hg commit -q -m $r |
|
15 | > hg commit -q -m $r | |
16 | > hg up -q -r 0 |
|
16 | > hg up -q -r 0 | |
17 | > hg pull . -q -r $r -R ../gdrepo |
|
17 | > hg pull . -q -r $r -R ../gdrepo | |
18 | > done |
|
18 | > done | |
19 |
|
19 | |||
20 | $ cd .. |
|
20 | $ cd .. | |
21 | >>> from __future__ import print_function |
|
21 | >>> from __future__ import print_function | |
22 | >>> import os |
|
22 | >>> import os | |
23 | >>> regsize = os.stat("repo/.hg/store/00manifest.i").st_size |
|
23 | >>> regsize = os.stat("repo/.hg/store/00manifest.i").st_size | |
24 | >>> gdsize = os.stat("gdrepo/.hg/store/00manifest.i").st_size |
|
24 | >>> gdsize = os.stat("gdrepo/.hg/store/00manifest.i").st_size | |
25 | >>> if regsize < gdsize: |
|
25 | >>> if regsize < gdsize: | |
26 | ... print('generaldata increased size of manifest') |
|
26 | ... print('generaldata increased size of manifest') | |
27 |
|
27 | |||
28 | Verify rev reordering doesnt create invalid bundles (issue4462) |
|
28 | Verify rev reordering doesnt create invalid bundles (issue4462) | |
29 | This requires a commit tree that when pulled will reorder manifest revs such |
|
29 | This requires a commit tree that when pulled will reorder manifest revs such | |
30 | that the second manifest to create a file rev will be ordered before the first |
|
30 | that the second manifest to create a file rev will be ordered before the first | |
31 | manifest to create that file rev. We also need to do a partial pull to ensure |
|
31 | manifest to create that file rev. We also need to do a partial pull to ensure | |
32 | reordering happens. At the end we verify the linkrev points at the earliest |
|
32 | reordering happens. At the end we verify the linkrev points at the earliest | |
33 | commit. |
|
33 | commit. | |
34 |
|
34 | |||
35 | $ hg init server --config format.generaldelta=True |
|
35 | $ hg init server --config format.generaldelta=True | |
36 | $ cd server |
|
36 | $ cd server | |
37 | $ touch a |
|
37 | $ touch a | |
38 | $ hg commit -Aqm a |
|
38 | $ hg commit -Aqm a | |
39 | $ echo x > x |
|
39 | $ echo x > x | |
40 | $ echo y > y |
|
40 | $ echo y > y | |
41 | $ hg commit -Aqm xy |
|
41 | $ hg commit -Aqm xy | |
42 | $ hg up -q '.^' |
|
42 | $ hg up -q '.^' | |
43 | $ echo x > x |
|
43 | $ echo x > x | |
44 | $ echo z > z |
|
44 | $ echo z > z | |
45 | $ hg commit -Aqm xz |
|
45 | $ hg commit -Aqm xz | |
46 | $ hg up -q 1 |
|
46 | $ hg up -q 1 | |
47 | $ echo b > b |
|
47 | $ echo b > b | |
48 | $ hg commit -Aqm b |
|
48 | $ hg commit -Aqm b | |
49 | $ hg merge -q 2 |
|
49 | $ hg merge -q 2 | |
50 | $ hg commit -Aqm merge |
|
50 | $ hg commit -Aqm merge | |
51 | $ echo c > c |
|
51 | $ echo c > c | |
52 | $ hg commit -Aqm c |
|
52 | $ hg commit -Aqm c | |
53 | $ hg log -G -T '{rev} {shortest(node)} {desc}' |
|
53 | $ hg log -G -T '{rev} {shortest(node)} {desc}' | |
54 | @ 5 ebb8 c |
|
54 | @ 5 ebb8 c | |
55 | | |
|
55 | | | |
56 | o 4 baf7 merge |
|
56 | o 4 baf7 merge | |
57 | |\ |
|
57 | |\ | |
58 | | o 3 a129 b |
|
58 | | o 3 a129 b | |
59 | | | |
|
59 | | | | |
60 | o | 2 958c xz |
|
60 | o | 2 958c xz | |
61 | | | |
|
61 | | | | |
62 | | o 1 f00c xy |
|
62 | | o 1 f00c xy | |
63 | |/ |
|
63 | |/ | |
64 | o 0 3903 a |
|
64 | o 0 3903 a | |
65 |
|
65 | |||
66 | $ cd .. |
|
66 | $ cd .. | |
67 | $ hg init client --config format.generaldelta=false --config format.usegeneraldelta=false |
|
67 | $ hg init client --config format.generaldelta=false --config format.usegeneraldelta=false | |
68 | $ cd client |
|
68 | $ cd client | |
69 | $ hg pull -q ../server -r 4 |
|
69 | $ hg pull -q ../server -r 4 | |
70 | $ hg debugindex x |
|
70 | $ hg debugindex x | |
71 | rev offset length base linkrev nodeid p1 p2 |
|
71 | rev offset length base linkrev nodeid p1 p2 | |
72 | 0 0 3 0 1 1406e7411862 000000000000 000000000000 |
|
72 | 0 0 3 0 1 1406e7411862 000000000000 000000000000 | |
73 |
|
73 | |||
74 | $ cd .. |
|
74 | $ cd .. | |
75 |
|
75 | |||
76 | Test "usegeneraldelta" config |
|
76 | Test "usegeneraldelta" config | |
77 | (repo are general delta, but incoming bundle are not re-deltafied) |
|
77 | (repo are general delta, but incoming bundle are not re-deltafied) | |
78 |
|
78 | |||
79 | delta coming from the server base delta server are not recompressed. |
|
79 | delta coming from the server base delta server are not recompressed. | |
80 | (also include the aggressive version for comparison) |
|
80 | (also include the aggressive version for comparison) | |
81 |
|
81 | |||
82 | $ hg clone repo --pull --config format.usegeneraldelta=1 usegd |
|
82 | $ hg clone repo --pull --config format.usegeneraldelta=1 usegd | |
83 | requesting all changes |
|
83 | requesting all changes | |
84 | adding changesets |
|
84 | adding changesets | |
85 | adding manifests |
|
85 | adding manifests | |
86 | adding file changes |
|
86 | adding file changes | |
87 | added 4 changesets with 6 changes to 3 files (+2 heads) |
|
87 | added 4 changesets with 6 changes to 3 files (+2 heads) | |
88 | updating to branch default |
|
88 | updating to branch default | |
89 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
89 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
90 | $ hg clone repo --pull --config format.generaldelta=1 full |
|
90 | $ hg clone repo --pull --config format.generaldelta=1 full | |
91 | requesting all changes |
|
91 | requesting all changes | |
92 | adding changesets |
|
92 | adding changesets | |
93 | adding manifests |
|
93 | adding manifests | |
94 | adding file changes |
|
94 | adding file changes | |
95 | added 4 changesets with 6 changes to 3 files (+2 heads) |
|
95 | added 4 changesets with 6 changes to 3 files (+2 heads) | |
96 | updating to branch default |
|
96 | updating to branch default | |
97 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
97 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
98 | $ hg -R repo debugindex -m |
|
98 | $ hg -R repo debugindex -m | |
99 | rev offset length base linkrev nodeid p1 p2 |
|
99 | rev offset length base linkrev nodeid p1 p2 | |
100 | 0 0 104 0 0 cef96823c800 000000000000 000000000000 |
|
100 | 0 0 104 0 0 cef96823c800 000000000000 000000000000 | |
101 | 1 104 57 0 1 58ab9a8d541d cef96823c800 000000000000 |
|
101 | 1 104 57 0 1 58ab9a8d541d cef96823c800 000000000000 | |
102 | 2 161 57 0 2 134fdc6fd680 cef96823c800 000000000000 |
|
102 | 2 161 57 0 2 134fdc6fd680 cef96823c800 000000000000 | |
103 | 3 218 104 3 3 723508934dad cef96823c800 000000000000 |
|
103 | 3 218 104 3 3 723508934dad cef96823c800 000000000000 | |
104 | $ hg -R usegd debugindex -m |
|
104 | $ hg -R usegd debugindex -m | |
105 | rev offset length delta linkrev nodeid p1 p2 |
|
105 | rev offset length delta linkrev nodeid p1 p2 | |
106 | 0 0 104 -1 0 cef96823c800 000000000000 000000000000 |
|
106 | 0 0 104 -1 0 cef96823c800 000000000000 000000000000 | |
107 | 1 104 57 0 1 58ab9a8d541d cef96823c800 000000000000 |
|
107 | 1 104 57 0 1 58ab9a8d541d cef96823c800 000000000000 | |
108 | 2 161 57 1 2 134fdc6fd680 cef96823c800 000000000000 |
|
108 | 2 161 57 1 2 134fdc6fd680 cef96823c800 000000000000 | |
109 | 3 218 57 0 3 723508934dad cef96823c800 000000000000 |
|
109 | 3 218 57 0 3 723508934dad cef96823c800 000000000000 | |
110 | $ hg -R full debugindex -m |
|
110 | $ hg -R full debugindex -m | |
111 | rev offset length delta linkrev nodeid p1 p2 |
|
111 | rev offset length delta linkrev nodeid p1 p2 | |
112 | 0 0 104 -1 0 cef96823c800 000000000000 000000000000 |
|
112 | 0 0 104 -1 0 cef96823c800 000000000000 000000000000 | |
113 | 1 104 57 0 1 58ab9a8d541d cef96823c800 000000000000 |
|
113 | 1 104 57 0 1 58ab9a8d541d cef96823c800 000000000000 | |
114 | 2 161 57 0 2 134fdc6fd680 cef96823c800 000000000000 |
|
114 | 2 161 57 0 2 134fdc6fd680 cef96823c800 000000000000 | |
115 | 3 218 57 0 3 723508934dad cef96823c800 000000000000 |
|
115 | 3 218 57 0 3 723508934dad cef96823c800 000000000000 | |
116 |
|
116 | |||
117 | Test format.aggressivemergedeltas |
|
117 | Test format.aggressivemergedeltas | |
118 |
|
118 | |||
119 | $ hg init --config format.generaldelta=1 aggressive |
|
119 | $ hg init --config format.generaldelta=1 aggressive | |
120 | $ cd aggressive |
|
120 | $ cd aggressive | |
121 | $ cat << EOF >> .hg/hgrc |
|
121 | $ cat << EOF >> .hg/hgrc | |
122 | > [format] |
|
122 | > [format] | |
123 | > generaldelta = 1 |
|
123 | > generaldelta = 1 | |
124 | > EOF |
|
124 | > EOF | |
125 | $ touch a b c d e |
|
125 | $ touch a b c d e | |
126 | $ hg commit -Aqm side1 |
|
126 | $ hg commit -Aqm side1 | |
127 | $ hg up -q null |
|
127 | $ hg up -q null | |
128 | $ touch x y |
|
128 | $ touch x y | |
129 | $ hg commit -Aqm side2 |
|
129 | $ hg commit -Aqm side2 | |
130 |
|
130 | |||
131 | - Verify non-aggressive merge uses p1 (commit 1) as delta parent |
|
131 | - Verify non-aggressive merge uses p1 (commit 1) as delta parent | |
132 | $ hg merge -q 0 |
|
132 | $ hg merge -q 0 | |
133 | $ hg commit -q -m merge |
|
133 | $ hg commit -q -m merge | |
134 | $ hg debugindex -m |
|
134 | $ hg debugindex -m | |
135 | rev offset length delta linkrev nodeid p1 p2 |
|
135 | rev offset length delta linkrev nodeid p1 p2 | |
136 | 0 0 59 -1 0 8dde941edb6e 000000000000 000000000000 |
|
136 | 0 0 59 -1 0 8dde941edb6e 000000000000 000000000000 | |
137 | 1 59 61 0 1 315c023f341d 000000000000 000000000000 |
|
137 | 1 59 61 0 1 315c023f341d 000000000000 000000000000 | |
138 | 2 120 65 1 2 2ab389a983eb 315c023f341d 8dde941edb6e |
|
138 | 2 120 65 1 2 2ab389a983eb 315c023f341d 8dde941edb6e | |
139 |
|
139 | |||
140 | $ hg strip -q -r . --config extensions.strip= |
|
140 | $ hg strip -q -r . --config extensions.strip= | |
141 |
|
141 | |||
142 | - Verify aggressive merge uses p2 (commit 0) as delta parent |
|
142 | - Verify aggressive merge uses p2 (commit 0) as delta parent | |
143 | $ hg up -q -C 1 |
|
143 | $ hg up -q -C 1 | |
144 | $ hg merge -q 0 |
|
144 | $ hg merge -q 0 | |
145 | $ hg commit -q -m merge --config format.aggressivemergedeltas=True |
|
145 | $ hg commit -q -m merge --config format.aggressivemergedeltas=True | |
146 | $ hg debugindex -m |
|
146 | $ hg debugindex -m | |
147 | rev offset length delta linkrev nodeid p1 p2 |
|
147 | rev offset length delta linkrev nodeid p1 p2 | |
148 | 0 0 59 -1 0 8dde941edb6e 000000000000 000000000000 |
|
148 | 0 0 59 -1 0 8dde941edb6e 000000000000 000000000000 | |
149 | 1 59 61 0 1 315c023f341d 000000000000 000000000000 |
|
149 | 1 59 61 0 1 315c023f341d 000000000000 000000000000 | |
150 | 2 120 62 0 2 2ab389a983eb 315c023f341d 8dde941edb6e |
|
150 | 2 120 62 0 2 2ab389a983eb 315c023f341d 8dde941edb6e | |
151 |
|
151 | |||
152 | Test that strip bundle use bundle2 |
|
152 | Test that strip bundle use bundle2 | |
153 | $ hg --config extensions.strip= strip . |
|
153 | $ hg --config extensions.strip= strip . | |
154 | 0 files updated, 0 files merged, 5 files removed, 0 files unresolved |
|
154 | 0 files updated, 0 files merged, 5 files removed, 0 files unresolved | |
155 | saved backup bundle to $TESTTMP/aggressive/.hg/strip-backup/1c5d4dc9a8b8-6c68e60c-backup.hg (glob) |
|
155 | saved backup bundle to $TESTTMP/aggressive/.hg/strip-backup/1c5d4dc9a8b8-6c68e60c-backup.hg (glob) | |
156 | $ hg debugbundle .hg/strip-backup/* |
|
156 | $ hg debugbundle .hg/strip-backup/* | |
157 | Stream params: sortdict([('Compression', 'BZ')]) |
|
157 | Stream params: sortdict([('Compression', 'BZ')]) | |
158 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '1')])" |
|
158 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '1')])" | |
159 | 1c5d4dc9a8b8d6e1750966d343e94db665e7a1e9 |
|
159 | 1c5d4dc9a8b8d6e1750966d343e94db665e7a1e9 | |
|
160 | phase-heads -- 'sortdict()' | |||
|
161 | 1c5d4dc9a8b8d6e1750966d343e94db665e7a1e9 draft | |||
160 |
|
162 | |||
161 | $ cd .. |
|
163 | $ cd .. |
@@ -1,1397 +1,1401 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(troubles, ' {troubles}')}) [{tags} {bookmarks}] {desc|firstline}\n" |
|
6 | > logtemplate="{rev}:{node|short} ({phase}{if(obsolete, ' *{obsolete}*')}{if(troubles, ' {troubles}')}) [{tags} {bookmarks}] {desc|firstline}\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=createmarkers,exchange |
|
42 | > evolution=createmarkers,exchange | |
43 | > EOF |
|
43 | > EOF | |
44 |
|
44 | |||
45 | Killing a single changeset without replacement |
|
45 | Killing a single changeset without replacement | |
46 |
|
46 | |||
47 | $ hg debugobsolete 0 |
|
47 | $ hg debugobsolete 0 | |
48 | abort: changeset references must be full hexadecimal node identifiers |
|
48 | abort: changeset references must be full hexadecimal node identifiers | |
49 | [255] |
|
49 | [255] | |
50 | $ hg debugobsolete '00' |
|
50 | $ hg debugobsolete '00' | |
51 | abort: changeset references must be full hexadecimal node identifiers |
|
51 | abort: changeset references must be full hexadecimal node identifiers | |
52 | [255] |
|
52 | [255] | |
53 | $ hg debugobsolete -d '0 0' `getid kill_me` -u babar |
|
53 | $ hg debugobsolete -d '0 0' `getid kill_me` -u babar | |
54 | $ hg debugobsolete |
|
54 | $ hg debugobsolete | |
55 | 97b7c2d76b1845ed3eb988cd612611e72406cef0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'babar'} |
|
55 | 97b7c2d76b1845ed3eb988cd612611e72406cef0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'babar'} | |
56 |
|
56 | |||
57 | (test that mercurial is not confused) |
|
57 | (test that mercurial is not confused) | |
58 |
|
58 | |||
59 | $ hg up null --quiet # having 0 as parent prevents it to be hidden |
|
59 | $ hg up null --quiet # having 0 as parent prevents it to be hidden | |
60 | $ hg tip |
|
60 | $ hg tip | |
61 | -1:000000000000 (public) [tip ] |
|
61 | -1:000000000000 (public) [tip ] | |
62 | $ hg up --hidden tip --quiet |
|
62 | $ hg up --hidden tip --quiet | |
63 |
|
63 | |||
64 | Killing a single changeset with itself should fail |
|
64 | Killing a single changeset with itself should fail | |
65 | (simple local safeguard) |
|
65 | (simple local safeguard) | |
66 |
|
66 | |||
67 | $ hg debugobsolete `getid kill_me` `getid kill_me` |
|
67 | $ hg debugobsolete `getid kill_me` `getid kill_me` | |
68 | abort: bad obsmarker input: in-marker cycle with 97b7c2d76b1845ed3eb988cd612611e72406cef0 |
|
68 | abort: bad obsmarker input: in-marker cycle with 97b7c2d76b1845ed3eb988cd612611e72406cef0 | |
69 | [255] |
|
69 | [255] | |
70 |
|
70 | |||
71 | $ cd .. |
|
71 | $ cd .. | |
72 |
|
72 | |||
73 | Killing a single changeset with replacement |
|
73 | Killing a single changeset with replacement | |
74 | (and testing the format option) |
|
74 | (and testing the format option) | |
75 |
|
75 | |||
76 | $ hg init tmpb |
|
76 | $ hg init tmpb | |
77 | $ cd tmpb |
|
77 | $ cd tmpb | |
78 | $ mkcommit a |
|
78 | $ mkcommit a | |
79 | $ mkcommit b |
|
79 | $ mkcommit b | |
80 | $ mkcommit original_c |
|
80 | $ mkcommit original_c | |
81 | $ hg up "desc('b')" |
|
81 | $ hg up "desc('b')" | |
82 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
82 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
83 | $ mkcommit new_c |
|
83 | $ mkcommit new_c | |
84 | created new head |
|
84 | created new head | |
85 | $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden |
|
85 | $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden | |
86 | $ hg debugobsolete --config format.obsstore-version=0 --flag 12 `getid original_c` `getid new_c` -d '121 120' |
|
86 | $ hg debugobsolete --config format.obsstore-version=0 --flag 12 `getid original_c` `getid new_c` -d '121 120' | |
87 | $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden |
|
87 | $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden | |
88 | 2:245bde4270cd add original_c |
|
88 | 2:245bde4270cd add original_c | |
89 | $ hg debugrevlog -cd |
|
89 | $ hg debugrevlog -cd | |
90 | # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen |
|
90 | # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen | |
91 | 0 -1 -1 0 59 0 0 0 0 58 58 0 1 0 |
|
91 | 0 -1 -1 0 59 0 0 0 0 58 58 0 1 0 | |
92 | 1 0 -1 59 118 59 59 0 0 58 116 0 1 0 |
|
92 | 1 0 -1 59 118 59 59 0 0 58 116 0 1 0 | |
93 | 2 1 -1 118 193 118 118 59 0 76 192 0 1 0 |
|
93 | 2 1 -1 118 193 118 118 59 0 76 192 0 1 0 | |
94 | 3 1 -1 193 260 193 193 59 0 66 258 0 2 0 |
|
94 | 3 1 -1 193 260 193 193 59 0 66 258 0 2 0 | |
95 | $ hg debugobsolete |
|
95 | $ hg debugobsolete | |
96 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
96 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
97 |
|
97 | |||
98 | (check for version number of the obsstore) |
|
98 | (check for version number of the obsstore) | |
99 |
|
99 | |||
100 | $ dd bs=1 count=1 if=.hg/store/obsstore 2>/dev/null |
|
100 | $ dd bs=1 count=1 if=.hg/store/obsstore 2>/dev/null | |
101 | \x00 (no-eol) (esc) |
|
101 | \x00 (no-eol) (esc) | |
102 |
|
102 | |||
103 | do it again (it read the obsstore before adding new changeset) |
|
103 | do it again (it read the obsstore before adding new changeset) | |
104 |
|
104 | |||
105 | $ hg up '.^' |
|
105 | $ hg up '.^' | |
106 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
106 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
107 | $ mkcommit new_2_c |
|
107 | $ mkcommit new_2_c | |
108 | created new head |
|
108 | created new head | |
109 | $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c` |
|
109 | $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c` | |
110 | $ hg debugobsolete |
|
110 | $ hg debugobsolete | |
111 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
111 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
112 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
112 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
113 |
|
113 | |||
114 | Register two markers with a missing node |
|
114 | Register two markers with a missing node | |
115 |
|
115 | |||
116 | $ hg up '.^' |
|
116 | $ hg up '.^' | |
117 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
117 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
118 | $ mkcommit new_3_c |
|
118 | $ mkcommit new_3_c | |
119 | created new head |
|
119 | created new head | |
120 | $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337 |
|
120 | $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337 | |
121 | $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c` |
|
121 | $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c` | |
122 | $ hg debugobsolete |
|
122 | $ hg debugobsolete | |
123 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
123 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
124 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
124 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
125 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
125 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
126 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
126 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
127 |
|
127 | |||
128 | Test the --index option of debugobsolete command |
|
128 | Test the --index option of debugobsolete command | |
129 | $ hg debugobsolete --index |
|
129 | $ hg debugobsolete --index | |
130 | 0 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
130 | 0 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
131 | 1 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
131 | 1 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
132 | 2 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
132 | 2 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
133 | 3 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
133 | 3 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
134 |
|
134 | |||
135 | Refuse pathological nullid successors |
|
135 | Refuse pathological nullid successors | |
136 | $ hg debugobsolete -d '9001 0' 1337133713371337133713371337133713371337 0000000000000000000000000000000000000000 |
|
136 | $ hg debugobsolete -d '9001 0' 1337133713371337133713371337133713371337 0000000000000000000000000000000000000000 | |
137 | transaction abort! |
|
137 | transaction abort! | |
138 | rollback completed |
|
138 | rollback completed | |
139 | abort: bad obsolescence marker detected: invalid successors nullid |
|
139 | abort: bad obsolescence marker detected: invalid successors nullid | |
140 | [255] |
|
140 | [255] | |
141 |
|
141 | |||
142 | Check that graphlog detect that a changeset is obsolete: |
|
142 | Check that graphlog detect that a changeset is obsolete: | |
143 |
|
143 | |||
144 | $ hg log -G |
|
144 | $ hg log -G | |
145 | @ 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
145 | @ 5:5601fb93a350 (draft) [tip ] add new_3_c | |
146 | | |
|
146 | | | |
147 | o 1:7c3bad9141dc (draft) [ ] add b |
|
147 | o 1:7c3bad9141dc (draft) [ ] add b | |
148 | | |
|
148 | | | |
149 | o 0:1f0dee641bb7 (draft) [ ] add a |
|
149 | o 0:1f0dee641bb7 (draft) [ ] add a | |
150 |
|
150 | |||
151 |
|
151 | |||
152 | check that heads does not report them |
|
152 | check that heads does not report them | |
153 |
|
153 | |||
154 | $ hg heads |
|
154 | $ hg heads | |
155 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
155 | 5:5601fb93a350 (draft) [tip ] add new_3_c | |
156 | $ hg heads --hidden |
|
156 | $ hg heads --hidden | |
157 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
157 | 5:5601fb93a350 (draft) [tip ] add new_3_c | |
158 | 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c |
|
158 | 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c | |
159 | 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c |
|
159 | 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c | |
160 | 2:245bde4270cd (draft *obsolete*) [ ] add original_c |
|
160 | 2:245bde4270cd (draft *obsolete*) [ ] add original_c | |
161 |
|
161 | |||
162 |
|
162 | |||
163 | check that summary does not report them |
|
163 | check that summary does not report them | |
164 |
|
164 | |||
165 | $ hg init ../sink |
|
165 | $ hg init ../sink | |
166 | $ echo '[paths]' >> .hg/hgrc |
|
166 | $ echo '[paths]' >> .hg/hgrc | |
167 | $ echo 'default=../sink' >> .hg/hgrc |
|
167 | $ echo 'default=../sink' >> .hg/hgrc | |
168 | $ hg summary --remote |
|
168 | $ hg summary --remote | |
169 | parent: 5:5601fb93a350 tip |
|
169 | parent: 5:5601fb93a350 tip | |
170 | add new_3_c |
|
170 | add new_3_c | |
171 | branch: default |
|
171 | branch: default | |
172 | commit: (clean) |
|
172 | commit: (clean) | |
173 | update: (current) |
|
173 | update: (current) | |
174 | phases: 3 draft |
|
174 | phases: 3 draft | |
175 | remote: 3 outgoing |
|
175 | remote: 3 outgoing | |
176 |
|
176 | |||
177 | $ hg summary --remote --hidden |
|
177 | $ hg summary --remote --hidden | |
178 | parent: 5:5601fb93a350 tip |
|
178 | parent: 5:5601fb93a350 tip | |
179 | add new_3_c |
|
179 | add new_3_c | |
180 | branch: default |
|
180 | branch: default | |
181 | commit: (clean) |
|
181 | commit: (clean) | |
182 | update: 3 new changesets, 4 branch heads (merge) |
|
182 | update: 3 new changesets, 4 branch heads (merge) | |
183 | phases: 6 draft |
|
183 | phases: 6 draft | |
184 | remote: 3 outgoing |
|
184 | remote: 3 outgoing | |
185 |
|
185 | |||
186 | check that various commands work well with filtering |
|
186 | check that various commands work well with filtering | |
187 |
|
187 | |||
188 | $ hg tip |
|
188 | $ hg tip | |
189 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
189 | 5:5601fb93a350 (draft) [tip ] add new_3_c | |
190 | $ hg log -r 6 |
|
190 | $ hg log -r 6 | |
191 | abort: unknown revision '6'! |
|
191 | abort: unknown revision '6'! | |
192 | [255] |
|
192 | [255] | |
193 | $ hg log -r 4 |
|
193 | $ hg log -r 4 | |
194 | abort: hidden revision '4'! |
|
194 | abort: hidden revision '4'! | |
195 | (use --hidden to access hidden revisions) |
|
195 | (use --hidden to access hidden revisions) | |
196 | [255] |
|
196 | [255] | |
197 | $ hg debugrevspec 'rev(6)' |
|
197 | $ hg debugrevspec 'rev(6)' | |
198 | $ hg debugrevspec 'rev(4)' |
|
198 | $ hg debugrevspec 'rev(4)' | |
199 | $ hg debugrevspec 'null' |
|
199 | $ hg debugrevspec 'null' | |
200 | -1 |
|
200 | -1 | |
201 |
|
201 | |||
202 | Check that public changeset are not accounted as obsolete: |
|
202 | Check that public changeset are not accounted as obsolete: | |
203 |
|
203 | |||
204 | $ hg --hidden phase --public 2 |
|
204 | $ hg --hidden phase --public 2 | |
205 | $ hg log -G |
|
205 | $ hg log -G | |
206 | @ 5:5601fb93a350 (draft bumped) [tip ] add new_3_c |
|
206 | @ 5:5601fb93a350 (draft bumped) [tip ] add new_3_c | |
207 | | |
|
207 | | | |
208 | | o 2:245bde4270cd (public) [ ] add original_c |
|
208 | | o 2:245bde4270cd (public) [ ] add original_c | |
209 | |/ |
|
209 | |/ | |
210 | o 1:7c3bad9141dc (public) [ ] add b |
|
210 | o 1:7c3bad9141dc (public) [ ] add b | |
211 | | |
|
211 | | | |
212 | o 0:1f0dee641bb7 (public) [ ] add a |
|
212 | o 0:1f0dee641bb7 (public) [ ] add a | |
213 |
|
213 | |||
214 |
|
214 | |||
215 | And that bumped changeset are detected |
|
215 | And that bumped changeset are detected | |
216 | -------------------------------------- |
|
216 | -------------------------------------- | |
217 |
|
217 | |||
218 | If we didn't filtered obsolete changesets out, 3 and 4 would show up too. Also |
|
218 | If we didn't filtered obsolete changesets out, 3 and 4 would show up too. Also | |
219 | note that the bumped changeset (5:5601fb93a350) is not a direct successor of |
|
219 | note that the bumped changeset (5:5601fb93a350) is not a direct successor of | |
220 | the public changeset |
|
220 | the public changeset | |
221 |
|
221 | |||
222 | $ hg log --hidden -r 'bumped()' |
|
222 | $ hg log --hidden -r 'bumped()' | |
223 | 5:5601fb93a350 (draft bumped) [tip ] add new_3_c |
|
223 | 5:5601fb93a350 (draft bumped) [tip ] add new_3_c | |
224 |
|
224 | |||
225 | And that we can't push bumped changeset |
|
225 | And that we can't push bumped changeset | |
226 |
|
226 | |||
227 | $ hg push ../tmpa -r 0 --force #(make repo related) |
|
227 | $ hg push ../tmpa -r 0 --force #(make repo related) | |
228 | pushing to ../tmpa |
|
228 | pushing to ../tmpa | |
229 | searching for changes |
|
229 | searching for changes | |
230 | warning: repository is unrelated |
|
230 | warning: repository is unrelated | |
231 | adding changesets |
|
231 | adding changesets | |
232 | adding manifests |
|
232 | adding manifests | |
233 | adding file changes |
|
233 | adding file changes | |
234 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
234 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
235 | $ hg push ../tmpa |
|
235 | $ hg push ../tmpa | |
236 | pushing to ../tmpa |
|
236 | pushing to ../tmpa | |
237 | searching for changes |
|
237 | searching for changes | |
238 | abort: push includes bumped changeset: 5601fb93a350! |
|
238 | abort: push includes bumped changeset: 5601fb93a350! | |
239 | [255] |
|
239 | [255] | |
240 |
|
240 | |||
241 | Fixing "bumped" situation |
|
241 | Fixing "bumped" situation | |
242 | We need to create a clone of 5 and add a special marker with a flag |
|
242 | We need to create a clone of 5 and add a special marker with a flag | |
243 |
|
243 | |||
244 | $ hg summary |
|
244 | $ hg summary | |
245 | parent: 5:5601fb93a350 tip (bumped) |
|
245 | parent: 5:5601fb93a350 tip (bumped) | |
246 | add new_3_c |
|
246 | add new_3_c | |
247 | branch: default |
|
247 | branch: default | |
248 | commit: (clean) |
|
248 | commit: (clean) | |
249 | update: 1 new changesets, 2 branch heads (merge) |
|
249 | update: 1 new changesets, 2 branch heads (merge) | |
250 | phases: 1 draft |
|
250 | phases: 1 draft | |
251 | bumped: 1 changesets |
|
251 | bumped: 1 changesets | |
252 | $ hg up '5^' |
|
252 | $ hg up '5^' | |
253 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
253 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
254 | $ hg revert -ar 5 |
|
254 | $ hg revert -ar 5 | |
255 | adding new_3_c |
|
255 | adding new_3_c | |
256 | $ hg ci -m 'add n3w_3_c' |
|
256 | $ hg ci -m 'add n3w_3_c' | |
257 | created new head |
|
257 | created new head | |
258 | $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c` |
|
258 | $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c` | |
259 | $ hg log -r 'bumped()' |
|
259 | $ hg log -r 'bumped()' | |
260 | $ hg log -G |
|
260 | $ hg log -G | |
261 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
261 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c | |
262 | | |
|
262 | | | |
263 | | o 2:245bde4270cd (public) [ ] add original_c |
|
263 | | o 2:245bde4270cd (public) [ ] add original_c | |
264 | |/ |
|
264 | |/ | |
265 | o 1:7c3bad9141dc (public) [ ] add b |
|
265 | o 1:7c3bad9141dc (public) [ ] add b | |
266 | | |
|
266 | | | |
267 | o 0:1f0dee641bb7 (public) [ ] add a |
|
267 | o 0:1f0dee641bb7 (public) [ ] add a | |
268 |
|
268 | |||
269 |
|
269 | |||
270 | Basic exclusive testing |
|
270 | Basic exclusive testing | |
271 |
|
271 | |||
272 | $ hg log -G --hidden |
|
272 | $ hg log -G --hidden | |
273 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
273 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c | |
274 | | |
|
274 | | | |
275 | | x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c |
|
275 | | x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c | |
276 | |/ |
|
276 | |/ | |
277 | | x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c |
|
277 | | x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c | |
278 | |/ |
|
278 | |/ | |
279 | | x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c |
|
279 | | x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c | |
280 | |/ |
|
280 | |/ | |
281 | | o 2:245bde4270cd (public) [ ] add original_c |
|
281 | | o 2:245bde4270cd (public) [ ] add original_c | |
282 | |/ |
|
282 | |/ | |
283 | o 1:7c3bad9141dc (public) [ ] add b |
|
283 | o 1:7c3bad9141dc (public) [ ] add b | |
284 | | |
|
284 | | | |
285 | o 0:1f0dee641bb7 (public) [ ] add a |
|
285 | o 0:1f0dee641bb7 (public) [ ] add a | |
286 |
|
286 | |||
287 | $ hg debugobsolete --rev 6f9641995072 |
|
287 | $ hg debugobsolete --rev 6f9641995072 | |
288 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
288 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
289 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
289 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
290 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
290 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
291 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
291 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
292 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
292 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
293 | $ hg debugobsolete --rev 6f9641995072 --exclusive |
|
293 | $ hg debugobsolete --rev 6f9641995072 --exclusive | |
294 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
294 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
295 | $ hg debugobsolete --rev 5601fb93a350 --hidden |
|
295 | $ hg debugobsolete --rev 5601fb93a350 --hidden | |
296 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
296 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
297 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
297 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
298 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
298 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
299 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
299 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
300 | $ hg debugobsolete --rev 5601fb93a350 --hidden --exclusive |
|
300 | $ hg debugobsolete --rev 5601fb93a350 --hidden --exclusive | |
301 | $ hg debugobsolete --rev 5601fb93a350+6f9641995072 --hidden --exclusive |
|
301 | $ hg debugobsolete --rev 5601fb93a350+6f9641995072 --hidden --exclusive | |
302 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
302 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
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 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
304 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
305 |
|
305 | |||
306 | $ cd .. |
|
306 | $ cd .. | |
307 |
|
307 | |||
308 | Revision 0 is hidden |
|
308 | Revision 0 is hidden | |
309 | -------------------- |
|
309 | -------------------- | |
310 |
|
310 | |||
311 | $ hg init rev0hidden |
|
311 | $ hg init rev0hidden | |
312 | $ cd rev0hidden |
|
312 | $ cd rev0hidden | |
313 |
|
313 | |||
314 | $ mkcommit kill0 |
|
314 | $ mkcommit kill0 | |
315 | $ hg up -q null |
|
315 | $ hg up -q null | |
316 | $ hg debugobsolete `getid kill0` |
|
316 | $ hg debugobsolete `getid kill0` | |
317 | $ mkcommit a |
|
317 | $ mkcommit a | |
318 | $ mkcommit b |
|
318 | $ mkcommit b | |
319 |
|
319 | |||
320 | Should pick the first visible revision as "repo" node |
|
320 | Should pick the first visible revision as "repo" node | |
321 |
|
321 | |||
322 | $ hg archive ../archive-null |
|
322 | $ hg archive ../archive-null | |
323 | $ cat ../archive-null/.hg_archival.txt |
|
323 | $ cat ../archive-null/.hg_archival.txt | |
324 | repo: 1f0dee641bb7258c56bd60e93edfa2405381c41e |
|
324 | repo: 1f0dee641bb7258c56bd60e93edfa2405381c41e | |
325 | node: 7c3bad9141dcb46ff89abf5f61856facd56e476c |
|
325 | node: 7c3bad9141dcb46ff89abf5f61856facd56e476c | |
326 | branch: default |
|
326 | branch: default | |
327 | latesttag: null |
|
327 | latesttag: null | |
328 | latesttagdistance: 2 |
|
328 | latesttagdistance: 2 | |
329 | changessincelatesttag: 2 |
|
329 | changessincelatesttag: 2 | |
330 |
|
330 | |||
331 |
|
331 | |||
332 | $ cd .. |
|
332 | $ cd .. | |
333 |
|
333 | |||
334 | Exchange Test |
|
334 | Exchange Test | |
335 | ============================ |
|
335 | ============================ | |
336 |
|
336 | |||
337 | Destination repo does not have any data |
|
337 | Destination repo does not have any data | |
338 | --------------------------------------- |
|
338 | --------------------------------------- | |
339 |
|
339 | |||
340 | Simple incoming test |
|
340 | Simple incoming test | |
341 |
|
341 | |||
342 | $ hg init tmpc |
|
342 | $ hg init tmpc | |
343 | $ cd tmpc |
|
343 | $ cd tmpc | |
344 | $ hg incoming ../tmpb |
|
344 | $ hg incoming ../tmpb | |
345 | comparing with ../tmpb |
|
345 | comparing with ../tmpb | |
346 | 0:1f0dee641bb7 (public) [ ] add a |
|
346 | 0:1f0dee641bb7 (public) [ ] add a | |
347 | 1:7c3bad9141dc (public) [ ] add b |
|
347 | 1:7c3bad9141dc (public) [ ] add b | |
348 | 2:245bde4270cd (public) [ ] add original_c |
|
348 | 2:245bde4270cd (public) [ ] add original_c | |
349 | 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
349 | 6:6f9641995072 (draft) [tip ] add n3w_3_c | |
350 |
|
350 | |||
351 | Try to pull markers |
|
351 | Try to pull markers | |
352 | (extinct changeset are excluded but marker are pushed) |
|
352 | (extinct changeset are excluded but marker are pushed) | |
353 |
|
353 | |||
354 | $ hg pull ../tmpb |
|
354 | $ hg pull ../tmpb | |
355 | pulling from ../tmpb |
|
355 | pulling from ../tmpb | |
356 | requesting all changes |
|
356 | requesting all changes | |
357 | adding changesets |
|
357 | adding changesets | |
358 | adding manifests |
|
358 | adding manifests | |
359 | adding file changes |
|
359 | adding file changes | |
360 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
360 | added 4 changesets with 4 changes to 4 files (+1 heads) | |
361 | 5 new obsolescence markers |
|
361 | 5 new obsolescence markers | |
362 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
362 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
363 | $ hg debugobsolete |
|
363 | $ hg debugobsolete | |
364 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
364 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
365 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
365 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
366 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
366 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
367 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
367 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
368 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
368 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
369 |
|
369 | |||
370 | Rollback//Transaction support |
|
370 | Rollback//Transaction support | |
371 |
|
371 | |||
372 | $ hg debugobsolete -d '1340 0' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb |
|
372 | $ hg debugobsolete -d '1340 0' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb | |
373 | $ hg debugobsolete |
|
373 | $ hg debugobsolete | |
374 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
374 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
375 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
375 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
376 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
376 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
377 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
377 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
378 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
378 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
379 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:22:20 1970 +0000) {'user': 'test'} |
|
379 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:22:20 1970 +0000) {'user': 'test'} | |
380 | $ hg rollback -n |
|
380 | $ hg rollback -n | |
381 | repository tip rolled back to revision 3 (undo debugobsolete) |
|
381 | repository tip rolled back to revision 3 (undo debugobsolete) | |
382 | $ hg rollback |
|
382 | $ hg rollback | |
383 | repository tip rolled back to revision 3 (undo debugobsolete) |
|
383 | repository tip rolled back to revision 3 (undo debugobsolete) | |
384 | $ hg debugobsolete |
|
384 | $ hg debugobsolete | |
385 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
385 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
386 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
386 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
387 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
387 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
388 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
388 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
389 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
389 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
390 |
|
390 | |||
391 | $ cd .. |
|
391 | $ cd .. | |
392 |
|
392 | |||
393 | Try to push markers |
|
393 | Try to push markers | |
394 |
|
394 | |||
395 | $ hg init tmpd |
|
395 | $ hg init tmpd | |
396 | $ hg -R tmpb push tmpd |
|
396 | $ hg -R tmpb push tmpd | |
397 | pushing to tmpd |
|
397 | pushing to tmpd | |
398 | searching for changes |
|
398 | searching for changes | |
399 | adding changesets |
|
399 | adding changesets | |
400 | adding manifests |
|
400 | adding manifests | |
401 | adding file changes |
|
401 | adding file changes | |
402 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
402 | added 4 changesets with 4 changes to 4 files (+1 heads) | |
403 | 5 new obsolescence markers |
|
403 | 5 new obsolescence markers | |
404 | $ hg -R tmpd debugobsolete | sort |
|
404 | $ hg -R tmpd debugobsolete | sort | |
405 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
405 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
406 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
406 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
407 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
407 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
408 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
408 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
409 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
409 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
410 |
|
410 | |||
411 | Check obsolete keys are exchanged only if source has an obsolete store |
|
411 | Check obsolete keys are exchanged only if source has an obsolete store | |
412 |
|
412 | |||
413 | $ hg init empty |
|
413 | $ hg init empty | |
414 | $ hg --config extensions.debugkeys=debugkeys.py -R empty push tmpd |
|
414 | $ hg --config extensions.debugkeys=debugkeys.py -R empty push tmpd | |
415 | pushing to tmpd |
|
415 | pushing to tmpd | |
416 | listkeys phases |
|
416 | listkeys phases | |
417 | listkeys bookmarks |
|
417 | listkeys bookmarks | |
418 | no changes found |
|
418 | no changes found | |
419 | listkeys phases |
|
419 | listkeys phases | |
420 | [1] |
|
420 | [1] | |
421 |
|
421 | |||
422 | clone support |
|
422 | clone support | |
423 | (markers are copied and extinct changesets are included to allow hardlinks) |
|
423 | (markers are copied and extinct changesets are included to allow hardlinks) | |
424 |
|
424 | |||
425 | $ hg clone tmpb clone-dest |
|
425 | $ hg clone tmpb clone-dest | |
426 | updating to branch default |
|
426 | updating to branch default | |
427 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
427 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
428 | $ hg -R clone-dest log -G --hidden |
|
428 | $ hg -R clone-dest log -G --hidden | |
429 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
429 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c | |
430 | | |
|
430 | | | |
431 | | x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c |
|
431 | | x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c | |
432 | |/ |
|
432 | |/ | |
433 | | x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c |
|
433 | | x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c | |
434 | |/ |
|
434 | |/ | |
435 | | x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c |
|
435 | | x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c | |
436 | |/ |
|
436 | |/ | |
437 | | o 2:245bde4270cd (public) [ ] add original_c |
|
437 | | o 2:245bde4270cd (public) [ ] add original_c | |
438 | |/ |
|
438 | |/ | |
439 | o 1:7c3bad9141dc (public) [ ] add b |
|
439 | o 1:7c3bad9141dc (public) [ ] add b | |
440 | | |
|
440 | | | |
441 | o 0:1f0dee641bb7 (public) [ ] add a |
|
441 | o 0:1f0dee641bb7 (public) [ ] add a | |
442 |
|
442 | |||
443 | $ hg -R clone-dest debugobsolete |
|
443 | $ hg -R clone-dest debugobsolete | |
444 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
444 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
445 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
445 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
446 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
446 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
447 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
447 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
448 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
448 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
449 |
|
449 | |||
450 |
|
450 | |||
451 | Destination repo have existing data |
|
451 | Destination repo have existing data | |
452 | --------------------------------------- |
|
452 | --------------------------------------- | |
453 |
|
453 | |||
454 | On pull |
|
454 | On pull | |
455 |
|
455 | |||
456 | $ hg init tmpe |
|
456 | $ hg init tmpe | |
457 | $ cd tmpe |
|
457 | $ cd tmpe | |
458 | $ hg debugobsolete -d '1339 0' 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 |
|
458 | $ hg debugobsolete -d '1339 0' 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 | |
459 | $ hg pull ../tmpb |
|
459 | $ hg pull ../tmpb | |
460 | pulling from ../tmpb |
|
460 | pulling from ../tmpb | |
461 | requesting all changes |
|
461 | requesting all changes | |
462 | adding changesets |
|
462 | adding changesets | |
463 | adding manifests |
|
463 | adding manifests | |
464 | adding file changes |
|
464 | adding file changes | |
465 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
465 | added 4 changesets with 4 changes to 4 files (+1 heads) | |
466 | 5 new obsolescence markers |
|
466 | 5 new obsolescence markers | |
467 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
467 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
468 | $ hg debugobsolete |
|
468 | $ hg debugobsolete | |
469 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
469 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
470 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
470 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
471 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
471 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
472 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
472 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
473 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
473 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
474 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
474 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
475 |
|
475 | |||
476 |
|
476 | |||
477 | On push |
|
477 | On push | |
478 |
|
478 | |||
479 | $ hg push ../tmpc |
|
479 | $ hg push ../tmpc | |
480 | pushing to ../tmpc |
|
480 | pushing to ../tmpc | |
481 | searching for changes |
|
481 | searching for changes | |
482 | no changes found |
|
482 | no changes found | |
483 | 1 new obsolescence markers |
|
483 | 1 new obsolescence markers | |
484 | [1] |
|
484 | [1] | |
485 | $ hg -R ../tmpc debugobsolete |
|
485 | $ hg -R ../tmpc debugobsolete | |
486 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
486 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
487 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
487 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
488 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
488 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
489 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
489 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
490 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
490 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
491 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
491 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
492 |
|
492 | |||
493 | detect outgoing obsolete and unstable |
|
493 | detect outgoing obsolete and unstable | |
494 | --------------------------------------- |
|
494 | --------------------------------------- | |
495 |
|
495 | |||
496 |
|
496 | |||
497 | $ hg log -G |
|
497 | $ hg log -G | |
498 | o 3:6f9641995072 (draft) [tip ] add n3w_3_c |
|
498 | o 3:6f9641995072 (draft) [tip ] add n3w_3_c | |
499 | | |
|
499 | | | |
500 | | o 2:245bde4270cd (public) [ ] add original_c |
|
500 | | o 2:245bde4270cd (public) [ ] add original_c | |
501 | |/ |
|
501 | |/ | |
502 | o 1:7c3bad9141dc (public) [ ] add b |
|
502 | o 1:7c3bad9141dc (public) [ ] add b | |
503 | | |
|
503 | | | |
504 | o 0:1f0dee641bb7 (public) [ ] add a |
|
504 | o 0:1f0dee641bb7 (public) [ ] add a | |
505 |
|
505 | |||
506 | $ hg up 'desc("n3w_3_c")' |
|
506 | $ hg up 'desc("n3w_3_c")' | |
507 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
507 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
508 | $ mkcommit original_d |
|
508 | $ mkcommit original_d | |
509 | $ mkcommit original_e |
|
509 | $ mkcommit original_e | |
510 | $ hg debugobsolete --record-parents `getid original_d` -d '0 0' |
|
510 | $ hg debugobsolete --record-parents `getid original_d` -d '0 0' | |
511 | $ hg debugobsolete | grep `getid original_d` |
|
511 | $ hg debugobsolete | grep `getid original_d` | |
512 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
512 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
513 | $ hg log -r 'obsolete()' |
|
513 | $ hg log -r 'obsolete()' | |
514 | 4:94b33453f93b (draft *obsolete*) [ ] add original_d |
|
514 | 4:94b33453f93b (draft *obsolete*) [ ] add original_d | |
515 | $ hg summary |
|
515 | $ hg summary | |
516 | parent: 5:cda648ca50f5 tip (unstable) |
|
516 | parent: 5:cda648ca50f5 tip (unstable) | |
517 | add original_e |
|
517 | add original_e | |
518 | branch: default |
|
518 | branch: default | |
519 | commit: (clean) |
|
519 | commit: (clean) | |
520 | update: 1 new changesets, 2 branch heads (merge) |
|
520 | update: 1 new changesets, 2 branch heads (merge) | |
521 | phases: 3 draft |
|
521 | phases: 3 draft | |
522 | unstable: 1 changesets |
|
522 | unstable: 1 changesets | |
523 | $ hg log -G -r '::unstable()' |
|
523 | $ hg log -G -r '::unstable()' | |
524 | @ 5:cda648ca50f5 (draft unstable) [tip ] add original_e |
|
524 | @ 5:cda648ca50f5 (draft unstable) [tip ] add original_e | |
525 | | |
|
525 | | | |
526 | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d |
|
526 | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d | |
527 | | |
|
527 | | | |
528 | o 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
528 | o 3:6f9641995072 (draft) [ ] add n3w_3_c | |
529 | | |
|
529 | | | |
530 | o 1:7c3bad9141dc (public) [ ] add b |
|
530 | o 1:7c3bad9141dc (public) [ ] add b | |
531 | | |
|
531 | | | |
532 | o 0:1f0dee641bb7 (public) [ ] add a |
|
532 | o 0:1f0dee641bb7 (public) [ ] add a | |
533 |
|
533 | |||
534 |
|
534 | |||
535 | refuse to push obsolete changeset |
|
535 | refuse to push obsolete changeset | |
536 |
|
536 | |||
537 | $ hg push ../tmpc/ -r 'desc("original_d")' |
|
537 | $ hg push ../tmpc/ -r 'desc("original_d")' | |
538 | pushing to ../tmpc/ |
|
538 | pushing to ../tmpc/ | |
539 | searching for changes |
|
539 | searching for changes | |
540 | abort: push includes obsolete changeset: 94b33453f93b! |
|
540 | abort: push includes obsolete changeset: 94b33453f93b! | |
541 | [255] |
|
541 | [255] | |
542 |
|
542 | |||
543 | refuse to push unstable changeset |
|
543 | refuse to push unstable changeset | |
544 |
|
544 | |||
545 | $ hg push ../tmpc/ |
|
545 | $ hg push ../tmpc/ | |
546 | pushing to ../tmpc/ |
|
546 | pushing to ../tmpc/ | |
547 | searching for changes |
|
547 | searching for changes | |
548 | abort: push includes unstable changeset: cda648ca50f5! |
|
548 | abort: push includes unstable changeset: cda648ca50f5! | |
549 | [255] |
|
549 | [255] | |
550 |
|
550 | |||
551 | Test that extinct changeset are properly detected |
|
551 | Test that extinct changeset are properly detected | |
552 |
|
552 | |||
553 | $ hg log -r 'extinct()' |
|
553 | $ hg log -r 'extinct()' | |
554 |
|
554 | |||
555 | Don't try to push extinct changeset |
|
555 | Don't try to push extinct changeset | |
556 |
|
556 | |||
557 | $ hg init ../tmpf |
|
557 | $ hg init ../tmpf | |
558 | $ hg out ../tmpf |
|
558 | $ hg out ../tmpf | |
559 | comparing with ../tmpf |
|
559 | comparing with ../tmpf | |
560 | searching for changes |
|
560 | searching for changes | |
561 | 0:1f0dee641bb7 (public) [ ] add a |
|
561 | 0:1f0dee641bb7 (public) [ ] add a | |
562 | 1:7c3bad9141dc (public) [ ] add b |
|
562 | 1:7c3bad9141dc (public) [ ] add b | |
563 | 2:245bde4270cd (public) [ ] add original_c |
|
563 | 2:245bde4270cd (public) [ ] add original_c | |
564 | 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
564 | 3:6f9641995072 (draft) [ ] add n3w_3_c | |
565 | 4:94b33453f93b (draft *obsolete*) [ ] add original_d |
|
565 | 4:94b33453f93b (draft *obsolete*) [ ] add original_d | |
566 | 5:cda648ca50f5 (draft unstable) [tip ] add original_e |
|
566 | 5:cda648ca50f5 (draft unstable) [tip ] add original_e | |
567 | $ hg push ../tmpf -f # -f because be push unstable too |
|
567 | $ hg push ../tmpf -f # -f because be push unstable too | |
568 | pushing to ../tmpf |
|
568 | pushing to ../tmpf | |
569 | searching for changes |
|
569 | searching for changes | |
570 | adding changesets |
|
570 | adding changesets | |
571 | adding manifests |
|
571 | adding manifests | |
572 | adding file changes |
|
572 | adding file changes | |
573 | added 6 changesets with 6 changes to 6 files (+1 heads) |
|
573 | added 6 changesets with 6 changes to 6 files (+1 heads) | |
574 | 7 new obsolescence markers |
|
574 | 7 new obsolescence markers | |
575 |
|
575 | |||
576 | no warning displayed |
|
576 | no warning displayed | |
577 |
|
577 | |||
578 | $ hg push ../tmpf |
|
578 | $ hg push ../tmpf | |
579 | pushing to ../tmpf |
|
579 | pushing to ../tmpf | |
580 | searching for changes |
|
580 | searching for changes | |
581 | no changes found |
|
581 | no changes found | |
582 | [1] |
|
582 | [1] | |
583 |
|
583 | |||
584 | Do not warn about new head when the new head is a successors of a remote one |
|
584 | Do not warn about new head when the new head is a successors of a remote one | |
585 |
|
585 | |||
586 | $ hg log -G |
|
586 | $ hg log -G | |
587 | @ 5:cda648ca50f5 (draft unstable) [tip ] add original_e |
|
587 | @ 5:cda648ca50f5 (draft unstable) [tip ] add original_e | |
588 | | |
|
588 | | | |
589 | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d |
|
589 | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d | |
590 | | |
|
590 | | | |
591 | o 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
591 | o 3:6f9641995072 (draft) [ ] add n3w_3_c | |
592 | | |
|
592 | | | |
593 | | o 2:245bde4270cd (public) [ ] add original_c |
|
593 | | o 2:245bde4270cd (public) [ ] add original_c | |
594 | |/ |
|
594 | |/ | |
595 | o 1:7c3bad9141dc (public) [ ] add b |
|
595 | o 1:7c3bad9141dc (public) [ ] add b | |
596 | | |
|
596 | | | |
597 | o 0:1f0dee641bb7 (public) [ ] add a |
|
597 | o 0:1f0dee641bb7 (public) [ ] add a | |
598 |
|
598 | |||
599 | $ hg up -q 'desc(n3w_3_c)' |
|
599 | $ hg up -q 'desc(n3w_3_c)' | |
600 | $ mkcommit obsolete_e |
|
600 | $ mkcommit obsolete_e | |
601 | created new head |
|
601 | created new head | |
602 | $ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'` \ |
|
602 | $ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'` \ | |
603 | > -u 'test <test@example.net>' |
|
603 | > -u 'test <test@example.net>' | |
604 | $ hg outgoing ../tmpf # parasite hg outgoing testin |
|
604 | $ hg outgoing ../tmpf # parasite hg outgoing testin | |
605 | comparing with ../tmpf |
|
605 | comparing with ../tmpf | |
606 | searching for changes |
|
606 | searching for changes | |
607 | 6:3de5eca88c00 (draft) [tip ] add obsolete_e |
|
607 | 6:3de5eca88c00 (draft) [tip ] add obsolete_e | |
608 | $ hg push ../tmpf |
|
608 | $ hg push ../tmpf | |
609 | pushing to ../tmpf |
|
609 | pushing to ../tmpf | |
610 | searching for changes |
|
610 | searching for changes | |
611 | adding changesets |
|
611 | adding changesets | |
612 | adding manifests |
|
612 | adding manifests | |
613 | adding file changes |
|
613 | adding file changes | |
614 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
614 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
615 | 1 new obsolescence markers |
|
615 | 1 new obsolescence markers | |
616 |
|
616 | |||
617 | test relevance computation |
|
617 | test relevance computation | |
618 | --------------------------------------- |
|
618 | --------------------------------------- | |
619 |
|
619 | |||
620 | Checking simple case of "marker relevance". |
|
620 | Checking simple case of "marker relevance". | |
621 |
|
621 | |||
622 |
|
622 | |||
623 | Reminder of the repo situation |
|
623 | Reminder of the repo situation | |
624 |
|
624 | |||
625 | $ hg log --hidden --graph |
|
625 | $ hg log --hidden --graph | |
626 | @ 6:3de5eca88c00 (draft) [tip ] add obsolete_e |
|
626 | @ 6:3de5eca88c00 (draft) [tip ] add obsolete_e | |
627 | | |
|
627 | | | |
628 | | x 5:cda648ca50f5 (draft *obsolete*) [ ] add original_e |
|
628 | | x 5:cda648ca50f5 (draft *obsolete*) [ ] add original_e | |
629 | | | |
|
629 | | | | |
630 | | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d |
|
630 | | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d | |
631 | |/ |
|
631 | |/ | |
632 | o 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
632 | o 3:6f9641995072 (draft) [ ] add n3w_3_c | |
633 | | |
|
633 | | | |
634 | | o 2:245bde4270cd (public) [ ] add original_c |
|
634 | | o 2:245bde4270cd (public) [ ] add original_c | |
635 | |/ |
|
635 | |/ | |
636 | o 1:7c3bad9141dc (public) [ ] add b |
|
636 | o 1:7c3bad9141dc (public) [ ] add b | |
637 | | |
|
637 | | | |
638 | o 0:1f0dee641bb7 (public) [ ] add a |
|
638 | o 0:1f0dee641bb7 (public) [ ] add a | |
639 |
|
639 | |||
640 |
|
640 | |||
641 | List of all markers |
|
641 | List of all markers | |
642 |
|
642 | |||
643 | $ hg debugobsolete |
|
643 | $ hg debugobsolete | |
644 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
644 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
645 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
645 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
646 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
646 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
647 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
647 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
648 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
648 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
649 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
649 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
650 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
650 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
651 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) |
|
651 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) | |
652 |
|
652 | |||
653 | List of changesets with no chain |
|
653 | List of changesets with no chain | |
654 |
|
654 | |||
655 | $ hg debugobsolete --hidden --rev ::2 |
|
655 | $ hg debugobsolete --hidden --rev ::2 | |
656 |
|
656 | |||
657 | List of changesets that are included on marker chain |
|
657 | List of changesets that are included on marker chain | |
658 |
|
658 | |||
659 | $ hg debugobsolete --hidden --rev 6 |
|
659 | $ hg debugobsolete --hidden --rev 6 | |
660 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) |
|
660 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) | |
661 |
|
661 | |||
662 | List of changesets with a longer chain, (including a pruned children) |
|
662 | List of changesets with a longer chain, (including a pruned children) | |
663 |
|
663 | |||
664 | $ hg debugobsolete --hidden --rev 3 |
|
664 | $ hg debugobsolete --hidden --rev 3 | |
665 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
665 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
666 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
666 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
667 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
667 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
668 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
668 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
669 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
669 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
670 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
670 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
671 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
671 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
672 |
|
672 | |||
673 | List of both |
|
673 | List of both | |
674 |
|
674 | |||
675 | $ hg debugobsolete --hidden --rev 3::6 |
|
675 | $ hg debugobsolete --hidden --rev 3::6 | |
676 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
676 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
677 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
677 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
678 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
678 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
679 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
679 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
680 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
680 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
681 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
681 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
682 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) |
|
682 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) | |
683 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
683 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
684 |
|
684 | |||
685 | List of all markers in JSON |
|
685 | List of all markers in JSON | |
686 |
|
686 | |||
687 | $ hg debugobsolete -Tjson |
|
687 | $ hg debugobsolete -Tjson | |
688 | [ |
|
688 | [ | |
689 | { |
|
689 | { | |
690 | "date": [1339.0, 0], |
|
690 | "date": [1339.0, 0], | |
691 | "flag": 0, |
|
691 | "flag": 0, | |
692 | "metadata": {"user": "test"}, |
|
692 | "metadata": {"user": "test"}, | |
693 | "precnode": "1339133913391339133913391339133913391339", |
|
693 | "precnode": "1339133913391339133913391339133913391339", | |
694 | "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"] |
|
694 | "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"] | |
695 | }, |
|
695 | }, | |
696 | { |
|
696 | { | |
697 | "date": [1339.0, 0], |
|
697 | "date": [1339.0, 0], | |
698 | "flag": 0, |
|
698 | "flag": 0, | |
699 | "metadata": {"user": "test"}, |
|
699 | "metadata": {"user": "test"}, | |
700 | "precnode": "1337133713371337133713371337133713371337", |
|
700 | "precnode": "1337133713371337133713371337133713371337", | |
701 | "succnodes": ["5601fb93a350734d935195fee37f4054c529ff39"] |
|
701 | "succnodes": ["5601fb93a350734d935195fee37f4054c529ff39"] | |
702 | }, |
|
702 | }, | |
703 | { |
|
703 | { | |
704 | "date": [121.0, 120], |
|
704 | "date": [121.0, 120], | |
705 | "flag": 12, |
|
705 | "flag": 12, | |
706 | "metadata": {"user": "test"}, |
|
706 | "metadata": {"user": "test"}, | |
707 | "precnode": "245bde4270cd1072a27757984f9cda8ba26f08ca", |
|
707 | "precnode": "245bde4270cd1072a27757984f9cda8ba26f08ca", | |
708 | "succnodes": ["cdbce2fbb16313928851e97e0d85413f3f7eb77f"] |
|
708 | "succnodes": ["cdbce2fbb16313928851e97e0d85413f3f7eb77f"] | |
709 | }, |
|
709 | }, | |
710 | { |
|
710 | { | |
711 | "date": [1338.0, 0], |
|
711 | "date": [1338.0, 0], | |
712 | "flag": 1, |
|
712 | "flag": 1, | |
713 | "metadata": {"user": "test"}, |
|
713 | "metadata": {"user": "test"}, | |
714 | "precnode": "5601fb93a350734d935195fee37f4054c529ff39", |
|
714 | "precnode": "5601fb93a350734d935195fee37f4054c529ff39", | |
715 | "succnodes": ["6f96419950729f3671185b847352890f074f7557"] |
|
715 | "succnodes": ["6f96419950729f3671185b847352890f074f7557"] | |
716 | }, |
|
716 | }, | |
717 | { |
|
717 | { | |
718 | "date": [1338.0, 0], |
|
718 | "date": [1338.0, 0], | |
719 | "flag": 0, |
|
719 | "flag": 0, | |
720 | "metadata": {"user": "test"}, |
|
720 | "metadata": {"user": "test"}, | |
721 | "precnode": "ca819180edb99ed25ceafb3e9584ac287e240b00", |
|
721 | "precnode": "ca819180edb99ed25ceafb3e9584ac287e240b00", | |
722 | "succnodes": ["1337133713371337133713371337133713371337"] |
|
722 | "succnodes": ["1337133713371337133713371337133713371337"] | |
723 | }, |
|
723 | }, | |
724 | { |
|
724 | { | |
725 | "date": [1337.0, 0], |
|
725 | "date": [1337.0, 0], | |
726 | "flag": 0, |
|
726 | "flag": 0, | |
727 | "metadata": {"user": "test"}, |
|
727 | "metadata": {"user": "test"}, | |
728 | "precnode": "cdbce2fbb16313928851e97e0d85413f3f7eb77f", |
|
728 | "precnode": "cdbce2fbb16313928851e97e0d85413f3f7eb77f", | |
729 | "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"] |
|
729 | "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"] | |
730 | }, |
|
730 | }, | |
731 | { |
|
731 | { | |
732 | "date": [0.0, 0], |
|
732 | "date": [0.0, 0], | |
733 | "flag": 0, |
|
733 | "flag": 0, | |
734 | "metadata": {"user": "test"}, |
|
734 | "metadata": {"user": "test"}, | |
735 | "parentnodes": ["6f96419950729f3671185b847352890f074f7557"], |
|
735 | "parentnodes": ["6f96419950729f3671185b847352890f074f7557"], | |
736 | "precnode": "94b33453f93bdb8d457ef9b770851a618bf413e1", |
|
736 | "precnode": "94b33453f93bdb8d457ef9b770851a618bf413e1", | |
737 | "succnodes": [] |
|
737 | "succnodes": [] | |
738 | }, |
|
738 | }, | |
739 | { |
|
739 | { | |
740 | "date": *, (glob) |
|
740 | "date": *, (glob) | |
741 | "flag": 0, |
|
741 | "flag": 0, | |
742 | "metadata": {"user": "test <test@example.net>"}, |
|
742 | "metadata": {"user": "test <test@example.net>"}, | |
743 | "precnode": "cda648ca50f50482b7055c0b0c4c117bba6733d9", |
|
743 | "precnode": "cda648ca50f50482b7055c0b0c4c117bba6733d9", | |
744 | "succnodes": ["3de5eca88c00aa039da7399a220f4a5221faa585"] |
|
744 | "succnodes": ["3de5eca88c00aa039da7399a220f4a5221faa585"] | |
745 | } |
|
745 | } | |
746 | ] |
|
746 | ] | |
747 |
|
747 | |||
748 | Template keywords |
|
748 | Template keywords | |
749 |
|
749 | |||
750 | $ hg debugobsolete -r6 -T '{succnodes % "{node|short}"} {date|shortdate}\n' |
|
750 | $ hg debugobsolete -r6 -T '{succnodes % "{node|short}"} {date|shortdate}\n' | |
751 | 3de5eca88c00 ????-??-?? (glob) |
|
751 | 3de5eca88c00 ????-??-?? (glob) | |
752 | $ hg debugobsolete -r6 -T '{join(metadata % "{key}={value}", " ")}\n' |
|
752 | $ hg debugobsolete -r6 -T '{join(metadata % "{key}={value}", " ")}\n' | |
753 | user=test <test@example.net> |
|
753 | user=test <test@example.net> | |
754 | $ hg debugobsolete -r6 -T '{metadata}\n' |
|
754 | $ hg debugobsolete -r6 -T '{metadata}\n' | |
755 | 'user': 'test <test@example.net>' |
|
755 | 'user': 'test <test@example.net>' | |
756 | $ hg debugobsolete -r6 -T '{flag} {get(metadata, "user")}\n' |
|
756 | $ hg debugobsolete -r6 -T '{flag} {get(metadata, "user")}\n' | |
757 | 0 test <test@example.net> |
|
757 | 0 test <test@example.net> | |
758 |
|
758 | |||
759 | Test the debug output for exchange |
|
759 | Test the debug output for exchange | |
760 | ---------------------------------- |
|
760 | ---------------------------------- | |
761 |
|
761 | |||
762 | $ hg pull ../tmpb --config 'experimental.obsmarkers-exchange-debug=True' # bundle2 |
|
762 | $ hg pull ../tmpb --config 'experimental.obsmarkers-exchange-debug=True' # bundle2 | |
763 | pulling from ../tmpb |
|
763 | pulling from ../tmpb | |
764 | searching for changes |
|
764 | searching for changes | |
765 | no changes found |
|
765 | no changes found | |
766 | obsmarker-exchange: 346 bytes received |
|
766 | obsmarker-exchange: 346 bytes received | |
767 |
|
767 | |||
768 | check hgweb does not explode |
|
768 | check hgweb does not explode | |
769 | ==================================== |
|
769 | ==================================== | |
770 |
|
770 | |||
771 | $ hg unbundle $TESTDIR/bundles/hgweb+obs.hg |
|
771 | $ hg unbundle $TESTDIR/bundles/hgweb+obs.hg | |
772 | adding changesets |
|
772 | adding changesets | |
773 | adding manifests |
|
773 | adding manifests | |
774 | adding file changes |
|
774 | adding file changes | |
775 | added 62 changesets with 63 changes to 9 files (+60 heads) |
|
775 | added 62 changesets with 63 changes to 9 files (+60 heads) | |
776 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
776 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
777 | $ for node in `hg log -r 'desc(babar_)' --template '{node}\n'`; |
|
777 | $ for node in `hg log -r 'desc(babar_)' --template '{node}\n'`; | |
778 | > do |
|
778 | > do | |
779 | > hg debugobsolete $node |
|
779 | > hg debugobsolete $node | |
780 | > done |
|
780 | > done | |
781 | $ hg up tip |
|
781 | $ hg up tip | |
782 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
782 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
783 |
|
783 | |||
784 | #if serve |
|
784 | #if serve | |
785 |
|
785 | |||
786 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
786 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
787 | $ cat hg.pid >> $DAEMON_PIDS |
|
787 | $ cat hg.pid >> $DAEMON_PIDS | |
788 |
|
788 | |||
789 | check changelog view |
|
789 | check changelog view | |
790 |
|
790 | |||
791 | $ get-with-headers.py --headeronly localhost:$HGPORT 'shortlog/' |
|
791 | $ get-with-headers.py --headeronly localhost:$HGPORT 'shortlog/' | |
792 | 200 Script output follows |
|
792 | 200 Script output follows | |
793 |
|
793 | |||
794 | check graph view |
|
794 | check graph view | |
795 |
|
795 | |||
796 | $ get-with-headers.py --headeronly localhost:$HGPORT 'graph' |
|
796 | $ get-with-headers.py --headeronly localhost:$HGPORT 'graph' | |
797 | 200 Script output follows |
|
797 | 200 Script output follows | |
798 |
|
798 | |||
799 | check filelog view |
|
799 | check filelog view | |
800 |
|
800 | |||
801 | $ get-with-headers.py --headeronly localhost:$HGPORT 'log/'`hg log -r . -T "{node}"`/'babar' |
|
801 | $ get-with-headers.py --headeronly localhost:$HGPORT 'log/'`hg log -r . -T "{node}"`/'babar' | |
802 | 200 Script output follows |
|
802 | 200 Script output follows | |
803 |
|
803 | |||
804 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/68' |
|
804 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/68' | |
805 | 200 Script output follows |
|
805 | 200 Script output follows | |
806 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67' |
|
806 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67' | |
807 | 404 Not Found |
|
807 | 404 Not Found | |
808 | [1] |
|
808 | [1] | |
809 |
|
809 | |||
810 | check that web.view config option: |
|
810 | check that web.view config option: | |
811 |
|
811 | |||
812 | $ killdaemons.py hg.pid |
|
812 | $ killdaemons.py hg.pid | |
813 | $ cat >> .hg/hgrc << EOF |
|
813 | $ cat >> .hg/hgrc << EOF | |
814 | > [web] |
|
814 | > [web] | |
815 | > view=all |
|
815 | > view=all | |
816 | > EOF |
|
816 | > EOF | |
817 | $ wait |
|
817 | $ wait | |
818 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
818 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
819 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67' |
|
819 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67' | |
820 | 200 Script output follows |
|
820 | 200 Script output follows | |
821 | $ killdaemons.py hg.pid |
|
821 | $ killdaemons.py hg.pid | |
822 |
|
822 | |||
823 | Checking _enable=False warning if obsolete marker exists |
|
823 | Checking _enable=False warning if obsolete marker exists | |
824 |
|
824 | |||
825 | $ echo '[experimental]' >> $HGRCPATH |
|
825 | $ echo '[experimental]' >> $HGRCPATH | |
826 | $ echo "evolution=" >> $HGRCPATH |
|
826 | $ echo "evolution=" >> $HGRCPATH | |
827 | $ hg log -r tip |
|
827 | $ hg log -r tip | |
828 | obsolete feature not enabled but 68 markers found! |
|
828 | obsolete feature not enabled but 68 markers found! | |
829 | 68:c15e9edfca13 (draft) [tip ] add celestine |
|
829 | 68:c15e9edfca13 (draft) [tip ] add celestine | |
830 |
|
830 | |||
831 | reenable for later test |
|
831 | reenable for later test | |
832 |
|
832 | |||
833 | $ echo '[experimental]' >> $HGRCPATH |
|
833 | $ echo '[experimental]' >> $HGRCPATH | |
834 | $ echo "evolution=createmarkers,exchange" >> $HGRCPATH |
|
834 | $ echo "evolution=createmarkers,exchange" >> $HGRCPATH | |
835 |
|
835 | |||
836 | $ rm hg.pid access.log errors.log |
|
836 | $ rm hg.pid access.log errors.log | |
837 | #endif |
|
837 | #endif | |
838 |
|
838 | |||
839 | Several troubles on the same changeset (create an unstable and bumped changeset) |
|
839 | Several troubles on the same changeset (create an unstable and bumped changeset) | |
840 |
|
840 | |||
841 | $ hg debugobsolete `getid obsolete_e` |
|
841 | $ hg debugobsolete `getid obsolete_e` | |
842 | $ hg debugobsolete `getid original_c` `getid babar` |
|
842 | $ hg debugobsolete `getid original_c` `getid babar` | |
843 | $ hg log --config ui.logtemplate= -r 'bumped() and unstable()' |
|
843 | $ hg log --config ui.logtemplate= -r 'bumped() and unstable()' | |
844 | changeset: 7:50c51b361e60 |
|
844 | changeset: 7:50c51b361e60 | |
845 | user: test |
|
845 | user: test | |
846 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
846 | date: Thu Jan 01 00:00:00 1970 +0000 | |
847 | trouble: unstable, bumped |
|
847 | trouble: unstable, bumped | |
848 | summary: add babar |
|
848 | summary: add babar | |
849 |
|
849 | |||
850 |
|
850 | |||
851 | test the "obsolete" templatekw |
|
851 | test the "obsolete" templatekw | |
852 |
|
852 | |||
853 | $ hg log -r 'obsolete()' |
|
853 | $ hg log -r 'obsolete()' | |
854 | 6:3de5eca88c00 (draft *obsolete*) [ ] add obsolete_e |
|
854 | 6:3de5eca88c00 (draft *obsolete*) [ ] add obsolete_e | |
855 |
|
855 | |||
856 | test the "troubles" templatekw |
|
856 | test the "troubles" templatekw | |
857 |
|
857 | |||
858 | $ hg log -r 'bumped() and unstable()' |
|
858 | $ hg log -r 'bumped() and unstable()' | |
859 | 7:50c51b361e60 (draft unstable bumped) [ ] add babar |
|
859 | 7:50c51b361e60 (draft unstable bumped) [ ] add babar | |
860 |
|
860 | |||
861 | test the default cmdline template |
|
861 | test the default cmdline template | |
862 |
|
862 | |||
863 | $ hg log -T default -r 'bumped()' |
|
863 | $ hg log -T default -r 'bumped()' | |
864 | changeset: 7:50c51b361e60 |
|
864 | changeset: 7:50c51b361e60 | |
865 | user: test |
|
865 | user: test | |
866 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
866 | date: Thu Jan 01 00:00:00 1970 +0000 | |
867 | trouble: unstable, bumped |
|
867 | trouble: unstable, bumped | |
868 | summary: add babar |
|
868 | summary: add babar | |
869 |
|
869 | |||
870 | $ hg log -T default -r 'obsolete()' |
|
870 | $ hg log -T default -r 'obsolete()' | |
871 | changeset: 6:3de5eca88c00 |
|
871 | changeset: 6:3de5eca88c00 | |
872 | parent: 3:6f9641995072 |
|
872 | parent: 3:6f9641995072 | |
873 | user: test |
|
873 | user: test | |
874 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
874 | date: Thu Jan 01 00:00:00 1970 +0000 | |
875 | summary: add obsolete_e |
|
875 | summary: add obsolete_e | |
876 |
|
876 | |||
877 |
|
877 | |||
878 | test summary output |
|
878 | test summary output | |
879 |
|
879 | |||
880 | $ hg up -r 'bumped() and unstable()' |
|
880 | $ hg up -r 'bumped() and unstable()' | |
881 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
881 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
882 | $ hg summary |
|
882 | $ hg summary | |
883 | parent: 7:50c51b361e60 (unstable, bumped) |
|
883 | parent: 7:50c51b361e60 (unstable, bumped) | |
884 | add babar |
|
884 | add babar | |
885 | branch: default |
|
885 | branch: default | |
886 | commit: (clean) |
|
886 | commit: (clean) | |
887 | update: 2 new changesets (update) |
|
887 | update: 2 new changesets (update) | |
888 | phases: 4 draft |
|
888 | phases: 4 draft | |
889 | unstable: 2 changesets |
|
889 | unstable: 2 changesets | |
890 | bumped: 1 changesets |
|
890 | bumped: 1 changesets | |
891 | $ hg up -r 'obsolete()' |
|
891 | $ hg up -r 'obsolete()' | |
892 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
892 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
893 | $ hg summary |
|
893 | $ hg summary | |
894 | parent: 6:3de5eca88c00 (obsolete) |
|
894 | parent: 6:3de5eca88c00 (obsolete) | |
895 | add obsolete_e |
|
895 | add obsolete_e | |
896 | branch: default |
|
896 | branch: default | |
897 | commit: (clean) |
|
897 | commit: (clean) | |
898 | update: 3 new changesets (update) |
|
898 | update: 3 new changesets (update) | |
899 | phases: 4 draft |
|
899 | phases: 4 draft | |
900 | unstable: 2 changesets |
|
900 | unstable: 2 changesets | |
901 | bumped: 1 changesets |
|
901 | bumped: 1 changesets | |
902 |
|
902 | |||
903 | Test incoming/outcoming with changesets obsoleted remotely, known locally |
|
903 | Test incoming/outcoming with changesets obsoleted remotely, known locally | |
904 | =============================================================================== |
|
904 | =============================================================================== | |
905 |
|
905 | |||
906 | This test issue 3805 |
|
906 | This test issue 3805 | |
907 |
|
907 | |||
908 | $ hg init repo-issue3805 |
|
908 | $ hg init repo-issue3805 | |
909 | $ cd repo-issue3805 |
|
909 | $ cd repo-issue3805 | |
910 | $ echo "base" > base |
|
910 | $ echo "base" > base | |
911 | $ hg ci -Am "base" |
|
911 | $ hg ci -Am "base" | |
912 | adding base |
|
912 | adding base | |
913 | $ echo "foo" > foo |
|
913 | $ echo "foo" > foo | |
914 | $ hg ci -Am "A" |
|
914 | $ hg ci -Am "A" | |
915 | adding foo |
|
915 | adding foo | |
916 | $ hg clone . ../other-issue3805 |
|
916 | $ hg clone . ../other-issue3805 | |
917 | updating to branch default |
|
917 | updating to branch default | |
918 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
918 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
919 | $ echo "bar" >> foo |
|
919 | $ echo "bar" >> foo | |
920 | $ hg ci --amend |
|
920 | $ hg ci --amend | |
921 | $ cd ../other-issue3805 |
|
921 | $ cd ../other-issue3805 | |
922 | $ hg log -G |
|
922 | $ hg log -G | |
923 | @ 1:29f0c6921ddd (draft) [tip ] A |
|
923 | @ 1:29f0c6921ddd (draft) [tip ] A | |
924 | | |
|
924 | | | |
925 | o 0:d20a80d4def3 (draft) [ ] base |
|
925 | o 0:d20a80d4def3 (draft) [ ] base | |
926 |
|
926 | |||
927 | $ hg log -G -R ../repo-issue3805 |
|
927 | $ hg log -G -R ../repo-issue3805 | |
928 | @ 3:323a9c3ddd91 (draft) [tip ] A |
|
928 | @ 3:323a9c3ddd91 (draft) [tip ] A | |
929 | | |
|
929 | | | |
930 | o 0:d20a80d4def3 (draft) [ ] base |
|
930 | o 0:d20a80d4def3 (draft) [ ] base | |
931 |
|
931 | |||
932 | $ hg incoming |
|
932 | $ hg incoming | |
933 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) |
|
933 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) | |
934 | searching for changes |
|
934 | searching for changes | |
935 | 3:323a9c3ddd91 (draft) [tip ] A |
|
935 | 3:323a9c3ddd91 (draft) [tip ] A | |
936 | $ hg incoming --bundle ../issue3805.hg |
|
936 | $ hg incoming --bundle ../issue3805.hg | |
937 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) |
|
937 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) | |
938 | searching for changes |
|
938 | searching for changes | |
939 | 3:323a9c3ddd91 (draft) [tip ] A |
|
939 | 3:323a9c3ddd91 (draft) [tip ] A | |
940 | $ hg outgoing |
|
940 | $ hg outgoing | |
941 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) |
|
941 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) | |
942 | searching for changes |
|
942 | searching for changes | |
943 | 1:29f0c6921ddd (draft) [tip ] A |
|
943 | 1:29f0c6921ddd (draft) [tip ] A | |
944 |
|
944 | |||
945 | #if serve |
|
945 | #if serve | |
946 |
|
946 | |||
947 | $ hg serve -R ../repo-issue3805 -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
947 | $ hg serve -R ../repo-issue3805 -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
948 | $ cat hg.pid >> $DAEMON_PIDS |
|
948 | $ cat hg.pid >> $DAEMON_PIDS | |
949 |
|
949 | |||
950 | $ hg incoming http://localhost:$HGPORT |
|
950 | $ hg incoming http://localhost:$HGPORT | |
951 | comparing with http://localhost:$HGPORT/ |
|
951 | comparing with http://localhost:$HGPORT/ | |
952 | searching for changes |
|
952 | searching for changes | |
953 | 2:323a9c3ddd91 (draft) [tip ] A |
|
953 | 2:323a9c3ddd91 (draft) [tip ] A | |
954 | $ hg outgoing http://localhost:$HGPORT |
|
954 | $ hg outgoing http://localhost:$HGPORT | |
955 | comparing with http://localhost:$HGPORT/ |
|
955 | comparing with http://localhost:$HGPORT/ | |
956 | searching for changes |
|
956 | searching for changes | |
957 | 1:29f0c6921ddd (draft) [tip ] A |
|
957 | 1:29f0c6921ddd (draft) [tip ] A | |
958 |
|
958 | |||
959 | $ killdaemons.py |
|
959 | $ killdaemons.py | |
960 |
|
960 | |||
961 | #endif |
|
961 | #endif | |
962 |
|
962 | |||
963 | This test issue 3814 |
|
963 | This test issue 3814 | |
964 |
|
964 | |||
965 | (nothing to push but locally hidden changeset) |
|
965 | (nothing to push but locally hidden changeset) | |
966 |
|
966 | |||
967 | $ cd .. |
|
967 | $ cd .. | |
968 | $ hg init repo-issue3814 |
|
968 | $ hg init repo-issue3814 | |
969 | $ cd repo-issue3805 |
|
969 | $ cd repo-issue3805 | |
970 | $ hg push -r 323a9c3ddd91 ../repo-issue3814 |
|
970 | $ hg push -r 323a9c3ddd91 ../repo-issue3814 | |
971 | pushing to ../repo-issue3814 |
|
971 | pushing to ../repo-issue3814 | |
972 | searching for changes |
|
972 | searching for changes | |
973 | adding changesets |
|
973 | adding changesets | |
974 | adding manifests |
|
974 | adding manifests | |
975 | adding file changes |
|
975 | adding file changes | |
976 | added 2 changesets with 2 changes to 2 files |
|
976 | added 2 changesets with 2 changes to 2 files | |
977 | 2 new obsolescence markers |
|
977 | 2 new obsolescence markers | |
978 | $ hg out ../repo-issue3814 |
|
978 | $ hg out ../repo-issue3814 | |
979 | comparing with ../repo-issue3814 |
|
979 | comparing with ../repo-issue3814 | |
980 | searching for changes |
|
980 | searching for changes | |
981 | no changes found |
|
981 | no changes found | |
982 | [1] |
|
982 | [1] | |
983 |
|
983 | |||
984 | Test that a local tag blocks a changeset from being hidden |
|
984 | Test that a local tag blocks a changeset from being hidden | |
985 |
|
985 | |||
986 | $ hg tag -l visible -r 1 --hidden |
|
986 | $ hg tag -l visible -r 1 --hidden | |
987 | $ hg log -G |
|
987 | $ hg log -G | |
988 | @ 3:323a9c3ddd91 (draft) [tip ] A |
|
988 | @ 3:323a9c3ddd91 (draft) [tip ] A | |
989 | | |
|
989 | | | |
990 | | x 1:29f0c6921ddd (draft *obsolete*) [visible ] A |
|
990 | | x 1:29f0c6921ddd (draft *obsolete*) [visible ] A | |
991 | |/ |
|
991 | |/ | |
992 | o 0:d20a80d4def3 (draft) [ ] base |
|
992 | o 0:d20a80d4def3 (draft) [ ] base | |
993 |
|
993 | |||
994 | Test that removing a local tag does not cause some commands to fail |
|
994 | Test that removing a local tag does not cause some commands to fail | |
995 |
|
995 | |||
996 | $ hg tag -l -r tip tiptag |
|
996 | $ hg tag -l -r tip tiptag | |
997 | $ hg tags |
|
997 | $ hg tags | |
998 | tiptag 3:323a9c3ddd91 |
|
998 | tiptag 3:323a9c3ddd91 | |
999 | tip 3:323a9c3ddd91 |
|
999 | tip 3:323a9c3ddd91 | |
1000 | visible 1:29f0c6921ddd |
|
1000 | visible 1:29f0c6921ddd | |
1001 | $ hg --config extensions.strip= strip -r tip --no-backup |
|
1001 | $ hg --config extensions.strip= strip -r tip --no-backup | |
1002 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1002 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1003 | $ hg tags |
|
1003 | $ hg tags | |
1004 | visible 1:29f0c6921ddd |
|
1004 | visible 1:29f0c6921ddd | |
1005 | tip 1:29f0c6921ddd |
|
1005 | tip 1:29f0c6921ddd | |
1006 |
|
1006 | |||
1007 | Test bundle overlay onto hidden revision |
|
1007 | Test bundle overlay onto hidden revision | |
1008 |
|
1008 | |||
1009 | $ cd .. |
|
1009 | $ cd .. | |
1010 | $ hg init repo-bundleoverlay |
|
1010 | $ hg init repo-bundleoverlay | |
1011 | $ cd repo-bundleoverlay |
|
1011 | $ cd repo-bundleoverlay | |
1012 | $ echo "A" > foo |
|
1012 | $ echo "A" > foo | |
1013 | $ hg ci -Am "A" |
|
1013 | $ hg ci -Am "A" | |
1014 | adding foo |
|
1014 | adding foo | |
1015 | $ echo "B" >> foo |
|
1015 | $ echo "B" >> foo | |
1016 | $ hg ci -m "B" |
|
1016 | $ hg ci -m "B" | |
1017 | $ hg up 0 |
|
1017 | $ hg up 0 | |
1018 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1018 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1019 | $ echo "C" >> foo |
|
1019 | $ echo "C" >> foo | |
1020 | $ hg ci -m "C" |
|
1020 | $ hg ci -m "C" | |
1021 | created new head |
|
1021 | created new head | |
1022 | $ hg log -G |
|
1022 | $ hg log -G | |
1023 | @ 2:c186d7714947 (draft) [tip ] C |
|
1023 | @ 2:c186d7714947 (draft) [tip ] C | |
1024 | | |
|
1024 | | | |
1025 | | o 1:44526ebb0f98 (draft) [ ] B |
|
1025 | | o 1:44526ebb0f98 (draft) [ ] B | |
1026 | |/ |
|
1026 | |/ | |
1027 | o 0:4b34ecfb0d56 (draft) [ ] A |
|
1027 | o 0:4b34ecfb0d56 (draft) [ ] A | |
1028 |
|
1028 | |||
1029 |
|
1029 | |||
1030 | $ hg clone -r1 . ../other-bundleoverlay |
|
1030 | $ hg clone -r1 . ../other-bundleoverlay | |
1031 | adding changesets |
|
1031 | adding changesets | |
1032 | adding manifests |
|
1032 | adding manifests | |
1033 | adding file changes |
|
1033 | adding file changes | |
1034 | added 2 changesets with 2 changes to 1 files |
|
1034 | added 2 changesets with 2 changes to 1 files | |
1035 | updating to branch default |
|
1035 | updating to branch default | |
1036 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1036 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1037 | $ cd ../other-bundleoverlay |
|
1037 | $ cd ../other-bundleoverlay | |
1038 | $ echo "B+" >> foo |
|
1038 | $ echo "B+" >> foo | |
1039 | $ hg ci --amend -m "B+" |
|
1039 | $ hg ci --amend -m "B+" | |
1040 | $ hg log -G --hidden |
|
1040 | $ hg log -G --hidden | |
1041 | @ 3:b7d587542d40 (draft) [tip ] B+ |
|
1041 | @ 3:b7d587542d40 (draft) [tip ] B+ | |
1042 | | |
|
1042 | | | |
1043 | | x 2:eb95e9297e18 (draft *obsolete*) [ ] temporary amend commit for 44526ebb0f98 |
|
1043 | | x 2:eb95e9297e18 (draft *obsolete*) [ ] temporary amend commit for 44526ebb0f98 | |
1044 | | | |
|
1044 | | | | |
1045 | | x 1:44526ebb0f98 (draft *obsolete*) [ ] B |
|
1045 | | x 1:44526ebb0f98 (draft *obsolete*) [ ] B | |
1046 | |/ |
|
1046 | |/ | |
1047 | o 0:4b34ecfb0d56 (draft) [ ] A |
|
1047 | o 0:4b34ecfb0d56 (draft) [ ] A | |
1048 |
|
1048 | |||
1049 |
|
1049 | |||
1050 | $ hg incoming ../repo-bundleoverlay --bundle ../bundleoverlay.hg |
|
1050 | $ hg incoming ../repo-bundleoverlay --bundle ../bundleoverlay.hg | |
1051 | comparing with ../repo-bundleoverlay |
|
1051 | comparing with ../repo-bundleoverlay | |
1052 | searching for changes |
|
1052 | searching for changes | |
1053 | 1:44526ebb0f98 (draft) [ ] B |
|
1053 | 1:44526ebb0f98 (draft) [ ] B | |
1054 | 2:c186d7714947 (draft) [tip ] C |
|
1054 | 2:c186d7714947 (draft) [tip ] C | |
1055 | $ hg log -G -R ../bundleoverlay.hg |
|
1055 | $ hg log -G -R ../bundleoverlay.hg | |
1056 | o 4:c186d7714947 (draft) [tip ] C |
|
1056 | o 4:c186d7714947 (draft) [tip ] C | |
1057 | | |
|
1057 | | | |
1058 | | @ 3:b7d587542d40 (draft) [ ] B+ |
|
1058 | | @ 3:b7d587542d40 (draft) [ ] B+ | |
1059 | |/ |
|
1059 | |/ | |
1060 | o 0:4b34ecfb0d56 (draft) [ ] A |
|
1060 | o 0:4b34ecfb0d56 (draft) [ ] A | |
1061 |
|
1061 | |||
1062 |
|
1062 | |||
1063 | #if serve |
|
1063 | #if serve | |
1064 |
|
1064 | |||
1065 | Test issue 4506 |
|
1065 | Test issue 4506 | |
1066 |
|
1066 | |||
1067 | $ cd .. |
|
1067 | $ cd .. | |
1068 | $ hg init repo-issue4506 |
|
1068 | $ hg init repo-issue4506 | |
1069 | $ cd repo-issue4506 |
|
1069 | $ cd repo-issue4506 | |
1070 | $ echo "0" > foo |
|
1070 | $ echo "0" > foo | |
1071 | $ hg add foo |
|
1071 | $ hg add foo | |
1072 | $ hg ci -m "content-0" |
|
1072 | $ hg ci -m "content-0" | |
1073 |
|
1073 | |||
1074 | $ hg up null |
|
1074 | $ hg up null | |
1075 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1075 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1076 | $ echo "1" > bar |
|
1076 | $ echo "1" > bar | |
1077 | $ hg add bar |
|
1077 | $ hg add bar | |
1078 | $ hg ci -m "content-1" |
|
1078 | $ hg ci -m "content-1" | |
1079 | created new head |
|
1079 | created new head | |
1080 | $ hg up 0 |
|
1080 | $ hg up 0 | |
1081 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1081 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1082 | $ hg graft 1 |
|
1082 | $ hg graft 1 | |
1083 | grafting 1:1c9eddb02162 "content-1" (tip) |
|
1083 | grafting 1:1c9eddb02162 "content-1" (tip) | |
1084 |
|
1084 | |||
1085 | $ hg debugobsolete `hg log -r1 -T'{node}'` `hg log -r2 -T'{node}'` |
|
1085 | $ hg debugobsolete `hg log -r1 -T'{node}'` `hg log -r2 -T'{node}'` | |
1086 |
|
1086 | |||
1087 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
1087 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
1088 | $ cat hg.pid >> $DAEMON_PIDS |
|
1088 | $ cat hg.pid >> $DAEMON_PIDS | |
1089 |
|
1089 | |||
1090 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/1' |
|
1090 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/1' | |
1091 | 404 Not Found |
|
1091 | 404 Not Found | |
1092 | [1] |
|
1092 | [1] | |
1093 | $ get-with-headers.py --headeronly localhost:$HGPORT 'file/tip/bar' |
|
1093 | $ get-with-headers.py --headeronly localhost:$HGPORT 'file/tip/bar' | |
1094 | 200 Script output follows |
|
1094 | 200 Script output follows | |
1095 | $ get-with-headers.py --headeronly localhost:$HGPORT 'annotate/tip/bar' |
|
1095 | $ get-with-headers.py --headeronly localhost:$HGPORT 'annotate/tip/bar' | |
1096 | 200 Script output follows |
|
1096 | 200 Script output follows | |
1097 |
|
1097 | |||
1098 | $ killdaemons.py |
|
1098 | $ killdaemons.py | |
1099 |
|
1099 | |||
1100 | #endif |
|
1100 | #endif | |
1101 |
|
1101 | |||
1102 | Test heads computation on pending index changes with obsolescence markers |
|
1102 | Test heads computation on pending index changes with obsolescence markers | |
1103 | $ cd .. |
|
1103 | $ cd .. | |
1104 | $ cat >$TESTTMP/test_extension.py << EOF |
|
1104 | $ cat >$TESTTMP/test_extension.py << EOF | |
1105 | > from mercurial import cmdutil, registrar |
|
1105 | > from mercurial import cmdutil, registrar | |
1106 | > from mercurial.i18n import _ |
|
1106 | > from mercurial.i18n import _ | |
1107 | > |
|
1107 | > | |
1108 | > cmdtable = {} |
|
1108 | > cmdtable = {} | |
1109 | > command = registrar.command(cmdtable) |
|
1109 | > command = registrar.command(cmdtable) | |
1110 | > @command("amendtransient",[], _('hg amendtransient [rev]')) |
|
1110 | > @command("amendtransient",[], _('hg amendtransient [rev]')) | |
1111 | > def amend(ui, repo, *pats, **opts): |
|
1111 | > def amend(ui, repo, *pats, **opts): | |
1112 | > def commitfunc(ui, repo, message, match, opts): |
|
1112 | > def commitfunc(ui, repo, message, match, opts): | |
1113 | > return repo.commit(message, repo['.'].user(), repo['.'].date(), match) |
|
1113 | > return repo.commit(message, repo['.'].user(), repo['.'].date(), match) | |
1114 | > opts['message'] = 'Test' |
|
1114 | > opts['message'] = 'Test' | |
1115 | > opts['logfile'] = None |
|
1115 | > opts['logfile'] = None | |
1116 | > cmdutil.amend(ui, repo, commitfunc, repo['.'], {}, pats, opts) |
|
1116 | > cmdutil.amend(ui, repo, commitfunc, repo['.'], {}, pats, opts) | |
1117 | > ui.write('%s\n' % repo.changelog.headrevs()) |
|
1117 | > ui.write('%s\n' % repo.changelog.headrevs()) | |
1118 | > EOF |
|
1118 | > EOF | |
1119 | $ cat >> $HGRCPATH << EOF |
|
1119 | $ cat >> $HGRCPATH << EOF | |
1120 | > [extensions] |
|
1120 | > [extensions] | |
1121 | > testextension=$TESTTMP/test_extension.py |
|
1121 | > testextension=$TESTTMP/test_extension.py | |
1122 | > EOF |
|
1122 | > EOF | |
1123 | $ hg init repo-issue-nativerevs-pending-changes |
|
1123 | $ hg init repo-issue-nativerevs-pending-changes | |
1124 | $ cd repo-issue-nativerevs-pending-changes |
|
1124 | $ cd repo-issue-nativerevs-pending-changes | |
1125 | $ mkcommit a |
|
1125 | $ mkcommit a | |
1126 | $ mkcommit b |
|
1126 | $ mkcommit b | |
1127 | $ hg up ".^" |
|
1127 | $ hg up ".^" | |
1128 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1128 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1129 | $ echo aa > a |
|
1129 | $ echo aa > a | |
1130 | $ hg amendtransient |
|
1130 | $ hg amendtransient | |
1131 | [1, 3] |
|
1131 | [1, 3] | |
1132 |
|
1132 | |||
1133 | Test cache consistency for the visible filter |
|
1133 | Test cache consistency for the visible filter | |
1134 | 1) We want to make sure that the cached filtered revs are invalidated when |
|
1134 | 1) We want to make sure that the cached filtered revs are invalidated when | |
1135 | bookmarks change |
|
1135 | bookmarks change | |
1136 | $ cd .. |
|
1136 | $ cd .. | |
1137 | $ cat >$TESTTMP/test_extension.py << EOF |
|
1137 | $ cat >$TESTTMP/test_extension.py << EOF | |
1138 | > import weakref |
|
1138 | > import weakref | |
1139 | > from mercurial import cmdutil, extensions, bookmarks, repoview |
|
1139 | > from mercurial import cmdutil, extensions, bookmarks, repoview | |
1140 | > def _bookmarkchanged(orig, bkmstoreinst, *args, **kwargs): |
|
1140 | > def _bookmarkchanged(orig, bkmstoreinst, *args, **kwargs): | |
1141 | > reporef = weakref.ref(bkmstoreinst._repo) |
|
1141 | > reporef = weakref.ref(bkmstoreinst._repo) | |
1142 | > def trhook(tr): |
|
1142 | > def trhook(tr): | |
1143 | > repo = reporef() |
|
1143 | > repo = reporef() | |
1144 | > hidden1 = repoview.computehidden(repo) |
|
1144 | > hidden1 = repoview.computehidden(repo) | |
1145 | > hidden = repoview.filterrevs(repo, 'visible') |
|
1145 | > hidden = repoview.filterrevs(repo, 'visible') | |
1146 | > if sorted(hidden1) != sorted(hidden): |
|
1146 | > if sorted(hidden1) != sorted(hidden): | |
1147 | > print "cache inconsistency" |
|
1147 | > print "cache inconsistency" | |
1148 | > bkmstoreinst._repo.currenttransaction().addpostclose('test_extension', trhook) |
|
1148 | > bkmstoreinst._repo.currenttransaction().addpostclose('test_extension', trhook) | |
1149 | > orig(bkmstoreinst, *args, **kwargs) |
|
1149 | > orig(bkmstoreinst, *args, **kwargs) | |
1150 | > def extsetup(ui): |
|
1150 | > def extsetup(ui): | |
1151 | > extensions.wrapfunction(bookmarks.bmstore, 'recordchange', |
|
1151 | > extensions.wrapfunction(bookmarks.bmstore, 'recordchange', | |
1152 | > _bookmarkchanged) |
|
1152 | > _bookmarkchanged) | |
1153 | > EOF |
|
1153 | > EOF | |
1154 |
|
1154 | |||
1155 | $ hg init repo-cache-inconsistency |
|
1155 | $ hg init repo-cache-inconsistency | |
1156 | $ cd repo-issue-nativerevs-pending-changes |
|
1156 | $ cd repo-issue-nativerevs-pending-changes | |
1157 | $ mkcommit a |
|
1157 | $ mkcommit a | |
1158 | a already tracked! |
|
1158 | a already tracked! | |
1159 | $ mkcommit b |
|
1159 | $ mkcommit b | |
1160 | $ hg id |
|
1160 | $ hg id | |
1161 | 13bedc178fce tip |
|
1161 | 13bedc178fce tip | |
1162 | $ echo "hello" > b |
|
1162 | $ echo "hello" > b | |
1163 | $ hg commit --amend -m "message" |
|
1163 | $ hg commit --amend -m "message" | |
1164 | $ hg book bookb -r 13bedc178fce --hidden |
|
1164 | $ hg book bookb -r 13bedc178fce --hidden | |
1165 | $ hg log -r 13bedc178fce |
|
1165 | $ hg log -r 13bedc178fce | |
1166 | 5:13bedc178fce (draft *obsolete*) [ bookb] add b |
|
1166 | 5:13bedc178fce (draft *obsolete*) [ bookb] add b | |
1167 | $ hg book -d bookb |
|
1167 | $ hg book -d bookb | |
1168 | $ hg log -r 13bedc178fce |
|
1168 | $ hg log -r 13bedc178fce | |
1169 | abort: hidden revision '13bedc178fce'! |
|
1169 | abort: hidden revision '13bedc178fce'! | |
1170 | (use --hidden to access hidden revisions) |
|
1170 | (use --hidden to access hidden revisions) | |
1171 | [255] |
|
1171 | [255] | |
1172 |
|
1172 | |||
1173 | Empty out the test extension, as it isn't compatible with later parts |
|
1173 | Empty out the test extension, as it isn't compatible with later parts | |
1174 | of the test. |
|
1174 | of the test. | |
1175 | $ echo > $TESTTMP/test_extension.py |
|
1175 | $ echo > $TESTTMP/test_extension.py | |
1176 |
|
1176 | |||
1177 | Test ability to pull changeset with locally applying obsolescence markers |
|
1177 | Test ability to pull changeset with locally applying obsolescence markers | |
1178 | (issue4945) |
|
1178 | (issue4945) | |
1179 |
|
1179 | |||
1180 | $ cd .. |
|
1180 | $ cd .. | |
1181 | $ hg init issue4845 |
|
1181 | $ hg init issue4845 | |
1182 | $ cd issue4845 |
|
1182 | $ cd issue4845 | |
1183 |
|
1183 | |||
1184 | $ echo foo > f0 |
|
1184 | $ echo foo > f0 | |
1185 | $ hg add f0 |
|
1185 | $ hg add f0 | |
1186 | $ hg ci -m '0' |
|
1186 | $ hg ci -m '0' | |
1187 | $ echo foo > f1 |
|
1187 | $ echo foo > f1 | |
1188 | $ hg add f1 |
|
1188 | $ hg add f1 | |
1189 | $ hg ci -m '1' |
|
1189 | $ hg ci -m '1' | |
1190 | $ echo foo > f2 |
|
1190 | $ echo foo > f2 | |
1191 | $ hg add f2 |
|
1191 | $ hg add f2 | |
1192 | $ hg ci -m '2' |
|
1192 | $ hg ci -m '2' | |
1193 |
|
1193 | |||
1194 | $ echo bar > f2 |
|
1194 | $ echo bar > f2 | |
1195 | $ hg commit --amend --config experimetnal.evolution=createmarkers |
|
1195 | $ hg commit --amend --config experimetnal.evolution=createmarkers | |
1196 | $ hg log -G |
|
1196 | $ hg log -G | |
1197 | @ 4:b0551702f918 (draft) [tip ] 2 |
|
1197 | @ 4:b0551702f918 (draft) [tip ] 2 | |
1198 | | |
|
1198 | | | |
1199 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1199 | o 1:e016b03fd86f (draft) [ ] 1 | |
1200 | | |
|
1200 | | | |
1201 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1201 | o 0:a78f55e5508c (draft) [ ] 0 | |
1202 |
|
1202 | |||
1203 | $ hg log -G --hidden |
|
1203 | $ hg log -G --hidden | |
1204 | @ 4:b0551702f918 (draft) [tip ] 2 |
|
1204 | @ 4:b0551702f918 (draft) [tip ] 2 | |
1205 | | |
|
1205 | | | |
1206 | | x 3:f27abbcc1f77 (draft *obsolete*) [ ] temporary amend commit for e008cf283490 |
|
1206 | | x 3:f27abbcc1f77 (draft *obsolete*) [ ] temporary amend commit for e008cf283490 | |
1207 | | | |
|
1207 | | | | |
1208 | | x 2:e008cf283490 (draft *obsolete*) [ ] 2 |
|
1208 | | x 2:e008cf283490 (draft *obsolete*) [ ] 2 | |
1209 | |/ |
|
1209 | |/ | |
1210 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1210 | o 1:e016b03fd86f (draft) [ ] 1 | |
1211 | | |
|
1211 | | | |
1212 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1212 | o 0:a78f55e5508c (draft) [ ] 0 | |
1213 |
|
1213 | |||
1214 |
|
1214 | |||
1215 | $ hg strip --hidden -r 2 --config extensions.strip= --config devel.strip-obsmarkers=no |
|
1215 | $ hg strip --hidden -r 2 --config extensions.strip= --config devel.strip-obsmarkers=no | |
1216 | saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e008cf283490-39c978dc-backup.hg (glob) |
|
1216 | saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e008cf283490-39c978dc-backup.hg (glob) | |
1217 | $ hg debugobsolete |
|
1217 | $ hg debugobsolete | |
1218 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (*) {'user': 'test'} (glob) |
|
1218 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (*) {'user': 'test'} (glob) | |
1219 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (*) {'user': 'test'} (glob) |
|
1219 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (*) {'user': 'test'} (glob) | |
1220 | $ hg log -G |
|
1220 | $ hg log -G | |
1221 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1221 | @ 2:b0551702f918 (draft) [tip ] 2 | |
1222 | | |
|
1222 | | | |
1223 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1223 | o 1:e016b03fd86f (draft) [ ] 1 | |
1224 | | |
|
1224 | | | |
1225 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1225 | o 0:a78f55e5508c (draft) [ ] 0 | |
1226 |
|
1226 | |||
1227 | $ hg log -G --hidden |
|
1227 | $ hg log -G --hidden | |
1228 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1228 | @ 2:b0551702f918 (draft) [tip ] 2 | |
1229 | | |
|
1229 | | | |
1230 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1230 | o 1:e016b03fd86f (draft) [ ] 1 | |
1231 | | |
|
1231 | | | |
1232 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1232 | o 0:a78f55e5508c (draft) [ ] 0 | |
1233 |
|
1233 | |||
1234 | $ hg debugbundle .hg/strip-backup/e008cf283490-*-backup.hg |
|
1234 | $ hg debugbundle .hg/strip-backup/e008cf283490-*-backup.hg | |
1235 | Stream params: sortdict([('Compression', 'BZ')]) |
|
1235 | Stream params: sortdict([('Compression', 'BZ')]) | |
1236 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '2')])" |
|
1236 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '2')])" | |
1237 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 |
|
1237 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 | |
1238 | f27abbcc1f77fb409cf9160482fe619541e2d605 |
|
1238 | f27abbcc1f77fb409cf9160482fe619541e2d605 | |
1239 | obsmarkers -- 'sortdict()' |
|
1239 | obsmarkers -- 'sortdict()' | |
1240 | version: 1 (70 bytes) |
|
1240 | version: 1 (70 bytes) | |
1241 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1241 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
1242 | phase-heads -- 'sortdict()' | |||
|
1243 | f27abbcc1f77fb409cf9160482fe619541e2d605 draft | |||
1242 |
|
1244 | |||
1243 | $ hg pull .hg/strip-backup/e008cf283490-*-backup.hg |
|
1245 | $ hg pull .hg/strip-backup/e008cf283490-*-backup.hg | |
1244 | pulling from .hg/strip-backup/e008cf283490-39c978dc-backup.hg |
|
1246 | pulling from .hg/strip-backup/e008cf283490-39c978dc-backup.hg | |
1245 | searching for changes |
|
1247 | searching for changes | |
1246 | no changes found |
|
1248 | no changes found | |
1247 | $ hg debugobsolete |
|
1249 | $ hg debugobsolete | |
1248 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (*) {'user': 'test'} (glob) |
|
1250 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (*) {'user': 'test'} (glob) | |
1249 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (*) {'user': 'test'} (glob) |
|
1251 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (*) {'user': 'test'} (glob) | |
1250 | $ hg log -G |
|
1252 | $ hg log -G | |
1251 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1253 | @ 2:b0551702f918 (draft) [tip ] 2 | |
1252 | | |
|
1254 | | | |
1253 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1255 | o 1:e016b03fd86f (draft) [ ] 1 | |
1254 | | |
|
1256 | | | |
1255 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1257 | o 0:a78f55e5508c (draft) [ ] 0 | |
1256 |
|
1258 | |||
1257 | $ hg log -G --hidden |
|
1259 | $ hg log -G --hidden | |
1258 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1260 | @ 2:b0551702f918 (draft) [tip ] 2 | |
1259 | | |
|
1261 | | | |
1260 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1262 | o 1:e016b03fd86f (draft) [ ] 1 | |
1261 | | |
|
1263 | | | |
1262 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1264 | o 0:a78f55e5508c (draft) [ ] 0 | |
1263 |
|
1265 | |||
1264 |
|
1266 | |||
1265 | Testing that strip remove markers: |
|
1267 | Testing that strip remove markers: | |
1266 |
|
1268 | |||
1267 | $ hg strip -r 1 --config extensions.strip= |
|
1269 | $ hg strip -r 1 --config extensions.strip= | |
1268 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1270 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
1269 | saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e016b03fd86f-65ede734-backup.hg (glob) |
|
1271 | saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e016b03fd86f-65ede734-backup.hg (glob) | |
1270 | $ hg debugobsolete |
|
1272 | $ hg debugobsolete | |
1271 | $ hg log -G |
|
1273 | $ hg log -G | |
1272 | @ 0:a78f55e5508c (draft) [tip ] 0 |
|
1274 | @ 0:a78f55e5508c (draft) [tip ] 0 | |
1273 |
|
1275 | |||
1274 | $ hg log -G --hidden |
|
1276 | $ hg log -G --hidden | |
1275 | @ 0:a78f55e5508c (draft) [tip ] 0 |
|
1277 | @ 0:a78f55e5508c (draft) [tip ] 0 | |
1276 |
|
1278 | |||
1277 | $ hg debugbundle .hg/strip-backup/e016b03fd86f-*-backup.hg |
|
1279 | $ hg debugbundle .hg/strip-backup/e016b03fd86f-*-backup.hg | |
1278 | Stream params: sortdict([('Compression', 'BZ')]) |
|
1280 | Stream params: sortdict([('Compression', 'BZ')]) | |
1279 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '2')])" |
|
1281 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '2')])" | |
1280 | e016b03fd86fcccc54817d120b90b751aaf367d6 |
|
1282 | e016b03fd86fcccc54817d120b90b751aaf367d6 | |
1281 | b0551702f918510f01ae838ab03a463054c67b46 |
|
1283 | b0551702f918510f01ae838ab03a463054c67b46 | |
1282 | obsmarkers -- 'sortdict()' |
|
1284 | obsmarkers -- 'sortdict()' | |
1283 | version: 1 (139 bytes) |
|
1285 | version: 1 (139 bytes) | |
1284 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1286 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
1285 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1287 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
|
1288 | phase-heads -- 'sortdict()' | |||
|
1289 | b0551702f918510f01ae838ab03a463054c67b46 draft | |||
1286 |
|
1290 | |||
1287 | $ hg unbundle .hg/strip-backup/e016b03fd86f-*-backup.hg |
|
1291 | $ hg unbundle .hg/strip-backup/e016b03fd86f-*-backup.hg | |
1288 | adding changesets |
|
1292 | adding changesets | |
1289 | adding manifests |
|
1293 | adding manifests | |
1290 | adding file changes |
|
1294 | adding file changes | |
1291 | added 2 changesets with 2 changes to 2 files |
|
1295 | added 2 changesets with 2 changes to 2 files | |
1292 | 2 new obsolescence markers |
|
1296 | 2 new obsolescence markers | |
1293 | (run 'hg update' to get a working copy) |
|
1297 | (run 'hg update' to get a working copy) | |
1294 | $ hg debugobsolete | sort |
|
1298 | $ hg debugobsolete | sort | |
1295 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (*) {'user': 'test'} (glob) |
|
1299 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (*) {'user': 'test'} (glob) | |
1296 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (*) {'user': 'test'} (glob) |
|
1300 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (*) {'user': 'test'} (glob) | |
1297 | $ hg log -G |
|
1301 | $ hg log -G | |
1298 | o 2:b0551702f918 (draft) [tip ] 2 |
|
1302 | o 2:b0551702f918 (draft) [tip ] 2 | |
1299 | | |
|
1303 | | | |
1300 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1304 | o 1:e016b03fd86f (draft) [ ] 1 | |
1301 | | |
|
1305 | | | |
1302 | @ 0:a78f55e5508c (draft) [ ] 0 |
|
1306 | @ 0:a78f55e5508c (draft) [ ] 0 | |
1303 |
|
1307 | |||
1304 | $ hg log -G --hidden |
|
1308 | $ hg log -G --hidden | |
1305 | o 2:b0551702f918 (draft) [tip ] 2 |
|
1309 | o 2:b0551702f918 (draft) [tip ] 2 | |
1306 | | |
|
1310 | | | |
1307 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1311 | o 1:e016b03fd86f (draft) [ ] 1 | |
1308 | | |
|
1312 | | | |
1309 | @ 0:a78f55e5508c (draft) [ ] 0 |
|
1313 | @ 0:a78f55e5508c (draft) [ ] 0 | |
1310 |
|
1314 | |||
1311 | Test that 'hg debugobsolete --index --rev' can show indices of obsmarkers when |
|
1315 | Test that 'hg debugobsolete --index --rev' can show indices of obsmarkers when | |
1312 | only a subset of those are displayed (because of --rev option) |
|
1316 | only a subset of those are displayed (because of --rev option) | |
1313 | $ hg init doindexrev |
|
1317 | $ hg init doindexrev | |
1314 | $ cd doindexrev |
|
1318 | $ cd doindexrev | |
1315 | $ echo a > a |
|
1319 | $ echo a > a | |
1316 | $ hg ci -Am a |
|
1320 | $ hg ci -Am a | |
1317 | adding a |
|
1321 | adding a | |
1318 | $ hg ci --amend -m aa |
|
1322 | $ hg ci --amend -m aa | |
1319 | $ echo b > b |
|
1323 | $ echo b > b | |
1320 | $ hg ci -Am b |
|
1324 | $ hg ci -Am b | |
1321 | adding b |
|
1325 | adding b | |
1322 | $ hg ci --amend -m bb |
|
1326 | $ hg ci --amend -m bb | |
1323 | $ echo c > c |
|
1327 | $ echo c > c | |
1324 | $ hg ci -Am c |
|
1328 | $ hg ci -Am c | |
1325 | adding c |
|
1329 | adding c | |
1326 | $ hg ci --amend -m cc |
|
1330 | $ hg ci --amend -m cc | |
1327 | $ echo d > d |
|
1331 | $ echo d > d | |
1328 | $ hg ci -Am d |
|
1332 | $ hg ci -Am d | |
1329 | adding d |
|
1333 | adding d | |
1330 | $ hg ci --amend -m dd --config experimental.evolution.track-operation=1 |
|
1334 | $ hg ci --amend -m dd --config experimental.evolution.track-operation=1 | |
1331 | $ hg debugobsolete --index --rev "3+7" |
|
1335 | $ hg debugobsolete --index --rev "3+7" | |
1332 | 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 \(.*\) {'user': 'test'} (re) |
|
1336 | 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 \(.*\) {'user': 'test'} (re) | |
1333 | 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 \(.*\) {'operation': 'amend', 'user': 'test'} (re) |
|
1337 | 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 \(.*\) {'operation': 'amend', 'user': 'test'} (re) | |
1334 | $ hg debugobsolete --index --rev "3+7" -Tjson |
|
1338 | $ hg debugobsolete --index --rev "3+7" -Tjson | |
1335 | [ |
|
1339 | [ | |
1336 | { |
|
1340 | { | |
1337 | "date": [0.0, 0], |
|
1341 | "date": [0.0, 0], | |
1338 | "flag": 0, |
|
1342 | "flag": 0, | |
1339 | "index": 1, |
|
1343 | "index": 1, | |
1340 | "metadata": {"user": "test"}, |
|
1344 | "metadata": {"user": "test"}, | |
1341 | "precnode": "6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1", |
|
1345 | "precnode": "6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1", | |
1342 | "succnodes": ["d27fb9b066076fd921277a4b9e8b9cb48c95bc6a"] |
|
1346 | "succnodes": ["d27fb9b066076fd921277a4b9e8b9cb48c95bc6a"] | |
1343 | }, |
|
1347 | }, | |
1344 | { |
|
1348 | { | |
1345 | "date": [0.0, 0], |
|
1349 | "date": [0.0, 0], | |
1346 | "flag": 0, |
|
1350 | "flag": 0, | |
1347 | "index": 3, |
|
1351 | "index": 3, | |
1348 | "metadata": {"operation": "amend", "user": "test"}, |
|
1352 | "metadata": {"operation": "amend", "user": "test"}, | |
1349 | "precnode": "4715cf767440ed891755448016c2b8cf70760c30", |
|
1353 | "precnode": "4715cf767440ed891755448016c2b8cf70760c30", | |
1350 | "succnodes": ["7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d"] |
|
1354 | "succnodes": ["7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d"] | |
1351 | } |
|
1355 | } | |
1352 | ] |
|
1356 | ] | |
1353 |
|
1357 | |||
1354 | Test the --delete option of debugobsolete command |
|
1358 | Test the --delete option of debugobsolete command | |
1355 | $ hg debugobsolete --index |
|
1359 | $ hg debugobsolete --index | |
1356 | 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1360 | 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
1357 | 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1361 | 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
1358 | 2 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1362 | 2 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
1359 | 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'} |
|
1363 | 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'} | |
1360 | $ hg debugobsolete --delete 1 --delete 3 |
|
1364 | $ hg debugobsolete --delete 1 --delete 3 | |
1361 | deleted 2 obsolescence markers |
|
1365 | deleted 2 obsolescence markers | |
1362 | $ hg debugobsolete |
|
1366 | $ hg debugobsolete | |
1363 | cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1367 | cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
1364 | 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1368 | 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
1365 |
|
1369 | |||
1366 | Test adding changeset after obsmarkers affecting it |
|
1370 | Test adding changeset after obsmarkers affecting it | |
1367 | (eg: during pull, or unbundle) |
|
1371 | (eg: during pull, or unbundle) | |
1368 |
|
1372 | |||
1369 | $ mkcommit e |
|
1373 | $ mkcommit e | |
1370 | $ hg bundle -r . --base .~1 ../bundle-2.hg |
|
1374 | $ hg bundle -r . --base .~1 ../bundle-2.hg | |
1371 | 1 changesets found |
|
1375 | 1 changesets found | |
1372 | $ getid . |
|
1376 | $ getid . | |
1373 | $ hg --config extensions.strip= strip -r . |
|
1377 | $ hg --config extensions.strip= strip -r . | |
1374 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1378 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1375 | saved backup bundle to $TESTTMP/tmpe/issue4845/doindexrev/.hg/strip-backup/9bc153528424-ee80edd4-backup.hg (glob) |
|
1379 | saved backup bundle to $TESTTMP/tmpe/issue4845/doindexrev/.hg/strip-backup/9bc153528424-ee80edd4-backup.hg (glob) | |
1376 | $ hg debugobsolete 9bc153528424ea266d13e57f9ff0d799dfe61e4b |
|
1380 | $ hg debugobsolete 9bc153528424ea266d13e57f9ff0d799dfe61e4b | |
1377 | $ hg unbundle ../bundle-2.hg |
|
1381 | $ hg unbundle ../bundle-2.hg | |
1378 | adding changesets |
|
1382 | adding changesets | |
1379 | adding manifests |
|
1383 | adding manifests | |
1380 | adding file changes |
|
1384 | adding file changes | |
1381 | added 1 changesets with 1 changes to 1 files |
|
1385 | added 1 changesets with 1 changes to 1 files | |
1382 | (run 'hg update' to get a working copy) |
|
1386 | (run 'hg update' to get a working copy) | |
1383 | $ hg log -G |
|
1387 | $ hg log -G | |
1384 | @ 7:7ae79c5d60f0 (draft) [tip ] dd |
|
1388 | @ 7:7ae79c5d60f0 (draft) [tip ] dd | |
1385 | | |
|
1389 | | | |
1386 | | o 6:4715cf767440 (draft) [ ] d |
|
1390 | | o 6:4715cf767440 (draft) [ ] d | |
1387 | |/ |
|
1391 | |/ | |
1388 | o 5:29346082e4a9 (draft) [ ] cc |
|
1392 | o 5:29346082e4a9 (draft) [ ] cc | |
1389 | | |
|
1393 | | | |
1390 | o 3:d27fb9b06607 (draft) [ ] bb |
|
1394 | o 3:d27fb9b06607 (draft) [ ] bb | |
1391 | | |
|
1395 | | | |
1392 | | o 2:6fdef60fcbab (draft) [ ] b |
|
1396 | | o 2:6fdef60fcbab (draft) [ ] b | |
1393 | |/ |
|
1397 | |/ | |
1394 | o 1:f9bd49731b0b (draft) [ ] aa |
|
1398 | o 1:f9bd49731b0b (draft) [ ] aa | |
1395 |
|
1399 | |||
1396 |
|
1400 | |||
1397 | $ cd .. |
|
1401 | $ cd .. |
@@ -1,361 +1,365 b'' | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [format] |
|
2 | > [format] | |
3 | > usegeneraldelta=yes |
|
3 | > usegeneraldelta=yes | |
4 | > [extensions] |
|
4 | > [extensions] | |
5 | > rebase= |
|
5 | > rebase= | |
6 | > |
|
6 | > | |
7 | > [phases] |
|
7 | > [phases] | |
8 | > publish=False |
|
8 | > publish=False | |
9 | > |
|
9 | > | |
10 | > [alias] |
|
10 | > [alias] | |
11 | > tglog = log -G --template "{rev}:{phase} '{desc}' {branches} {bookmarks}\n" |
|
11 | > tglog = log -G --template "{rev}:{phase} '{desc}' {branches} {bookmarks}\n" | |
12 | > EOF |
|
12 | > EOF | |
13 |
|
13 | |||
14 | $ hg init a |
|
14 | $ hg init a | |
15 | $ cd a |
|
15 | $ cd a | |
16 | $ echo c1 >common |
|
16 | $ echo c1 >common | |
17 | $ hg add common |
|
17 | $ hg add common | |
18 | $ hg ci -m C1 |
|
18 | $ hg ci -m C1 | |
19 |
|
19 | |||
20 | $ echo c2 >>common |
|
20 | $ echo c2 >>common | |
21 | $ hg ci -m C2 |
|
21 | $ hg ci -m C2 | |
22 |
|
22 | |||
23 | $ echo c3 >>common |
|
23 | $ echo c3 >>common | |
24 | $ hg ci -m C3 |
|
24 | $ hg ci -m C3 | |
25 |
|
25 | |||
26 | $ hg up -q -C 1 |
|
26 | $ hg up -q -C 1 | |
27 |
|
27 | |||
28 | $ echo l1 >>extra |
|
28 | $ echo l1 >>extra | |
29 | $ hg add extra |
|
29 | $ hg add extra | |
30 | $ hg ci -m L1 |
|
30 | $ hg ci -m L1 | |
31 | created new head |
|
31 | created new head | |
32 |
|
32 | |||
33 | $ sed -e 's/c2/l2/' common > common.new |
|
33 | $ sed -e 's/c2/l2/' common > common.new | |
34 | $ mv common.new common |
|
34 | $ mv common.new common | |
35 | $ hg ci -m L2 |
|
35 | $ hg ci -m L2 | |
36 |
|
36 | |||
37 | $ echo l3 >> extra2 |
|
37 | $ echo l3 >> extra2 | |
38 | $ hg add extra2 |
|
38 | $ hg add extra2 | |
39 | $ hg ci -m L3 |
|
39 | $ hg ci -m L3 | |
40 | $ hg bookmark mybook |
|
40 | $ hg bookmark mybook | |
41 |
|
41 | |||
42 | $ hg phase --force --secret 4 |
|
42 | $ hg phase --force --secret 4 | |
43 |
|
43 | |||
44 | $ hg tglog |
|
44 | $ hg tglog | |
45 | @ 5:secret 'L3' mybook |
|
45 | @ 5:secret 'L3' mybook | |
46 | | |
|
46 | | | |
47 | o 4:secret 'L2' |
|
47 | o 4:secret 'L2' | |
48 | | |
|
48 | | | |
49 | o 3:draft 'L1' |
|
49 | o 3:draft 'L1' | |
50 | | |
|
50 | | | |
51 | | o 2:draft 'C3' |
|
51 | | o 2:draft 'C3' | |
52 | |/ |
|
52 | |/ | |
53 | o 1:draft 'C2' |
|
53 | o 1:draft 'C2' | |
54 | | |
|
54 | | | |
55 | o 0:draft 'C1' |
|
55 | o 0:draft 'C1' | |
56 |
|
56 | |||
57 | Try to call --continue: |
|
57 | Try to call --continue: | |
58 |
|
58 | |||
59 | $ hg rebase --continue |
|
59 | $ hg rebase --continue | |
60 | abort: no rebase in progress |
|
60 | abort: no rebase in progress | |
61 | [255] |
|
61 | [255] | |
62 |
|
62 | |||
63 | Conflicting rebase: |
|
63 | Conflicting rebase: | |
64 |
|
64 | |||
65 | $ hg rebase -s 3 -d 2 |
|
65 | $ hg rebase -s 3 -d 2 | |
66 | rebasing 3:3163e20567cc "L1" |
|
66 | rebasing 3:3163e20567cc "L1" | |
67 | rebasing 4:46f0b057b5c0 "L2" |
|
67 | rebasing 4:46f0b057b5c0 "L2" | |
68 | merging common |
|
68 | merging common | |
69 | warning: conflicts while merging common! (edit, then use 'hg resolve --mark') |
|
69 | warning: conflicts while merging common! (edit, then use 'hg resolve --mark') | |
70 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
70 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
71 | [1] |
|
71 | [1] | |
72 |
|
72 | |||
73 | Try to continue without solving the conflict: |
|
73 | Try to continue without solving the conflict: | |
74 |
|
74 | |||
75 | $ hg rebase --continue |
|
75 | $ hg rebase --continue | |
76 | abort: unresolved merge conflicts (see 'hg help resolve') |
|
76 | abort: unresolved merge conflicts (see 'hg help resolve') | |
77 | [255] |
|
77 | [255] | |
78 |
|
78 | |||
79 | Conclude rebase: |
|
79 | Conclude rebase: | |
80 |
|
80 | |||
81 | $ echo 'resolved merge' >common |
|
81 | $ echo 'resolved merge' >common | |
82 | $ hg resolve -m common |
|
82 | $ hg resolve -m common | |
83 | (no more unresolved files) |
|
83 | (no more unresolved files) | |
84 | continue: hg rebase --continue |
|
84 | continue: hg rebase --continue | |
85 | $ hg rebase --continue |
|
85 | $ hg rebase --continue | |
86 | already rebased 3:3163e20567cc "L1" as 3e046f2ecedb |
|
86 | already rebased 3:3163e20567cc "L1" as 3e046f2ecedb | |
87 | rebasing 4:46f0b057b5c0 "L2" |
|
87 | rebasing 4:46f0b057b5c0 "L2" | |
88 | rebasing 5:8029388f38dc "L3" (mybook) |
|
88 | rebasing 5:8029388f38dc "L3" (mybook) | |
89 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/3163e20567cc-5ca4656e-backup.hg (glob) |
|
89 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/3163e20567cc-5ca4656e-backup.hg (glob) | |
90 |
|
90 | |||
91 | $ hg tglog |
|
91 | $ hg tglog | |
92 | @ 5:secret 'L3' mybook |
|
92 | @ 5:secret 'L3' mybook | |
93 | | |
|
93 | | | |
94 | o 4:secret 'L2' |
|
94 | o 4:secret 'L2' | |
95 | | |
|
95 | | | |
96 | o 3:draft 'L1' |
|
96 | o 3:draft 'L1' | |
97 | | |
|
97 | | | |
98 | o 2:draft 'C3' |
|
98 | o 2:draft 'C3' | |
99 | | |
|
99 | | | |
100 | o 1:draft 'C2' |
|
100 | o 1:draft 'C2' | |
101 | | |
|
101 | | | |
102 | o 0:draft 'C1' |
|
102 | o 0:draft 'C1' | |
103 |
|
103 | |||
104 | Check correctness: |
|
104 | Check correctness: | |
105 |
|
105 | |||
106 | $ hg cat -r 0 common |
|
106 | $ hg cat -r 0 common | |
107 | c1 |
|
107 | c1 | |
108 |
|
108 | |||
109 | $ hg cat -r 1 common |
|
109 | $ hg cat -r 1 common | |
110 | c1 |
|
110 | c1 | |
111 | c2 |
|
111 | c2 | |
112 |
|
112 | |||
113 | $ hg cat -r 2 common |
|
113 | $ hg cat -r 2 common | |
114 | c1 |
|
114 | c1 | |
115 | c2 |
|
115 | c2 | |
116 | c3 |
|
116 | c3 | |
117 |
|
117 | |||
118 | $ hg cat -r 3 common |
|
118 | $ hg cat -r 3 common | |
119 | c1 |
|
119 | c1 | |
120 | c2 |
|
120 | c2 | |
121 | c3 |
|
121 | c3 | |
122 |
|
122 | |||
123 | $ hg cat -r 4 common |
|
123 | $ hg cat -r 4 common | |
124 | resolved merge |
|
124 | resolved merge | |
125 |
|
125 | |||
126 | $ hg cat -r 5 common |
|
126 | $ hg cat -r 5 common | |
127 | resolved merge |
|
127 | resolved merge | |
128 |
|
128 | |||
129 | Bookmark stays active after --continue |
|
129 | Bookmark stays active after --continue | |
130 | $ hg bookmarks |
|
130 | $ hg bookmarks | |
131 | * mybook 5:d67b21408fc0 |
|
131 | * mybook 5:d67b21408fc0 | |
132 |
|
132 | |||
133 | $ cd .. |
|
133 | $ cd .. | |
134 |
|
134 | |||
135 | Check that the right ancestors is used while rebasing a merge (issue4041) |
|
135 | Check that the right ancestors is used while rebasing a merge (issue4041) | |
136 |
|
136 | |||
137 | $ hg clone "$TESTDIR/bundles/issue4041.hg" issue4041 |
|
137 | $ hg clone "$TESTDIR/bundles/issue4041.hg" issue4041 | |
138 | requesting all changes |
|
138 | requesting all changes | |
139 | adding changesets |
|
139 | adding changesets | |
140 | adding manifests |
|
140 | adding manifests | |
141 | adding file changes |
|
141 | adding file changes | |
142 | added 11 changesets with 8 changes to 3 files (+1 heads) |
|
142 | added 11 changesets with 8 changes to 3 files (+1 heads) | |
143 | updating to branch default |
|
143 | updating to branch default | |
144 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
144 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
145 | $ cd issue4041 |
|
145 | $ cd issue4041 | |
146 | $ hg log -G |
|
146 | $ hg log -G | |
147 | o changeset: 10:2f2496ddf49d |
|
147 | o changeset: 10:2f2496ddf49d | |
148 | |\ branch: f1 |
|
148 | |\ branch: f1 | |
149 | | | tag: tip |
|
149 | | | tag: tip | |
150 | | | parent: 7:4c9fbe56a16f |
|
150 | | | parent: 7:4c9fbe56a16f | |
151 | | | parent: 9:e31216eec445 |
|
151 | | | parent: 9:e31216eec445 | |
152 | | | user: szhang |
|
152 | | | user: szhang | |
153 | | | date: Thu Sep 05 12:59:39 2013 -0400 |
|
153 | | | date: Thu Sep 05 12:59:39 2013 -0400 | |
154 | | | summary: merge |
|
154 | | | summary: merge | |
155 | | | |
|
155 | | | | |
156 | | o changeset: 9:e31216eec445 |
|
156 | | o changeset: 9:e31216eec445 | |
157 | | | branch: f1 |
|
157 | | | branch: f1 | |
158 | | | user: szhang |
|
158 | | | user: szhang | |
159 | | | date: Thu Sep 05 12:59:10 2013 -0400 |
|
159 | | | date: Thu Sep 05 12:59:10 2013 -0400 | |
160 | | | summary: more changes to f1 |
|
160 | | | summary: more changes to f1 | |
161 | | | |
|
161 | | | | |
162 | | o changeset: 8:8e4e2c1a07ae |
|
162 | | o changeset: 8:8e4e2c1a07ae | |
163 | | |\ branch: f1 |
|
163 | | |\ branch: f1 | |
164 | | | | parent: 2:4bc80088dc6b |
|
164 | | | | parent: 2:4bc80088dc6b | |
165 | | | | parent: 6:400110238667 |
|
165 | | | | parent: 6:400110238667 | |
166 | | | | user: szhang |
|
166 | | | | user: szhang | |
167 | | | | date: Thu Sep 05 12:57:59 2013 -0400 |
|
167 | | | | date: Thu Sep 05 12:57:59 2013 -0400 | |
168 | | | | summary: bad merge |
|
168 | | | | summary: bad merge | |
169 | | | | |
|
169 | | | | | |
170 | o | | changeset: 7:4c9fbe56a16f |
|
170 | o | | changeset: 7:4c9fbe56a16f | |
171 | |/ / branch: f1 |
|
171 | |/ / branch: f1 | |
172 | | | parent: 2:4bc80088dc6b |
|
172 | | | parent: 2:4bc80088dc6b | |
173 | | | user: szhang |
|
173 | | | user: szhang | |
174 | | | date: Thu Sep 05 12:54:00 2013 -0400 |
|
174 | | | date: Thu Sep 05 12:54:00 2013 -0400 | |
175 | | | summary: changed f1 |
|
175 | | | summary: changed f1 | |
176 | | | |
|
176 | | | | |
177 | | o changeset: 6:400110238667 |
|
177 | | o changeset: 6:400110238667 | |
178 | | | branch: f2 |
|
178 | | | branch: f2 | |
179 | | | parent: 4:12e8ec6bb010 |
|
179 | | | parent: 4:12e8ec6bb010 | |
180 | | | user: szhang |
|
180 | | | user: szhang | |
181 | | | date: Tue Sep 03 13:58:02 2013 -0400 |
|
181 | | | date: Tue Sep 03 13:58:02 2013 -0400 | |
182 | | | summary: changed f2 on f2 |
|
182 | | | summary: changed f2 on f2 | |
183 | | | |
|
183 | | | | |
184 | | | @ changeset: 5:d79e2059b5c0 |
|
184 | | | @ changeset: 5:d79e2059b5c0 | |
185 | | | | parent: 3:8a951942e016 |
|
185 | | | | parent: 3:8a951942e016 | |
186 | | | | user: szhang |
|
186 | | | | user: szhang | |
187 | | | | date: Tue Sep 03 13:57:39 2013 -0400 |
|
187 | | | | date: Tue Sep 03 13:57:39 2013 -0400 | |
188 | | | | summary: changed f2 on default |
|
188 | | | | summary: changed f2 on default | |
189 | | | | |
|
189 | | | | | |
190 | | o | changeset: 4:12e8ec6bb010 |
|
190 | | o | changeset: 4:12e8ec6bb010 | |
191 | | |/ branch: f2 |
|
191 | | |/ branch: f2 | |
192 | | | user: szhang |
|
192 | | | user: szhang | |
193 | | | date: Tue Sep 03 13:57:18 2013 -0400 |
|
193 | | | date: Tue Sep 03 13:57:18 2013 -0400 | |
194 | | | summary: created f2 branch |
|
194 | | | summary: created f2 branch | |
195 | | | |
|
195 | | | | |
196 | | o changeset: 3:8a951942e016 |
|
196 | | o changeset: 3:8a951942e016 | |
197 | | | parent: 0:24797d4f68de |
|
197 | | | parent: 0:24797d4f68de | |
198 | | | user: szhang |
|
198 | | | user: szhang | |
199 | | | date: Tue Sep 03 13:57:11 2013 -0400 |
|
199 | | | date: Tue Sep 03 13:57:11 2013 -0400 | |
200 | | | summary: added f2.txt |
|
200 | | | summary: added f2.txt | |
201 | | | |
|
201 | | | | |
202 | o | changeset: 2:4bc80088dc6b |
|
202 | o | changeset: 2:4bc80088dc6b | |
203 | | | branch: f1 |
|
203 | | | branch: f1 | |
204 | | | user: szhang |
|
204 | | | user: szhang | |
205 | | | date: Tue Sep 03 13:56:20 2013 -0400 |
|
205 | | | date: Tue Sep 03 13:56:20 2013 -0400 | |
206 | | | summary: added f1.txt |
|
206 | | | summary: added f1.txt | |
207 | | | |
|
207 | | | | |
208 | o | changeset: 1:ef53c9e6b608 |
|
208 | o | changeset: 1:ef53c9e6b608 | |
209 | |/ branch: f1 |
|
209 | |/ branch: f1 | |
210 | | user: szhang |
|
210 | | user: szhang | |
211 | | date: Tue Sep 03 13:55:26 2013 -0400 |
|
211 | | date: Tue Sep 03 13:55:26 2013 -0400 | |
212 | | summary: created f1 branch |
|
212 | | summary: created f1 branch | |
213 | | |
|
213 | | | |
214 | o changeset: 0:24797d4f68de |
|
214 | o changeset: 0:24797d4f68de | |
215 | user: szhang |
|
215 | user: szhang | |
216 | date: Tue Sep 03 13:55:08 2013 -0400 |
|
216 | date: Tue Sep 03 13:55:08 2013 -0400 | |
217 | summary: added default.txt |
|
217 | summary: added default.txt | |
218 |
|
218 | |||
219 | $ hg rebase -s9 -d2 --debug # use debug to really check merge base used |
|
219 | $ hg rebase -s9 -d2 --debug # use debug to really check merge base used | |
220 | rebase onto 4bc80088dc6b starting from e31216eec445 |
|
220 | rebase onto 4bc80088dc6b starting from e31216eec445 | |
221 | rebase status stored |
|
221 | rebase status stored | |
222 | ignoring null merge rebase of 3 |
|
222 | ignoring null merge rebase of 3 | |
223 | ignoring null merge rebase of 4 |
|
223 | ignoring null merge rebase of 4 | |
224 | ignoring null merge rebase of 6 |
|
224 | ignoring null merge rebase of 6 | |
225 | ignoring null merge rebase of 8 |
|
225 | ignoring null merge rebase of 8 | |
226 | rebasing 9:e31216eec445 "more changes to f1" |
|
226 | rebasing 9:e31216eec445 "more changes to f1" | |
227 | future parents are 2 and -1 |
|
227 | future parents are 2 and -1 | |
228 | update to 2:4bc80088dc6b |
|
228 | update to 2:4bc80088dc6b | |
229 | resolving manifests |
|
229 | resolving manifests | |
230 | branchmerge: False, force: True, partial: False |
|
230 | branchmerge: False, force: True, partial: False | |
231 | ancestor: d79e2059b5c0+, local: d79e2059b5c0+, remote: 4bc80088dc6b |
|
231 | ancestor: d79e2059b5c0+, local: d79e2059b5c0+, remote: 4bc80088dc6b | |
232 | f2.txt: other deleted -> r |
|
232 | f2.txt: other deleted -> r | |
233 | removing f2.txt |
|
233 | removing f2.txt | |
234 | f1.txt: remote created -> g |
|
234 | f1.txt: remote created -> g | |
235 | getting f1.txt |
|
235 | getting f1.txt | |
236 | merge against 9:e31216eec445 |
|
236 | merge against 9:e31216eec445 | |
237 | detach base 8:8e4e2c1a07ae |
|
237 | detach base 8:8e4e2c1a07ae | |
238 | searching for copies back to rev 3 |
|
238 | searching for copies back to rev 3 | |
239 | unmatched files in other (from topological common ancestor): |
|
239 | unmatched files in other (from topological common ancestor): | |
240 | f2.txt |
|
240 | f2.txt | |
241 | resolving manifests |
|
241 | resolving manifests | |
242 | branchmerge: True, force: True, partial: False |
|
242 | branchmerge: True, force: True, partial: False | |
243 | ancestor: 8e4e2c1a07ae, local: 4bc80088dc6b+, remote: e31216eec445 |
|
243 | ancestor: 8e4e2c1a07ae, local: 4bc80088dc6b+, remote: e31216eec445 | |
244 | f1.txt: remote is newer -> g |
|
244 | f1.txt: remote is newer -> g | |
245 | getting f1.txt |
|
245 | getting f1.txt | |
246 | committing files: |
|
246 | committing files: | |
247 | f1.txt |
|
247 | f1.txt | |
248 | committing manifest |
|
248 | committing manifest | |
249 | committing changelog |
|
249 | committing changelog | |
250 | rebased as 19c888675e13 |
|
250 | rebased as 19c888675e13 | |
251 | rebasing 10:2f2496ddf49d "merge" (tip) |
|
251 | rebasing 10:2f2496ddf49d "merge" (tip) | |
252 | future parents are 11 and 7 |
|
252 | future parents are 11 and 7 | |
253 | already in destination |
|
253 | already in destination | |
254 | merge against 10:2f2496ddf49d |
|
254 | merge against 10:2f2496ddf49d | |
255 | detach base 9:e31216eec445 |
|
255 | detach base 9:e31216eec445 | |
256 | searching for copies back to rev 3 |
|
256 | searching for copies back to rev 3 | |
257 | unmatched files in other (from topological common ancestor): |
|
257 | unmatched files in other (from topological common ancestor): | |
258 | f2.txt |
|
258 | f2.txt | |
259 | resolving manifests |
|
259 | resolving manifests | |
260 | branchmerge: True, force: True, partial: False |
|
260 | branchmerge: True, force: True, partial: False | |
261 | ancestor: e31216eec445, local: 19c888675e13+, remote: 2f2496ddf49d |
|
261 | ancestor: e31216eec445, local: 19c888675e13+, remote: 2f2496ddf49d | |
262 | f1.txt: remote is newer -> g |
|
262 | f1.txt: remote is newer -> g | |
263 | getting f1.txt |
|
263 | getting f1.txt | |
264 | committing files: |
|
264 | committing files: | |
265 | f1.txt |
|
265 | f1.txt | |
266 | committing manifest |
|
266 | committing manifest | |
267 | committing changelog |
|
267 | committing changelog | |
268 | rebased as 2a7f09cac94c |
|
268 | rebased as 2a7f09cac94c | |
269 | rebase merging completed |
|
269 | rebase merging completed | |
270 | rebase status stored |
|
270 | rebase status stored | |
271 | updating the branch cache |
|
271 | updating the branch cache | |
272 | update back to initial working directory parent |
|
272 | update back to initial working directory parent | |
273 | resolving manifests |
|
273 | resolving manifests | |
274 | branchmerge: False, force: False, partial: False |
|
274 | branchmerge: False, force: False, partial: False | |
275 | ancestor: 2a7f09cac94c, local: 2a7f09cac94c+, remote: d79e2059b5c0 |
|
275 | ancestor: 2a7f09cac94c, local: 2a7f09cac94c+, remote: d79e2059b5c0 | |
276 | f1.txt: other deleted -> r |
|
276 | f1.txt: other deleted -> r | |
277 | removing f1.txt |
|
277 | removing f1.txt | |
278 | f2.txt: remote created -> g |
|
278 | f2.txt: remote created -> g | |
279 | getting f2.txt |
|
279 | getting f2.txt | |
280 | 2 changesets found |
|
280 | 2 changesets found | |
281 | list of changesets: |
|
281 | list of changesets: | |
282 | e31216eec445e44352c5f01588856059466a24c9 |
|
282 | e31216eec445e44352c5f01588856059466a24c9 | |
283 | 2f2496ddf49d69b5ef23ad8cf9fb2e0e4faf0ac2 |
|
283 | 2f2496ddf49d69b5ef23ad8cf9fb2e0e4faf0ac2 | |
284 |
bundle2-output-bundle: "HG20", (1 params) |
|
284 | bundle2-output-bundle: "HG20", (1 params) 2 parts total | |
285 | bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload |
|
285 | bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload | |
|
286 | bundle2-output-part: "phase-heads" 24 bytes payload | |||
286 | saved backup bundle to $TESTTMP/issue4041/.hg/strip-backup/e31216eec445-15f7a814-backup.hg (glob) |
|
287 | saved backup bundle to $TESTTMP/issue4041/.hg/strip-backup/e31216eec445-15f7a814-backup.hg (glob) | |
287 | 3 changesets found |
|
288 | 3 changesets found | |
288 | list of changesets: |
|
289 | list of changesets: | |
289 | 4c9fbe56a16f30c0d5dcc40ec1a97bbe3325209c |
|
290 | 4c9fbe56a16f30c0d5dcc40ec1a97bbe3325209c | |
290 | 19c888675e133ab5dff84516926a65672eaf04d9 |
|
291 | 19c888675e133ab5dff84516926a65672eaf04d9 | |
291 | 2a7f09cac94c7f4b73ebd5cd1a62d3b2e8e336bf |
|
292 | 2a7f09cac94c7f4b73ebd5cd1a62d3b2e8e336bf | |
292 |
bundle2-output-bundle: "HG20", |
|
293 | bundle2-output-bundle: "HG20", 2 parts total | |
293 | bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload |
|
294 | bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload | |
|
295 | bundle2-output-part: "phase-heads" 24 bytes payload | |||
294 | adding branch |
|
296 | adding branch | |
295 | bundle2-input-bundle: with-transaction |
|
297 | bundle2-input-bundle: with-transaction | |
296 | bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported |
|
298 | bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported | |
297 | adding changesets |
|
299 | adding changesets | |
298 | add changeset 4c9fbe56a16f |
|
300 | add changeset 4c9fbe56a16f | |
299 | add changeset 19c888675e13 |
|
301 | add changeset 19c888675e13 | |
300 | add changeset 2a7f09cac94c |
|
302 | add changeset 2a7f09cac94c | |
301 | adding manifests |
|
303 | adding manifests | |
302 | adding file changes |
|
304 | adding file changes | |
303 | adding f1.txt revisions |
|
305 | adding f1.txt revisions | |
304 | added 2 changesets with 2 changes to 1 files |
|
306 | added 2 changesets with 2 changes to 1 files | |
305 | bundle2-input-part: total payload size 1686 |
|
307 | bundle2-input-part: total payload size 1686 | |
306 | bundle2-input-bundle: 0 parts total |
|
308 | bundle2-input-part: "phase-heads" supported | |
|
309 | bundle2-input-part: total payload size 24 | |||
|
310 | bundle2-input-bundle: 1 parts total | |||
307 | updating the branch cache |
|
311 | updating the branch cache | |
308 | invalid branchheads cache (served): tip differs |
|
312 | invalid branchheads cache (served): tip differs | |
309 | rebase completed |
|
313 | rebase completed | |
310 |
|
314 | |||
311 | Test minimization of merge conflicts |
|
315 | Test minimization of merge conflicts | |
312 | $ hg up -q null |
|
316 | $ hg up -q null | |
313 | $ echo a > a |
|
317 | $ echo a > a | |
314 | $ hg add a |
|
318 | $ hg add a | |
315 | $ hg commit -q -m 'a' |
|
319 | $ hg commit -q -m 'a' | |
316 | $ echo b >> a |
|
320 | $ echo b >> a | |
317 | $ hg commit -q -m 'ab' |
|
321 | $ hg commit -q -m 'ab' | |
318 | $ hg bookmark ab |
|
322 | $ hg bookmark ab | |
319 | $ hg up -q '.^' |
|
323 | $ hg up -q '.^' | |
320 | $ echo b >> a |
|
324 | $ echo b >> a | |
321 | $ echo c >> a |
|
325 | $ echo c >> a | |
322 | $ hg commit -q -m 'abc' |
|
326 | $ hg commit -q -m 'abc' | |
323 | $ hg rebase -s 7bc217434fc1 -d ab --keep |
|
327 | $ hg rebase -s 7bc217434fc1 -d ab --keep | |
324 | rebasing 13:7bc217434fc1 "abc" (tip) |
|
328 | rebasing 13:7bc217434fc1 "abc" (tip) | |
325 | merging a |
|
329 | merging a | |
326 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
330 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
327 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
331 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
328 | [1] |
|
332 | [1] | |
329 | $ hg diff |
|
333 | $ hg diff | |
330 | diff -r 328e4ab1f7cc a |
|
334 | diff -r 328e4ab1f7cc a | |
331 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
335 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
332 | +++ b/a * (glob) |
|
336 | +++ b/a * (glob) | |
333 | @@ -1,2 +1,6 @@ |
|
337 | @@ -1,2 +1,6 @@ | |
334 | a |
|
338 | a | |
335 | b |
|
339 | b | |
336 | +<<<<<<< dest: 328e4ab1f7cc ab - test: ab |
|
340 | +<<<<<<< dest: 328e4ab1f7cc ab - test: ab | |
337 | +======= |
|
341 | +======= | |
338 | +c |
|
342 | +c | |
339 | +>>>>>>> source: 7bc217434fc1 - test: abc |
|
343 | +>>>>>>> source: 7bc217434fc1 - test: abc | |
340 | $ hg rebase --abort |
|
344 | $ hg rebase --abort | |
341 | rebase aborted |
|
345 | rebase aborted | |
342 | $ hg up -q -C 7bc217434fc1 |
|
346 | $ hg up -q -C 7bc217434fc1 | |
343 | $ hg rebase -s . -d ab --keep -t internal:merge3 |
|
347 | $ hg rebase -s . -d ab --keep -t internal:merge3 | |
344 | rebasing 13:7bc217434fc1 "abc" (tip) |
|
348 | rebasing 13:7bc217434fc1 "abc" (tip) | |
345 | merging a |
|
349 | merging a | |
346 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
350 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
347 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
351 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
348 | [1] |
|
352 | [1] | |
349 | $ hg diff |
|
353 | $ hg diff | |
350 | diff -r 328e4ab1f7cc a |
|
354 | diff -r 328e4ab1f7cc a | |
351 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
355 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
352 | +++ b/a * (glob) |
|
356 | +++ b/a * (glob) | |
353 | @@ -1,2 +1,8 @@ |
|
357 | @@ -1,2 +1,8 @@ | |
354 | a |
|
358 | a | |
355 | +<<<<<<< dest: 328e4ab1f7cc ab - test: ab |
|
359 | +<<<<<<< dest: 328e4ab1f7cc ab - test: ab | |
356 | b |
|
360 | b | |
357 | +||||||| base |
|
361 | +||||||| base | |
358 | +======= |
|
362 | +======= | |
359 | +b |
|
363 | +b | |
360 | +c |
|
364 | +c | |
361 | +>>>>>>> source: 7bc217434fc1 - test: abc |
|
365 | +>>>>>>> source: 7bc217434fc1 - test: abc |
@@ -1,940 +1,943 b'' | |||||
1 | $ echo "[format]" >> $HGRCPATH |
|
1 | $ echo "[format]" >> $HGRCPATH | |
2 | $ echo "usegeneraldelta=yes" >> $HGRCPATH |
|
2 | $ echo "usegeneraldelta=yes" >> $HGRCPATH | |
3 | $ echo "[extensions]" >> $HGRCPATH |
|
3 | $ echo "[extensions]" >> $HGRCPATH | |
4 | $ echo "strip=" >> $HGRCPATH |
|
4 | $ echo "strip=" >> $HGRCPATH | |
5 |
|
5 | |||
6 | $ restore() { |
|
6 | $ restore() { | |
7 | > hg unbundle -q .hg/strip-backup/* |
|
7 | > hg unbundle -q .hg/strip-backup/* | |
8 | > rm .hg/strip-backup/* |
|
8 | > rm .hg/strip-backup/* | |
9 | > } |
|
9 | > } | |
10 | $ teststrip() { |
|
10 | $ teststrip() { | |
11 | > hg up -C $1 |
|
11 | > hg up -C $1 | |
12 | > echo % before update $1, strip $2 |
|
12 | > echo % before update $1, strip $2 | |
13 | > hg parents |
|
13 | > hg parents | |
14 | > hg --traceback strip $2 |
|
14 | > hg --traceback strip $2 | |
15 | > echo % after update $1, strip $2 |
|
15 | > echo % after update $1, strip $2 | |
16 | > hg parents |
|
16 | > hg parents | |
17 | > restore |
|
17 | > restore | |
18 | > } |
|
18 | > } | |
19 |
|
19 | |||
20 | $ hg init test |
|
20 | $ hg init test | |
21 | $ cd test |
|
21 | $ cd test | |
22 |
|
22 | |||
23 | $ echo foo > bar |
|
23 | $ echo foo > bar | |
24 | $ hg ci -Ama |
|
24 | $ hg ci -Ama | |
25 | adding bar |
|
25 | adding bar | |
26 |
|
26 | |||
27 | $ echo more >> bar |
|
27 | $ echo more >> bar | |
28 | $ hg ci -Amb |
|
28 | $ hg ci -Amb | |
29 |
|
29 | |||
30 | $ echo blah >> bar |
|
30 | $ echo blah >> bar | |
31 | $ hg ci -Amc |
|
31 | $ hg ci -Amc | |
32 |
|
32 | |||
33 | $ hg up 1 |
|
33 | $ hg up 1 | |
34 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
34 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
35 | $ echo blah >> bar |
|
35 | $ echo blah >> bar | |
36 | $ hg ci -Amd |
|
36 | $ hg ci -Amd | |
37 | created new head |
|
37 | created new head | |
38 |
|
38 | |||
39 | $ echo final >> bar |
|
39 | $ echo final >> bar | |
40 | $ hg ci -Ame |
|
40 | $ hg ci -Ame | |
41 |
|
41 | |||
42 | $ hg log |
|
42 | $ hg log | |
43 | changeset: 4:443431ffac4f |
|
43 | changeset: 4:443431ffac4f | |
44 | tag: tip |
|
44 | tag: tip | |
45 | user: test |
|
45 | user: test | |
46 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
46 | date: Thu Jan 01 00:00:00 1970 +0000 | |
47 | summary: e |
|
47 | summary: e | |
48 |
|
48 | |||
49 | changeset: 3:65bd5f99a4a3 |
|
49 | changeset: 3:65bd5f99a4a3 | |
50 | parent: 1:ef3a871183d7 |
|
50 | parent: 1:ef3a871183d7 | |
51 | user: test |
|
51 | user: test | |
52 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
52 | date: Thu Jan 01 00:00:00 1970 +0000 | |
53 | summary: d |
|
53 | summary: d | |
54 |
|
54 | |||
55 | changeset: 2:264128213d29 |
|
55 | changeset: 2:264128213d29 | |
56 | user: test |
|
56 | user: test | |
57 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
57 | date: Thu Jan 01 00:00:00 1970 +0000 | |
58 | summary: c |
|
58 | summary: c | |
59 |
|
59 | |||
60 | changeset: 1:ef3a871183d7 |
|
60 | changeset: 1:ef3a871183d7 | |
61 | user: test |
|
61 | user: test | |
62 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
62 | date: Thu Jan 01 00:00:00 1970 +0000 | |
63 | summary: b |
|
63 | summary: b | |
64 |
|
64 | |||
65 | changeset: 0:9ab35a2d17cb |
|
65 | changeset: 0:9ab35a2d17cb | |
66 | user: test |
|
66 | user: test | |
67 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
67 | date: Thu Jan 01 00:00:00 1970 +0000 | |
68 | summary: a |
|
68 | summary: a | |
69 |
|
69 | |||
70 |
|
70 | |||
71 | $ teststrip 4 4 |
|
71 | $ teststrip 4 4 | |
72 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
72 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
73 | % before update 4, strip 4 |
|
73 | % before update 4, strip 4 | |
74 | changeset: 4:443431ffac4f |
|
74 | changeset: 4:443431ffac4f | |
75 | tag: tip |
|
75 | tag: tip | |
76 | user: test |
|
76 | user: test | |
77 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
77 | date: Thu Jan 01 00:00:00 1970 +0000 | |
78 | summary: e |
|
78 | summary: e | |
79 |
|
79 | |||
80 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
80 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
81 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
81 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
82 | % after update 4, strip 4 |
|
82 | % after update 4, strip 4 | |
83 | changeset: 3:65bd5f99a4a3 |
|
83 | changeset: 3:65bd5f99a4a3 | |
84 | tag: tip |
|
84 | tag: tip | |
85 | parent: 1:ef3a871183d7 |
|
85 | parent: 1:ef3a871183d7 | |
86 | user: test |
|
86 | user: test | |
87 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
87 | date: Thu Jan 01 00:00:00 1970 +0000 | |
88 | summary: d |
|
88 | summary: d | |
89 |
|
89 | |||
90 | $ teststrip 4 3 |
|
90 | $ teststrip 4 3 | |
91 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
91 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
92 | % before update 4, strip 3 |
|
92 | % before update 4, strip 3 | |
93 | changeset: 4:443431ffac4f |
|
93 | changeset: 4:443431ffac4f | |
94 | tag: tip |
|
94 | tag: tip | |
95 | user: test |
|
95 | user: test | |
96 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
96 | date: Thu Jan 01 00:00:00 1970 +0000 | |
97 | summary: e |
|
97 | summary: e | |
98 |
|
98 | |||
99 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
99 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
100 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
100 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
101 | % after update 4, strip 3 |
|
101 | % after update 4, strip 3 | |
102 | changeset: 1:ef3a871183d7 |
|
102 | changeset: 1:ef3a871183d7 | |
103 | user: test |
|
103 | user: test | |
104 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
104 | date: Thu Jan 01 00:00:00 1970 +0000 | |
105 | summary: b |
|
105 | summary: b | |
106 |
|
106 | |||
107 | $ teststrip 1 4 |
|
107 | $ teststrip 1 4 | |
108 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
108 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
109 | % before update 1, strip 4 |
|
109 | % before update 1, strip 4 | |
110 | changeset: 1:ef3a871183d7 |
|
110 | changeset: 1:ef3a871183d7 | |
111 | user: test |
|
111 | user: test | |
112 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
112 | date: Thu Jan 01 00:00:00 1970 +0000 | |
113 | summary: b |
|
113 | summary: b | |
114 |
|
114 | |||
115 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
115 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
116 | % after update 1, strip 4 |
|
116 | % after update 1, strip 4 | |
117 | changeset: 1:ef3a871183d7 |
|
117 | changeset: 1:ef3a871183d7 | |
118 | user: test |
|
118 | user: test | |
119 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
119 | date: Thu Jan 01 00:00:00 1970 +0000 | |
120 | summary: b |
|
120 | summary: b | |
121 |
|
121 | |||
122 | $ teststrip 4 2 |
|
122 | $ teststrip 4 2 | |
123 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
123 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
124 | % before update 4, strip 2 |
|
124 | % before update 4, strip 2 | |
125 | changeset: 4:443431ffac4f |
|
125 | changeset: 4:443431ffac4f | |
126 | tag: tip |
|
126 | tag: tip | |
127 | user: test |
|
127 | user: test | |
128 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
128 | date: Thu Jan 01 00:00:00 1970 +0000 | |
129 | summary: e |
|
129 | summary: e | |
130 |
|
130 | |||
131 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
131 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
132 | % after update 4, strip 2 |
|
132 | % after update 4, strip 2 | |
133 | changeset: 3:443431ffac4f |
|
133 | changeset: 3:443431ffac4f | |
134 | tag: tip |
|
134 | tag: tip | |
135 | user: test |
|
135 | user: test | |
136 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
136 | date: Thu Jan 01 00:00:00 1970 +0000 | |
137 | summary: e |
|
137 | summary: e | |
138 |
|
138 | |||
139 | $ teststrip 4 1 |
|
139 | $ teststrip 4 1 | |
140 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
140 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
141 | % before update 4, strip 1 |
|
141 | % before update 4, strip 1 | |
142 | changeset: 4:264128213d29 |
|
142 | changeset: 4:264128213d29 | |
143 | tag: tip |
|
143 | tag: tip | |
144 | parent: 1:ef3a871183d7 |
|
144 | parent: 1:ef3a871183d7 | |
145 | user: test |
|
145 | user: test | |
146 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
146 | date: Thu Jan 01 00:00:00 1970 +0000 | |
147 | summary: c |
|
147 | summary: c | |
148 |
|
148 | |||
149 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
149 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
150 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
150 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
151 | % after update 4, strip 1 |
|
151 | % after update 4, strip 1 | |
152 | changeset: 0:9ab35a2d17cb |
|
152 | changeset: 0:9ab35a2d17cb | |
153 | tag: tip |
|
153 | tag: tip | |
154 | user: test |
|
154 | user: test | |
155 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
155 | date: Thu Jan 01 00:00:00 1970 +0000 | |
156 | summary: a |
|
156 | summary: a | |
157 |
|
157 | |||
158 | $ teststrip null 4 |
|
158 | $ teststrip null 4 | |
159 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
159 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
160 | % before update null, strip 4 |
|
160 | % before update null, strip 4 | |
161 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
161 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
162 | % after update null, strip 4 |
|
162 | % after update null, strip 4 | |
163 |
|
163 | |||
164 | $ hg log |
|
164 | $ hg log | |
165 | changeset: 4:264128213d29 |
|
165 | changeset: 4:264128213d29 | |
166 | tag: tip |
|
166 | tag: tip | |
167 | parent: 1:ef3a871183d7 |
|
167 | parent: 1:ef3a871183d7 | |
168 | user: test |
|
168 | user: test | |
169 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
169 | date: Thu Jan 01 00:00:00 1970 +0000 | |
170 | summary: c |
|
170 | summary: c | |
171 |
|
171 | |||
172 | changeset: 3:443431ffac4f |
|
172 | changeset: 3:443431ffac4f | |
173 | user: test |
|
173 | user: test | |
174 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
174 | date: Thu Jan 01 00:00:00 1970 +0000 | |
175 | summary: e |
|
175 | summary: e | |
176 |
|
176 | |||
177 | changeset: 2:65bd5f99a4a3 |
|
177 | changeset: 2:65bd5f99a4a3 | |
178 | user: test |
|
178 | user: test | |
179 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
179 | date: Thu Jan 01 00:00:00 1970 +0000 | |
180 | summary: d |
|
180 | summary: d | |
181 |
|
181 | |||
182 | changeset: 1:ef3a871183d7 |
|
182 | changeset: 1:ef3a871183d7 | |
183 | user: test |
|
183 | user: test | |
184 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
184 | date: Thu Jan 01 00:00:00 1970 +0000 | |
185 | summary: b |
|
185 | summary: b | |
186 |
|
186 | |||
187 | changeset: 0:9ab35a2d17cb |
|
187 | changeset: 0:9ab35a2d17cb | |
188 | user: test |
|
188 | user: test | |
189 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
189 | date: Thu Jan 01 00:00:00 1970 +0000 | |
190 | summary: a |
|
190 | summary: a | |
191 |
|
191 | |||
192 | $ hg up -C 4 |
|
192 | $ hg up -C 4 | |
193 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
193 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
194 | $ hg parents |
|
194 | $ hg parents | |
195 | changeset: 4:264128213d29 |
|
195 | changeset: 4:264128213d29 | |
196 | tag: tip |
|
196 | tag: tip | |
197 | parent: 1:ef3a871183d7 |
|
197 | parent: 1:ef3a871183d7 | |
198 | user: test |
|
198 | user: test | |
199 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
199 | date: Thu Jan 01 00:00:00 1970 +0000 | |
200 | summary: c |
|
200 | summary: c | |
201 |
|
201 | |||
202 |
|
202 | |||
203 | $ hg --traceback strip 4 |
|
203 | $ hg --traceback strip 4 | |
204 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
204 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
205 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/264128213d29-0b39d6bf-backup.hg (glob) |
|
205 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/264128213d29-0b39d6bf-backup.hg (glob) | |
206 | $ hg parents |
|
206 | $ hg parents | |
207 | changeset: 1:ef3a871183d7 |
|
207 | changeset: 1:ef3a871183d7 | |
208 | user: test |
|
208 | user: test | |
209 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
209 | date: Thu Jan 01 00:00:00 1970 +0000 | |
210 | summary: b |
|
210 | summary: b | |
211 |
|
211 | |||
212 | $ hg debugbundle .hg/strip-backup/* |
|
212 | $ hg debugbundle .hg/strip-backup/* | |
213 | Stream params: sortdict([('Compression', 'BZ')]) |
|
213 | Stream params: sortdict([('Compression', 'BZ')]) | |
214 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '1')])" |
|
214 | changegroup -- "sortdict([('version', '02'), ('nbchanges', '1')])" | |
215 | 264128213d290d868c54642d13aeaa3675551a78 |
|
215 | 264128213d290d868c54642d13aeaa3675551a78 | |
|
216 | phase-heads -- 'sortdict()' | |||
|
217 | 264128213d290d868c54642d13aeaa3675551a78 draft | |||
216 | $ hg pull .hg/strip-backup/* |
|
218 | $ hg pull .hg/strip-backup/* | |
217 | pulling from .hg/strip-backup/264128213d29-0b39d6bf-backup.hg |
|
219 | pulling from .hg/strip-backup/264128213d29-0b39d6bf-backup.hg | |
218 | searching for changes |
|
220 | searching for changes | |
219 | adding changesets |
|
221 | adding changesets | |
220 | adding manifests |
|
222 | adding manifests | |
221 | adding file changes |
|
223 | adding file changes | |
222 | added 1 changesets with 0 changes to 0 files (+1 heads) |
|
224 | added 1 changesets with 0 changes to 0 files (+1 heads) | |
223 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
225 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
224 | $ rm .hg/strip-backup/* |
|
226 | $ rm .hg/strip-backup/* | |
225 | $ hg log --graph |
|
227 | $ hg log --graph | |
226 | o changeset: 4:264128213d29 |
|
228 | o changeset: 4:264128213d29 | |
227 | | tag: tip |
|
229 | | tag: tip | |
228 | | parent: 1:ef3a871183d7 |
|
230 | | parent: 1:ef3a871183d7 | |
229 | | user: test |
|
231 | | user: test | |
230 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
232 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
231 | | summary: c |
|
233 | | summary: c | |
232 | | |
|
234 | | | |
233 | | o changeset: 3:443431ffac4f |
|
235 | | o changeset: 3:443431ffac4f | |
234 | | | user: test |
|
236 | | | user: test | |
235 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
237 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
236 | | | summary: e |
|
238 | | | summary: e | |
237 | | | |
|
239 | | | | |
238 | | o changeset: 2:65bd5f99a4a3 |
|
240 | | o changeset: 2:65bd5f99a4a3 | |
239 | |/ user: test |
|
241 | |/ user: test | |
240 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
242 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
241 | | summary: d |
|
243 | | summary: d | |
242 | | |
|
244 | | | |
243 | @ changeset: 1:ef3a871183d7 |
|
245 | @ changeset: 1:ef3a871183d7 | |
244 | | user: test |
|
246 | | user: test | |
245 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
247 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
246 | | summary: b |
|
248 | | summary: b | |
247 | | |
|
249 | | | |
248 | o changeset: 0:9ab35a2d17cb |
|
250 | o changeset: 0:9ab35a2d17cb | |
249 | user: test |
|
251 | user: test | |
250 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
252 | date: Thu Jan 01 00:00:00 1970 +0000 | |
251 | summary: a |
|
253 | summary: a | |
252 |
|
254 | |||
253 | $ hg up -C 2 |
|
255 | $ hg up -C 2 | |
254 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
256 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
255 | $ hg merge 4 |
|
257 | $ hg merge 4 | |
256 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
258 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
257 | (branch merge, don't forget to commit) |
|
259 | (branch merge, don't forget to commit) | |
258 |
|
260 | |||
259 | before strip of merge parent |
|
261 | before strip of merge parent | |
260 |
|
262 | |||
261 | $ hg parents |
|
263 | $ hg parents | |
262 | changeset: 2:65bd5f99a4a3 |
|
264 | changeset: 2:65bd5f99a4a3 | |
263 | user: test |
|
265 | user: test | |
264 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
266 | date: Thu Jan 01 00:00:00 1970 +0000 | |
265 | summary: d |
|
267 | summary: d | |
266 |
|
268 | |||
267 | changeset: 4:264128213d29 |
|
269 | changeset: 4:264128213d29 | |
268 | tag: tip |
|
270 | tag: tip | |
269 | parent: 1:ef3a871183d7 |
|
271 | parent: 1:ef3a871183d7 | |
270 | user: test |
|
272 | user: test | |
271 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
273 | date: Thu Jan 01 00:00:00 1970 +0000 | |
272 | summary: c |
|
274 | summary: c | |
273 |
|
275 | |||
274 | $ hg strip 4 |
|
276 | $ hg strip 4 | |
275 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
277 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
276 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
278 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
277 |
|
279 | |||
278 | after strip of merge parent |
|
280 | after strip of merge parent | |
279 |
|
281 | |||
280 | $ hg parents |
|
282 | $ hg parents | |
281 | changeset: 1:ef3a871183d7 |
|
283 | changeset: 1:ef3a871183d7 | |
282 | user: test |
|
284 | user: test | |
283 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
285 | date: Thu Jan 01 00:00:00 1970 +0000 | |
284 | summary: b |
|
286 | summary: b | |
285 |
|
287 | |||
286 | $ restore |
|
288 | $ restore | |
287 |
|
289 | |||
288 | $ hg up |
|
290 | $ hg up | |
289 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
291 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
290 | updated to "264128213d29: c" |
|
292 | updated to "264128213d29: c" | |
291 | 1 other heads for branch "default" |
|
293 | 1 other heads for branch "default" | |
292 | $ hg log -G |
|
294 | $ hg log -G | |
293 | @ changeset: 4:264128213d29 |
|
295 | @ changeset: 4:264128213d29 | |
294 | | tag: tip |
|
296 | | tag: tip | |
295 | | parent: 1:ef3a871183d7 |
|
297 | | parent: 1:ef3a871183d7 | |
296 | | user: test |
|
298 | | user: test | |
297 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
299 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
298 | | summary: c |
|
300 | | summary: c | |
299 | | |
|
301 | | | |
300 | | o changeset: 3:443431ffac4f |
|
302 | | o changeset: 3:443431ffac4f | |
301 | | | user: test |
|
303 | | | user: test | |
302 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
304 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
303 | | | summary: e |
|
305 | | | summary: e | |
304 | | | |
|
306 | | | | |
305 | | o changeset: 2:65bd5f99a4a3 |
|
307 | | o changeset: 2:65bd5f99a4a3 | |
306 | |/ user: test |
|
308 | |/ user: test | |
307 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
309 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
308 | | summary: d |
|
310 | | summary: d | |
309 | | |
|
311 | | | |
310 | o changeset: 1:ef3a871183d7 |
|
312 | o changeset: 1:ef3a871183d7 | |
311 | | user: test |
|
313 | | user: test | |
312 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
314 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
313 | | summary: b |
|
315 | | summary: b | |
314 | | |
|
316 | | | |
315 | o changeset: 0:9ab35a2d17cb |
|
317 | o changeset: 0:9ab35a2d17cb | |
316 | user: test |
|
318 | user: test | |
317 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
319 | date: Thu Jan 01 00:00:00 1970 +0000 | |
318 | summary: a |
|
320 | summary: a | |
319 |
|
321 | |||
320 |
|
322 | |||
321 | 2 is parent of 3, only one strip should happen |
|
323 | 2 is parent of 3, only one strip should happen | |
322 |
|
324 | |||
323 | $ hg strip "roots(2)" 3 |
|
325 | $ hg strip "roots(2)" 3 | |
324 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
326 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
325 | $ hg log -G |
|
327 | $ hg log -G | |
326 | @ changeset: 2:264128213d29 |
|
328 | @ changeset: 2:264128213d29 | |
327 | | tag: tip |
|
329 | | tag: tip | |
328 | | user: test |
|
330 | | user: test | |
329 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
331 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
330 | | summary: c |
|
332 | | summary: c | |
331 | | |
|
333 | | | |
332 | o changeset: 1:ef3a871183d7 |
|
334 | o changeset: 1:ef3a871183d7 | |
333 | | user: test |
|
335 | | user: test | |
334 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
336 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
335 | | summary: b |
|
337 | | summary: b | |
336 | | |
|
338 | | | |
337 | o changeset: 0:9ab35a2d17cb |
|
339 | o changeset: 0:9ab35a2d17cb | |
338 | user: test |
|
340 | user: test | |
339 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
341 | date: Thu Jan 01 00:00:00 1970 +0000 | |
340 | summary: a |
|
342 | summary: a | |
341 |
|
343 | |||
342 | $ restore |
|
344 | $ restore | |
343 | $ hg log -G |
|
345 | $ hg log -G | |
344 | o changeset: 4:443431ffac4f |
|
346 | o changeset: 4:443431ffac4f | |
345 | | tag: tip |
|
347 | | tag: tip | |
346 | | user: test |
|
348 | | user: test | |
347 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
349 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
348 | | summary: e |
|
350 | | summary: e | |
349 | | |
|
351 | | | |
350 | o changeset: 3:65bd5f99a4a3 |
|
352 | o changeset: 3:65bd5f99a4a3 | |
351 | | parent: 1:ef3a871183d7 |
|
353 | | parent: 1:ef3a871183d7 | |
352 | | user: test |
|
354 | | user: test | |
353 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
355 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
354 | | summary: d |
|
356 | | summary: d | |
355 | | |
|
357 | | | |
356 | | @ changeset: 2:264128213d29 |
|
358 | | @ changeset: 2:264128213d29 | |
357 | |/ user: test |
|
359 | |/ user: test | |
358 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
360 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
359 | | summary: c |
|
361 | | summary: c | |
360 | | |
|
362 | | | |
361 | o changeset: 1:ef3a871183d7 |
|
363 | o changeset: 1:ef3a871183d7 | |
362 | | user: test |
|
364 | | user: test | |
363 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
365 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
364 | | summary: b |
|
366 | | summary: b | |
365 | | |
|
367 | | | |
366 | o changeset: 0:9ab35a2d17cb |
|
368 | o changeset: 0:9ab35a2d17cb | |
367 | user: test |
|
369 | user: test | |
368 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
370 | date: Thu Jan 01 00:00:00 1970 +0000 | |
369 | summary: a |
|
371 | summary: a | |
370 |
|
372 | |||
371 | Failed hook while applying "saveheads" bundle. |
|
373 | Failed hook while applying "saveheads" bundle. | |
372 |
|
374 | |||
373 | $ hg strip 2 --config hooks.pretxnchangegroup.bad=false |
|
375 | $ hg strip 2 --config hooks.pretxnchangegroup.bad=false | |
374 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
376 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
375 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
377 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
376 | transaction abort! |
|
378 | transaction abort! | |
377 | rollback completed |
|
379 | rollback completed | |
378 | strip failed, backup bundle stored in '$TESTTMP/test/.hg/strip-backup/*-backup.hg' (glob) |
|
380 | strip failed, backup bundle stored in '$TESTTMP/test/.hg/strip-backup/*-backup.hg' (glob) | |
379 | strip failed, unrecovered changes stored in '$TESTTMP/test/.hg/strip-backup/*-temp.hg' (glob) |
|
381 | strip failed, unrecovered changes stored in '$TESTTMP/test/.hg/strip-backup/*-temp.hg' (glob) | |
380 | (fix the problem, then recover the changesets with "hg unbundle '$TESTTMP/test/.hg/strip-backup/*-temp.hg'") (glob) |
|
382 | (fix the problem, then recover the changesets with "hg unbundle '$TESTTMP/test/.hg/strip-backup/*-temp.hg'") (glob) | |
381 | abort: pretxnchangegroup.bad hook exited with status 1 |
|
383 | abort: pretxnchangegroup.bad hook exited with status 1 | |
382 | [255] |
|
384 | [255] | |
383 | $ restore |
|
385 | $ restore | |
384 | $ hg log -G |
|
386 | $ hg log -G | |
385 | o changeset: 4:443431ffac4f |
|
387 | o changeset: 4:443431ffac4f | |
386 | | tag: tip |
|
388 | | tag: tip | |
387 | | user: test |
|
389 | | user: test | |
388 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
390 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
389 | | summary: e |
|
391 | | summary: e | |
390 | | |
|
392 | | | |
391 | o changeset: 3:65bd5f99a4a3 |
|
393 | o changeset: 3:65bd5f99a4a3 | |
392 | | parent: 1:ef3a871183d7 |
|
394 | | parent: 1:ef3a871183d7 | |
393 | | user: test |
|
395 | | user: test | |
394 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
396 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
395 | | summary: d |
|
397 | | summary: d | |
396 | | |
|
398 | | | |
397 | | o changeset: 2:264128213d29 |
|
399 | | o changeset: 2:264128213d29 | |
398 | |/ user: test |
|
400 | |/ user: test | |
399 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
401 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
400 | | summary: c |
|
402 | | summary: c | |
401 | | |
|
403 | | | |
402 | @ changeset: 1:ef3a871183d7 |
|
404 | @ changeset: 1:ef3a871183d7 | |
403 | | user: test |
|
405 | | user: test | |
404 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
406 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
405 | | summary: b |
|
407 | | summary: b | |
406 | | |
|
408 | | | |
407 | o changeset: 0:9ab35a2d17cb |
|
409 | o changeset: 0:9ab35a2d17cb | |
408 | user: test |
|
410 | user: test | |
409 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
411 | date: Thu Jan 01 00:00:00 1970 +0000 | |
410 | summary: a |
|
412 | summary: a | |
411 |
|
413 | |||
412 |
|
414 | |||
413 | 2 different branches: 2 strips |
|
415 | 2 different branches: 2 strips | |
414 |
|
416 | |||
415 | $ hg strip 2 4 |
|
417 | $ hg strip 2 4 | |
416 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
418 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
417 | $ hg log -G |
|
419 | $ hg log -G | |
418 | o changeset: 2:65bd5f99a4a3 |
|
420 | o changeset: 2:65bd5f99a4a3 | |
419 | | tag: tip |
|
421 | | tag: tip | |
420 | | user: test |
|
422 | | user: test | |
421 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
423 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
422 | | summary: d |
|
424 | | summary: d | |
423 | | |
|
425 | | | |
424 | @ changeset: 1:ef3a871183d7 |
|
426 | @ changeset: 1:ef3a871183d7 | |
425 | | user: test |
|
427 | | user: test | |
426 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
428 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
427 | | summary: b |
|
429 | | summary: b | |
428 | | |
|
430 | | | |
429 | o changeset: 0:9ab35a2d17cb |
|
431 | o changeset: 0:9ab35a2d17cb | |
430 | user: test |
|
432 | user: test | |
431 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
433 | date: Thu Jan 01 00:00:00 1970 +0000 | |
432 | summary: a |
|
434 | summary: a | |
433 |
|
435 | |||
434 | $ restore |
|
436 | $ restore | |
435 |
|
437 | |||
436 | 2 different branches and a common ancestor: 1 strip |
|
438 | 2 different branches and a common ancestor: 1 strip | |
437 |
|
439 | |||
438 | $ hg strip 1 "2|4" |
|
440 | $ hg strip 1 "2|4" | |
439 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
441 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
440 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
442 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
441 | $ restore |
|
443 | $ restore | |
442 |
|
444 | |||
443 | verify fncache is kept up-to-date |
|
445 | verify fncache is kept up-to-date | |
444 |
|
446 | |||
445 | $ touch a |
|
447 | $ touch a | |
446 | $ hg ci -qAm a |
|
448 | $ hg ci -qAm a | |
447 | $ cat .hg/store/fncache | sort |
|
449 | $ cat .hg/store/fncache | sort | |
448 | data/a.i |
|
450 | data/a.i | |
449 | data/bar.i |
|
451 | data/bar.i | |
450 | $ hg strip tip |
|
452 | $ hg strip tip | |
451 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
453 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
452 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
454 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
453 | $ cat .hg/store/fncache |
|
455 | $ cat .hg/store/fncache | |
454 | data/bar.i |
|
456 | data/bar.i | |
455 |
|
457 | |||
456 | stripping an empty revset |
|
458 | stripping an empty revset | |
457 |
|
459 | |||
458 | $ hg strip "1 and not 1" |
|
460 | $ hg strip "1 and not 1" | |
459 | abort: empty revision set |
|
461 | abort: empty revision set | |
460 | [255] |
|
462 | [255] | |
461 |
|
463 | |||
462 | remove branchy history for qimport tests |
|
464 | remove branchy history for qimport tests | |
463 |
|
465 | |||
464 | $ hg strip 3 |
|
466 | $ hg strip 3 | |
465 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
467 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
466 |
|
468 | |||
467 |
|
469 | |||
468 | strip of applied mq should cleanup status file |
|
470 | strip of applied mq should cleanup status file | |
469 |
|
471 | |||
470 | $ echo "mq=" >> $HGRCPATH |
|
472 | $ echo "mq=" >> $HGRCPATH | |
471 | $ hg up -C 3 |
|
473 | $ hg up -C 3 | |
472 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
474 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
473 | $ echo fooagain >> bar |
|
475 | $ echo fooagain >> bar | |
474 | $ hg ci -mf |
|
476 | $ hg ci -mf | |
475 | $ hg qimport -r tip:2 |
|
477 | $ hg qimport -r tip:2 | |
476 |
|
478 | |||
477 | applied patches before strip |
|
479 | applied patches before strip | |
478 |
|
480 | |||
479 | $ hg qapplied |
|
481 | $ hg qapplied | |
480 | d |
|
482 | d | |
481 | e |
|
483 | e | |
482 | f |
|
484 | f | |
483 |
|
485 | |||
484 | stripping revision in queue |
|
486 | stripping revision in queue | |
485 |
|
487 | |||
486 | $ hg strip 3 |
|
488 | $ hg strip 3 | |
487 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
489 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
488 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
490 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
489 |
|
491 | |||
490 | applied patches after stripping rev in queue |
|
492 | applied patches after stripping rev in queue | |
491 |
|
493 | |||
492 | $ hg qapplied |
|
494 | $ hg qapplied | |
493 | d |
|
495 | d | |
494 |
|
496 | |||
495 | stripping ancestor of queue |
|
497 | stripping ancestor of queue | |
496 |
|
498 | |||
497 | $ hg strip 1 |
|
499 | $ hg strip 1 | |
498 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
500 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
499 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
501 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
500 |
|
502 | |||
501 | applied patches after stripping ancestor of queue |
|
503 | applied patches after stripping ancestor of queue | |
502 |
|
504 | |||
503 | $ hg qapplied |
|
505 | $ hg qapplied | |
504 |
|
506 | |||
505 | Verify strip protects against stripping wc parent when there are uncommitted mods |
|
507 | Verify strip protects against stripping wc parent when there are uncommitted mods | |
506 |
|
508 | |||
507 | $ echo b > b |
|
509 | $ echo b > b | |
508 | $ echo bb > bar |
|
510 | $ echo bb > bar | |
509 | $ hg add b |
|
511 | $ hg add b | |
510 | $ hg ci -m 'b' |
|
512 | $ hg ci -m 'b' | |
511 | $ hg log --graph |
|
513 | $ hg log --graph | |
512 | @ changeset: 1:76dcf9fab855 |
|
514 | @ changeset: 1:76dcf9fab855 | |
513 | | tag: tip |
|
515 | | tag: tip | |
514 | | user: test |
|
516 | | user: test | |
515 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
517 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
516 | | summary: b |
|
518 | | summary: b | |
517 | | |
|
519 | | | |
518 | o changeset: 0:9ab35a2d17cb |
|
520 | o changeset: 0:9ab35a2d17cb | |
519 | user: test |
|
521 | user: test | |
520 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
522 | date: Thu Jan 01 00:00:00 1970 +0000 | |
521 | summary: a |
|
523 | summary: a | |
522 |
|
524 | |||
523 | $ hg up 0 |
|
525 | $ hg up 0 | |
524 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
526 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
525 | $ echo c > bar |
|
527 | $ echo c > bar | |
526 | $ hg up -t false |
|
528 | $ hg up -t false | |
527 | merging bar |
|
529 | merging bar | |
528 | merging bar failed! |
|
530 | merging bar failed! | |
529 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
531 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
530 | use 'hg resolve' to retry unresolved file merges |
|
532 | use 'hg resolve' to retry unresolved file merges | |
531 | [1] |
|
533 | [1] | |
532 | $ hg sum |
|
534 | $ hg sum | |
533 | parent: 1:76dcf9fab855 tip |
|
535 | parent: 1:76dcf9fab855 tip | |
534 | b |
|
536 | b | |
535 | branch: default |
|
537 | branch: default | |
536 | commit: 1 modified, 1 unknown, 1 unresolved |
|
538 | commit: 1 modified, 1 unknown, 1 unresolved | |
537 | update: (current) |
|
539 | update: (current) | |
538 | phases: 2 draft |
|
540 | phases: 2 draft | |
539 | mq: 3 unapplied |
|
541 | mq: 3 unapplied | |
540 |
|
542 | |||
541 | $ echo c > b |
|
543 | $ echo c > b | |
542 | $ hg strip tip |
|
544 | $ hg strip tip | |
543 | abort: local changes found |
|
545 | abort: local changes found | |
544 | [255] |
|
546 | [255] | |
545 | $ hg strip tip --keep |
|
547 | $ hg strip tip --keep | |
546 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
548 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
547 | $ hg log --graph |
|
549 | $ hg log --graph | |
548 | @ changeset: 0:9ab35a2d17cb |
|
550 | @ changeset: 0:9ab35a2d17cb | |
549 | tag: tip |
|
551 | tag: tip | |
550 | user: test |
|
552 | user: test | |
551 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
553 | date: Thu Jan 01 00:00:00 1970 +0000 | |
552 | summary: a |
|
554 | summary: a | |
553 |
|
555 | |||
554 | $ hg status |
|
556 | $ hg status | |
555 | M bar |
|
557 | M bar | |
556 | ? b |
|
558 | ? b | |
557 | ? bar.orig |
|
559 | ? bar.orig | |
558 |
|
560 | |||
559 | $ rm bar.orig |
|
561 | $ rm bar.orig | |
560 | $ hg sum |
|
562 | $ hg sum | |
561 | parent: 0:9ab35a2d17cb tip |
|
563 | parent: 0:9ab35a2d17cb tip | |
562 | a |
|
564 | a | |
563 | branch: default |
|
565 | branch: default | |
564 | commit: 1 modified, 1 unknown |
|
566 | commit: 1 modified, 1 unknown | |
565 | update: (current) |
|
567 | update: (current) | |
566 | phases: 1 draft |
|
568 | phases: 1 draft | |
567 | mq: 3 unapplied |
|
569 | mq: 3 unapplied | |
568 |
|
570 | |||
569 | Strip adds, removes, modifies with --keep |
|
571 | Strip adds, removes, modifies with --keep | |
570 |
|
572 | |||
571 | $ touch b |
|
573 | $ touch b | |
572 | $ hg add b |
|
574 | $ hg add b | |
573 | $ hg commit -mb |
|
575 | $ hg commit -mb | |
574 | $ touch c |
|
576 | $ touch c | |
575 |
|
577 | |||
576 | ... with a clean working dir |
|
578 | ... with a clean working dir | |
577 |
|
579 | |||
578 | $ hg add c |
|
580 | $ hg add c | |
579 | $ hg rm bar |
|
581 | $ hg rm bar | |
580 | $ hg commit -mc |
|
582 | $ hg commit -mc | |
581 | $ hg status |
|
583 | $ hg status | |
582 | $ hg strip --keep tip |
|
584 | $ hg strip --keep tip | |
583 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
585 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
584 | $ hg status |
|
586 | $ hg status | |
585 | ! bar |
|
587 | ! bar | |
586 | ? c |
|
588 | ? c | |
587 |
|
589 | |||
588 | ... with a dirty working dir |
|
590 | ... with a dirty working dir | |
589 |
|
591 | |||
590 | $ hg add c |
|
592 | $ hg add c | |
591 | $ hg rm bar |
|
593 | $ hg rm bar | |
592 | $ hg commit -mc |
|
594 | $ hg commit -mc | |
593 | $ hg status |
|
595 | $ hg status | |
594 | $ echo b > b |
|
596 | $ echo b > b | |
595 | $ echo d > d |
|
597 | $ echo d > d | |
596 | $ hg strip --keep tip |
|
598 | $ hg strip --keep tip | |
597 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
599 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
598 | $ hg status |
|
600 | $ hg status | |
599 | M b |
|
601 | M b | |
600 | ! bar |
|
602 | ! bar | |
601 | ? c |
|
603 | ? c | |
602 | ? d |
|
604 | ? d | |
603 |
|
605 | |||
604 | ... after updating the dirstate |
|
606 | ... after updating the dirstate | |
605 | $ hg add c |
|
607 | $ hg add c | |
606 | $ hg commit -mc |
|
608 | $ hg commit -mc | |
607 | $ hg rm c |
|
609 | $ hg rm c | |
608 | $ hg commit -mc |
|
610 | $ hg commit -mc | |
609 | $ hg strip --keep '.^' -q |
|
611 | $ hg strip --keep '.^' -q | |
610 | $ cd .. |
|
612 | $ cd .. | |
611 |
|
613 | |||
612 | stripping many nodes on a complex graph (issue3299) |
|
614 | stripping many nodes on a complex graph (issue3299) | |
613 |
|
615 | |||
614 | $ hg init issue3299 |
|
616 | $ hg init issue3299 | |
615 | $ cd issue3299 |
|
617 | $ cd issue3299 | |
616 | $ hg debugbuilddag '@a.:a@b.:b.:x<a@a.:a<b@b.:b<a@a.:a' |
|
618 | $ hg debugbuilddag '@a.:a@b.:b.:x<a@a.:a<b@b.:b<a@a.:a' | |
617 | $ hg strip 'not ancestors(x)' |
|
619 | $ hg strip 'not ancestors(x)' | |
618 | saved backup bundle to $TESTTMP/issue3299/.hg/strip-backup/*-backup.hg (glob) |
|
620 | saved backup bundle to $TESTTMP/issue3299/.hg/strip-backup/*-backup.hg (glob) | |
619 |
|
621 | |||
620 | test hg strip -B bookmark |
|
622 | test hg strip -B bookmark | |
621 |
|
623 | |||
622 | $ cd .. |
|
624 | $ cd .. | |
623 | $ hg init bookmarks |
|
625 | $ hg init bookmarks | |
624 | $ cd bookmarks |
|
626 | $ cd bookmarks | |
625 | $ hg debugbuilddag '..<2.*1/2:m<2+3:c<m+3:a<2.:b<m+2:d<2.:e<m+1:f' |
|
627 | $ hg debugbuilddag '..<2.*1/2:m<2+3:c<m+3:a<2.:b<m+2:d<2.:e<m+1:f' | |
626 | $ hg bookmark -r 'a' 'todelete' |
|
628 | $ hg bookmark -r 'a' 'todelete' | |
627 | $ hg bookmark -r 'b' 'B' |
|
629 | $ hg bookmark -r 'b' 'B' | |
628 | $ hg bookmark -r 'b' 'nostrip' |
|
630 | $ hg bookmark -r 'b' 'nostrip' | |
629 | $ hg bookmark -r 'c' 'delete' |
|
631 | $ hg bookmark -r 'c' 'delete' | |
630 | $ hg bookmark -r 'd' 'multipledelete1' |
|
632 | $ hg bookmark -r 'd' 'multipledelete1' | |
631 | $ hg bookmark -r 'e' 'multipledelete2' |
|
633 | $ hg bookmark -r 'e' 'multipledelete2' | |
632 | $ hg bookmark -r 'f' 'singlenode1' |
|
634 | $ hg bookmark -r 'f' 'singlenode1' | |
633 | $ hg bookmark -r 'f' 'singlenode2' |
|
635 | $ hg bookmark -r 'f' 'singlenode2' | |
634 | $ hg up -C todelete |
|
636 | $ hg up -C todelete | |
635 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
637 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
636 | (activating bookmark todelete) |
|
638 | (activating bookmark todelete) | |
637 | $ hg strip -B nostrip |
|
639 | $ hg strip -B nostrip | |
638 | bookmark 'nostrip' deleted |
|
640 | bookmark 'nostrip' deleted | |
639 | abort: empty revision set |
|
641 | abort: empty revision set | |
640 | [255] |
|
642 | [255] | |
641 | $ hg strip -B todelete |
|
643 | $ hg strip -B todelete | |
642 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
644 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
643 | saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/*-backup.hg (glob) |
|
645 | saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/*-backup.hg (glob) | |
644 | bookmark 'todelete' deleted |
|
646 | bookmark 'todelete' deleted | |
645 | $ hg id -ir dcbb326fdec2 |
|
647 | $ hg id -ir dcbb326fdec2 | |
646 | abort: unknown revision 'dcbb326fdec2'! |
|
648 | abort: unknown revision 'dcbb326fdec2'! | |
647 | [255] |
|
649 | [255] | |
648 | $ hg id -ir d62d843c9a01 |
|
650 | $ hg id -ir d62d843c9a01 | |
649 | d62d843c9a01 |
|
651 | d62d843c9a01 | |
650 | $ hg bookmarks |
|
652 | $ hg bookmarks | |
651 | B 9:ff43616e5d0f |
|
653 | B 9:ff43616e5d0f | |
652 | delete 6:2702dd0c91e7 |
|
654 | delete 6:2702dd0c91e7 | |
653 | multipledelete1 11:e46a4836065c |
|
655 | multipledelete1 11:e46a4836065c | |
654 | multipledelete2 12:b4594d867745 |
|
656 | multipledelete2 12:b4594d867745 | |
655 | singlenode1 13:43227190fef8 |
|
657 | singlenode1 13:43227190fef8 | |
656 | singlenode2 13:43227190fef8 |
|
658 | singlenode2 13:43227190fef8 | |
657 | $ hg strip -B multipledelete1 -B multipledelete2 |
|
659 | $ hg strip -B multipledelete1 -B multipledelete2 | |
658 | saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/e46a4836065c-89ec65c2-backup.hg (glob) |
|
660 | saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/e46a4836065c-89ec65c2-backup.hg (glob) | |
659 | bookmark 'multipledelete1' deleted |
|
661 | bookmark 'multipledelete1' deleted | |
660 | bookmark 'multipledelete2' deleted |
|
662 | bookmark 'multipledelete2' deleted | |
661 | $ hg id -ir e46a4836065c |
|
663 | $ hg id -ir e46a4836065c | |
662 | abort: unknown revision 'e46a4836065c'! |
|
664 | abort: unknown revision 'e46a4836065c'! | |
663 | [255] |
|
665 | [255] | |
664 | $ hg id -ir b4594d867745 |
|
666 | $ hg id -ir b4594d867745 | |
665 | abort: unknown revision 'b4594d867745'! |
|
667 | abort: unknown revision 'b4594d867745'! | |
666 | [255] |
|
668 | [255] | |
667 | $ hg strip -B singlenode1 -B singlenode2 |
|
669 | $ hg strip -B singlenode1 -B singlenode2 | |
668 | saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/43227190fef8-8da858f2-backup.hg (glob) |
|
670 | saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/43227190fef8-8da858f2-backup.hg (glob) | |
669 | bookmark 'singlenode1' deleted |
|
671 | bookmark 'singlenode1' deleted | |
670 | bookmark 'singlenode2' deleted |
|
672 | bookmark 'singlenode2' deleted | |
671 | $ hg id -ir 43227190fef8 |
|
673 | $ hg id -ir 43227190fef8 | |
672 | abort: unknown revision '43227190fef8'! |
|
674 | abort: unknown revision '43227190fef8'! | |
673 | [255] |
|
675 | [255] | |
674 | $ hg strip -B unknownbookmark |
|
676 | $ hg strip -B unknownbookmark | |
675 | abort: bookmark 'unknownbookmark' not found |
|
677 | abort: bookmark 'unknownbookmark' not found | |
676 | [255] |
|
678 | [255] | |
677 | $ hg strip -B unknownbookmark1 -B unknownbookmark2 |
|
679 | $ hg strip -B unknownbookmark1 -B unknownbookmark2 | |
678 | abort: bookmark 'unknownbookmark1,unknownbookmark2' not found |
|
680 | abort: bookmark 'unknownbookmark1,unknownbookmark2' not found | |
679 | [255] |
|
681 | [255] | |
680 | $ hg strip -B delete -B unknownbookmark |
|
682 | $ hg strip -B delete -B unknownbookmark | |
681 | abort: bookmark 'unknownbookmark' not found |
|
683 | abort: bookmark 'unknownbookmark' not found | |
682 | [255] |
|
684 | [255] | |
683 | $ hg strip -B delete |
|
685 | $ hg strip -B delete | |
684 | saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/*-backup.hg (glob) |
|
686 | saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/*-backup.hg (glob) | |
685 | bookmark 'delete' deleted |
|
687 | bookmark 'delete' deleted | |
686 | $ hg id -ir 6:2702dd0c91e7 |
|
688 | $ hg id -ir 6:2702dd0c91e7 | |
687 | abort: unknown revision '2702dd0c91e7'! |
|
689 | abort: unknown revision '2702dd0c91e7'! | |
688 | [255] |
|
690 | [255] | |
689 | $ hg update B |
|
691 | $ hg update B | |
690 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
692 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
691 | (activating bookmark B) |
|
693 | (activating bookmark B) | |
692 | $ echo a > a |
|
694 | $ echo a > a | |
693 | $ hg add a |
|
695 | $ hg add a | |
694 | $ hg strip -B B |
|
696 | $ hg strip -B B | |
695 | abort: local changes found |
|
697 | abort: local changes found | |
696 | [255] |
|
698 | [255] | |
697 | $ hg bookmarks |
|
699 | $ hg bookmarks | |
698 | * B 6:ff43616e5d0f |
|
700 | * B 6:ff43616e5d0f | |
699 |
|
701 | |||
700 | Make sure no one adds back a -b option: |
|
702 | Make sure no one adds back a -b option: | |
701 |
|
703 | |||
702 | $ hg strip -b tip |
|
704 | $ hg strip -b tip | |
703 | hg strip: option -b not recognized |
|
705 | hg strip: option -b not recognized | |
704 | hg strip [-k] [-f] [-B bookmark] [-r] REV... |
|
706 | hg strip [-k] [-f] [-B bookmark] [-r] REV... | |
705 |
|
707 | |||
706 | strip changesets and all their descendants from the repository |
|
708 | strip changesets and all their descendants from the repository | |
707 |
|
709 | |||
708 | (use 'hg help -e strip' to show help for the strip extension) |
|
710 | (use 'hg help -e strip' to show help for the strip extension) | |
709 |
|
711 | |||
710 | options ([+] can be repeated): |
|
712 | options ([+] can be repeated): | |
711 |
|
713 | |||
712 | -r --rev REV [+] strip specified revision (optional, can specify |
|
714 | -r --rev REV [+] strip specified revision (optional, can specify | |
713 | revisions without this option) |
|
715 | revisions without this option) | |
714 | -f --force force removal of changesets, discard uncommitted |
|
716 | -f --force force removal of changesets, discard uncommitted | |
715 | changes (no backup) |
|
717 | changes (no backup) | |
716 | --no-backup no backups |
|
718 | --no-backup no backups | |
717 | -k --keep do not modify working directory during strip |
|
719 | -k --keep do not modify working directory during strip | |
718 | -B --bookmark VALUE [+] remove revs only reachable from given bookmark |
|
720 | -B --bookmark VALUE [+] remove revs only reachable from given bookmark | |
719 | --mq operate on patch repository |
|
721 | --mq operate on patch repository | |
720 |
|
722 | |||
721 | (use 'hg strip -h' to show more help) |
|
723 | (use 'hg strip -h' to show more help) | |
722 | [255] |
|
724 | [255] | |
723 |
|
725 | |||
724 | $ cd .. |
|
726 | $ cd .. | |
725 |
|
727 | |||
726 | Verify bundles don't get overwritten: |
|
728 | Verify bundles don't get overwritten: | |
727 |
|
729 | |||
728 | $ hg init doublebundle |
|
730 | $ hg init doublebundle | |
729 | $ cd doublebundle |
|
731 | $ cd doublebundle | |
730 | $ touch a |
|
732 | $ touch a | |
731 | $ hg commit -Aqm a |
|
733 | $ hg commit -Aqm a | |
732 | $ touch b |
|
734 | $ touch b | |
733 | $ hg commit -Aqm b |
|
735 | $ hg commit -Aqm b | |
734 | $ hg strip -r 0 |
|
736 | $ hg strip -r 0 | |
735 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
737 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
736 | saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-e68910bd-backup.hg (glob) |
|
738 | saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-e68910bd-backup.hg (glob) | |
737 | $ ls .hg/strip-backup |
|
739 | $ ls .hg/strip-backup | |
738 | 3903775176ed-e68910bd-backup.hg |
|
740 | 3903775176ed-e68910bd-backup.hg | |
739 | $ hg pull -q -r 3903775176ed .hg/strip-backup/3903775176ed-e68910bd-backup.hg |
|
741 | $ hg pull -q -r 3903775176ed .hg/strip-backup/3903775176ed-e68910bd-backup.hg | |
740 | $ hg strip -r 0 |
|
742 | $ hg strip -r 0 | |
741 | saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-54390173-backup.hg (glob) |
|
743 | saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-54390173-backup.hg (glob) | |
742 | $ ls .hg/strip-backup |
|
744 | $ ls .hg/strip-backup | |
743 | 3903775176ed-54390173-backup.hg |
|
745 | 3903775176ed-54390173-backup.hg | |
744 | 3903775176ed-e68910bd-backup.hg |
|
746 | 3903775176ed-e68910bd-backup.hg | |
745 | $ cd .. |
|
747 | $ cd .. | |
746 |
|
748 | |||
747 | Test that we only bundle the stripped changesets (issue4736) |
|
749 | Test that we only bundle the stripped changesets (issue4736) | |
748 | ------------------------------------------------------------ |
|
750 | ------------------------------------------------------------ | |
749 |
|
751 | |||
750 | initialization (previous repo is empty anyway) |
|
752 | initialization (previous repo is empty anyway) | |
751 |
|
753 | |||
752 | $ hg init issue4736 |
|
754 | $ hg init issue4736 | |
753 | $ cd issue4736 |
|
755 | $ cd issue4736 | |
754 | $ echo a > a |
|
756 | $ echo a > a | |
755 | $ hg add a |
|
757 | $ hg add a | |
756 | $ hg commit -m commitA |
|
758 | $ hg commit -m commitA | |
757 | $ echo b > b |
|
759 | $ echo b > b | |
758 | $ hg add b |
|
760 | $ hg add b | |
759 | $ hg commit -m commitB |
|
761 | $ hg commit -m commitB | |
760 | $ echo c > c |
|
762 | $ echo c > c | |
761 | $ hg add c |
|
763 | $ hg add c | |
762 | $ hg commit -m commitC |
|
764 | $ hg commit -m commitC | |
763 | $ hg up 'desc(commitB)' |
|
765 | $ hg up 'desc(commitB)' | |
764 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
766 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
765 | $ echo d > d |
|
767 | $ echo d > d | |
766 | $ hg add d |
|
768 | $ hg add d | |
767 | $ hg commit -m commitD |
|
769 | $ hg commit -m commitD | |
768 | created new head |
|
770 | created new head | |
769 | $ hg up 'desc(commitC)' |
|
771 | $ hg up 'desc(commitC)' | |
770 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
772 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
771 | $ hg merge 'desc(commitD)' |
|
773 | $ hg merge 'desc(commitD)' | |
772 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
774 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
773 | (branch merge, don't forget to commit) |
|
775 | (branch merge, don't forget to commit) | |
774 | $ hg ci -m 'mergeCD' |
|
776 | $ hg ci -m 'mergeCD' | |
775 | $ hg log -G |
|
777 | $ hg log -G | |
776 | @ changeset: 4:d8db9d137221 |
|
778 | @ changeset: 4:d8db9d137221 | |
777 | |\ tag: tip |
|
779 | |\ tag: tip | |
778 | | | parent: 2:5c51d8d6557d |
|
780 | | | parent: 2:5c51d8d6557d | |
779 | | | parent: 3:6625a5168474 |
|
781 | | | parent: 3:6625a5168474 | |
780 | | | user: test |
|
782 | | | user: test | |
781 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
783 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
782 | | | summary: mergeCD |
|
784 | | | summary: mergeCD | |
783 | | | |
|
785 | | | | |
784 | | o changeset: 3:6625a5168474 |
|
786 | | o changeset: 3:6625a5168474 | |
785 | | | parent: 1:eca11cf91c71 |
|
787 | | | parent: 1:eca11cf91c71 | |
786 | | | user: test |
|
788 | | | user: test | |
787 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
789 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
788 | | | summary: commitD |
|
790 | | | summary: commitD | |
789 | | | |
|
791 | | | | |
790 | o | changeset: 2:5c51d8d6557d |
|
792 | o | changeset: 2:5c51d8d6557d | |
791 | |/ user: test |
|
793 | |/ user: test | |
792 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
794 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
793 | | summary: commitC |
|
795 | | summary: commitC | |
794 | | |
|
796 | | | |
795 | o changeset: 1:eca11cf91c71 |
|
797 | o changeset: 1:eca11cf91c71 | |
796 | | user: test |
|
798 | | user: test | |
797 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
799 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
798 | | summary: commitB |
|
800 | | summary: commitB | |
799 | | |
|
801 | | | |
800 | o changeset: 0:105141ef12d0 |
|
802 | o changeset: 0:105141ef12d0 | |
801 | user: test |
|
803 | user: test | |
802 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
804 | date: Thu Jan 01 00:00:00 1970 +0000 | |
803 | summary: commitA |
|
805 | summary: commitA | |
804 |
|
806 | |||
805 |
|
807 | |||
806 | Check bundle behavior: |
|
808 | Check bundle behavior: | |
807 |
|
809 | |||
808 | $ hg bundle -r 'desc(mergeCD)' --base 'desc(commitC)' ../issue4736.hg |
|
810 | $ hg bundle -r 'desc(mergeCD)' --base 'desc(commitC)' ../issue4736.hg | |
809 | 2 changesets found |
|
811 | 2 changesets found | |
810 | $ hg log -r 'bundle()' -R ../issue4736.hg |
|
812 | $ hg log -r 'bundle()' -R ../issue4736.hg | |
811 | changeset: 3:6625a5168474 |
|
813 | changeset: 3:6625a5168474 | |
812 | parent: 1:eca11cf91c71 |
|
814 | parent: 1:eca11cf91c71 | |
813 | user: test |
|
815 | user: test | |
814 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
816 | date: Thu Jan 01 00:00:00 1970 +0000 | |
815 | summary: commitD |
|
817 | summary: commitD | |
816 |
|
818 | |||
817 | changeset: 4:d8db9d137221 |
|
819 | changeset: 4:d8db9d137221 | |
818 | tag: tip |
|
820 | tag: tip | |
819 | parent: 2:5c51d8d6557d |
|
821 | parent: 2:5c51d8d6557d | |
820 | parent: 3:6625a5168474 |
|
822 | parent: 3:6625a5168474 | |
821 | user: test |
|
823 | user: test | |
822 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
824 | date: Thu Jan 01 00:00:00 1970 +0000 | |
823 | summary: mergeCD |
|
825 | summary: mergeCD | |
824 |
|
826 | |||
825 |
|
827 | |||
826 | check strip behavior |
|
828 | check strip behavior | |
827 |
|
829 | |||
828 | $ hg --config extensions.strip= strip 'desc(commitD)' --debug |
|
830 | $ hg --config extensions.strip= strip 'desc(commitD)' --debug | |
829 | resolving manifests |
|
831 | resolving manifests | |
830 | branchmerge: False, force: True, partial: False |
|
832 | branchmerge: False, force: True, partial: False | |
831 | ancestor: d8db9d137221+, local: d8db9d137221+, remote: eca11cf91c71 |
|
833 | ancestor: d8db9d137221+, local: d8db9d137221+, remote: eca11cf91c71 | |
832 | c: other deleted -> r |
|
834 | c: other deleted -> r | |
833 | removing c |
|
835 | removing c | |
834 | d: other deleted -> r |
|
836 | d: other deleted -> r | |
835 | removing d |
|
837 | removing d | |
836 | starting 4 threads for background file closing (?) |
|
838 | starting 4 threads for background file closing (?) | |
837 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
839 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
838 | 2 changesets found |
|
840 | 2 changesets found | |
839 | list of changesets: |
|
841 | list of changesets: | |
840 | 6625a516847449b6f0fa3737b9ba56e9f0f3032c |
|
842 | 6625a516847449b6f0fa3737b9ba56e9f0f3032c | |
841 | d8db9d1372214336d2b5570f20ee468d2c72fa8b |
|
843 | d8db9d1372214336d2b5570f20ee468d2c72fa8b | |
842 |
bundle2-output-bundle: "HG20", (1 params) |
|
844 | bundle2-output-bundle: "HG20", (1 params) 2 parts total | |
843 | bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload |
|
845 | bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload | |
|
846 | bundle2-output-part: "phase-heads" 24 bytes payload | |||
844 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/6625a5168474-345bb43d-backup.hg (glob) |
|
847 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/6625a5168474-345bb43d-backup.hg (glob) | |
845 | updating the branch cache |
|
848 | updating the branch cache | |
846 | invalid branchheads cache (served): tip differs |
|
849 | invalid branchheads cache (served): tip differs | |
847 | truncating cache/rbc-revs-v1 to 24 |
|
850 | truncating cache/rbc-revs-v1 to 24 | |
848 | $ hg log -G |
|
851 | $ hg log -G | |
849 | o changeset: 2:5c51d8d6557d |
|
852 | o changeset: 2:5c51d8d6557d | |
850 | | tag: tip |
|
853 | | tag: tip | |
851 | | user: test |
|
854 | | user: test | |
852 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
855 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
853 | | summary: commitC |
|
856 | | summary: commitC | |
854 | | |
|
857 | | | |
855 | @ changeset: 1:eca11cf91c71 |
|
858 | @ changeset: 1:eca11cf91c71 | |
856 | | user: test |
|
859 | | user: test | |
857 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
860 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
858 | | summary: commitB |
|
861 | | summary: commitB | |
859 | | |
|
862 | | | |
860 | o changeset: 0:105141ef12d0 |
|
863 | o changeset: 0:105141ef12d0 | |
861 | user: test |
|
864 | user: test | |
862 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
865 | date: Thu Jan 01 00:00:00 1970 +0000 | |
863 | summary: commitA |
|
866 | summary: commitA | |
864 |
|
867 | |||
865 |
|
868 | |||
866 | strip backup content |
|
869 | strip backup content | |
867 |
|
870 | |||
868 | $ hg log -r 'bundle()' -R .hg/strip-backup/6625a5168474-*-backup.hg |
|
871 | $ hg log -r 'bundle()' -R .hg/strip-backup/6625a5168474-*-backup.hg | |
869 | changeset: 3:6625a5168474 |
|
872 | changeset: 3:6625a5168474 | |
870 | parent: 1:eca11cf91c71 |
|
873 | parent: 1:eca11cf91c71 | |
871 | user: test |
|
874 | user: test | |
872 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
875 | date: Thu Jan 01 00:00:00 1970 +0000 | |
873 | summary: commitD |
|
876 | summary: commitD | |
874 |
|
877 | |||
875 | changeset: 4:d8db9d137221 |
|
878 | changeset: 4:d8db9d137221 | |
876 | tag: tip |
|
879 | tag: tip | |
877 | parent: 2:5c51d8d6557d |
|
880 | parent: 2:5c51d8d6557d | |
878 | parent: 3:6625a5168474 |
|
881 | parent: 3:6625a5168474 | |
879 | user: test |
|
882 | user: test | |
880 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
883 | date: Thu Jan 01 00:00:00 1970 +0000 | |
881 | summary: mergeCD |
|
884 | summary: mergeCD | |
882 |
|
885 | |||
883 | Check that the phase cache is properly invalidated after a strip with bookmark. |
|
886 | Check that the phase cache is properly invalidated after a strip with bookmark. | |
884 |
|
887 | |||
885 | $ cat > ../stripstalephasecache.py << EOF |
|
888 | $ cat > ../stripstalephasecache.py << EOF | |
886 | > from mercurial import extensions, localrepo |
|
889 | > from mercurial import extensions, localrepo | |
887 | > def transactioncallback(orig, repo, desc, *args, **kwargs): |
|
890 | > def transactioncallback(orig, repo, desc, *args, **kwargs): | |
888 | > def test(transaction): |
|
891 | > def test(transaction): | |
889 | > # observe cache inconsistency |
|
892 | > # observe cache inconsistency | |
890 | > try: |
|
893 | > try: | |
891 | > [repo.changelog.node(r) for r in repo.revs("not public()")] |
|
894 | > [repo.changelog.node(r) for r in repo.revs("not public()")] | |
892 | > except IndexError: |
|
895 | > except IndexError: | |
893 | > repo.ui.status("Index error!\n") |
|
896 | > repo.ui.status("Index error!\n") | |
894 | > transaction = orig(repo, desc, *args, **kwargs) |
|
897 | > transaction = orig(repo, desc, *args, **kwargs) | |
895 | > # warm up the phase cache |
|
898 | > # warm up the phase cache | |
896 | > list(repo.revs("not public()")) |
|
899 | > list(repo.revs("not public()")) | |
897 | > if desc != 'strip': |
|
900 | > if desc != 'strip': | |
898 | > transaction.addpostclose("phase invalidation test", test) |
|
901 | > transaction.addpostclose("phase invalidation test", test) | |
899 | > return transaction |
|
902 | > return transaction | |
900 | > def extsetup(ui): |
|
903 | > def extsetup(ui): | |
901 | > extensions.wrapfunction(localrepo.localrepository, "transaction", |
|
904 | > extensions.wrapfunction(localrepo.localrepository, "transaction", | |
902 | > transactioncallback) |
|
905 | > transactioncallback) | |
903 | > EOF |
|
906 | > EOF | |
904 | $ hg up -C 2 |
|
907 | $ hg up -C 2 | |
905 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
908 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
906 | $ echo k > k |
|
909 | $ echo k > k | |
907 | $ hg add k |
|
910 | $ hg add k | |
908 | $ hg commit -m commitK |
|
911 | $ hg commit -m commitK | |
909 | $ echo l > l |
|
912 | $ echo l > l | |
910 | $ hg add l |
|
913 | $ hg add l | |
911 | $ hg commit -m commitL |
|
914 | $ hg commit -m commitL | |
912 | $ hg book -r tip blah |
|
915 | $ hg book -r tip blah | |
913 | $ hg strip ".^" --config extensions.crash=$TESTTMP/stripstalephasecache.py |
|
916 | $ hg strip ".^" --config extensions.crash=$TESTTMP/stripstalephasecache.py | |
914 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
917 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
915 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/8f0b4384875c-4fa10deb-backup.hg (glob) |
|
918 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/8f0b4384875c-4fa10deb-backup.hg (glob) | |
916 | $ hg up -C 1 |
|
919 | $ hg up -C 1 | |
917 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
920 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
918 |
|
921 | |||
919 | Error during post-close callback of the strip transaction |
|
922 | Error during post-close callback of the strip transaction | |
920 | (They should be gracefully handled and reported) |
|
923 | (They should be gracefully handled and reported) | |
921 |
|
924 | |||
922 | $ cat > ../crashstrip.py << EOF |
|
925 | $ cat > ../crashstrip.py << EOF | |
923 | > from mercurial import error |
|
926 | > from mercurial import error | |
924 | > def reposetup(ui, repo): |
|
927 | > def reposetup(ui, repo): | |
925 | > class crashstriprepo(repo.__class__): |
|
928 | > class crashstriprepo(repo.__class__): | |
926 | > def transaction(self, desc, *args, **kwargs): |
|
929 | > def transaction(self, desc, *args, **kwargs): | |
927 | > tr = super(crashstriprepo, self).transaction(self, desc, *args, **kwargs) |
|
930 | > tr = super(crashstriprepo, self).transaction(self, desc, *args, **kwargs) | |
928 | > if desc == 'strip': |
|
931 | > if desc == 'strip': | |
929 | > def crash(tra): raise error.Abort('boom') |
|
932 | > def crash(tra): raise error.Abort('boom') | |
930 | > tr.addpostclose('crash', crash) |
|
933 | > tr.addpostclose('crash', crash) | |
931 | > return tr |
|
934 | > return tr | |
932 | > repo.__class__ = crashstriprepo |
|
935 | > repo.__class__ = crashstriprepo | |
933 | > EOF |
|
936 | > EOF | |
934 | $ hg strip tip --config extensions.crash=$TESTTMP/crashstrip.py |
|
937 | $ hg strip tip --config extensions.crash=$TESTTMP/crashstrip.py | |
935 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg (glob) |
|
938 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg (glob) | |
936 | strip failed, backup bundle stored in '$TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg' (glob) |
|
939 | strip failed, backup bundle stored in '$TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg' (glob) | |
937 | abort: boom |
|
940 | abort: boom | |
938 | [255] |
|
941 | [255] | |
939 |
|
942 | |||
940 |
|
943 |
General Comments 0
You need to be logged in to leave comments.
Login now