Show More
@@ -1,719 +1,763 | |||||
1 | from __future__ import absolute_import |
|
1 | from __future__ import absolute_import | |
2 |
|
2 | |||
3 | import errno |
|
3 | import errno | |
4 | import os |
|
4 | import os | |
5 | import re |
|
5 | import re | |
6 | import socket |
|
6 | import socket | |
7 | import stat |
|
7 | import stat | |
8 | import subprocess |
|
8 | import subprocess | |
9 | import sys |
|
9 | import sys | |
10 | import tempfile |
|
10 | import tempfile | |
11 |
|
11 | |||
12 | tempprefix = 'hg-hghave-' |
|
12 | tempprefix = 'hg-hghave-' | |
13 |
|
13 | |||
14 | checks = { |
|
14 | checks = { | |
15 | "true": (lambda: True, "yak shaving"), |
|
15 | "true": (lambda: True, "yak shaving"), | |
16 | "false": (lambda: False, "nail clipper"), |
|
16 | "false": (lambda: False, "nail clipper"), | |
17 | } |
|
17 | } | |
18 |
|
18 | |||
19 | def check(name, desc): |
|
19 | def check(name, desc): | |
20 | """Registers a check function for a feature.""" |
|
20 | """Registers a check function for a feature.""" | |
21 | def decorator(func): |
|
21 | def decorator(func): | |
22 | checks[name] = (func, desc) |
|
22 | checks[name] = (func, desc) | |
23 | return func |
|
23 | return func | |
24 | return decorator |
|
24 | return decorator | |
25 |
|
25 | |||
26 | def checkvers(name, desc, vers): |
|
26 | def checkvers(name, desc, vers): | |
27 | """Registers a check function for each of a series of versions. |
|
27 | """Registers a check function for each of a series of versions. | |
28 |
|
28 | |||
29 | vers can be a list or an iterator""" |
|
29 | vers can be a list or an iterator""" | |
30 | def decorator(func): |
|
30 | def decorator(func): | |
31 | def funcv(v): |
|
31 | def funcv(v): | |
32 | def f(): |
|
32 | def f(): | |
33 | return func(v) |
|
33 | return func(v) | |
34 | return f |
|
34 | return f | |
35 | for v in vers: |
|
35 | for v in vers: | |
36 | v = str(v) |
|
36 | v = str(v) | |
37 | f = funcv(v) |
|
37 | f = funcv(v) | |
38 | checks['%s%s' % (name, v.replace('.', ''))] = (f, desc % v) |
|
38 | checks['%s%s' % (name, v.replace('.', ''))] = (f, desc % v) | |
39 | return func |
|
39 | return func | |
40 | return decorator |
|
40 | return decorator | |
41 |
|
41 | |||
42 | def checkfeatures(features): |
|
42 | def checkfeatures(features): | |
43 | result = { |
|
43 | result = { | |
44 | 'error': [], |
|
44 | 'error': [], | |
45 | 'missing': [], |
|
45 | 'missing': [], | |
46 | 'skipped': [], |
|
46 | 'skipped': [], | |
47 | } |
|
47 | } | |
48 |
|
48 | |||
49 | for feature in features: |
|
49 | for feature in features: | |
50 | negate = feature.startswith('no-') |
|
50 | negate = feature.startswith('no-') | |
51 | if negate: |
|
51 | if negate: | |
52 | feature = feature[3:] |
|
52 | feature = feature[3:] | |
53 |
|
53 | |||
54 | if feature not in checks: |
|
54 | if feature not in checks: | |
55 | result['missing'].append(feature) |
|
55 | result['missing'].append(feature) | |
56 | continue |
|
56 | continue | |
57 |
|
57 | |||
58 | check, desc = checks[feature] |
|
58 | check, desc = checks[feature] | |
59 | try: |
|
59 | try: | |
60 | available = check() |
|
60 | available = check() | |
61 | except Exception: |
|
61 | except Exception: | |
62 | result['error'].append('hghave check failed: %s' % feature) |
|
62 | result['error'].append('hghave check failed: %s' % feature) | |
63 | continue |
|
63 | continue | |
64 |
|
64 | |||
65 | if not negate and not available: |
|
65 | if not negate and not available: | |
66 | result['skipped'].append('missing feature: %s' % desc) |
|
66 | result['skipped'].append('missing feature: %s' % desc) | |
67 | elif negate and available: |
|
67 | elif negate and available: | |
68 | result['skipped'].append('system supports %s' % desc) |
|
68 | result['skipped'].append('system supports %s' % desc) | |
69 |
|
69 | |||
70 | return result |
|
70 | return result | |
71 |
|
71 | |||
72 | def require(features): |
|
72 | def require(features): | |
73 | """Require that features are available, exiting if not.""" |
|
73 | """Require that features are available, exiting if not.""" | |
74 | result = checkfeatures(features) |
|
74 | result = checkfeatures(features) | |
75 |
|
75 | |||
76 | for missing in result['missing']: |
|
76 | for missing in result['missing']: | |
77 | sys.stderr.write('skipped: unknown feature: %s\n' % missing) |
|
77 | sys.stderr.write('skipped: unknown feature: %s\n' % missing) | |
78 | for msg in result['skipped']: |
|
78 | for msg in result['skipped']: | |
79 | sys.stderr.write('skipped: %s\n' % msg) |
|
79 | sys.stderr.write('skipped: %s\n' % msg) | |
80 | for msg in result['error']: |
|
80 | for msg in result['error']: | |
81 | sys.stderr.write('%s\n' % msg) |
|
81 | sys.stderr.write('%s\n' % msg) | |
82 |
|
82 | |||
83 | if result['missing']: |
|
83 | if result['missing']: | |
84 | sys.exit(2) |
|
84 | sys.exit(2) | |
85 |
|
85 | |||
86 | if result['skipped'] or result['error']: |
|
86 | if result['skipped'] or result['error']: | |
87 | sys.exit(1) |
|
87 | sys.exit(1) | |
88 |
|
88 | |||
89 | def matchoutput(cmd, regexp, ignorestatus=False): |
|
89 | def matchoutput(cmd, regexp, ignorestatus=False): | |
90 | """Return the match object if cmd executes successfully and its output |
|
90 | """Return the match object if cmd executes successfully and its output | |
91 | is matched by the supplied regular expression. |
|
91 | is matched by the supplied regular expression. | |
92 | """ |
|
92 | """ | |
93 | r = re.compile(regexp) |
|
93 | r = re.compile(regexp) | |
94 | try: |
|
94 | try: | |
95 | p = subprocess.Popen( |
|
95 | p = subprocess.Popen( | |
96 | cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) |
|
96 | cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) | |
97 | except OSError as e: |
|
97 | except OSError as e: | |
98 | if e.errno != errno.ENOENT: |
|
98 | if e.errno != errno.ENOENT: | |
99 | raise |
|
99 | raise | |
100 | ret = -1 |
|
100 | ret = -1 | |
101 | ret = p.wait() |
|
101 | ret = p.wait() | |
102 | s = p.stdout.read() |
|
102 | s = p.stdout.read() | |
103 | return (ignorestatus or not ret) and r.search(s) |
|
103 | return (ignorestatus or not ret) and r.search(s) | |
104 |
|
104 | |||
105 | @check("baz", "GNU Arch baz client") |
|
105 | @check("baz", "GNU Arch baz client") | |
106 | def has_baz(): |
|
106 | def has_baz(): | |
107 | return matchoutput('baz --version 2>&1', br'baz Bazaar version') |
|
107 | return matchoutput('baz --version 2>&1', br'baz Bazaar version') | |
108 |
|
108 | |||
109 | @check("bzr", "Canonical's Bazaar client") |
|
109 | @check("bzr", "Canonical's Bazaar client") | |
110 | def has_bzr(): |
|
110 | def has_bzr(): | |
111 | try: |
|
111 | try: | |
112 | import bzrlib |
|
112 | import bzrlib | |
113 | import bzrlib.bzrdir |
|
113 | import bzrlib.bzrdir | |
114 | import bzrlib.errors |
|
114 | import bzrlib.errors | |
115 | import bzrlib.revision |
|
115 | import bzrlib.revision | |
116 | import bzrlib.revisionspec |
|
116 | import bzrlib.revisionspec | |
117 | bzrlib.revisionspec.RevisionSpec |
|
117 | bzrlib.revisionspec.RevisionSpec | |
118 | return bzrlib.__doc__ is not None |
|
118 | return bzrlib.__doc__ is not None | |
119 | except (AttributeError, ImportError): |
|
119 | except (AttributeError, ImportError): | |
120 | return False |
|
120 | return False | |
121 |
|
121 | |||
122 | @checkvers("bzr", "Canonical's Bazaar client >= %s", (1.14,)) |
|
122 | @checkvers("bzr", "Canonical's Bazaar client >= %s", (1.14,)) | |
123 | def has_bzr_range(v): |
|
123 | def has_bzr_range(v): | |
124 | major, minor = v.split('.')[0:2] |
|
124 | major, minor = v.split('.')[0:2] | |
125 | try: |
|
125 | try: | |
126 | import bzrlib |
|
126 | import bzrlib | |
127 | return (bzrlib.__doc__ is not None |
|
127 | return (bzrlib.__doc__ is not None | |
128 | and bzrlib.version_info[:2] >= (int(major), int(minor))) |
|
128 | and bzrlib.version_info[:2] >= (int(major), int(minor))) | |
129 | except ImportError: |
|
129 | except ImportError: | |
130 | return False |
|
130 | return False | |
131 |
|
131 | |||
132 | @check("chg", "running with chg") |
|
132 | @check("chg", "running with chg") | |
133 | def has_chg(): |
|
133 | def has_chg(): | |
134 | return 'CHGHG' in os.environ |
|
134 | return 'CHGHG' in os.environ | |
135 |
|
135 | |||
136 | @check("cvs", "cvs client/server") |
|
136 | @check("cvs", "cvs client/server") | |
137 | def has_cvs(): |
|
137 | def has_cvs(): | |
138 | re = br'Concurrent Versions System.*?server' |
|
138 | re = br'Concurrent Versions System.*?server' | |
139 | return matchoutput('cvs --version 2>&1', re) and not has_msys() |
|
139 | return matchoutput('cvs --version 2>&1', re) and not has_msys() | |
140 |
|
140 | |||
141 | @check("cvs112", "cvs client/server 1.12.* (not cvsnt)") |
|
141 | @check("cvs112", "cvs client/server 1.12.* (not cvsnt)") | |
142 | def has_cvs112(): |
|
142 | def has_cvs112(): | |
143 | re = br'Concurrent Versions System \(CVS\) 1.12.*?server' |
|
143 | re = br'Concurrent Versions System \(CVS\) 1.12.*?server' | |
144 | return matchoutput('cvs --version 2>&1', re) and not has_msys() |
|
144 | return matchoutput('cvs --version 2>&1', re) and not has_msys() | |
145 |
|
145 | |||
146 | @check("cvsnt", "cvsnt client/server") |
|
146 | @check("cvsnt", "cvsnt client/server") | |
147 | def has_cvsnt(): |
|
147 | def has_cvsnt(): | |
148 | re = br'Concurrent Versions System \(CVSNT\) (\d+).(\d+).*\(client/server\)' |
|
148 | re = br'Concurrent Versions System \(CVSNT\) (\d+).(\d+).*\(client/server\)' | |
149 | return matchoutput('cvsnt --version 2>&1', re) |
|
149 | return matchoutput('cvsnt --version 2>&1', re) | |
150 |
|
150 | |||
151 | @check("darcs", "darcs client") |
|
151 | @check("darcs", "darcs client") | |
152 | def has_darcs(): |
|
152 | def has_darcs(): | |
153 | return matchoutput('darcs --version', br'\b2\.([2-9]|\d{2})', True) |
|
153 | return matchoutput('darcs --version', br'\b2\.([2-9]|\d{2})', True) | |
154 |
|
154 | |||
155 | @check("mtn", "monotone client (>= 1.0)") |
|
155 | @check("mtn", "monotone client (>= 1.0)") | |
156 | def has_mtn(): |
|
156 | def has_mtn(): | |
157 | return matchoutput('mtn --version', br'monotone', True) and not matchoutput( |
|
157 | return matchoutput('mtn --version', br'monotone', True) and not matchoutput( | |
158 | 'mtn --version', br'monotone 0\.', True) |
|
158 | 'mtn --version', br'monotone 0\.', True) | |
159 |
|
159 | |||
160 | @check("eol-in-paths", "end-of-lines in paths") |
|
160 | @check("eol-in-paths", "end-of-lines in paths") | |
161 | def has_eol_in_paths(): |
|
161 | def has_eol_in_paths(): | |
162 | try: |
|
162 | try: | |
163 | fd, path = tempfile.mkstemp(dir='.', prefix=tempprefix, suffix='\n\r') |
|
163 | fd, path = tempfile.mkstemp(dir='.', prefix=tempprefix, suffix='\n\r') | |
164 | os.close(fd) |
|
164 | os.close(fd) | |
165 | os.remove(path) |
|
165 | os.remove(path) | |
166 | return True |
|
166 | return True | |
167 | except (IOError, OSError): |
|
167 | except (IOError, OSError): | |
168 | return False |
|
168 | return False | |
169 |
|
169 | |||
170 | @check("execbit", "executable bit") |
|
170 | @check("execbit", "executable bit") | |
171 | def has_executablebit(): |
|
171 | def has_executablebit(): | |
172 | try: |
|
172 | try: | |
173 | EXECFLAGS = stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH |
|
173 | EXECFLAGS = stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH | |
174 | fh, fn = tempfile.mkstemp(dir='.', prefix=tempprefix) |
|
174 | fh, fn = tempfile.mkstemp(dir='.', prefix=tempprefix) | |
175 | try: |
|
175 | try: | |
176 | os.close(fh) |
|
176 | os.close(fh) | |
177 | m = os.stat(fn).st_mode & 0o777 |
|
177 | m = os.stat(fn).st_mode & 0o777 | |
178 | new_file_has_exec = m & EXECFLAGS |
|
178 | new_file_has_exec = m & EXECFLAGS | |
179 | os.chmod(fn, m ^ EXECFLAGS) |
|
179 | os.chmod(fn, m ^ EXECFLAGS) | |
180 | exec_flags_cannot_flip = ((os.stat(fn).st_mode & 0o777) == m) |
|
180 | exec_flags_cannot_flip = ((os.stat(fn).st_mode & 0o777) == m) | |
181 | finally: |
|
181 | finally: | |
182 | os.unlink(fn) |
|
182 | os.unlink(fn) | |
183 | except (IOError, OSError): |
|
183 | except (IOError, OSError): | |
184 | # we don't care, the user probably won't be able to commit anyway |
|
184 | # we don't care, the user probably won't be able to commit anyway | |
185 | return False |
|
185 | return False | |
186 | return not (new_file_has_exec or exec_flags_cannot_flip) |
|
186 | return not (new_file_has_exec or exec_flags_cannot_flip) | |
187 |
|
187 | |||
188 | @check("icasefs", "case insensitive file system") |
|
188 | @check("icasefs", "case insensitive file system") | |
189 | def has_icasefs(): |
|
189 | def has_icasefs(): | |
190 | # Stolen from mercurial.util |
|
190 | # Stolen from mercurial.util | |
191 | fd, path = tempfile.mkstemp(dir='.', prefix=tempprefix) |
|
191 | fd, path = tempfile.mkstemp(dir='.', prefix=tempprefix) | |
192 | os.close(fd) |
|
192 | os.close(fd) | |
193 | try: |
|
193 | try: | |
194 | s1 = os.stat(path) |
|
194 | s1 = os.stat(path) | |
195 | d, b = os.path.split(path) |
|
195 | d, b = os.path.split(path) | |
196 | p2 = os.path.join(d, b.upper()) |
|
196 | p2 = os.path.join(d, b.upper()) | |
197 | if path == p2: |
|
197 | if path == p2: | |
198 | p2 = os.path.join(d, b.lower()) |
|
198 | p2 = os.path.join(d, b.lower()) | |
199 | try: |
|
199 | try: | |
200 | s2 = os.stat(p2) |
|
200 | s2 = os.stat(p2) | |
201 | return s2 == s1 |
|
201 | return s2 == s1 | |
202 | except OSError: |
|
202 | except OSError: | |
203 | return False |
|
203 | return False | |
204 | finally: |
|
204 | finally: | |
205 | os.remove(path) |
|
205 | os.remove(path) | |
206 |
|
206 | |||
207 | @check("fifo", "named pipes") |
|
207 | @check("fifo", "named pipes") | |
208 | def has_fifo(): |
|
208 | def has_fifo(): | |
209 | if getattr(os, "mkfifo", None) is None: |
|
209 | if getattr(os, "mkfifo", None) is None: | |
210 | return False |
|
210 | return False | |
211 | name = tempfile.mktemp(dir='.', prefix=tempprefix) |
|
211 | name = tempfile.mktemp(dir='.', prefix=tempprefix) | |
212 | try: |
|
212 | try: | |
213 | os.mkfifo(name) |
|
213 | os.mkfifo(name) | |
214 | os.unlink(name) |
|
214 | os.unlink(name) | |
215 | return True |
|
215 | return True | |
216 | except OSError: |
|
216 | except OSError: | |
217 | return False |
|
217 | return False | |
218 |
|
218 | |||
219 | @check("killdaemons", 'killdaemons.py support') |
|
219 | @check("killdaemons", 'killdaemons.py support') | |
220 | def has_killdaemons(): |
|
220 | def has_killdaemons(): | |
221 | return True |
|
221 | return True | |
222 |
|
222 | |||
223 | @check("cacheable", "cacheable filesystem") |
|
223 | @check("cacheable", "cacheable filesystem") | |
224 | def has_cacheable_fs(): |
|
224 | def has_cacheable_fs(): | |
225 | from mercurial import util |
|
225 | from mercurial import util | |
226 |
|
226 | |||
227 | fd, path = tempfile.mkstemp(dir='.', prefix=tempprefix) |
|
227 | fd, path = tempfile.mkstemp(dir='.', prefix=tempprefix) | |
228 | os.close(fd) |
|
228 | os.close(fd) | |
229 | try: |
|
229 | try: | |
230 | return util.cachestat(path).cacheable() |
|
230 | return util.cachestat(path).cacheable() | |
231 | finally: |
|
231 | finally: | |
232 | os.remove(path) |
|
232 | os.remove(path) | |
233 |
|
233 | |||
234 | @check("lsprof", "python lsprof module") |
|
234 | @check("lsprof", "python lsprof module") | |
235 | def has_lsprof(): |
|
235 | def has_lsprof(): | |
236 | try: |
|
236 | try: | |
237 | import _lsprof |
|
237 | import _lsprof | |
238 | _lsprof.Profiler # silence unused import warning |
|
238 | _lsprof.Profiler # silence unused import warning | |
239 | return True |
|
239 | return True | |
240 | except ImportError: |
|
240 | except ImportError: | |
241 | return False |
|
241 | return False | |
242 |
|
242 | |||
243 | def gethgversion(): |
|
243 | def gethgversion(): | |
244 | m = matchoutput('hg --version --quiet 2>&1', br'(\d+)\.(\d+)') |
|
244 | m = matchoutput('hg --version --quiet 2>&1', br'(\d+)\.(\d+)') | |
245 | if not m: |
|
245 | if not m: | |
246 | return (0, 0) |
|
246 | return (0, 0) | |
247 | return (int(m.group(1)), int(m.group(2))) |
|
247 | return (int(m.group(1)), int(m.group(2))) | |
248 |
|
248 | |||
249 | @checkvers("hg", "Mercurial >= %s", |
|
249 | @checkvers("hg", "Mercurial >= %s", | |
250 | list([(1.0 * x) / 10 for x in range(9, 99)])) |
|
250 | list([(1.0 * x) / 10 for x in range(9, 99)])) | |
251 | def has_hg_range(v): |
|
251 | def has_hg_range(v): | |
252 | major, minor = v.split('.')[0:2] |
|
252 | major, minor = v.split('.')[0:2] | |
253 | return gethgversion() >= (int(major), int(minor)) |
|
253 | return gethgversion() >= (int(major), int(minor)) | |
254 |
|
254 | |||
255 | @check("hg08", "Mercurial >= 0.8") |
|
255 | @check("hg08", "Mercurial >= 0.8") | |
256 | def has_hg08(): |
|
256 | def has_hg08(): | |
257 | if checks["hg09"][0](): |
|
257 | if checks["hg09"][0](): | |
258 | return True |
|
258 | return True | |
259 | return matchoutput('hg help annotate 2>&1', '--date') |
|
259 | return matchoutput('hg help annotate 2>&1', '--date') | |
260 |
|
260 | |||
261 | @check("hg07", "Mercurial >= 0.7") |
|
261 | @check("hg07", "Mercurial >= 0.7") | |
262 | def has_hg07(): |
|
262 | def has_hg07(): | |
263 | if checks["hg08"][0](): |
|
263 | if checks["hg08"][0](): | |
264 | return True |
|
264 | return True | |
265 | return matchoutput('hg --version --quiet 2>&1', 'Mercurial Distributed SCM') |
|
265 | return matchoutput('hg --version --quiet 2>&1', 'Mercurial Distributed SCM') | |
266 |
|
266 | |||
267 | @check("hg06", "Mercurial >= 0.6") |
|
267 | @check("hg06", "Mercurial >= 0.6") | |
268 | def has_hg06(): |
|
268 | def has_hg06(): | |
269 | if checks["hg07"][0](): |
|
269 | if checks["hg07"][0](): | |
270 | return True |
|
270 | return True | |
271 | return matchoutput('hg --version --quiet 2>&1', 'Mercurial version') |
|
271 | return matchoutput('hg --version --quiet 2>&1', 'Mercurial version') | |
272 |
|
272 | |||
273 | @check("gettext", "GNU Gettext (msgfmt)") |
|
273 | @check("gettext", "GNU Gettext (msgfmt)") | |
274 | def has_gettext(): |
|
274 | def has_gettext(): | |
275 | return matchoutput('msgfmt --version', br'GNU gettext-tools') |
|
275 | return matchoutput('msgfmt --version', br'GNU gettext-tools') | |
276 |
|
276 | |||
277 | @check("git", "git command line client") |
|
277 | @check("git", "git command line client") | |
278 | def has_git(): |
|
278 | def has_git(): | |
279 | return matchoutput('git --version 2>&1', br'^git version') |
|
279 | return matchoutput('git --version 2>&1', br'^git version') | |
280 |
|
280 | |||
281 | def getgitversion(): |
|
281 | def getgitversion(): | |
282 | m = matchoutput('git --version 2>&1', br'git version (\d+)\.(\d+)') |
|
282 | m = matchoutput('git --version 2>&1', br'git version (\d+)\.(\d+)') | |
283 | if not m: |
|
283 | if not m: | |
284 | return (0, 0) |
|
284 | return (0, 0) | |
285 | return (int(m.group(1)), int(m.group(2))) |
|
285 | return (int(m.group(1)), int(m.group(2))) | |
286 |
|
286 | |||
287 | # https://github.com/git-lfs/lfs-test-server |
|
287 | # https://github.com/git-lfs/lfs-test-server | |
288 | @check("lfs-test-server", "git-lfs test server") |
|
288 | @check("lfs-test-server", "git-lfs test server") | |
289 | def has_lfsserver(): |
|
289 | def has_lfsserver(): | |
290 | exe = 'lfs-test-server' |
|
290 | exe = 'lfs-test-server' | |
291 | if has_windows(): |
|
291 | if has_windows(): | |
292 | exe = 'lfs-test-server.exe' |
|
292 | exe = 'lfs-test-server.exe' | |
293 | return any( |
|
293 | return any( | |
294 | os.access(os.path.join(path, exe), os.X_OK) |
|
294 | os.access(os.path.join(path, exe), os.X_OK) | |
295 | for path in os.environ["PATH"].split(os.pathsep) |
|
295 | for path in os.environ["PATH"].split(os.pathsep) | |
296 | ) |
|
296 | ) | |
297 |
|
297 | |||
298 | @checkvers("git", "git client (with ext::sh support) version >= %s", (1.9,)) |
|
298 | @checkvers("git", "git client (with ext::sh support) version >= %s", (1.9,)) | |
299 | def has_git_range(v): |
|
299 | def has_git_range(v): | |
300 | major, minor = v.split('.')[0:2] |
|
300 | major, minor = v.split('.')[0:2] | |
301 | return getgitversion() >= (int(major), int(minor)) |
|
301 | return getgitversion() >= (int(major), int(minor)) | |
302 |
|
302 | |||
303 | @check("docutils", "Docutils text processing library") |
|
303 | @check("docutils", "Docutils text processing library") | |
304 | def has_docutils(): |
|
304 | def has_docutils(): | |
305 | try: |
|
305 | try: | |
306 | import docutils.core |
|
306 | import docutils.core | |
307 | docutils.core.publish_cmdline # silence unused import |
|
307 | docutils.core.publish_cmdline # silence unused import | |
308 | return True |
|
308 | return True | |
309 | except ImportError: |
|
309 | except ImportError: | |
310 | return False |
|
310 | return False | |
311 |
|
311 | |||
312 | def getsvnversion(): |
|
312 | def getsvnversion(): | |
313 | m = matchoutput('svn --version --quiet 2>&1', br'^(\d+)\.(\d+)') |
|
313 | m = matchoutput('svn --version --quiet 2>&1', br'^(\d+)\.(\d+)') | |
314 | if not m: |
|
314 | if not m: | |
315 | return (0, 0) |
|
315 | return (0, 0) | |
316 | return (int(m.group(1)), int(m.group(2))) |
|
316 | return (int(m.group(1)), int(m.group(2))) | |
317 |
|
317 | |||
318 | @checkvers("svn", "subversion client and admin tools >= %s", (1.3, 1.5)) |
|
318 | @checkvers("svn", "subversion client and admin tools >= %s", (1.3, 1.5)) | |
319 | def has_svn_range(v): |
|
319 | def has_svn_range(v): | |
320 | major, minor = v.split('.')[0:2] |
|
320 | major, minor = v.split('.')[0:2] | |
321 | return getsvnversion() >= (int(major), int(minor)) |
|
321 | return getsvnversion() >= (int(major), int(minor)) | |
322 |
|
322 | |||
323 | @check("svn", "subversion client and admin tools") |
|
323 | @check("svn", "subversion client and admin tools") | |
324 | def has_svn(): |
|
324 | def has_svn(): | |
325 | return matchoutput('svn --version 2>&1', br'^svn, version') and \ |
|
325 | return matchoutput('svn --version 2>&1', br'^svn, version') and \ | |
326 | matchoutput('svnadmin --version 2>&1', br'^svnadmin, version') |
|
326 | matchoutput('svnadmin --version 2>&1', br'^svnadmin, version') | |
327 |
|
327 | |||
328 | @check("svn-bindings", "subversion python bindings") |
|
328 | @check("svn-bindings", "subversion python bindings") | |
329 | def has_svn_bindings(): |
|
329 | def has_svn_bindings(): | |
330 | try: |
|
330 | try: | |
331 | import svn.core |
|
331 | import svn.core | |
332 | version = svn.core.SVN_VER_MAJOR, svn.core.SVN_VER_MINOR |
|
332 | version = svn.core.SVN_VER_MAJOR, svn.core.SVN_VER_MINOR | |
333 | if version < (1, 4): |
|
333 | if version < (1, 4): | |
334 | return False |
|
334 | return False | |
335 | return True |
|
335 | return True | |
336 | except ImportError: |
|
336 | except ImportError: | |
337 | return False |
|
337 | return False | |
338 |
|
338 | |||
339 | @check("p4", "Perforce server and client") |
|
339 | @check("p4", "Perforce server and client") | |
340 | def has_p4(): |
|
340 | def has_p4(): | |
341 | return (matchoutput('p4 -V', br'Rev\. P4/') and |
|
341 | return (matchoutput('p4 -V', br'Rev\. P4/') and | |
342 | matchoutput('p4d -V', br'Rev\. P4D/')) |
|
342 | matchoutput('p4d -V', br'Rev\. P4D/')) | |
343 |
|
343 | |||
344 | @check("symlink", "symbolic links") |
|
344 | @check("symlink", "symbolic links") | |
345 | def has_symlink(): |
|
345 | def has_symlink(): | |
346 | if getattr(os, "symlink", None) is None: |
|
346 | if getattr(os, "symlink", None) is None: | |
347 | return False |
|
347 | return False | |
348 | name = tempfile.mktemp(dir='.', prefix=tempprefix) |
|
348 | name = tempfile.mktemp(dir='.', prefix=tempprefix) | |
349 | try: |
|
349 | try: | |
350 | os.symlink(".", name) |
|
350 | os.symlink(".", name) | |
351 | os.unlink(name) |
|
351 | os.unlink(name) | |
352 | return True |
|
352 | return True | |
353 | except (OSError, AttributeError): |
|
353 | except (OSError, AttributeError): | |
354 | return False |
|
354 | return False | |
355 |
|
355 | |||
356 | @check("hardlink", "hardlinks") |
|
356 | @check("hardlink", "hardlinks") | |
357 | def has_hardlink(): |
|
357 | def has_hardlink(): | |
358 | from mercurial import util |
|
358 | from mercurial import util | |
359 | fh, fn = tempfile.mkstemp(dir='.', prefix=tempprefix) |
|
359 | fh, fn = tempfile.mkstemp(dir='.', prefix=tempprefix) | |
360 | os.close(fh) |
|
360 | os.close(fh) | |
361 | name = tempfile.mktemp(dir='.', prefix=tempprefix) |
|
361 | name = tempfile.mktemp(dir='.', prefix=tempprefix) | |
362 | try: |
|
362 | try: | |
363 | util.oslink(fn, name) |
|
363 | util.oslink(fn, name) | |
364 | os.unlink(name) |
|
364 | os.unlink(name) | |
365 | return True |
|
365 | return True | |
366 | except OSError: |
|
366 | except OSError: | |
367 | return False |
|
367 | return False | |
368 | finally: |
|
368 | finally: | |
369 | os.unlink(fn) |
|
369 | os.unlink(fn) | |
370 |
|
370 | |||
371 | @check("hardlink-whitelisted", "hardlinks on whitelisted filesystems") |
|
371 | @check("hardlink-whitelisted", "hardlinks on whitelisted filesystems") | |
372 | def has_hardlink_whitelisted(): |
|
372 | def has_hardlink_whitelisted(): | |
373 | from mercurial import util |
|
373 | from mercurial import util | |
374 | try: |
|
374 | try: | |
375 | fstype = util.getfstype(b'.') |
|
375 | fstype = util.getfstype(b'.') | |
376 | except OSError: |
|
376 | except OSError: | |
377 | return False |
|
377 | return False | |
378 | return fstype in util._hardlinkfswhitelist |
|
378 | return fstype in util._hardlinkfswhitelist | |
379 |
|
379 | |||
380 | @check("rmcwd", "can remove current working directory") |
|
380 | @check("rmcwd", "can remove current working directory") | |
381 | def has_rmcwd(): |
|
381 | def has_rmcwd(): | |
382 | ocwd = os.getcwd() |
|
382 | ocwd = os.getcwd() | |
383 | temp = tempfile.mkdtemp(dir='.', prefix=tempprefix) |
|
383 | temp = tempfile.mkdtemp(dir='.', prefix=tempprefix) | |
384 | try: |
|
384 | try: | |
385 | os.chdir(temp) |
|
385 | os.chdir(temp) | |
386 | # On Linux, 'rmdir .' isn't allowed, but the other names are okay. |
|
386 | # On Linux, 'rmdir .' isn't allowed, but the other names are okay. | |
387 | # On Solaris and Windows, the cwd can't be removed by any names. |
|
387 | # On Solaris and Windows, the cwd can't be removed by any names. | |
388 | os.rmdir(os.getcwd()) |
|
388 | os.rmdir(os.getcwd()) | |
389 | return True |
|
389 | return True | |
390 | except OSError: |
|
390 | except OSError: | |
391 | return False |
|
391 | return False | |
392 | finally: |
|
392 | finally: | |
393 | os.chdir(ocwd) |
|
393 | os.chdir(ocwd) | |
394 | # clean up temp dir on platforms where cwd can't be removed |
|
394 | # clean up temp dir on platforms where cwd can't be removed | |
395 | try: |
|
395 | try: | |
396 | os.rmdir(temp) |
|
396 | os.rmdir(temp) | |
397 | except OSError: |
|
397 | except OSError: | |
398 | pass |
|
398 | pass | |
399 |
|
399 | |||
400 | @check("tla", "GNU Arch tla client") |
|
400 | @check("tla", "GNU Arch tla client") | |
401 | def has_tla(): |
|
401 | def has_tla(): | |
402 | return matchoutput('tla --version 2>&1', br'The GNU Arch Revision') |
|
402 | return matchoutput('tla --version 2>&1', br'The GNU Arch Revision') | |
403 |
|
403 | |||
404 | @check("gpg", "gpg client") |
|
404 | @check("gpg", "gpg client") | |
405 | def has_gpg(): |
|
405 | def has_gpg(): | |
406 | return matchoutput('gpg --version 2>&1', br'GnuPG') |
|
406 | return matchoutput('gpg --version 2>&1', br'GnuPG') | |
407 |
|
407 | |||
408 | @check("gpg2", "gpg client v2") |
|
408 | @check("gpg2", "gpg client v2") | |
409 | def has_gpg2(): |
|
409 | def has_gpg2(): | |
410 | return matchoutput('gpg --version 2>&1', br'GnuPG[^0-9]+2\.') |
|
410 | return matchoutput('gpg --version 2>&1', br'GnuPG[^0-9]+2\.') | |
411 |
|
411 | |||
412 | @check("gpg21", "gpg client v2.1+") |
|
412 | @check("gpg21", "gpg client v2.1+") | |
413 | def has_gpg21(): |
|
413 | def has_gpg21(): | |
414 | return matchoutput('gpg --version 2>&1', br'GnuPG[^0-9]+2\.(?!0)') |
|
414 | return matchoutput('gpg --version 2>&1', br'GnuPG[^0-9]+2\.(?!0)') | |
415 |
|
415 | |||
416 | @check("unix-permissions", "unix-style permissions") |
|
416 | @check("unix-permissions", "unix-style permissions") | |
417 | def has_unix_permissions(): |
|
417 | def has_unix_permissions(): | |
418 | d = tempfile.mkdtemp(dir='.', prefix=tempprefix) |
|
418 | d = tempfile.mkdtemp(dir='.', prefix=tempprefix) | |
419 | try: |
|
419 | try: | |
420 | fname = os.path.join(d, 'foo') |
|
420 | fname = os.path.join(d, 'foo') | |
421 | for umask in (0o77, 0o07, 0o22): |
|
421 | for umask in (0o77, 0o07, 0o22): | |
422 | os.umask(umask) |
|
422 | os.umask(umask) | |
423 | f = open(fname, 'w') |
|
423 | f = open(fname, 'w') | |
424 | f.close() |
|
424 | f.close() | |
425 | mode = os.stat(fname).st_mode |
|
425 | mode = os.stat(fname).st_mode | |
426 | os.unlink(fname) |
|
426 | os.unlink(fname) | |
427 | if mode & 0o777 != ~umask & 0o666: |
|
427 | if mode & 0o777 != ~umask & 0o666: | |
428 | return False |
|
428 | return False | |
429 | return True |
|
429 | return True | |
430 | finally: |
|
430 | finally: | |
431 | os.rmdir(d) |
|
431 | os.rmdir(d) | |
432 |
|
432 | |||
433 | @check("unix-socket", "AF_UNIX socket family") |
|
433 | @check("unix-socket", "AF_UNIX socket family") | |
434 | def has_unix_socket(): |
|
434 | def has_unix_socket(): | |
435 | return getattr(socket, 'AF_UNIX', None) is not None |
|
435 | return getattr(socket, 'AF_UNIX', None) is not None | |
436 |
|
436 | |||
437 | @check("root", "root permissions") |
|
437 | @check("root", "root permissions") | |
438 | def has_root(): |
|
438 | def has_root(): | |
439 | return getattr(os, 'geteuid', None) and os.geteuid() == 0 |
|
439 | return getattr(os, 'geteuid', None) and os.geteuid() == 0 | |
440 |
|
440 | |||
441 | @check("pyflakes", "Pyflakes python linter") |
|
441 | @check("pyflakes", "Pyflakes python linter") | |
442 | def has_pyflakes(): |
|
442 | def has_pyflakes(): | |
443 | return matchoutput("sh -c \"echo 'import re' 2>&1 | pyflakes\"", |
|
443 | return matchoutput("sh -c \"echo 'import re' 2>&1 | pyflakes\"", | |
444 | br"<stdin>:1: 're' imported but unused", |
|
444 | br"<stdin>:1: 're' imported but unused", | |
445 | True) |
|
445 | True) | |
446 |
|
446 | |||
447 | @check("pylint", "Pylint python linter") |
|
447 | @check("pylint", "Pylint python linter") | |
448 | def has_pylint(): |
|
448 | def has_pylint(): | |
449 | return matchoutput("pylint --help", |
|
449 | return matchoutput("pylint --help", | |
450 | br"Usage: pylint", |
|
450 | br"Usage: pylint", | |
451 | True) |
|
451 | True) | |
452 |
|
452 | |||
453 | @check("clang-format", "clang-format C code formatter") |
|
453 | @check("clang-format", "clang-format C code formatter") | |
454 | def has_clang_format(): |
|
454 | def has_clang_format(): | |
455 | return matchoutput("clang-format --help", |
|
455 | return matchoutput("clang-format --help", | |
456 | br"^OVERVIEW: A tool to format C/C\+\+[^ ]+ code.") |
|
456 | br"^OVERVIEW: A tool to format C/C\+\+[^ ]+ code.") | |
457 |
|
457 | |||
458 | @check("jshint", "JSHint static code analysis tool") |
|
458 | @check("jshint", "JSHint static code analysis tool") | |
459 | def has_jshint(): |
|
459 | def has_jshint(): | |
460 | return matchoutput("jshint --version 2>&1", br"jshint v") |
|
460 | return matchoutput("jshint --version 2>&1", br"jshint v") | |
461 |
|
461 | |||
462 | @check("pygments", "Pygments source highlighting library") |
|
462 | @check("pygments", "Pygments source highlighting library") | |
463 | def has_pygments(): |
|
463 | def has_pygments(): | |
464 | try: |
|
464 | try: | |
465 | import pygments |
|
465 | import pygments | |
466 | pygments.highlight # silence unused import warning |
|
466 | pygments.highlight # silence unused import warning | |
467 | return True |
|
467 | return True | |
468 | except ImportError: |
|
468 | except ImportError: | |
469 | return False |
|
469 | return False | |
470 |
|
470 | |||
471 | @check("outer-repo", "outer repo") |
|
471 | @check("outer-repo", "outer repo") | |
472 | def has_outer_repo(): |
|
472 | def has_outer_repo(): | |
473 | # failing for other reasons than 'no repo' imply that there is a repo |
|
473 | # failing for other reasons than 'no repo' imply that there is a repo | |
474 | return not matchoutput('hg root 2>&1', |
|
474 | return not matchoutput('hg root 2>&1', | |
475 | br'abort: no repository found', True) |
|
475 | br'abort: no repository found', True) | |
476 |
|
476 | |||
477 | @check("ssl", "ssl module available") |
|
477 | @check("ssl", "ssl module available") | |
478 | def has_ssl(): |
|
478 | def has_ssl(): | |
479 | try: |
|
479 | try: | |
480 | import ssl |
|
480 | import ssl | |
481 | ssl.CERT_NONE |
|
481 | ssl.CERT_NONE | |
482 | return True |
|
482 | return True | |
483 | except ImportError: |
|
483 | except ImportError: | |
484 | return False |
|
484 | return False | |
485 |
|
485 | |||
486 | @check("sslcontext", "python >= 2.7.9 ssl") |
|
486 | @check("sslcontext", "python >= 2.7.9 ssl") | |
487 | def has_sslcontext(): |
|
487 | def has_sslcontext(): | |
488 | try: |
|
488 | try: | |
489 | import ssl |
|
489 | import ssl | |
490 | ssl.SSLContext |
|
490 | ssl.SSLContext | |
491 | return True |
|
491 | return True | |
492 | except (ImportError, AttributeError): |
|
492 | except (ImportError, AttributeError): | |
493 | return False |
|
493 | return False | |
494 |
|
494 | |||
495 | @check("defaultcacerts", "can verify SSL certs by system's CA certs store") |
|
495 | @check("defaultcacerts", "can verify SSL certs by system's CA certs store") | |
496 | def has_defaultcacerts(): |
|
496 | def has_defaultcacerts(): | |
497 | from mercurial import sslutil, ui as uimod |
|
497 | from mercurial import sslutil, ui as uimod | |
498 | ui = uimod.ui.load() |
|
498 | ui = uimod.ui.load() | |
499 | return sslutil._defaultcacerts(ui) or sslutil._canloaddefaultcerts |
|
499 | return sslutil._defaultcacerts(ui) or sslutil._canloaddefaultcerts | |
500 |
|
500 | |||
501 | @check("defaultcacertsloaded", "detected presence of loaded system CA certs") |
|
501 | @check("defaultcacertsloaded", "detected presence of loaded system CA certs") | |
502 | def has_defaultcacertsloaded(): |
|
502 | def has_defaultcacertsloaded(): | |
503 | import ssl |
|
503 | import ssl | |
504 | from mercurial import sslutil, ui as uimod |
|
504 | from mercurial import sslutil, ui as uimod | |
505 |
|
505 | |||
506 | if not has_defaultcacerts(): |
|
506 | if not has_defaultcacerts(): | |
507 | return False |
|
507 | return False | |
508 | if not has_sslcontext(): |
|
508 | if not has_sslcontext(): | |
509 | return False |
|
509 | return False | |
510 |
|
510 | |||
511 | ui = uimod.ui.load() |
|
511 | ui = uimod.ui.load() | |
512 | cafile = sslutil._defaultcacerts(ui) |
|
512 | cafile = sslutil._defaultcacerts(ui) | |
513 | ctx = ssl.create_default_context() |
|
513 | ctx = ssl.create_default_context() | |
514 | if cafile: |
|
514 | if cafile: | |
515 | ctx.load_verify_locations(cafile=cafile) |
|
515 | ctx.load_verify_locations(cafile=cafile) | |
516 | else: |
|
516 | else: | |
517 | ctx.load_default_certs() |
|
517 | ctx.load_default_certs() | |
518 |
|
518 | |||
519 | return len(ctx.get_ca_certs()) > 0 |
|
519 | return len(ctx.get_ca_certs()) > 0 | |
520 |
|
520 | |||
521 | @check("tls1.2", "TLS 1.2 protocol support") |
|
521 | @check("tls1.2", "TLS 1.2 protocol support") | |
522 | def has_tls1_2(): |
|
522 | def has_tls1_2(): | |
523 | from mercurial import sslutil |
|
523 | from mercurial import sslutil | |
524 | return 'tls1.2' in sslutil.supportedprotocols |
|
524 | return 'tls1.2' in sslutil.supportedprotocols | |
525 |
|
525 | |||
526 | @check("windows", "Windows") |
|
526 | @check("windows", "Windows") | |
527 | def has_windows(): |
|
527 | def has_windows(): | |
528 | return os.name == 'nt' |
|
528 | return os.name == 'nt' | |
529 |
|
529 | |||
530 | @check("system-sh", "system() uses sh") |
|
530 | @check("system-sh", "system() uses sh") | |
531 | def has_system_sh(): |
|
531 | def has_system_sh(): | |
532 | return os.name != 'nt' |
|
532 | return os.name != 'nt' | |
533 |
|
533 | |||
534 | @check("serve", "platform and python can manage 'hg serve -d'") |
|
534 | @check("serve", "platform and python can manage 'hg serve -d'") | |
535 | def has_serve(): |
|
535 | def has_serve(): | |
536 | return True |
|
536 | return True | |
537 |
|
537 | |||
538 | @check("test-repo", "running tests from repository") |
|
538 | @check("test-repo", "running tests from repository") | |
539 | def has_test_repo(): |
|
539 | def has_test_repo(): | |
540 | t = os.environ["TESTDIR"] |
|
540 | t = os.environ["TESTDIR"] | |
541 | return os.path.isdir(os.path.join(t, "..", ".hg")) |
|
541 | return os.path.isdir(os.path.join(t, "..", ".hg")) | |
542 |
|
542 | |||
543 | @check("tic", "terminfo compiler and curses module") |
|
543 | @check("tic", "terminfo compiler and curses module") | |
544 | def has_tic(): |
|
544 | def has_tic(): | |
545 | try: |
|
545 | try: | |
546 | import curses |
|
546 | import curses | |
547 | curses.COLOR_BLUE |
|
547 | curses.COLOR_BLUE | |
548 | return matchoutput('test -x "`which tic`"', br'') |
|
548 | return matchoutput('test -x "`which tic`"', br'') | |
549 | except ImportError: |
|
549 | except ImportError: | |
550 | return False |
|
550 | return False | |
551 |
|
551 | |||
552 | @check("msys", "Windows with MSYS") |
|
552 | @check("msys", "Windows with MSYS") | |
553 | def has_msys(): |
|
553 | def has_msys(): | |
554 | return os.getenv('MSYSTEM') |
|
554 | return os.getenv('MSYSTEM') | |
555 |
|
555 | |||
556 | @check("aix", "AIX") |
|
556 | @check("aix", "AIX") | |
557 | def has_aix(): |
|
557 | def has_aix(): | |
558 | return sys.platform.startswith("aix") |
|
558 | return sys.platform.startswith("aix") | |
559 |
|
559 | |||
560 | @check("osx", "OS X") |
|
560 | @check("osx", "OS X") | |
561 | def has_osx(): |
|
561 | def has_osx(): | |
562 | return sys.platform == 'darwin' |
|
562 | return sys.platform == 'darwin' | |
563 |
|
563 | |||
564 | @check("osxpackaging", "OS X packaging tools") |
|
564 | @check("osxpackaging", "OS X packaging tools") | |
565 | def has_osxpackaging(): |
|
565 | def has_osxpackaging(): | |
566 | try: |
|
566 | try: | |
567 | return (matchoutput('pkgbuild', br'Usage: pkgbuild ', ignorestatus=1) |
|
567 | return (matchoutput('pkgbuild', br'Usage: pkgbuild ', ignorestatus=1) | |
568 | and matchoutput( |
|
568 | and matchoutput( | |
569 | 'productbuild', br'Usage: productbuild ', |
|
569 | 'productbuild', br'Usage: productbuild ', | |
570 | ignorestatus=1) |
|
570 | ignorestatus=1) | |
571 | and matchoutput('lsbom', br'Usage: lsbom', ignorestatus=1) |
|
571 | and matchoutput('lsbom', br'Usage: lsbom', ignorestatus=1) | |
572 | and matchoutput( |
|
572 | and matchoutput( | |
573 | 'xar --help', br'Usage: xar', ignorestatus=1)) |
|
573 | 'xar --help', br'Usage: xar', ignorestatus=1)) | |
574 | except ImportError: |
|
574 | except ImportError: | |
575 | return False |
|
575 | return False | |
576 |
|
576 | |||
577 | @check('linuxormacos', 'Linux or MacOS') |
|
577 | @check('linuxormacos', 'Linux or MacOS') | |
578 | def has_linuxormacos(): |
|
578 | def has_linuxormacos(): | |
579 | # This isn't a perfect test for MacOS. But it is sufficient for our needs. |
|
579 | # This isn't a perfect test for MacOS. But it is sufficient for our needs. | |
580 | return sys.platform.startswith(('linux', 'darwin')) |
|
580 | return sys.platform.startswith(('linux', 'darwin')) | |
581 |
|
581 | |||
582 | @check("docker", "docker support") |
|
582 | @check("docker", "docker support") | |
583 | def has_docker(): |
|
583 | def has_docker(): | |
584 | pat = br'A self-sufficient runtime for' |
|
584 | pat = br'A self-sufficient runtime for' | |
585 | if matchoutput('docker --help', pat): |
|
585 | if matchoutput('docker --help', pat): | |
586 | if 'linux' not in sys.platform: |
|
586 | if 'linux' not in sys.platform: | |
587 | # TODO: in theory we should be able to test docker-based |
|
587 | # TODO: in theory we should be able to test docker-based | |
588 | # package creation on non-linux using boot2docker, but in |
|
588 | # package creation on non-linux using boot2docker, but in | |
589 | # practice that requires extra coordination to make sure |
|
589 | # practice that requires extra coordination to make sure | |
590 | # $TESTTEMP is going to be visible at the same path to the |
|
590 | # $TESTTEMP is going to be visible at the same path to the | |
591 | # boot2docker VM. If we figure out how to verify that, we |
|
591 | # boot2docker VM. If we figure out how to verify that, we | |
592 | # can use the following instead of just saying False: |
|
592 | # can use the following instead of just saying False: | |
593 | # return 'DOCKER_HOST' in os.environ |
|
593 | # return 'DOCKER_HOST' in os.environ | |
594 | return False |
|
594 | return False | |
595 |
|
595 | |||
596 | return True |
|
596 | return True | |
597 | return False |
|
597 | return False | |
598 |
|
598 | |||
599 | @check("debhelper", "debian packaging tools") |
|
599 | @check("debhelper", "debian packaging tools") | |
600 | def has_debhelper(): |
|
600 | def has_debhelper(): | |
601 | # Some versions of dpkg say `dpkg', some say 'dpkg' (` vs ' on the first |
|
601 | # Some versions of dpkg say `dpkg', some say 'dpkg' (` vs ' on the first | |
602 | # quote), so just accept anything in that spot. |
|
602 | # quote), so just accept anything in that spot. | |
603 | dpkg = matchoutput('dpkg --version', |
|
603 | dpkg = matchoutput('dpkg --version', | |
604 | br"Debian .dpkg' package management program") |
|
604 | br"Debian .dpkg' package management program") | |
605 | dh = matchoutput('dh --help', |
|
605 | dh = matchoutput('dh --help', | |
606 | br'dh is a part of debhelper.', ignorestatus=True) |
|
606 | br'dh is a part of debhelper.', ignorestatus=True) | |
607 | dh_py2 = matchoutput('dh_python2 --help', |
|
607 | dh_py2 = matchoutput('dh_python2 --help', | |
608 | br'other supported Python versions') |
|
608 | br'other supported Python versions') | |
609 | # debuild comes from the 'devscripts' package, though you might want |
|
609 | # debuild comes from the 'devscripts' package, though you might want | |
610 | # the 'build-debs' package instead, which has a dependency on devscripts. |
|
610 | # the 'build-debs' package instead, which has a dependency on devscripts. | |
611 | debuild = matchoutput('debuild --help', |
|
611 | debuild = matchoutput('debuild --help', | |
612 | br'to run debian/rules with given parameter') |
|
612 | br'to run debian/rules with given parameter') | |
613 | return dpkg and dh and dh_py2 and debuild |
|
613 | return dpkg and dh and dh_py2 and debuild | |
614 |
|
614 | |||
615 | @check("debdeps", |
|
615 | @check("debdeps", | |
616 | "debian build dependencies (run dpkg-checkbuilddeps in contrib/)") |
|
616 | "debian build dependencies (run dpkg-checkbuilddeps in contrib/)") | |
617 | def has_debdeps(): |
|
617 | def has_debdeps(): | |
618 | # just check exit status (ignoring output) |
|
618 | # just check exit status (ignoring output) | |
619 | path = '%s/../contrib/debian/control' % os.environ['TESTDIR'] |
|
619 | path = '%s/../contrib/debian/control' % os.environ['TESTDIR'] | |
620 | return matchoutput('dpkg-checkbuilddeps %s' % path, br'') |
|
620 | return matchoutput('dpkg-checkbuilddeps %s' % path, br'') | |
621 |
|
621 | |||
622 | @check("demandimport", "demandimport enabled") |
|
622 | @check("demandimport", "demandimport enabled") | |
623 | def has_demandimport(): |
|
623 | def has_demandimport(): | |
624 | # chg disables demandimport intentionally for performance wins. |
|
624 | # chg disables demandimport intentionally for performance wins. | |
625 | return ((not has_chg()) and os.environ.get('HGDEMANDIMPORT') != 'disable') |
|
625 | return ((not has_chg()) and os.environ.get('HGDEMANDIMPORT') != 'disable') | |
626 |
|
626 | |||
627 | @check("py3k", "running with Python 3.x") |
|
627 | @check("py3k", "running with Python 3.x") | |
628 | def has_py3k(): |
|
628 | def has_py3k(): | |
629 | return 3 == sys.version_info[0] |
|
629 | return 3 == sys.version_info[0] | |
630 |
|
630 | |||
631 | @check("py3exe", "a Python 3.x interpreter is available") |
|
631 | @check("py3exe", "a Python 3.x interpreter is available") | |
632 | def has_python3exe(): |
|
632 | def has_python3exe(): | |
633 | return 'PYTHON3' in os.environ |
|
633 | return 'PYTHON3' in os.environ | |
634 |
|
634 | |||
635 | @check("py3pygments", "Pygments available on Python 3.x") |
|
635 | @check("py3pygments", "Pygments available on Python 3.x") | |
636 | def has_py3pygments(): |
|
636 | def has_py3pygments(): | |
637 | if has_py3k(): |
|
637 | if has_py3k(): | |
638 | return has_pygments() |
|
638 | return has_pygments() | |
639 | elif has_python3exe(): |
|
639 | elif has_python3exe(): | |
640 | # just check exit status (ignoring output) |
|
640 | # just check exit status (ignoring output) | |
641 | py3 = os.environ['PYTHON3'] |
|
641 | py3 = os.environ['PYTHON3'] | |
642 | return matchoutput('%s -c "import pygments"' % py3, br'') |
|
642 | return matchoutput('%s -c "import pygments"' % py3, br'') | |
643 | return False |
|
643 | return False | |
644 |
|
644 | |||
645 | @check("pure", "running with pure Python code") |
|
645 | @check("pure", "running with pure Python code") | |
646 | def has_pure(): |
|
646 | def has_pure(): | |
647 | return any([ |
|
647 | return any([ | |
648 | os.environ.get("HGMODULEPOLICY") == "py", |
|
648 | os.environ.get("HGMODULEPOLICY") == "py", | |
649 | os.environ.get("HGTEST_RUN_TESTS_PURE") == "--pure", |
|
649 | os.environ.get("HGTEST_RUN_TESTS_PURE") == "--pure", | |
650 | ]) |
|
650 | ]) | |
651 |
|
651 | |||
652 | @check("slow", "allow slow tests (use --allow-slow-tests)") |
|
652 | @check("slow", "allow slow tests (use --allow-slow-tests)") | |
653 | def has_slow(): |
|
653 | def has_slow(): | |
654 | return os.environ.get('HGTEST_SLOW') == 'slow' |
|
654 | return os.environ.get('HGTEST_SLOW') == 'slow' | |
655 |
|
655 | |||
656 | @check("hypothesis", "Hypothesis automated test generation") |
|
656 | @check("hypothesis", "Hypothesis automated test generation") | |
657 | def has_hypothesis(): |
|
657 | def has_hypothesis(): | |
658 | try: |
|
658 | try: | |
659 | import hypothesis |
|
659 | import hypothesis | |
660 | hypothesis.given |
|
660 | hypothesis.given | |
661 | return True |
|
661 | return True | |
662 | except ImportError: |
|
662 | except ImportError: | |
663 | return False |
|
663 | return False | |
664 |
|
664 | |||
665 | @check("unziplinks", "unzip(1) understands and extracts symlinks") |
|
665 | @check("unziplinks", "unzip(1) understands and extracts symlinks") | |
666 | def unzip_understands_symlinks(): |
|
666 | def unzip_understands_symlinks(): | |
667 | return matchoutput('unzip --help', br'Info-ZIP') |
|
667 | return matchoutput('unzip --help', br'Info-ZIP') | |
668 |
|
668 | |||
669 | @check("zstd", "zstd Python module available") |
|
669 | @check("zstd", "zstd Python module available") | |
670 | def has_zstd(): |
|
670 | def has_zstd(): | |
671 | try: |
|
671 | try: | |
672 | import mercurial.zstd |
|
672 | import mercurial.zstd | |
673 | mercurial.zstd.__version__ |
|
673 | mercurial.zstd.__version__ | |
674 | return True |
|
674 | return True | |
675 | except ImportError: |
|
675 | except ImportError: | |
676 | return False |
|
676 | return False | |
677 |
|
677 | |||
678 | @check("devfull", "/dev/full special file") |
|
678 | @check("devfull", "/dev/full special file") | |
679 | def has_dev_full(): |
|
679 | def has_dev_full(): | |
680 | return os.path.exists('/dev/full') |
|
680 | return os.path.exists('/dev/full') | |
681 |
|
681 | |||
682 | @check("virtualenv", "Python virtualenv support") |
|
682 | @check("virtualenv", "Python virtualenv support") | |
683 | def has_virtualenv(): |
|
683 | def has_virtualenv(): | |
684 | try: |
|
684 | try: | |
685 | import virtualenv |
|
685 | import virtualenv | |
686 | virtualenv.ACTIVATE_SH |
|
686 | virtualenv.ACTIVATE_SH | |
687 | return True |
|
687 | return True | |
688 | except ImportError: |
|
688 | except ImportError: | |
689 | return False |
|
689 | return False | |
690 |
|
690 | |||
691 | @check("fsmonitor", "running tests with fsmonitor") |
|
691 | @check("fsmonitor", "running tests with fsmonitor") | |
692 | def has_fsmonitor(): |
|
692 | def has_fsmonitor(): | |
693 | return 'HGFSMONITOR_TESTS' in os.environ |
|
693 | return 'HGFSMONITOR_TESTS' in os.environ | |
694 |
|
694 | |||
695 | @check("fuzzywuzzy", "Fuzzy string matching library") |
|
695 | @check("fuzzywuzzy", "Fuzzy string matching library") | |
696 | def has_fuzzywuzzy(): |
|
696 | def has_fuzzywuzzy(): | |
697 | try: |
|
697 | try: | |
698 | import fuzzywuzzy |
|
698 | import fuzzywuzzy | |
699 | fuzzywuzzy.__version__ |
|
699 | fuzzywuzzy.__version__ | |
700 | return True |
|
700 | return True | |
701 | except ImportError: |
|
701 | except ImportError: | |
702 | return False |
|
702 | return False | |
703 |
|
703 | |||
704 | @check("clang-libfuzzer", "clang new enough to include libfuzzer") |
|
704 | @check("clang-libfuzzer", "clang new enough to include libfuzzer") | |
705 | def has_clang_libfuzzer(): |
|
705 | def has_clang_libfuzzer(): | |
706 | mat = matchoutput('clang --version', b'clang version (\d)') |
|
706 | mat = matchoutput('clang --version', b'clang version (\d)') | |
707 | if mat: |
|
707 | if mat: | |
708 | # libfuzzer is new in clang 6 |
|
708 | # libfuzzer is new in clang 6 | |
709 | return int(mat.group(1)) > 5 |
|
709 | return int(mat.group(1)) > 5 | |
710 | return False |
|
710 | return False | |
711 |
|
711 | |||
712 | @check("xdiff", "xdiff algorithm") |
|
712 | @check("xdiff", "xdiff algorithm") | |
713 | def has_xdiff(): |
|
713 | def has_xdiff(): | |
714 | try: |
|
714 | try: | |
715 | from mercurial import policy |
|
715 | from mercurial import policy | |
716 | bdiff = policy.importmod('bdiff') |
|
716 | bdiff = policy.importmod('bdiff') | |
717 | return bdiff.xdiffblocks(b'', b'') == [(0, 0, 0, 0)] |
|
717 | return bdiff.xdiffblocks(b'', b'') == [(0, 0, 0, 0)] | |
718 | except (ImportError, AttributeError): |
|
718 | except (ImportError, AttributeError): | |
719 | return False |
|
719 | return False | |
|
720 | ||||
|
721 | def getrepofeatures(): | |||
|
722 | """Obtain set of repository features in use. | |||
|
723 | ||||
|
724 | HGREPOFEATURES can be used to define or remove features. It contains | |||
|
725 | a space-delimited list of feature strings. Strings beginning with ``-`` | |||
|
726 | mean to remove. | |||
|
727 | """ | |||
|
728 | # Default list provided by core. | |||
|
729 | features = { | |||
|
730 | 'revlogstore', | |||
|
731 | } | |||
|
732 | ||||
|
733 | # Features that imply other features. | |||
|
734 | implies = { | |||
|
735 | 'simplestore': ['-revlogstore'], | |||
|
736 | } | |||
|
737 | ||||
|
738 | for override in os.environ.get('HGREPOFEATURES', '').split(' '): | |||
|
739 | if not override: | |||
|
740 | continue | |||
|
741 | ||||
|
742 | if override.startswith('-'): | |||
|
743 | if override[1:] in features: | |||
|
744 | features.remove(override[1:]) | |||
|
745 | else: | |||
|
746 | features.add(override) | |||
|
747 | ||||
|
748 | for imply in implies.get(override, []): | |||
|
749 | if imply.startswith('-'): | |||
|
750 | if imply[1:] in features: | |||
|
751 | features.remove(imply[1:]) | |||
|
752 | else: | |||
|
753 | features.add(imply) | |||
|
754 | ||||
|
755 | return features | |||
|
756 | ||||
|
757 | @check('reporevlogstore', 'repository using the default revlog store') | |||
|
758 | def has_reporevlogstore(): | |||
|
759 | return 'revlogstore' in getrepofeatures() | |||
|
760 | ||||
|
761 | @check('reposimplestore', 'repository using simple storage extension') | |||
|
762 | def has_reposimplestore(): | |||
|
763 | return 'simplestore' in getrepofeatures() |
@@ -1,589 +1,594 | |||||
1 | # simplestorerepo.py - Extension that swaps in alternate repository storage. |
|
1 | # simplestorerepo.py - Extension that swaps in alternate repository storage. | |
2 | # |
|
2 | # | |
3 | # Copyright 2018 Gregory Szorc <gregory.szorc@gmail.com> |
|
3 | # Copyright 2018 Gregory Szorc <gregory.szorc@gmail.com> | |
4 | # |
|
4 | # | |
5 | # This software may be used and distributed according to the terms of the |
|
5 | # This software may be used and distributed according to the terms of the | |
6 | # GNU General Public License version 2 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. | |
7 |
|
7 | |||
|
8 | # To use this with the test suite: | |||
|
9 | # | |||
|
10 | # $ HGREPOFEATURES="simplestore" ./run-tests.py \ | |||
|
11 | # --extra-config-opt extensions.simplestore=`pwd`/simplestorerepo.py | |||
|
12 | ||||
8 | from __future__ import absolute_import |
|
13 | from __future__ import absolute_import | |
9 |
|
14 | |||
10 | from mercurial.i18n import _ |
|
15 | from mercurial.i18n import _ | |
11 | from mercurial.node import ( |
|
16 | from mercurial.node import ( | |
12 | bin, |
|
17 | bin, | |
13 | hex, |
|
18 | hex, | |
14 | nullid, |
|
19 | nullid, | |
15 | nullrev, |
|
20 | nullrev, | |
16 | ) |
|
21 | ) | |
17 | from mercurial.thirdparty import ( |
|
22 | from mercurial.thirdparty import ( | |
18 | cbor, |
|
23 | cbor, | |
19 | ) |
|
24 | ) | |
20 | from mercurial import ( |
|
25 | from mercurial import ( | |
21 | ancestor, |
|
26 | ancestor, | |
22 | error, |
|
27 | error, | |
23 | filelog, |
|
28 | filelog, | |
24 | mdiff, |
|
29 | mdiff, | |
25 | pycompat, |
|
30 | pycompat, | |
26 | revlog, |
|
31 | revlog, | |
27 | ) |
|
32 | ) | |
28 |
|
33 | |||
29 | # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for |
|
34 | # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for | |
30 | # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should |
|
35 | # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should | |
31 | # be specifying the version(s) of Mercurial they are tested with, or |
|
36 | # be specifying the version(s) of Mercurial they are tested with, or | |
32 | # leave the attribute unspecified. |
|
37 | # leave the attribute unspecified. | |
33 | testedwith = 'ships-with-hg-core' |
|
38 | testedwith = 'ships-with-hg-core' | |
34 |
|
39 | |||
35 | def validatenode(node): |
|
40 | def validatenode(node): | |
36 | if isinstance(node, int): |
|
41 | if isinstance(node, int): | |
37 | raise ValueError('expected node; got int') |
|
42 | raise ValueError('expected node; got int') | |
38 |
|
43 | |||
39 | if len(node) != 20: |
|
44 | if len(node) != 20: | |
40 | raise ValueError('expected 20 byte node') |
|
45 | raise ValueError('expected 20 byte node') | |
41 |
|
46 | |||
42 | def validaterev(rev): |
|
47 | def validaterev(rev): | |
43 | if not isinstance(rev, int): |
|
48 | if not isinstance(rev, int): | |
44 | raise ValueError('expected int') |
|
49 | raise ValueError('expected int') | |
45 |
|
50 | |||
46 | class filestorage(object): |
|
51 | class filestorage(object): | |
47 | """Implements storage for a tracked path. |
|
52 | """Implements storage for a tracked path. | |
48 |
|
53 | |||
49 | Data is stored in the VFS in a directory corresponding to the tracked |
|
54 | Data is stored in the VFS in a directory corresponding to the tracked | |
50 | path. |
|
55 | path. | |
51 |
|
56 | |||
52 | Index data is stored in an ``index`` file using CBOR. |
|
57 | Index data is stored in an ``index`` file using CBOR. | |
53 |
|
58 | |||
54 | Fulltext data is stored in files having names of the node. |
|
59 | Fulltext data is stored in files having names of the node. | |
55 | """ |
|
60 | """ | |
56 |
|
61 | |||
57 | def __init__(self, svfs, path): |
|
62 | def __init__(self, svfs, path): | |
58 | self._svfs = svfs |
|
63 | self._svfs = svfs | |
59 | self._path = path |
|
64 | self._path = path | |
60 |
|
65 | |||
61 | self._storepath = b'/'.join([b'data', path]) |
|
66 | self._storepath = b'/'.join([b'data', path]) | |
62 | self._indexpath = b'/'.join([self._storepath, b'index']) |
|
67 | self._indexpath = b'/'.join([self._storepath, b'index']) | |
63 |
|
68 | |||
64 | indexdata = self._svfs.tryread(self._indexpath) |
|
69 | indexdata = self._svfs.tryread(self._indexpath) | |
65 | if indexdata: |
|
70 | if indexdata: | |
66 | indexdata = cbor.loads(indexdata) |
|
71 | indexdata = cbor.loads(indexdata) | |
67 |
|
72 | |||
68 | self._indexdata = indexdata or [] |
|
73 | self._indexdata = indexdata or [] | |
69 | self._indexbynode = {} |
|
74 | self._indexbynode = {} | |
70 | self._indexbyrev = {} |
|
75 | self._indexbyrev = {} | |
71 | self.index = [] |
|
76 | self.index = [] | |
72 | self._refreshindex() |
|
77 | self._refreshindex() | |
73 |
|
78 | |||
74 | # This is used by changegroup code :/ |
|
79 | # This is used by changegroup code :/ | |
75 | self._generaldelta = True |
|
80 | self._generaldelta = True | |
76 | self.storedeltachains = False |
|
81 | self.storedeltachains = False | |
77 |
|
82 | |||
78 | self.version = 1 |
|
83 | self.version = 1 | |
79 |
|
84 | |||
80 | def _refreshindex(self): |
|
85 | def _refreshindex(self): | |
81 | self._indexbynode.clear() |
|
86 | self._indexbynode.clear() | |
82 | self._indexbyrev.clear() |
|
87 | self._indexbyrev.clear() | |
83 | self.index = [] |
|
88 | self.index = [] | |
84 |
|
89 | |||
85 | for i, entry in enumerate(self._indexdata): |
|
90 | for i, entry in enumerate(self._indexdata): | |
86 | self._indexbynode[entry[b'node']] = entry |
|
91 | self._indexbynode[entry[b'node']] = entry | |
87 | self._indexbyrev[i] = entry |
|
92 | self._indexbyrev[i] = entry | |
88 |
|
93 | |||
89 | self._indexbynode[nullid] = { |
|
94 | self._indexbynode[nullid] = { | |
90 | b'node': nullid, |
|
95 | b'node': nullid, | |
91 | b'p1': nullid, |
|
96 | b'p1': nullid, | |
92 | b'p2': nullid, |
|
97 | b'p2': nullid, | |
93 | b'linkrev': nullrev, |
|
98 | b'linkrev': nullrev, | |
94 | b'flags': 0, |
|
99 | b'flags': 0, | |
95 | } |
|
100 | } | |
96 |
|
101 | |||
97 | self._indexbyrev[nullrev] = { |
|
102 | self._indexbyrev[nullrev] = { | |
98 | b'node': nullid, |
|
103 | b'node': nullid, | |
99 | b'p1': nullid, |
|
104 | b'p1': nullid, | |
100 | b'p2': nullid, |
|
105 | b'p2': nullid, | |
101 | b'linkrev': nullrev, |
|
106 | b'linkrev': nullrev, | |
102 | b'flags': 0, |
|
107 | b'flags': 0, | |
103 | } |
|
108 | } | |
104 |
|
109 | |||
105 | for i, entry in enumerate(self._indexdata): |
|
110 | for i, entry in enumerate(self._indexdata): | |
106 | p1rev, p2rev = self.parentrevs(self.rev(entry[b'node'])) |
|
111 | p1rev, p2rev = self.parentrevs(self.rev(entry[b'node'])) | |
107 |
|
112 | |||
108 | # start, length, rawsize, chainbase, linkrev, p1, p2, node |
|
113 | # start, length, rawsize, chainbase, linkrev, p1, p2, node | |
109 | self.index.append((0, 0, 0, -1, entry[b'linkrev'], p1rev, p2rev, |
|
114 | self.index.append((0, 0, 0, -1, entry[b'linkrev'], p1rev, p2rev, | |
110 | entry[b'node'])) |
|
115 | entry[b'node'])) | |
111 |
|
116 | |||
112 | self.index.append((0, 0, 0, -1, -1, -1, -1, nullid)) |
|
117 | self.index.append((0, 0, 0, -1, -1, -1, -1, nullid)) | |
113 |
|
118 | |||
114 | def __len__(self): |
|
119 | def __len__(self): | |
115 | return len(self._indexdata) |
|
120 | return len(self._indexdata) | |
116 |
|
121 | |||
117 | def __iter__(self): |
|
122 | def __iter__(self): | |
118 | return iter(range(len(self))) |
|
123 | return iter(range(len(self))) | |
119 |
|
124 | |||
120 | def revs(self, start=0, stop=None): |
|
125 | def revs(self, start=0, stop=None): | |
121 | step = 1 |
|
126 | step = 1 | |
122 | if stop is not None: |
|
127 | if stop is not None: | |
123 | if start > stop: |
|
128 | if start > stop: | |
124 | step = -1 |
|
129 | step = -1 | |
125 |
|
130 | |||
126 | stop += step |
|
131 | stop += step | |
127 | else: |
|
132 | else: | |
128 | stop = len(self) |
|
133 | stop = len(self) | |
129 |
|
134 | |||
130 | return range(start, stop, step) |
|
135 | return range(start, stop, step) | |
131 |
|
136 | |||
132 | def parents(self, node): |
|
137 | def parents(self, node): | |
133 | validatenode(node) |
|
138 | validatenode(node) | |
134 |
|
139 | |||
135 | if node not in self._indexbynode: |
|
140 | if node not in self._indexbynode: | |
136 | raise KeyError('unknown node') |
|
141 | raise KeyError('unknown node') | |
137 |
|
142 | |||
138 | entry = self._indexbynode[node] |
|
143 | entry = self._indexbynode[node] | |
139 |
|
144 | |||
140 | return entry[b'p1'], entry[b'p2'] |
|
145 | return entry[b'p1'], entry[b'p2'] | |
141 |
|
146 | |||
142 | def parentrevs(self, rev): |
|
147 | def parentrevs(self, rev): | |
143 | p1, p2 = self.parents(self._indexbyrev[rev][b'node']) |
|
148 | p1, p2 = self.parents(self._indexbyrev[rev][b'node']) | |
144 | return self.rev(p1), self.rev(p2) |
|
149 | return self.rev(p1), self.rev(p2) | |
145 |
|
150 | |||
146 | def rev(self, node): |
|
151 | def rev(self, node): | |
147 | validatenode(node) |
|
152 | validatenode(node) | |
148 |
|
153 | |||
149 | # Will raise KeyError. |
|
154 | # Will raise KeyError. | |
150 | self._indexbynode[node] |
|
155 | self._indexbynode[node] | |
151 |
|
156 | |||
152 | for rev, entry in self._indexbyrev.items(): |
|
157 | for rev, entry in self._indexbyrev.items(): | |
153 | if entry[b'node'] == node: |
|
158 | if entry[b'node'] == node: | |
154 | return rev |
|
159 | return rev | |
155 |
|
160 | |||
156 | raise error.ProgrammingError('this should not occur') |
|
161 | raise error.ProgrammingError('this should not occur') | |
157 |
|
162 | |||
158 | def node(self, rev): |
|
163 | def node(self, rev): | |
159 | validaterev(rev) |
|
164 | validaterev(rev) | |
160 |
|
165 | |||
161 | return self._indexbyrev[rev][b'node'] |
|
166 | return self._indexbyrev[rev][b'node'] | |
162 |
|
167 | |||
163 | def lookup(self, node): |
|
168 | def lookup(self, node): | |
164 | if isinstance(node, int): |
|
169 | if isinstance(node, int): | |
165 | return self.node(node) |
|
170 | return self.node(node) | |
166 |
|
171 | |||
167 | if len(node) == 20: |
|
172 | if len(node) == 20: | |
168 | try: |
|
173 | try: | |
169 | self.rev(node) |
|
174 | self.rev(node) | |
170 | return node |
|
175 | return node | |
171 | except LookupError: |
|
176 | except LookupError: | |
172 | pass |
|
177 | pass | |
173 |
|
178 | |||
174 | try: |
|
179 | try: | |
175 | rev = int(node) |
|
180 | rev = int(node) | |
176 | if '%d' % rev != node: |
|
181 | if '%d' % rev != node: | |
177 | raise ValueError |
|
182 | raise ValueError | |
178 |
|
183 | |||
179 | if rev < 0: |
|
184 | if rev < 0: | |
180 | rev = len(self) + rev |
|
185 | rev = len(self) + rev | |
181 | if rev < 0 or rev >= len(self): |
|
186 | if rev < 0 or rev >= len(self): | |
182 | raise ValueError |
|
187 | raise ValueError | |
183 |
|
188 | |||
184 | return self.node(rev) |
|
189 | return self.node(rev) | |
185 | except (ValueError, OverflowError): |
|
190 | except (ValueError, OverflowError): | |
186 | pass |
|
191 | pass | |
187 |
|
192 | |||
188 | if len(node) == 40: |
|
193 | if len(node) == 40: | |
189 | try: |
|
194 | try: | |
190 | rawnode = bin(node) |
|
195 | rawnode = bin(node) | |
191 | self.rev(rawnode) |
|
196 | self.rev(rawnode) | |
192 | return rawnode |
|
197 | return rawnode | |
193 | except (TypeError, LookupError): |
|
198 | except (TypeError, LookupError): | |
194 | pass |
|
199 | pass | |
195 |
|
200 | |||
196 | raise LookupError(node, self._path, _('invalid lookup input')) |
|
201 | raise LookupError(node, self._path, _('invalid lookup input')) | |
197 |
|
202 | |||
198 | def linkrev(self, rev): |
|
203 | def linkrev(self, rev): | |
199 | validaterev(rev) |
|
204 | validaterev(rev) | |
200 |
|
205 | |||
201 | return self._indexbyrev[rev][b'linkrev'] |
|
206 | return self._indexbyrev[rev][b'linkrev'] | |
202 |
|
207 | |||
203 | def flags(self, rev): |
|
208 | def flags(self, rev): | |
204 | validaterev(rev) |
|
209 | validaterev(rev) | |
205 |
|
210 | |||
206 | return self._indexbyrev[rev][b'flags'] |
|
211 | return self._indexbyrev[rev][b'flags'] | |
207 |
|
212 | |||
208 | def deltaparent(self, rev): |
|
213 | def deltaparent(self, rev): | |
209 | validaterev(rev) |
|
214 | validaterev(rev) | |
210 |
|
215 | |||
211 | p1node = self.parents(self.node(rev))[0] |
|
216 | p1node = self.parents(self.node(rev))[0] | |
212 | return self.rev(p1node) |
|
217 | return self.rev(p1node) | |
213 |
|
218 | |||
214 | def candelta(self, baserev, rev): |
|
219 | def candelta(self, baserev, rev): | |
215 | validaterev(baserev) |
|
220 | validaterev(baserev) | |
216 | validaterev(rev) |
|
221 | validaterev(rev) | |
217 |
|
222 | |||
218 | if ((self.flags(baserev) & revlog.REVIDX_RAWTEXT_CHANGING_FLAGS) |
|
223 | if ((self.flags(baserev) & revlog.REVIDX_RAWTEXT_CHANGING_FLAGS) | |
219 | or (self.flags(rev) & revlog.REVIDX_RAWTEXT_CHANGING_FLAGS)): |
|
224 | or (self.flags(rev) & revlog.REVIDX_RAWTEXT_CHANGING_FLAGS)): | |
220 | return False |
|
225 | return False | |
221 |
|
226 | |||
222 | return True |
|
227 | return True | |
223 |
|
228 | |||
224 | def rawsize(self, rev): |
|
229 | def rawsize(self, rev): | |
225 | validaterev(rev) |
|
230 | validaterev(rev) | |
226 | node = self.node(rev) |
|
231 | node = self.node(rev) | |
227 | return len(self.revision(node, raw=True)) |
|
232 | return len(self.revision(node, raw=True)) | |
228 |
|
233 | |||
229 | def _processflags(self, text, flags, operation, raw=False): |
|
234 | def _processflags(self, text, flags, operation, raw=False): | |
230 | if flags == 0: |
|
235 | if flags == 0: | |
231 | return text, True |
|
236 | return text, True | |
232 |
|
237 | |||
233 | validatehash = True |
|
238 | validatehash = True | |
234 | # Depending on the operation (read or write), the order might be |
|
239 | # Depending on the operation (read or write), the order might be | |
235 | # reversed due to non-commutative transforms. |
|
240 | # reversed due to non-commutative transforms. | |
236 | orderedflags = revlog.REVIDX_FLAGS_ORDER |
|
241 | orderedflags = revlog.REVIDX_FLAGS_ORDER | |
237 | if operation == 'write': |
|
242 | if operation == 'write': | |
238 | orderedflags = reversed(orderedflags) |
|
243 | orderedflags = reversed(orderedflags) | |
239 |
|
244 | |||
240 | for flag in orderedflags: |
|
245 | for flag in orderedflags: | |
241 | # If a flagprocessor has been registered for a known flag, apply the |
|
246 | # If a flagprocessor has been registered for a known flag, apply the | |
242 | # related operation transform and update result tuple. |
|
247 | # related operation transform and update result tuple. | |
243 | if flag & flags: |
|
248 | if flag & flags: | |
244 | vhash = True |
|
249 | vhash = True | |
245 |
|
250 | |||
246 | if flag not in revlog._flagprocessors: |
|
251 | if flag not in revlog._flagprocessors: | |
247 | message = _("missing processor for flag '%#x'") % (flag) |
|
252 | message = _("missing processor for flag '%#x'") % (flag) | |
248 | raise revlog.RevlogError(message) |
|
253 | raise revlog.RevlogError(message) | |
249 |
|
254 | |||
250 | processor = revlog._flagprocessors[flag] |
|
255 | processor = revlog._flagprocessors[flag] | |
251 | if processor is not None: |
|
256 | if processor is not None: | |
252 | readtransform, writetransform, rawtransform = processor |
|
257 | readtransform, writetransform, rawtransform = processor | |
253 |
|
258 | |||
254 | if raw: |
|
259 | if raw: | |
255 | vhash = rawtransform(self, text) |
|
260 | vhash = rawtransform(self, text) | |
256 | elif operation == 'read': |
|
261 | elif operation == 'read': | |
257 | text, vhash = readtransform(self, text) |
|
262 | text, vhash = readtransform(self, text) | |
258 | else: # write operation |
|
263 | else: # write operation | |
259 | text, vhash = writetransform(self, text) |
|
264 | text, vhash = writetransform(self, text) | |
260 | validatehash = validatehash and vhash |
|
265 | validatehash = validatehash and vhash | |
261 |
|
266 | |||
262 | return text, validatehash |
|
267 | return text, validatehash | |
263 |
|
268 | |||
264 | def checkhash(self, text, node, p1=None, p2=None, rev=None): |
|
269 | def checkhash(self, text, node, p1=None, p2=None, rev=None): | |
265 | if p1 is None and p2 is None: |
|
270 | if p1 is None and p2 is None: | |
266 | p1, p2 = self.parents(node) |
|
271 | p1, p2 = self.parents(node) | |
267 | if node != revlog.hash(text, p1, p2): |
|
272 | if node != revlog.hash(text, p1, p2): | |
268 | raise error.RevlogError(_("integrity check failed on %s") % |
|
273 | raise error.RevlogError(_("integrity check failed on %s") % | |
269 | self._path) |
|
274 | self._path) | |
270 |
|
275 | |||
271 | def revision(self, node, raw=False): |
|
276 | def revision(self, node, raw=False): | |
272 | validatenode(node) |
|
277 | validatenode(node) | |
273 |
|
278 | |||
274 | if node == nullid: |
|
279 | if node == nullid: | |
275 | return b'' |
|
280 | return b'' | |
276 |
|
281 | |||
277 | self._indexbynode[node] |
|
282 | self._indexbynode[node] | |
278 |
|
283 | |||
279 | rev = self.rev(node) |
|
284 | rev = self.rev(node) | |
280 | flags = self.flags(rev) |
|
285 | flags = self.flags(rev) | |
281 |
|
286 | |||
282 | path = b'/'.join([self._storepath, hex(node)]) |
|
287 | path = b'/'.join([self._storepath, hex(node)]) | |
283 | rawtext = self._svfs.read(path) |
|
288 | rawtext = self._svfs.read(path) | |
284 |
|
289 | |||
285 | text, validatehash = self._processflags(rawtext, flags, 'read', raw=raw) |
|
290 | text, validatehash = self._processflags(rawtext, flags, 'read', raw=raw) | |
286 | if validatehash: |
|
291 | if validatehash: | |
287 | self.checkhash(text, node, rev=rev) |
|
292 | self.checkhash(text, node, rev=rev) | |
288 |
|
293 | |||
289 | return text |
|
294 | return text | |
290 |
|
295 | |||
291 | def read(self, node): |
|
296 | def read(self, node): | |
292 | validatenode(node) |
|
297 | validatenode(node) | |
293 |
|
298 | |||
294 | revision = self.revision(node) |
|
299 | revision = self.revision(node) | |
295 |
|
300 | |||
296 | if not revision.startswith(b'\1\n'): |
|
301 | if not revision.startswith(b'\1\n'): | |
297 | return revision |
|
302 | return revision | |
298 |
|
303 | |||
299 | start = revision.index(b'\1\n', 2) |
|
304 | start = revision.index(b'\1\n', 2) | |
300 | return revision[start + 2:] |
|
305 | return revision[start + 2:] | |
301 |
|
306 | |||
302 | def renamed(self, node): |
|
307 | def renamed(self, node): | |
303 | validatenode(node) |
|
308 | validatenode(node) | |
304 |
|
309 | |||
305 | if self.parents(node)[0] != nullid: |
|
310 | if self.parents(node)[0] != nullid: | |
306 | return False |
|
311 | return False | |
307 |
|
312 | |||
308 | fulltext = self.revision(node) |
|
313 | fulltext = self.revision(node) | |
309 | m = filelog.parsemeta(fulltext)[0] |
|
314 | m = filelog.parsemeta(fulltext)[0] | |
310 |
|
315 | |||
311 | if m and 'copy' in m: |
|
316 | if m and 'copy' in m: | |
312 | return m['copy'], bin(m['copyrev']) |
|
317 | return m['copy'], bin(m['copyrev']) | |
313 |
|
318 | |||
314 | return False |
|
319 | return False | |
315 |
|
320 | |||
316 | def cmp(self, node, text): |
|
321 | def cmp(self, node, text): | |
317 | validatenode(node) |
|
322 | validatenode(node) | |
318 |
|
323 | |||
319 | t = text |
|
324 | t = text | |
320 |
|
325 | |||
321 | if text.startswith(b'\1\n'): |
|
326 | if text.startswith(b'\1\n'): | |
322 | t = b'\1\n\1\n' + text |
|
327 | t = b'\1\n\1\n' + text | |
323 |
|
328 | |||
324 | p1, p2 = self.parents(node) |
|
329 | p1, p2 = self.parents(node) | |
325 |
|
330 | |||
326 | if revlog.hash(t, p1, p2) == node: |
|
331 | if revlog.hash(t, p1, p2) == node: | |
327 | return False |
|
332 | return False | |
328 |
|
333 | |||
329 | if self.iscensored(self.rev(node)): |
|
334 | if self.iscensored(self.rev(node)): | |
330 | return text != b'' |
|
335 | return text != b'' | |
331 |
|
336 | |||
332 | if self.renamed(node): |
|
337 | if self.renamed(node): | |
333 | t2 = self.read(node) |
|
338 | t2 = self.read(node) | |
334 | return t2 != text |
|
339 | return t2 != text | |
335 |
|
340 | |||
336 | return True |
|
341 | return True | |
337 |
|
342 | |||
338 | def size(self, rev): |
|
343 | def size(self, rev): | |
339 | validaterev(rev) |
|
344 | validaterev(rev) | |
340 |
|
345 | |||
341 | node = self._indexbyrev[rev][b'node'] |
|
346 | node = self._indexbyrev[rev][b'node'] | |
342 |
|
347 | |||
343 | if self.renamed(node): |
|
348 | if self.renamed(node): | |
344 | return len(self.read(node)) |
|
349 | return len(self.read(node)) | |
345 |
|
350 | |||
346 | if self.iscensored(rev): |
|
351 | if self.iscensored(rev): | |
347 | return 0 |
|
352 | return 0 | |
348 |
|
353 | |||
349 | return len(self.revision(node)) |
|
354 | return len(self.revision(node)) | |
350 |
|
355 | |||
351 | def iscensored(self, rev): |
|
356 | def iscensored(self, rev): | |
352 | validaterev(rev) |
|
357 | validaterev(rev) | |
353 |
|
358 | |||
354 | return self.flags(rev) & revlog.REVIDX_ISCENSORED |
|
359 | return self.flags(rev) & revlog.REVIDX_ISCENSORED | |
355 |
|
360 | |||
356 | def commonancestorsheads(self, a, b): |
|
361 | def commonancestorsheads(self, a, b): | |
357 | validatenode(a) |
|
362 | validatenode(a) | |
358 | validatenode(b) |
|
363 | validatenode(b) | |
359 |
|
364 | |||
360 | a = self.rev(a) |
|
365 | a = self.rev(a) | |
361 | b = self.rev(b) |
|
366 | b = self.rev(b) | |
362 |
|
367 | |||
363 | ancestors = ancestor.commonancestorsheads(self.parentrevs, a, b) |
|
368 | ancestors = ancestor.commonancestorsheads(self.parentrevs, a, b) | |
364 | return pycompat.maplist(self.node, ancestors) |
|
369 | return pycompat.maplist(self.node, ancestors) | |
365 |
|
370 | |||
366 | def descendants(self, revs): |
|
371 | def descendants(self, revs): | |
367 | # This is a copy of revlog.descendants() |
|
372 | # This is a copy of revlog.descendants() | |
368 | first = min(revs) |
|
373 | first = min(revs) | |
369 | if first == nullrev: |
|
374 | if first == nullrev: | |
370 | for i in self: |
|
375 | for i in self: | |
371 | yield i |
|
376 | yield i | |
372 | return |
|
377 | return | |
373 |
|
378 | |||
374 | seen = set(revs) |
|
379 | seen = set(revs) | |
375 | for i in self.revs(start=first + 1): |
|
380 | for i in self.revs(start=first + 1): | |
376 | for x in self.parentrevs(i): |
|
381 | for x in self.parentrevs(i): | |
377 | if x != nullrev and x in seen: |
|
382 | if x != nullrev and x in seen: | |
378 | seen.add(i) |
|
383 | seen.add(i) | |
379 | yield i |
|
384 | yield i | |
380 | break |
|
385 | break | |
381 |
|
386 | |||
382 | # Required by verify. |
|
387 | # Required by verify. | |
383 | def files(self): |
|
388 | def files(self): | |
384 | entries = self._svfs.listdir(self._storepath) |
|
389 | entries = self._svfs.listdir(self._storepath) | |
385 |
|
390 | |||
386 | # Strip out undo.backup.* files created as part of transaction |
|
391 | # Strip out undo.backup.* files created as part of transaction | |
387 | # recording. |
|
392 | # recording. | |
388 | entries = [f for f in entries if not f.startswith('undo.backup.')] |
|
393 | entries = [f for f in entries if not f.startswith('undo.backup.')] | |
389 |
|
394 | |||
390 | return [b'/'.join((self._storepath, f)) for f in entries] |
|
395 | return [b'/'.join((self._storepath, f)) for f in entries] | |
391 |
|
396 | |||
392 | # Required by verify. |
|
397 | # Required by verify. | |
393 | def checksize(self): |
|
398 | def checksize(self): | |
394 | return 0, 0 |
|
399 | return 0, 0 | |
395 |
|
400 | |||
396 | def add(self, text, meta, transaction, linkrev, p1, p2): |
|
401 | def add(self, text, meta, transaction, linkrev, p1, p2): | |
397 | if meta or text.startswith(b'\1\n'): |
|
402 | if meta or text.startswith(b'\1\n'): | |
398 | text = filelog.packmeta(meta, text) |
|
403 | text = filelog.packmeta(meta, text) | |
399 |
|
404 | |||
400 | return self.addrevision(text, transaction, linkrev, p1, p2) |
|
405 | return self.addrevision(text, transaction, linkrev, p1, p2) | |
401 |
|
406 | |||
402 | def addrevision(self, text, transaction, linkrev, p1, p2, node=None, |
|
407 | def addrevision(self, text, transaction, linkrev, p1, p2, node=None, | |
403 | flags=0): |
|
408 | flags=0): | |
404 | validatenode(p1) |
|
409 | validatenode(p1) | |
405 | validatenode(p2) |
|
410 | validatenode(p2) | |
406 |
|
411 | |||
407 | if flags: |
|
412 | if flags: | |
408 | node = node or revlog.hash(text, p1, p2) |
|
413 | node = node or revlog.hash(text, p1, p2) | |
409 |
|
414 | |||
410 | rawtext, validatehash = self._processflags(text, flags, 'write') |
|
415 | rawtext, validatehash = self._processflags(text, flags, 'write') | |
411 |
|
416 | |||
412 | node = node or revlog.hash(text, p1, p2) |
|
417 | node = node or revlog.hash(text, p1, p2) | |
413 |
|
418 | |||
414 | if node in self._indexbynode: |
|
419 | if node in self._indexbynode: | |
415 | return node |
|
420 | return node | |
416 |
|
421 | |||
417 | if validatehash: |
|
422 | if validatehash: | |
418 | self.checkhash(rawtext, node, p1=p1, p2=p2) |
|
423 | self.checkhash(rawtext, node, p1=p1, p2=p2) | |
419 |
|
424 | |||
420 | path = b'/'.join([self._storepath, hex(node)]) |
|
425 | path = b'/'.join([self._storepath, hex(node)]) | |
421 |
|
426 | |||
422 | self._svfs.write(path, text) |
|
427 | self._svfs.write(path, text) | |
423 |
|
428 | |||
424 | self._indexdata.append({ |
|
429 | self._indexdata.append({ | |
425 | b'node': node, |
|
430 | b'node': node, | |
426 | b'p1': p1, |
|
431 | b'p1': p1, | |
427 | b'p2': p2, |
|
432 | b'p2': p2, | |
428 | b'linkrev': linkrev, |
|
433 | b'linkrev': linkrev, | |
429 | b'flags': flags, |
|
434 | b'flags': flags, | |
430 | }) |
|
435 | }) | |
431 |
|
436 | |||
432 | self._reflectindexupdate() |
|
437 | self._reflectindexupdate() | |
433 |
|
438 | |||
434 | return node |
|
439 | return node | |
435 |
|
440 | |||
436 | def _reflectindexupdate(self): |
|
441 | def _reflectindexupdate(self): | |
437 | self._refreshindex() |
|
442 | self._refreshindex() | |
438 | self._svfs.write(self._indexpath, cbor.dumps(self._indexdata)) |
|
443 | self._svfs.write(self._indexpath, cbor.dumps(self._indexdata)) | |
439 |
|
444 | |||
440 | def addgroup(self, deltas, linkmapper, transaction, addrevisioncb=None): |
|
445 | def addgroup(self, deltas, linkmapper, transaction, addrevisioncb=None): | |
441 | nodes = [] |
|
446 | nodes = [] | |
442 |
|
447 | |||
443 | transaction.addbackup(self._indexpath) |
|
448 | transaction.addbackup(self._indexpath) | |
444 |
|
449 | |||
445 | for node, p1, p2, linknode, deltabase, delta, flags in deltas: |
|
450 | for node, p1, p2, linknode, deltabase, delta, flags in deltas: | |
446 | linkrev = linkmapper(linknode) |
|
451 | linkrev = linkmapper(linknode) | |
447 |
|
452 | |||
448 | nodes.append(node) |
|
453 | nodes.append(node) | |
449 |
|
454 | |||
450 | if node in self._indexbynode: |
|
455 | if node in self._indexbynode: | |
451 | continue |
|
456 | continue | |
452 |
|
457 | |||
453 | # Need to resolve the fulltext from the delta base. |
|
458 | # Need to resolve the fulltext from the delta base. | |
454 | if deltabase == nullid: |
|
459 | if deltabase == nullid: | |
455 | text = mdiff.patch(b'', delta) |
|
460 | text = mdiff.patch(b'', delta) | |
456 | else: |
|
461 | else: | |
457 | text = mdiff.patch(self.revision(deltabase), delta) |
|
462 | text = mdiff.patch(self.revision(deltabase), delta) | |
458 |
|
463 | |||
459 | self.addrevision(text, transaction, linkrev, p1, p2, flags) |
|
464 | self.addrevision(text, transaction, linkrev, p1, p2, flags) | |
460 |
|
465 | |||
461 | if addrevisioncb: |
|
466 | if addrevisioncb: | |
462 | addrevisioncb(self, node) |
|
467 | addrevisioncb(self, node) | |
463 |
|
468 | |||
464 | return nodes |
|
469 | return nodes | |
465 |
|
470 | |||
466 | def revdiff(self, rev1, rev2): |
|
471 | def revdiff(self, rev1, rev2): | |
467 | validaterev(rev1) |
|
472 | validaterev(rev1) | |
468 | validaterev(rev2) |
|
473 | validaterev(rev2) | |
469 |
|
474 | |||
470 | node1 = self.node(rev1) |
|
475 | node1 = self.node(rev1) | |
471 | node2 = self.node(rev2) |
|
476 | node2 = self.node(rev2) | |
472 |
|
477 | |||
473 | return mdiff.textdiff(self.revision(node1, raw=True), |
|
478 | return mdiff.textdiff(self.revision(node1, raw=True), | |
474 | self.revision(node2, raw=True)) |
|
479 | self.revision(node2, raw=True)) | |
475 |
|
480 | |||
476 | def headrevs(self): |
|
481 | def headrevs(self): | |
477 | # Assume all revisions are heads by default. |
|
482 | # Assume all revisions are heads by default. | |
478 | ishead = {rev: True for rev in self._indexbyrev} |
|
483 | ishead = {rev: True for rev in self._indexbyrev} | |
479 |
|
484 | |||
480 | for rev, entry in self._indexbyrev.items(): |
|
485 | for rev, entry in self._indexbyrev.items(): | |
481 | # Unset head flag for all seen parents. |
|
486 | # Unset head flag for all seen parents. | |
482 | ishead[self.rev(entry[b'p1'])] = False |
|
487 | ishead[self.rev(entry[b'p1'])] = False | |
483 | ishead[self.rev(entry[b'p2'])] = False |
|
488 | ishead[self.rev(entry[b'p2'])] = False | |
484 |
|
489 | |||
485 | return [rev for rev, ishead in sorted(ishead.items()) |
|
490 | return [rev for rev, ishead in sorted(ishead.items()) | |
486 | if ishead] |
|
491 | if ishead] | |
487 |
|
492 | |||
488 | def heads(self, start=None, stop=None): |
|
493 | def heads(self, start=None, stop=None): | |
489 | # This is copied from revlog.py. |
|
494 | # This is copied from revlog.py. | |
490 | if start is None and stop is None: |
|
495 | if start is None and stop is None: | |
491 | if not len(self): |
|
496 | if not len(self): | |
492 | return [nullid] |
|
497 | return [nullid] | |
493 | return [self.node(r) for r in self.headrevs()] |
|
498 | return [self.node(r) for r in self.headrevs()] | |
494 |
|
499 | |||
495 | if start is None: |
|
500 | if start is None: | |
496 | start = nullid |
|
501 | start = nullid | |
497 | if stop is None: |
|
502 | if stop is None: | |
498 | stop = [] |
|
503 | stop = [] | |
499 | stoprevs = set([self.rev(n) for n in stop]) |
|
504 | stoprevs = set([self.rev(n) for n in stop]) | |
500 | startrev = self.rev(start) |
|
505 | startrev = self.rev(start) | |
501 | reachable = {startrev} |
|
506 | reachable = {startrev} | |
502 | heads = {startrev} |
|
507 | heads = {startrev} | |
503 |
|
508 | |||
504 | parentrevs = self.parentrevs |
|
509 | parentrevs = self.parentrevs | |
505 | for r in self.revs(start=startrev + 1): |
|
510 | for r in self.revs(start=startrev + 1): | |
506 | for p in parentrevs(r): |
|
511 | for p in parentrevs(r): | |
507 | if p in reachable: |
|
512 | if p in reachable: | |
508 | if r not in stoprevs: |
|
513 | if r not in stoprevs: | |
509 | reachable.add(r) |
|
514 | reachable.add(r) | |
510 | heads.add(r) |
|
515 | heads.add(r) | |
511 | if p in heads and p not in stoprevs: |
|
516 | if p in heads and p not in stoprevs: | |
512 | heads.remove(p) |
|
517 | heads.remove(p) | |
513 |
|
518 | |||
514 | return [self.node(r) for r in heads] |
|
519 | return [self.node(r) for r in heads] | |
515 |
|
520 | |||
516 | def children(self, node): |
|
521 | def children(self, node): | |
517 | validatenode(node) |
|
522 | validatenode(node) | |
518 |
|
523 | |||
519 | # This is a copy of revlog.children(). |
|
524 | # This is a copy of revlog.children(). | |
520 | c = [] |
|
525 | c = [] | |
521 | p = self.rev(node) |
|
526 | p = self.rev(node) | |
522 | for r in self.revs(start=p + 1): |
|
527 | for r in self.revs(start=p + 1): | |
523 | prevs = [pr for pr in self.parentrevs(r) if pr != nullrev] |
|
528 | prevs = [pr for pr in self.parentrevs(r) if pr != nullrev] | |
524 | if prevs: |
|
529 | if prevs: | |
525 | for pr in prevs: |
|
530 | for pr in prevs: | |
526 | if pr == p: |
|
531 | if pr == p: | |
527 | c.append(self.node(r)) |
|
532 | c.append(self.node(r)) | |
528 | elif p == nullrev: |
|
533 | elif p == nullrev: | |
529 | c.append(self.node(r)) |
|
534 | c.append(self.node(r)) | |
530 | return c |
|
535 | return c | |
531 |
|
536 | |||
532 | def getstrippoint(self, minlink): |
|
537 | def getstrippoint(self, minlink): | |
533 |
|
538 | |||
534 | # This is largely a copy of revlog.getstrippoint(). |
|
539 | # This is largely a copy of revlog.getstrippoint(). | |
535 | brokenrevs = set() |
|
540 | brokenrevs = set() | |
536 | strippoint = len(self) |
|
541 | strippoint = len(self) | |
537 |
|
542 | |||
538 | heads = {} |
|
543 | heads = {} | |
539 | futurelargelinkrevs = set() |
|
544 | futurelargelinkrevs = set() | |
540 | for head in self.headrevs(): |
|
545 | for head in self.headrevs(): | |
541 | headlinkrev = self.linkrev(head) |
|
546 | headlinkrev = self.linkrev(head) | |
542 | heads[head] = headlinkrev |
|
547 | heads[head] = headlinkrev | |
543 | if headlinkrev >= minlink: |
|
548 | if headlinkrev >= minlink: | |
544 | futurelargelinkrevs.add(headlinkrev) |
|
549 | futurelargelinkrevs.add(headlinkrev) | |
545 |
|
550 | |||
546 | # This algorithm involves walking down the rev graph, starting at the |
|
551 | # This algorithm involves walking down the rev graph, starting at the | |
547 | # heads. Since the revs are topologically sorted according to linkrev, |
|
552 | # heads. Since the revs are topologically sorted according to linkrev, | |
548 | # once all head linkrevs are below the minlink, we know there are |
|
553 | # once all head linkrevs are below the minlink, we know there are | |
549 | # no more revs that could have a linkrev greater than minlink. |
|
554 | # no more revs that could have a linkrev greater than minlink. | |
550 | # So we can stop walking. |
|
555 | # So we can stop walking. | |
551 | while futurelargelinkrevs: |
|
556 | while futurelargelinkrevs: | |
552 | strippoint -= 1 |
|
557 | strippoint -= 1 | |
553 | linkrev = heads.pop(strippoint) |
|
558 | linkrev = heads.pop(strippoint) | |
554 |
|
559 | |||
555 | if linkrev < minlink: |
|
560 | if linkrev < minlink: | |
556 | brokenrevs.add(strippoint) |
|
561 | brokenrevs.add(strippoint) | |
557 | else: |
|
562 | else: | |
558 | futurelargelinkrevs.remove(linkrev) |
|
563 | futurelargelinkrevs.remove(linkrev) | |
559 |
|
564 | |||
560 | for p in self.parentrevs(strippoint): |
|
565 | for p in self.parentrevs(strippoint): | |
561 | if p != nullrev: |
|
566 | if p != nullrev: | |
562 | plinkrev = self.linkrev(p) |
|
567 | plinkrev = self.linkrev(p) | |
563 | heads[p] = plinkrev |
|
568 | heads[p] = plinkrev | |
564 | if plinkrev >= minlink: |
|
569 | if plinkrev >= minlink: | |
565 | futurelargelinkrevs.add(plinkrev) |
|
570 | futurelargelinkrevs.add(plinkrev) | |
566 |
|
571 | |||
567 | return strippoint, brokenrevs |
|
572 | return strippoint, brokenrevs | |
568 |
|
573 | |||
569 | def strip(self, minlink, transaction): |
|
574 | def strip(self, minlink, transaction): | |
570 | if not len(self): |
|
575 | if not len(self): | |
571 | return |
|
576 | return | |
572 |
|
577 | |||
573 | rev, _ignored = self.getstrippoint(minlink) |
|
578 | rev, _ignored = self.getstrippoint(minlink) | |
574 | if rev == len(self): |
|
579 | if rev == len(self): | |
575 | return |
|
580 | return | |
576 |
|
581 | |||
577 | # Purge index data starting at the requested revision. |
|
582 | # Purge index data starting at the requested revision. | |
578 | self._indexdata[rev:] = [] |
|
583 | self._indexdata[rev:] = [] | |
579 | self._reflectindexupdate() |
|
584 | self._reflectindexupdate() | |
580 |
|
585 | |||
581 | def reposetup(ui, repo): |
|
586 | def reposetup(ui, repo): | |
582 | if not repo.local(): |
|
587 | if not repo.local(): | |
583 | return |
|
588 | return | |
584 |
|
589 | |||
585 | class simplestorerepo(repo.__class__): |
|
590 | class simplestorerepo(repo.__class__): | |
586 | def file(self, f): |
|
591 | def file(self, f): | |
587 | return filestorage(self.svfs, f) |
|
592 | return filestorage(self.svfs, f) | |
588 |
|
593 | |||
589 | repo.__class__ = simplestorerepo |
|
594 | repo.__class__ = simplestorerepo |
@@ -1,1271 +1,1273 | |||||
1 | #testcases sshv1 sshv2 |
|
1 | #testcases sshv1 sshv2 | |
2 |
|
2 | |||
3 | #if sshv2 |
|
3 | #if sshv2 | |
4 | $ cat >> $HGRCPATH << EOF |
|
4 | $ cat >> $HGRCPATH << EOF | |
5 | > [experimental] |
|
5 | > [experimental] | |
6 | > sshpeer.advertise-v2 = true |
|
6 | > sshpeer.advertise-v2 = true | |
7 | > sshserver.support-v2 = true |
|
7 | > sshserver.support-v2 = true | |
8 | > EOF |
|
8 | > EOF | |
9 | #endif |
|
9 | #endif | |
10 |
|
10 | |||
11 | Prepare repo a: |
|
11 | Prepare repo a: | |
12 |
|
12 | |||
13 | $ hg init a |
|
13 | $ hg init a | |
14 | $ cd a |
|
14 | $ cd a | |
15 | $ echo a > a |
|
15 | $ echo a > a | |
16 | $ hg add a |
|
16 | $ hg add a | |
17 | $ hg commit -m test |
|
17 | $ hg commit -m test | |
18 | $ echo first line > b |
|
18 | $ echo first line > b | |
19 | $ hg add b |
|
19 | $ hg add b | |
20 |
|
20 | |||
21 | Create a non-inlined filelog: |
|
21 | Create a non-inlined filelog: | |
22 |
|
22 | |||
23 | $ $PYTHON -c 'open("data1", "wb").write(b"".join(b"%d\n" % x for x in range(10000)))' |
|
23 | $ $PYTHON -c 'open("data1", "wb").write(b"".join(b"%d\n" % x for x in range(10000)))' | |
24 | $ for j in 0 1 2 3 4 5 6 7 8 9; do |
|
24 | $ for j in 0 1 2 3 4 5 6 7 8 9; do | |
25 | > cat data1 >> b |
|
25 | > cat data1 >> b | |
26 | > hg commit -m test |
|
26 | > hg commit -m test | |
27 | > done |
|
27 | > done | |
28 |
|
28 | |||
29 | List files in store/data (should show a 'b.d'): |
|
29 | List files in store/data (should show a 'b.d'): | |
30 |
|
30 | |||
|
31 | #if reporevlogstore | |||
31 | $ for i in .hg/store/data/*; do |
|
32 | $ for i in .hg/store/data/*; do | |
32 | > echo $i |
|
33 | > echo $i | |
33 | > done |
|
34 | > done | |
34 | .hg/store/data/a.i |
|
35 | .hg/store/data/a.i | |
35 | .hg/store/data/b.d |
|
36 | .hg/store/data/b.d | |
36 | .hg/store/data/b.i |
|
37 | .hg/store/data/b.i | |
|
38 | #endif | |||
37 |
|
39 | |||
38 | Trigger branchcache creation: |
|
40 | Trigger branchcache creation: | |
39 |
|
41 | |||
40 | $ hg branches |
|
42 | $ hg branches | |
41 | default 10:a7949464abda |
|
43 | default 10:a7949464abda | |
42 | $ ls .hg/cache |
|
44 | $ ls .hg/cache | |
43 | branch2-served |
|
45 | branch2-served | |
44 | checkisexec (execbit !) |
|
46 | checkisexec (execbit !) | |
45 | checklink (symlink !) |
|
47 | checklink (symlink !) | |
46 | checklink-target (symlink !) |
|
48 | checklink-target (symlink !) | |
47 | checknoexec (execbit !) |
|
49 | checknoexec (execbit !) | |
48 | rbc-names-v1 |
|
50 | rbc-names-v1 | |
49 | rbc-revs-v1 |
|
51 | rbc-revs-v1 | |
50 |
|
52 | |||
51 | Default operation: |
|
53 | Default operation: | |
52 |
|
54 | |||
53 | $ hg clone . ../b |
|
55 | $ hg clone . ../b | |
54 | updating to branch default |
|
56 | updating to branch default | |
55 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
57 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
56 | $ cd ../b |
|
58 | $ cd ../b | |
57 |
|
59 | |||
58 | Ensure branchcache got copied over: |
|
60 | Ensure branchcache got copied over: | |
59 |
|
61 | |||
60 | $ ls .hg/cache |
|
62 | $ ls .hg/cache | |
61 | branch2-served |
|
63 | branch2-served | |
62 | checkisexec (execbit !) |
|
64 | checkisexec (execbit !) | |
63 | checklink (symlink !) |
|
65 | checklink (symlink !) | |
64 | checklink-target (symlink !) |
|
66 | checklink-target (symlink !) | |
65 | rbc-names-v1 |
|
67 | rbc-names-v1 | |
66 | rbc-revs-v1 |
|
68 | rbc-revs-v1 | |
67 |
|
69 | |||
68 | $ cat a |
|
70 | $ cat a | |
69 | a |
|
71 | a | |
70 | $ hg verify |
|
72 | $ hg verify | |
71 | checking changesets |
|
73 | checking changesets | |
72 | checking manifests |
|
74 | checking manifests | |
73 | crosschecking files in changesets and manifests |
|
75 | crosschecking files in changesets and manifests | |
74 | checking files |
|
76 | checking files | |
75 | 2 files, 11 changesets, 11 total revisions |
|
77 | 2 files, 11 changesets, 11 total revisions | |
76 |
|
78 | |||
77 | Invalid dest '' must abort: |
|
79 | Invalid dest '' must abort: | |
78 |
|
80 | |||
79 | $ hg clone . '' |
|
81 | $ hg clone . '' | |
80 | abort: empty destination path is not valid |
|
82 | abort: empty destination path is not valid | |
81 | [255] |
|
83 | [255] | |
82 |
|
84 | |||
83 | No update, with debug option: |
|
85 | No update, with debug option: | |
84 |
|
86 | |||
85 | #if hardlink |
|
87 | #if hardlink | |
86 | $ hg --debug clone -U . ../c --config progress.debug=true |
|
88 | $ hg --debug clone -U . ../c --config progress.debug=true | |
87 | linking: 1 |
|
89 | linking: 1 | |
88 | linking: 2 |
|
90 | linking: 2 | |
89 | linking: 3 |
|
91 | linking: 3 | |
90 | linking: 4 |
|
92 | linking: 4 | |
91 | linking: 5 |
|
93 | linking: 5 | |
92 | linking: 6 |
|
94 | linking: 6 | |
93 | linking: 7 |
|
95 | linking: 7 | |
94 | linking: 8 |
|
96 | linking: 8 | |
95 | linked 8 files |
|
97 | linked 8 files | |
96 | #else |
|
98 | #else | |
97 | $ hg --debug clone -U . ../c --config progress.debug=true |
|
99 | $ hg --debug clone -U . ../c --config progress.debug=true | |
98 | linking: 1 |
|
100 | linking: 1 | |
99 | copying: 2 |
|
101 | copying: 2 | |
100 | copying: 3 |
|
102 | copying: 3 | |
101 | copying: 4 |
|
103 | copying: 4 | |
102 | copying: 5 |
|
104 | copying: 5 | |
103 | copying: 6 |
|
105 | copying: 6 | |
104 | copying: 7 |
|
106 | copying: 7 | |
105 | copying: 8 |
|
107 | copying: 8 | |
106 | copied 8 files |
|
108 | copied 8 files | |
107 | #endif |
|
109 | #endif | |
108 | $ cd ../c |
|
110 | $ cd ../c | |
109 |
|
111 | |||
110 | Ensure branchcache got copied over: |
|
112 | Ensure branchcache got copied over: | |
111 |
|
113 | |||
112 | $ ls .hg/cache |
|
114 | $ ls .hg/cache | |
113 | branch2-served |
|
115 | branch2-served | |
114 | rbc-names-v1 |
|
116 | rbc-names-v1 | |
115 | rbc-revs-v1 |
|
117 | rbc-revs-v1 | |
116 |
|
118 | |||
117 | $ cat a 2>/dev/null || echo "a not present" |
|
119 | $ cat a 2>/dev/null || echo "a not present" | |
118 | a not present |
|
120 | a not present | |
119 | $ hg verify |
|
121 | $ hg verify | |
120 | checking changesets |
|
122 | checking changesets | |
121 | checking manifests |
|
123 | checking manifests | |
122 | crosschecking files in changesets and manifests |
|
124 | crosschecking files in changesets and manifests | |
123 | checking files |
|
125 | checking files | |
124 | 2 files, 11 changesets, 11 total revisions |
|
126 | 2 files, 11 changesets, 11 total revisions | |
125 |
|
127 | |||
126 | Default destination: |
|
128 | Default destination: | |
127 |
|
129 | |||
128 | $ mkdir ../d |
|
130 | $ mkdir ../d | |
129 | $ cd ../d |
|
131 | $ cd ../d | |
130 | $ hg clone ../a |
|
132 | $ hg clone ../a | |
131 | destination directory: a |
|
133 | destination directory: a | |
132 | updating to branch default |
|
134 | updating to branch default | |
133 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
135 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
134 | $ cd a |
|
136 | $ cd a | |
135 | $ hg cat a |
|
137 | $ hg cat a | |
136 | a |
|
138 | a | |
137 | $ cd ../.. |
|
139 | $ cd ../.. | |
138 |
|
140 | |||
139 | Check that we drop the 'file:' from the path before writing the .hgrc: |
|
141 | Check that we drop the 'file:' from the path before writing the .hgrc: | |
140 |
|
142 | |||
141 | $ hg clone file:a e |
|
143 | $ hg clone file:a e | |
142 | updating to branch default |
|
144 | updating to branch default | |
143 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
145 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
144 | $ grep 'file:' e/.hg/hgrc |
|
146 | $ grep 'file:' e/.hg/hgrc | |
145 | [1] |
|
147 | [1] | |
146 |
|
148 | |||
147 | Check that path aliases are expanded: |
|
149 | Check that path aliases are expanded: | |
148 |
|
150 | |||
149 | $ hg clone -q -U --config 'paths.foobar=a#0' foobar f |
|
151 | $ hg clone -q -U --config 'paths.foobar=a#0' foobar f | |
150 | $ hg -R f showconfig paths.default |
|
152 | $ hg -R f showconfig paths.default | |
151 | $TESTTMP/a#0 |
|
153 | $TESTTMP/a#0 | |
152 |
|
154 | |||
153 | Use --pull: |
|
155 | Use --pull: | |
154 |
|
156 | |||
155 | $ hg clone --pull a g |
|
157 | $ hg clone --pull a g | |
156 | requesting all changes |
|
158 | requesting all changes | |
157 | adding changesets |
|
159 | adding changesets | |
158 | adding manifests |
|
160 | adding manifests | |
159 | adding file changes |
|
161 | adding file changes | |
160 | added 11 changesets with 11 changes to 2 files |
|
162 | added 11 changesets with 11 changes to 2 files | |
161 | new changesets acb14030fe0a:a7949464abda |
|
163 | new changesets acb14030fe0a:a7949464abda | |
162 | updating to branch default |
|
164 | updating to branch default | |
163 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
165 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
164 | $ hg -R g verify |
|
166 | $ hg -R g verify | |
165 | checking changesets |
|
167 | checking changesets | |
166 | checking manifests |
|
168 | checking manifests | |
167 | crosschecking files in changesets and manifests |
|
169 | crosschecking files in changesets and manifests | |
168 | checking files |
|
170 | checking files | |
169 | 2 files, 11 changesets, 11 total revisions |
|
171 | 2 files, 11 changesets, 11 total revisions | |
170 |
|
172 | |||
171 | Invalid dest '' with --pull must abort (issue2528): |
|
173 | Invalid dest '' with --pull must abort (issue2528): | |
172 |
|
174 | |||
173 | $ hg clone --pull a '' |
|
175 | $ hg clone --pull a '' | |
174 | abort: empty destination path is not valid |
|
176 | abort: empty destination path is not valid | |
175 | [255] |
|
177 | [255] | |
176 |
|
178 | |||
177 | Clone to '.': |
|
179 | Clone to '.': | |
178 |
|
180 | |||
179 | $ mkdir h |
|
181 | $ mkdir h | |
180 | $ cd h |
|
182 | $ cd h | |
181 | $ hg clone ../a . |
|
183 | $ hg clone ../a . | |
182 | updating to branch default |
|
184 | updating to branch default | |
183 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
185 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
184 | $ cd .. |
|
186 | $ cd .. | |
185 |
|
187 | |||
186 |
|
188 | |||
187 | *** Tests for option -u *** |
|
189 | *** Tests for option -u *** | |
188 |
|
190 | |||
189 | Adding some more history to repo a: |
|
191 | Adding some more history to repo a: | |
190 |
|
192 | |||
191 | $ cd a |
|
193 | $ cd a | |
192 | $ hg tag ref1 |
|
194 | $ hg tag ref1 | |
193 | $ echo the quick brown fox >a |
|
195 | $ echo the quick brown fox >a | |
194 | $ hg ci -m "hacked default" |
|
196 | $ hg ci -m "hacked default" | |
195 | $ hg up ref1 |
|
197 | $ hg up ref1 | |
196 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
198 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
197 | $ hg branch stable |
|
199 | $ hg branch stable | |
198 | marked working directory as branch stable |
|
200 | marked working directory as branch stable | |
199 | (branches are permanent and global, did you want a bookmark?) |
|
201 | (branches are permanent and global, did you want a bookmark?) | |
200 | $ echo some text >a |
|
202 | $ echo some text >a | |
201 | $ hg ci -m "starting branch stable" |
|
203 | $ hg ci -m "starting branch stable" | |
202 | $ hg tag ref2 |
|
204 | $ hg tag ref2 | |
203 | $ echo some more text >a |
|
205 | $ echo some more text >a | |
204 | $ hg ci -m "another change for branch stable" |
|
206 | $ hg ci -m "another change for branch stable" | |
205 | $ hg up ref2 |
|
207 | $ hg up ref2 | |
206 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
208 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
207 | $ hg parents |
|
209 | $ hg parents | |
208 | changeset: 13:e8ece76546a6 |
|
210 | changeset: 13:e8ece76546a6 | |
209 | branch: stable |
|
211 | branch: stable | |
210 | tag: ref2 |
|
212 | tag: ref2 | |
211 | parent: 10:a7949464abda |
|
213 | parent: 10:a7949464abda | |
212 | user: test |
|
214 | user: test | |
213 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
215 | date: Thu Jan 01 00:00:00 1970 +0000 | |
214 | summary: starting branch stable |
|
216 | summary: starting branch stable | |
215 |
|
217 | |||
216 |
|
218 | |||
217 | Repo a has two heads: |
|
219 | Repo a has two heads: | |
218 |
|
220 | |||
219 | $ hg heads |
|
221 | $ hg heads | |
220 | changeset: 15:0aae7cf88f0d |
|
222 | changeset: 15:0aae7cf88f0d | |
221 | branch: stable |
|
223 | branch: stable | |
222 | tag: tip |
|
224 | tag: tip | |
223 | user: test |
|
225 | user: test | |
224 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
226 | date: Thu Jan 01 00:00:00 1970 +0000 | |
225 | summary: another change for branch stable |
|
227 | summary: another change for branch stable | |
226 |
|
228 | |||
227 | changeset: 12:f21241060d6a |
|
229 | changeset: 12:f21241060d6a | |
228 | user: test |
|
230 | user: test | |
229 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
231 | date: Thu Jan 01 00:00:00 1970 +0000 | |
230 | summary: hacked default |
|
232 | summary: hacked default | |
231 |
|
233 | |||
232 |
|
234 | |||
233 | $ cd .. |
|
235 | $ cd .. | |
234 |
|
236 | |||
235 |
|
237 | |||
236 | Testing --noupdate with --updaterev (must abort): |
|
238 | Testing --noupdate with --updaterev (must abort): | |
237 |
|
239 | |||
238 | $ hg clone --noupdate --updaterev 1 a ua |
|
240 | $ hg clone --noupdate --updaterev 1 a ua | |
239 | abort: cannot specify both --noupdate and --updaterev |
|
241 | abort: cannot specify both --noupdate and --updaterev | |
240 | [255] |
|
242 | [255] | |
241 |
|
243 | |||
242 |
|
244 | |||
243 | Testing clone -u: |
|
245 | Testing clone -u: | |
244 |
|
246 | |||
245 | $ hg clone -u . a ua |
|
247 | $ hg clone -u . a ua | |
246 | updating to branch stable |
|
248 | updating to branch stable | |
247 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
249 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
248 |
|
250 | |||
249 | Repo ua has both heads: |
|
251 | Repo ua has both heads: | |
250 |
|
252 | |||
251 | $ hg -R ua heads |
|
253 | $ hg -R ua heads | |
252 | changeset: 15:0aae7cf88f0d |
|
254 | changeset: 15:0aae7cf88f0d | |
253 | branch: stable |
|
255 | branch: stable | |
254 | tag: tip |
|
256 | tag: tip | |
255 | user: test |
|
257 | user: test | |
256 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
258 | date: Thu Jan 01 00:00:00 1970 +0000 | |
257 | summary: another change for branch stable |
|
259 | summary: another change for branch stable | |
258 |
|
260 | |||
259 | changeset: 12:f21241060d6a |
|
261 | changeset: 12:f21241060d6a | |
260 | user: test |
|
262 | user: test | |
261 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
263 | date: Thu Jan 01 00:00:00 1970 +0000 | |
262 | summary: hacked default |
|
264 | summary: hacked default | |
263 |
|
265 | |||
264 |
|
266 | |||
265 | Same revision checked out in repo a and ua: |
|
267 | Same revision checked out in repo a and ua: | |
266 |
|
268 | |||
267 | $ hg -R a parents --template "{node|short}\n" |
|
269 | $ hg -R a parents --template "{node|short}\n" | |
268 | e8ece76546a6 |
|
270 | e8ece76546a6 | |
269 | $ hg -R ua parents --template "{node|short}\n" |
|
271 | $ hg -R ua parents --template "{node|short}\n" | |
270 | e8ece76546a6 |
|
272 | e8ece76546a6 | |
271 |
|
273 | |||
272 | $ rm -r ua |
|
274 | $ rm -r ua | |
273 |
|
275 | |||
274 |
|
276 | |||
275 | Testing clone --pull -u: |
|
277 | Testing clone --pull -u: | |
276 |
|
278 | |||
277 | $ hg clone --pull -u . a ua |
|
279 | $ hg clone --pull -u . a ua | |
278 | requesting all changes |
|
280 | requesting all changes | |
279 | adding changesets |
|
281 | adding changesets | |
280 | adding manifests |
|
282 | adding manifests | |
281 | adding file changes |
|
283 | adding file changes | |
282 | added 16 changesets with 16 changes to 3 files (+1 heads) |
|
284 | added 16 changesets with 16 changes to 3 files (+1 heads) | |
283 | new changesets acb14030fe0a:0aae7cf88f0d |
|
285 | new changesets acb14030fe0a:0aae7cf88f0d | |
284 | updating to branch stable |
|
286 | updating to branch stable | |
285 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
287 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
286 |
|
288 | |||
287 | Repo ua has both heads: |
|
289 | Repo ua has both heads: | |
288 |
|
290 | |||
289 | $ hg -R ua heads |
|
291 | $ hg -R ua heads | |
290 | changeset: 15:0aae7cf88f0d |
|
292 | changeset: 15:0aae7cf88f0d | |
291 | branch: stable |
|
293 | branch: stable | |
292 | tag: tip |
|
294 | tag: tip | |
293 | user: test |
|
295 | user: test | |
294 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
296 | date: Thu Jan 01 00:00:00 1970 +0000 | |
295 | summary: another change for branch stable |
|
297 | summary: another change for branch stable | |
296 |
|
298 | |||
297 | changeset: 12:f21241060d6a |
|
299 | changeset: 12:f21241060d6a | |
298 | user: test |
|
300 | user: test | |
299 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
301 | date: Thu Jan 01 00:00:00 1970 +0000 | |
300 | summary: hacked default |
|
302 | summary: hacked default | |
301 |
|
303 | |||
302 |
|
304 | |||
303 | Same revision checked out in repo a and ua: |
|
305 | Same revision checked out in repo a and ua: | |
304 |
|
306 | |||
305 | $ hg -R a parents --template "{node|short}\n" |
|
307 | $ hg -R a parents --template "{node|short}\n" | |
306 | e8ece76546a6 |
|
308 | e8ece76546a6 | |
307 | $ hg -R ua parents --template "{node|short}\n" |
|
309 | $ hg -R ua parents --template "{node|short}\n" | |
308 | e8ece76546a6 |
|
310 | e8ece76546a6 | |
309 |
|
311 | |||
310 | $ rm -r ua |
|
312 | $ rm -r ua | |
311 |
|
313 | |||
312 |
|
314 | |||
313 | Testing clone -u <branch>: |
|
315 | Testing clone -u <branch>: | |
314 |
|
316 | |||
315 | $ hg clone -u stable a ua |
|
317 | $ hg clone -u stable a ua | |
316 | updating to branch stable |
|
318 | updating to branch stable | |
317 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
319 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
318 |
|
320 | |||
319 | Repo ua has both heads: |
|
321 | Repo ua has both heads: | |
320 |
|
322 | |||
321 | $ hg -R ua heads |
|
323 | $ hg -R ua heads | |
322 | changeset: 15:0aae7cf88f0d |
|
324 | changeset: 15:0aae7cf88f0d | |
323 | branch: stable |
|
325 | branch: stable | |
324 | tag: tip |
|
326 | tag: tip | |
325 | user: test |
|
327 | user: test | |
326 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
328 | date: Thu Jan 01 00:00:00 1970 +0000 | |
327 | summary: another change for branch stable |
|
329 | summary: another change for branch stable | |
328 |
|
330 | |||
329 | changeset: 12:f21241060d6a |
|
331 | changeset: 12:f21241060d6a | |
330 | user: test |
|
332 | user: test | |
331 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
333 | date: Thu Jan 01 00:00:00 1970 +0000 | |
332 | summary: hacked default |
|
334 | summary: hacked default | |
333 |
|
335 | |||
334 |
|
336 | |||
335 | Branch 'stable' is checked out: |
|
337 | Branch 'stable' is checked out: | |
336 |
|
338 | |||
337 | $ hg -R ua parents |
|
339 | $ hg -R ua parents | |
338 | changeset: 15:0aae7cf88f0d |
|
340 | changeset: 15:0aae7cf88f0d | |
339 | branch: stable |
|
341 | branch: stable | |
340 | tag: tip |
|
342 | tag: tip | |
341 | user: test |
|
343 | user: test | |
342 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
344 | date: Thu Jan 01 00:00:00 1970 +0000 | |
343 | summary: another change for branch stable |
|
345 | summary: another change for branch stable | |
344 |
|
346 | |||
345 |
|
347 | |||
346 | $ rm -r ua |
|
348 | $ rm -r ua | |
347 |
|
349 | |||
348 |
|
350 | |||
349 | Testing default checkout: |
|
351 | Testing default checkout: | |
350 |
|
352 | |||
351 | $ hg clone a ua |
|
353 | $ hg clone a ua | |
352 | updating to branch default |
|
354 | updating to branch default | |
353 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
355 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
354 |
|
356 | |||
355 | Repo ua has both heads: |
|
357 | Repo ua has both heads: | |
356 |
|
358 | |||
357 | $ hg -R ua heads |
|
359 | $ hg -R ua heads | |
358 | changeset: 15:0aae7cf88f0d |
|
360 | changeset: 15:0aae7cf88f0d | |
359 | branch: stable |
|
361 | branch: stable | |
360 | tag: tip |
|
362 | tag: tip | |
361 | user: test |
|
363 | user: test | |
362 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
364 | date: Thu Jan 01 00:00:00 1970 +0000 | |
363 | summary: another change for branch stable |
|
365 | summary: another change for branch stable | |
364 |
|
366 | |||
365 | changeset: 12:f21241060d6a |
|
367 | changeset: 12:f21241060d6a | |
366 | user: test |
|
368 | user: test | |
367 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
369 | date: Thu Jan 01 00:00:00 1970 +0000 | |
368 | summary: hacked default |
|
370 | summary: hacked default | |
369 |
|
371 | |||
370 |
|
372 | |||
371 | Branch 'default' is checked out: |
|
373 | Branch 'default' is checked out: | |
372 |
|
374 | |||
373 | $ hg -R ua parents |
|
375 | $ hg -R ua parents | |
374 | changeset: 12:f21241060d6a |
|
376 | changeset: 12:f21241060d6a | |
375 | user: test |
|
377 | user: test | |
376 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
378 | date: Thu Jan 01 00:00:00 1970 +0000 | |
377 | summary: hacked default |
|
379 | summary: hacked default | |
378 |
|
380 | |||
379 | Test clone with a branch named "@" (issue3677) |
|
381 | Test clone with a branch named "@" (issue3677) | |
380 |
|
382 | |||
381 | $ hg -R ua branch @ |
|
383 | $ hg -R ua branch @ | |
382 | marked working directory as branch @ |
|
384 | marked working directory as branch @ | |
383 | $ hg -R ua commit -m 'created branch @' |
|
385 | $ hg -R ua commit -m 'created branch @' | |
384 | $ hg clone ua atbranch |
|
386 | $ hg clone ua atbranch | |
385 | updating to branch default |
|
387 | updating to branch default | |
386 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
388 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
387 | $ hg -R atbranch heads |
|
389 | $ hg -R atbranch heads | |
388 | changeset: 16:798b6d97153e |
|
390 | changeset: 16:798b6d97153e | |
389 | branch: @ |
|
391 | branch: @ | |
390 | tag: tip |
|
392 | tag: tip | |
391 | parent: 12:f21241060d6a |
|
393 | parent: 12:f21241060d6a | |
392 | user: test |
|
394 | user: test | |
393 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
395 | date: Thu Jan 01 00:00:00 1970 +0000 | |
394 | summary: created branch @ |
|
396 | summary: created branch @ | |
395 |
|
397 | |||
396 | changeset: 15:0aae7cf88f0d |
|
398 | changeset: 15:0aae7cf88f0d | |
397 | branch: stable |
|
399 | branch: stable | |
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: another change for branch stable |
|
402 | summary: another change for branch stable | |
401 |
|
403 | |||
402 | changeset: 12:f21241060d6a |
|
404 | changeset: 12:f21241060d6a | |
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: hacked default |
|
407 | summary: hacked default | |
406 |
|
408 | |||
407 | $ hg -R atbranch parents |
|
409 | $ hg -R atbranch parents | |
408 | changeset: 12:f21241060d6a |
|
410 | changeset: 12:f21241060d6a | |
409 | user: test |
|
411 | user: test | |
410 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
412 | date: Thu Jan 01 00:00:00 1970 +0000 | |
411 | summary: hacked default |
|
413 | summary: hacked default | |
412 |
|
414 | |||
413 |
|
415 | |||
414 | $ rm -r ua atbranch |
|
416 | $ rm -r ua atbranch | |
415 |
|
417 | |||
416 |
|
418 | |||
417 | Testing #<branch>: |
|
419 | Testing #<branch>: | |
418 |
|
420 | |||
419 | $ hg clone -u . a#stable ua |
|
421 | $ hg clone -u . a#stable ua | |
420 | adding changesets |
|
422 | adding changesets | |
421 | adding manifests |
|
423 | adding manifests | |
422 | adding file changes |
|
424 | adding file changes | |
423 | added 14 changesets with 14 changes to 3 files |
|
425 | added 14 changesets with 14 changes to 3 files | |
424 | new changesets acb14030fe0a:0aae7cf88f0d |
|
426 | new changesets acb14030fe0a:0aae7cf88f0d | |
425 | updating to branch stable |
|
427 | updating to branch stable | |
426 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
428 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
427 |
|
429 | |||
428 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): |
|
430 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): | |
429 |
|
431 | |||
430 | $ hg -R ua heads |
|
432 | $ hg -R ua heads | |
431 | changeset: 13:0aae7cf88f0d |
|
433 | changeset: 13:0aae7cf88f0d | |
432 | branch: stable |
|
434 | branch: stable | |
433 | tag: tip |
|
435 | tag: tip | |
434 | user: test |
|
436 | user: test | |
435 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
437 | date: Thu Jan 01 00:00:00 1970 +0000 | |
436 | summary: another change for branch stable |
|
438 | summary: another change for branch stable | |
437 |
|
439 | |||
438 | changeset: 10:a7949464abda |
|
440 | changeset: 10:a7949464abda | |
439 | user: test |
|
441 | user: test | |
440 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
442 | date: Thu Jan 01 00:00:00 1970 +0000 | |
441 | summary: test |
|
443 | summary: test | |
442 |
|
444 | |||
443 |
|
445 | |||
444 | Same revision checked out in repo a and ua: |
|
446 | Same revision checked out in repo a and ua: | |
445 |
|
447 | |||
446 | $ hg -R a parents --template "{node|short}\n" |
|
448 | $ hg -R a parents --template "{node|short}\n" | |
447 | e8ece76546a6 |
|
449 | e8ece76546a6 | |
448 | $ hg -R ua parents --template "{node|short}\n" |
|
450 | $ hg -R ua parents --template "{node|short}\n" | |
449 | e8ece76546a6 |
|
451 | e8ece76546a6 | |
450 |
|
452 | |||
451 | $ rm -r ua |
|
453 | $ rm -r ua | |
452 |
|
454 | |||
453 |
|
455 | |||
454 | Testing -u -r <branch>: |
|
456 | Testing -u -r <branch>: | |
455 |
|
457 | |||
456 | $ hg clone -u . -r stable a ua |
|
458 | $ hg clone -u . -r stable a ua | |
457 | adding changesets |
|
459 | adding changesets | |
458 | adding manifests |
|
460 | adding manifests | |
459 | adding file changes |
|
461 | adding file changes | |
460 | added 14 changesets with 14 changes to 3 files |
|
462 | added 14 changesets with 14 changes to 3 files | |
461 | new changesets acb14030fe0a:0aae7cf88f0d |
|
463 | new changesets acb14030fe0a:0aae7cf88f0d | |
462 | updating to branch stable |
|
464 | updating to branch stable | |
463 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
465 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
464 |
|
466 | |||
465 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): |
|
467 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): | |
466 |
|
468 | |||
467 | $ hg -R ua heads |
|
469 | $ hg -R ua heads | |
468 | changeset: 13:0aae7cf88f0d |
|
470 | changeset: 13:0aae7cf88f0d | |
469 | branch: stable |
|
471 | branch: stable | |
470 | tag: tip |
|
472 | tag: tip | |
471 | user: test |
|
473 | user: test | |
472 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
474 | date: Thu Jan 01 00:00:00 1970 +0000 | |
473 | summary: another change for branch stable |
|
475 | summary: another change for branch stable | |
474 |
|
476 | |||
475 | changeset: 10:a7949464abda |
|
477 | changeset: 10:a7949464abda | |
476 | user: test |
|
478 | user: test | |
477 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
479 | date: Thu Jan 01 00:00:00 1970 +0000 | |
478 | summary: test |
|
480 | summary: test | |
479 |
|
481 | |||
480 |
|
482 | |||
481 | Same revision checked out in repo a and ua: |
|
483 | Same revision checked out in repo a and ua: | |
482 |
|
484 | |||
483 | $ hg -R a parents --template "{node|short}\n" |
|
485 | $ hg -R a parents --template "{node|short}\n" | |
484 | e8ece76546a6 |
|
486 | e8ece76546a6 | |
485 | $ hg -R ua parents --template "{node|short}\n" |
|
487 | $ hg -R ua parents --template "{node|short}\n" | |
486 | e8ece76546a6 |
|
488 | e8ece76546a6 | |
487 |
|
489 | |||
488 | $ rm -r ua |
|
490 | $ rm -r ua | |
489 |
|
491 | |||
490 |
|
492 | |||
491 | Testing -r <branch>: |
|
493 | Testing -r <branch>: | |
492 |
|
494 | |||
493 | $ hg clone -r stable a ua |
|
495 | $ hg clone -r stable a ua | |
494 | adding changesets |
|
496 | adding changesets | |
495 | adding manifests |
|
497 | adding manifests | |
496 | adding file changes |
|
498 | adding file changes | |
497 | added 14 changesets with 14 changes to 3 files |
|
499 | added 14 changesets with 14 changes to 3 files | |
498 | new changesets acb14030fe0a:0aae7cf88f0d |
|
500 | new changesets acb14030fe0a:0aae7cf88f0d | |
499 | updating to branch stable |
|
501 | updating to branch stable | |
500 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
502 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
501 |
|
503 | |||
502 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): |
|
504 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): | |
503 |
|
505 | |||
504 | $ hg -R ua heads |
|
506 | $ hg -R ua heads | |
505 | changeset: 13:0aae7cf88f0d |
|
507 | changeset: 13:0aae7cf88f0d | |
506 | branch: stable |
|
508 | branch: stable | |
507 | tag: tip |
|
509 | tag: tip | |
508 | user: test |
|
510 | user: test | |
509 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
511 | date: Thu Jan 01 00:00:00 1970 +0000 | |
510 | summary: another change for branch stable |
|
512 | summary: another change for branch stable | |
511 |
|
513 | |||
512 | changeset: 10:a7949464abda |
|
514 | changeset: 10:a7949464abda | |
513 | user: test |
|
515 | user: test | |
514 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
516 | date: Thu Jan 01 00:00:00 1970 +0000 | |
515 | summary: test |
|
517 | summary: test | |
516 |
|
518 | |||
517 |
|
519 | |||
518 | Branch 'stable' is checked out: |
|
520 | Branch 'stable' is checked out: | |
519 |
|
521 | |||
520 | $ hg -R ua parents |
|
522 | $ hg -R ua parents | |
521 | changeset: 13:0aae7cf88f0d |
|
523 | changeset: 13:0aae7cf88f0d | |
522 | branch: stable |
|
524 | branch: stable | |
523 | tag: tip |
|
525 | tag: tip | |
524 | user: test |
|
526 | user: test | |
525 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
527 | date: Thu Jan 01 00:00:00 1970 +0000 | |
526 | summary: another change for branch stable |
|
528 | summary: another change for branch stable | |
527 |
|
529 | |||
528 |
|
530 | |||
529 | $ rm -r ua |
|
531 | $ rm -r ua | |
530 |
|
532 | |||
531 |
|
533 | |||
532 | Issue2267: Error in 1.6 hg.py: TypeError: 'NoneType' object is not |
|
534 | Issue2267: Error in 1.6 hg.py: TypeError: 'NoneType' object is not | |
533 | iterable in addbranchrevs() |
|
535 | iterable in addbranchrevs() | |
534 |
|
536 | |||
535 | $ cat <<EOF > simpleclone.py |
|
537 | $ cat <<EOF > simpleclone.py | |
536 | > from mercurial import ui, hg |
|
538 | > from mercurial import ui, hg | |
537 | > myui = ui.ui.load() |
|
539 | > myui = ui.ui.load() | |
538 | > repo = hg.repository(myui, 'a') |
|
540 | > repo = hg.repository(myui, 'a') | |
539 | > hg.clone(myui, {}, repo, dest="ua") |
|
541 | > hg.clone(myui, {}, repo, dest="ua") | |
540 | > EOF |
|
542 | > EOF | |
541 |
|
543 | |||
542 | $ $PYTHON simpleclone.py |
|
544 | $ $PYTHON simpleclone.py | |
543 | updating to branch default |
|
545 | updating to branch default | |
544 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
546 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
545 |
|
547 | |||
546 | $ rm -r ua |
|
548 | $ rm -r ua | |
547 |
|
549 | |||
548 | $ cat <<EOF > branchclone.py |
|
550 | $ cat <<EOF > branchclone.py | |
549 | > from mercurial import ui, hg, extensions |
|
551 | > from mercurial import ui, hg, extensions | |
550 | > myui = ui.ui.load() |
|
552 | > myui = ui.ui.load() | |
551 | > extensions.loadall(myui) |
|
553 | > extensions.loadall(myui) | |
552 | > repo = hg.repository(myui, 'a') |
|
554 | > repo = hg.repository(myui, 'a') | |
553 | > hg.clone(myui, {}, repo, dest="ua", branch=["stable",]) |
|
555 | > hg.clone(myui, {}, repo, dest="ua", branch=["stable",]) | |
554 | > EOF |
|
556 | > EOF | |
555 |
|
557 | |||
556 | $ $PYTHON branchclone.py |
|
558 | $ $PYTHON branchclone.py | |
557 | adding changesets |
|
559 | adding changesets | |
558 | adding manifests |
|
560 | adding manifests | |
559 | adding file changes |
|
561 | adding file changes | |
560 | added 14 changesets with 14 changes to 3 files |
|
562 | added 14 changesets with 14 changes to 3 files | |
561 | new changesets acb14030fe0a:0aae7cf88f0d |
|
563 | new changesets acb14030fe0a:0aae7cf88f0d | |
562 | updating to branch stable |
|
564 | updating to branch stable | |
563 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
565 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
564 | $ rm -r ua |
|
566 | $ rm -r ua | |
565 |
|
567 | |||
566 |
|
568 | |||
567 | Test clone with special '@' bookmark: |
|
569 | Test clone with special '@' bookmark: | |
568 | $ cd a |
|
570 | $ cd a | |
569 | $ hg bookmark -r a7949464abda @ # branch point of stable from default |
|
571 | $ hg bookmark -r a7949464abda @ # branch point of stable from default | |
570 | $ hg clone . ../i |
|
572 | $ hg clone . ../i | |
571 | updating to bookmark @ |
|
573 | updating to bookmark @ | |
572 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
574 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
573 | $ hg id -i ../i |
|
575 | $ hg id -i ../i | |
574 | a7949464abda |
|
576 | a7949464abda | |
575 | $ rm -r ../i |
|
577 | $ rm -r ../i | |
576 |
|
578 | |||
577 | $ hg bookmark -f -r stable @ |
|
579 | $ hg bookmark -f -r stable @ | |
578 | $ hg bookmarks |
|
580 | $ hg bookmarks | |
579 | @ 15:0aae7cf88f0d |
|
581 | @ 15:0aae7cf88f0d | |
580 | $ hg clone . ../i |
|
582 | $ hg clone . ../i | |
581 | updating to bookmark @ on branch stable |
|
583 | updating to bookmark @ on branch stable | |
582 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
584 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
583 | $ hg id -i ../i |
|
585 | $ hg id -i ../i | |
584 | 0aae7cf88f0d |
|
586 | 0aae7cf88f0d | |
585 | $ cd "$TESTTMP" |
|
587 | $ cd "$TESTTMP" | |
586 |
|
588 | |||
587 |
|
589 | |||
588 | Testing failures: |
|
590 | Testing failures: | |
589 |
|
591 | |||
590 | $ mkdir fail |
|
592 | $ mkdir fail | |
591 | $ cd fail |
|
593 | $ cd fail | |
592 |
|
594 | |||
593 | No local source |
|
595 | No local source | |
594 |
|
596 | |||
595 | $ hg clone a b |
|
597 | $ hg clone a b | |
596 | abort: repository a not found! |
|
598 | abort: repository a not found! | |
597 | [255] |
|
599 | [255] | |
598 |
|
600 | |||
599 | No remote source |
|
601 | No remote source | |
600 |
|
602 | |||
601 | #if windows |
|
603 | #if windows | |
602 | $ hg clone http://$LOCALIP:3121/a b |
|
604 | $ hg clone http://$LOCALIP:3121/a b | |
603 | abort: error: * (glob) |
|
605 | abort: error: * (glob) | |
604 | [255] |
|
606 | [255] | |
605 | #else |
|
607 | #else | |
606 | $ hg clone http://$LOCALIP:3121/a b |
|
608 | $ hg clone http://$LOCALIP:3121/a b | |
607 | abort: error: *refused* (glob) |
|
609 | abort: error: *refused* (glob) | |
608 | [255] |
|
610 | [255] | |
609 | #endif |
|
611 | #endif | |
610 | $ rm -rf b # work around bug with http clone |
|
612 | $ rm -rf b # work around bug with http clone | |
611 |
|
613 | |||
612 |
|
614 | |||
613 | #if unix-permissions no-root |
|
615 | #if unix-permissions no-root | |
614 |
|
616 | |||
615 | Inaccessible source |
|
617 | Inaccessible source | |
616 |
|
618 | |||
617 | $ mkdir a |
|
619 | $ mkdir a | |
618 | $ chmod 000 a |
|
620 | $ chmod 000 a | |
619 | $ hg clone a b |
|
621 | $ hg clone a b | |
620 | abort: repository a not found! |
|
622 | abort: repository a not found! | |
621 | [255] |
|
623 | [255] | |
622 |
|
624 | |||
623 | Inaccessible destination |
|
625 | Inaccessible destination | |
624 |
|
626 | |||
625 | $ hg init b |
|
627 | $ hg init b | |
626 | $ cd b |
|
628 | $ cd b | |
627 | $ hg clone . ../a |
|
629 | $ hg clone . ../a | |
628 | abort: Permission denied: '../a' |
|
630 | abort: Permission denied: '../a' | |
629 | [255] |
|
631 | [255] | |
630 | $ cd .. |
|
632 | $ cd .. | |
631 | $ chmod 700 a |
|
633 | $ chmod 700 a | |
632 | $ rm -r a b |
|
634 | $ rm -r a b | |
633 |
|
635 | |||
634 | #endif |
|
636 | #endif | |
635 |
|
637 | |||
636 |
|
638 | |||
637 | #if fifo |
|
639 | #if fifo | |
638 |
|
640 | |||
639 | Source of wrong type |
|
641 | Source of wrong type | |
640 |
|
642 | |||
641 | $ mkfifo a |
|
643 | $ mkfifo a | |
642 | $ hg clone a b |
|
644 | $ hg clone a b | |
643 | abort: repository a not found! |
|
645 | abort: repository a not found! | |
644 | [255] |
|
646 | [255] | |
645 | $ rm a |
|
647 | $ rm a | |
646 |
|
648 | |||
647 | #endif |
|
649 | #endif | |
648 |
|
650 | |||
649 | Default destination, same directory |
|
651 | Default destination, same directory | |
650 |
|
652 | |||
651 | $ hg init q |
|
653 | $ hg init q | |
652 | $ hg clone q |
|
654 | $ hg clone q | |
653 | destination directory: q |
|
655 | destination directory: q | |
654 | abort: destination 'q' is not empty |
|
656 | abort: destination 'q' is not empty | |
655 | [255] |
|
657 | [255] | |
656 |
|
658 | |||
657 | destination directory not empty |
|
659 | destination directory not empty | |
658 |
|
660 | |||
659 | $ mkdir a |
|
661 | $ mkdir a | |
660 | $ echo stuff > a/a |
|
662 | $ echo stuff > a/a | |
661 | $ hg clone q a |
|
663 | $ hg clone q a | |
662 | abort: destination 'a' is not empty |
|
664 | abort: destination 'a' is not empty | |
663 | [255] |
|
665 | [255] | |
664 |
|
666 | |||
665 |
|
667 | |||
666 | #if unix-permissions no-root |
|
668 | #if unix-permissions no-root | |
667 |
|
669 | |||
668 | leave existing directory in place after clone failure |
|
670 | leave existing directory in place after clone failure | |
669 |
|
671 | |||
670 | $ hg init c |
|
672 | $ hg init c | |
671 | $ cd c |
|
673 | $ cd c | |
672 | $ echo c > c |
|
674 | $ echo c > c | |
673 | $ hg commit -A -m test |
|
675 | $ hg commit -A -m test | |
674 | adding c |
|
676 | adding c | |
675 | $ chmod -rx .hg/store/data |
|
677 | $ chmod -rx .hg/store/data | |
676 | $ cd .. |
|
678 | $ cd .. | |
677 | $ mkdir d |
|
679 | $ mkdir d | |
678 | $ hg clone c d 2> err |
|
680 | $ hg clone c d 2> err | |
679 | [255] |
|
681 | [255] | |
680 | $ test -d d |
|
682 | $ test -d d | |
681 | $ test -d d/.hg |
|
683 | $ test -d d/.hg | |
682 | [1] |
|
684 | [1] | |
683 |
|
685 | |||
684 | re-enable perm to allow deletion |
|
686 | re-enable perm to allow deletion | |
685 |
|
687 | |||
686 | $ chmod +rx c/.hg/store/data |
|
688 | $ chmod +rx c/.hg/store/data | |
687 |
|
689 | |||
688 | #endif |
|
690 | #endif | |
689 |
|
691 | |||
690 | $ cd .. |
|
692 | $ cd .. | |
691 |
|
693 | |||
692 | Test clone from the repository in (emulated) revlog format 0 (issue4203): |
|
694 | Test clone from the repository in (emulated) revlog format 0 (issue4203): | |
693 |
|
695 | |||
694 | $ mkdir issue4203 |
|
696 | $ mkdir issue4203 | |
695 | $ mkdir -p src/.hg |
|
697 | $ mkdir -p src/.hg | |
696 | $ echo foo > src/foo |
|
698 | $ echo foo > src/foo | |
697 | $ hg -R src add src/foo |
|
699 | $ hg -R src add src/foo | |
698 | $ hg -R src commit -m '#0' |
|
700 | $ hg -R src commit -m '#0' | |
699 | $ hg -R src log -q |
|
701 | $ hg -R src log -q | |
700 | 0:e1bab28bca43 |
|
702 | 0:e1bab28bca43 | |
701 | $ hg clone -U -q src dst |
|
703 | $ hg clone -U -q src dst | |
702 | $ hg -R dst log -q |
|
704 | $ hg -R dst log -q | |
703 | 0:e1bab28bca43 |
|
705 | 0:e1bab28bca43 | |
704 |
|
706 | |||
705 | Create repositories to test auto sharing functionality |
|
707 | Create repositories to test auto sharing functionality | |
706 |
|
708 | |||
707 | $ cat >> $HGRCPATH << EOF |
|
709 | $ cat >> $HGRCPATH << EOF | |
708 | > [extensions] |
|
710 | > [extensions] | |
709 | > share= |
|
711 | > share= | |
710 | > EOF |
|
712 | > EOF | |
711 |
|
713 | |||
712 | $ hg init empty |
|
714 | $ hg init empty | |
713 | $ hg init source1a |
|
715 | $ hg init source1a | |
714 | $ cd source1a |
|
716 | $ cd source1a | |
715 | $ echo initial1 > foo |
|
717 | $ echo initial1 > foo | |
716 | $ hg -q commit -A -m initial |
|
718 | $ hg -q commit -A -m initial | |
717 | $ echo second > foo |
|
719 | $ echo second > foo | |
718 | $ hg commit -m second |
|
720 | $ hg commit -m second | |
719 | $ cd .. |
|
721 | $ cd .. | |
720 |
|
722 | |||
721 | $ hg init filteredrev0 |
|
723 | $ hg init filteredrev0 | |
722 | $ cd filteredrev0 |
|
724 | $ cd filteredrev0 | |
723 | $ cat >> .hg/hgrc << EOF |
|
725 | $ cat >> .hg/hgrc << EOF | |
724 | > [experimental] |
|
726 | > [experimental] | |
725 | > evolution.createmarkers=True |
|
727 | > evolution.createmarkers=True | |
726 | > EOF |
|
728 | > EOF | |
727 | $ echo initial1 > foo |
|
729 | $ echo initial1 > foo | |
728 | $ hg -q commit -A -m initial0 |
|
730 | $ hg -q commit -A -m initial0 | |
729 | $ hg -q up -r null |
|
731 | $ hg -q up -r null | |
730 | $ echo initial2 > foo |
|
732 | $ echo initial2 > foo | |
731 | $ hg -q commit -A -m initial1 |
|
733 | $ hg -q commit -A -m initial1 | |
732 | $ hg debugobsolete c05d5c47a5cf81401869999f3d05f7d699d2b29a e082c1832e09a7d1e78b7fd49a592d372de854c8 |
|
734 | $ hg debugobsolete c05d5c47a5cf81401869999f3d05f7d699d2b29a e082c1832e09a7d1e78b7fd49a592d372de854c8 | |
733 | obsoleted 1 changesets |
|
735 | obsoleted 1 changesets | |
734 | $ cd .. |
|
736 | $ cd .. | |
735 |
|
737 | |||
736 | $ hg -q clone --pull source1a source1b |
|
738 | $ hg -q clone --pull source1a source1b | |
737 | $ cd source1a |
|
739 | $ cd source1a | |
738 | $ hg bookmark bookA |
|
740 | $ hg bookmark bookA | |
739 | $ echo 1a > foo |
|
741 | $ echo 1a > foo | |
740 | $ hg commit -m 1a |
|
742 | $ hg commit -m 1a | |
741 | $ cd ../source1b |
|
743 | $ cd ../source1b | |
742 | $ hg -q up -r 0 |
|
744 | $ hg -q up -r 0 | |
743 | $ echo head1 > foo |
|
745 | $ echo head1 > foo | |
744 | $ hg commit -m head1 |
|
746 | $ hg commit -m head1 | |
745 | created new head |
|
747 | created new head | |
746 | $ hg bookmark head1 |
|
748 | $ hg bookmark head1 | |
747 | $ hg -q up -r 0 |
|
749 | $ hg -q up -r 0 | |
748 | $ echo head2 > foo |
|
750 | $ echo head2 > foo | |
749 | $ hg commit -m head2 |
|
751 | $ hg commit -m head2 | |
750 | created new head |
|
752 | created new head | |
751 | $ hg bookmark head2 |
|
753 | $ hg bookmark head2 | |
752 | $ hg -q up -r 0 |
|
754 | $ hg -q up -r 0 | |
753 | $ hg branch branch1 |
|
755 | $ hg branch branch1 | |
754 | marked working directory as branch branch1 |
|
756 | marked working directory as branch branch1 | |
755 | (branches are permanent and global, did you want a bookmark?) |
|
757 | (branches are permanent and global, did you want a bookmark?) | |
756 | $ echo branch1 > foo |
|
758 | $ echo branch1 > foo | |
757 | $ hg commit -m branch1 |
|
759 | $ hg commit -m branch1 | |
758 | $ hg -q up -r 0 |
|
760 | $ hg -q up -r 0 | |
759 | $ hg branch branch2 |
|
761 | $ hg branch branch2 | |
760 | marked working directory as branch branch2 |
|
762 | marked working directory as branch branch2 | |
761 | $ echo branch2 > foo |
|
763 | $ echo branch2 > foo | |
762 | $ hg commit -m branch2 |
|
764 | $ hg commit -m branch2 | |
763 | $ cd .. |
|
765 | $ cd .. | |
764 | $ hg init source2 |
|
766 | $ hg init source2 | |
765 | $ cd source2 |
|
767 | $ cd source2 | |
766 | $ echo initial2 > foo |
|
768 | $ echo initial2 > foo | |
767 | $ hg -q commit -A -m initial2 |
|
769 | $ hg -q commit -A -m initial2 | |
768 | $ echo second > foo |
|
770 | $ echo second > foo | |
769 | $ hg commit -m second |
|
771 | $ hg commit -m second | |
770 | $ cd .. |
|
772 | $ cd .. | |
771 |
|
773 | |||
772 | Clone with auto share from an empty repo should not result in share |
|
774 | Clone with auto share from an empty repo should not result in share | |
773 |
|
775 | |||
774 | $ mkdir share |
|
776 | $ mkdir share | |
775 | $ hg --config share.pool=share clone empty share-empty |
|
777 | $ hg --config share.pool=share clone empty share-empty | |
776 | (not using pooled storage: remote appears to be empty) |
|
778 | (not using pooled storage: remote appears to be empty) | |
777 | updating to branch default |
|
779 | updating to branch default | |
778 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
780 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
779 | $ ls share |
|
781 | $ ls share | |
780 | $ test -d share-empty/.hg/store |
|
782 | $ test -d share-empty/.hg/store | |
781 | $ test -f share-empty/.hg/sharedpath |
|
783 | $ test -f share-empty/.hg/sharedpath | |
782 | [1] |
|
784 | [1] | |
783 |
|
785 | |||
784 | Clone with auto share from a repo with filtered revision 0 should not result in share |
|
786 | Clone with auto share from a repo with filtered revision 0 should not result in share | |
785 |
|
787 | |||
786 | $ hg --config share.pool=share clone filteredrev0 share-filtered |
|
788 | $ hg --config share.pool=share clone filteredrev0 share-filtered | |
787 | (not using pooled storage: unable to resolve identity of remote) |
|
789 | (not using pooled storage: unable to resolve identity of remote) | |
788 | requesting all changes |
|
790 | requesting all changes | |
789 | adding changesets |
|
791 | adding changesets | |
790 | adding manifests |
|
792 | adding manifests | |
791 | adding file changes |
|
793 | adding file changes | |
792 | added 1 changesets with 1 changes to 1 files |
|
794 | added 1 changesets with 1 changes to 1 files | |
793 | new changesets e082c1832e09 |
|
795 | new changesets e082c1832e09 | |
794 | updating to branch default |
|
796 | updating to branch default | |
795 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
797 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
796 |
|
798 | |||
797 | Clone from repo with content should result in shared store being created |
|
799 | Clone from repo with content should result in shared store being created | |
798 |
|
800 | |||
799 | $ hg --config share.pool=share clone source1a share-dest1a |
|
801 | $ hg --config share.pool=share clone source1a share-dest1a | |
800 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
802 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
801 | requesting all changes |
|
803 | requesting all changes | |
802 | adding changesets |
|
804 | adding changesets | |
803 | adding manifests |
|
805 | adding manifests | |
804 | adding file changes |
|
806 | adding file changes | |
805 | added 3 changesets with 3 changes to 1 files |
|
807 | added 3 changesets with 3 changes to 1 files | |
806 | new changesets b5f04eac9d8f:e5bfe23c0b47 |
|
808 | new changesets b5f04eac9d8f:e5bfe23c0b47 | |
807 | searching for changes |
|
809 | searching for changes | |
808 | no changes found |
|
810 | no changes found | |
809 | adding remote bookmark bookA |
|
811 | adding remote bookmark bookA | |
810 | updating working directory |
|
812 | updating working directory | |
811 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
813 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
812 |
|
814 | |||
813 | The shared repo should have been created |
|
815 | The shared repo should have been created | |
814 |
|
816 | |||
815 | $ ls share |
|
817 | $ ls share | |
816 | b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1 |
|
818 | b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1 | |
817 |
|
819 | |||
818 | The destination should point to it |
|
820 | The destination should point to it | |
819 |
|
821 | |||
820 | $ cat share-dest1a/.hg/sharedpath; echo |
|
822 | $ cat share-dest1a/.hg/sharedpath; echo | |
821 | $TESTTMP/share/b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1/.hg |
|
823 | $TESTTMP/share/b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1/.hg | |
822 |
|
824 | |||
823 | The destination should have bookmarks |
|
825 | The destination should have bookmarks | |
824 |
|
826 | |||
825 | $ hg -R share-dest1a bookmarks |
|
827 | $ hg -R share-dest1a bookmarks | |
826 | bookA 2:e5bfe23c0b47 |
|
828 | bookA 2:e5bfe23c0b47 | |
827 |
|
829 | |||
828 | The default path should be the remote, not the share |
|
830 | The default path should be the remote, not the share | |
829 |
|
831 | |||
830 | $ hg -R share-dest1a config paths.default |
|
832 | $ hg -R share-dest1a config paths.default | |
831 | $TESTTMP/source1a |
|
833 | $TESTTMP/source1a | |
832 |
|
834 | |||
833 | Clone with existing share dir should result in pull + share |
|
835 | Clone with existing share dir should result in pull + share | |
834 |
|
836 | |||
835 | $ hg --config share.pool=share clone source1b share-dest1b |
|
837 | $ hg --config share.pool=share clone source1b share-dest1b | |
836 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
838 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
837 | searching for changes |
|
839 | searching for changes | |
838 | adding changesets |
|
840 | adding changesets | |
839 | adding manifests |
|
841 | adding manifests | |
840 | adding file changes |
|
842 | adding file changes | |
841 | added 4 changesets with 4 changes to 1 files (+4 heads) |
|
843 | added 4 changesets with 4 changes to 1 files (+4 heads) | |
842 | adding remote bookmark head1 |
|
844 | adding remote bookmark head1 | |
843 | adding remote bookmark head2 |
|
845 | adding remote bookmark head2 | |
844 | new changesets 4a8dc1ab4c13:6bacf4683960 |
|
846 | new changesets 4a8dc1ab4c13:6bacf4683960 | |
845 | updating working directory |
|
847 | updating working directory | |
846 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
848 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
847 |
|
849 | |||
848 | $ ls share |
|
850 | $ ls share | |
849 | b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1 |
|
851 | b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1 | |
850 |
|
852 | |||
851 | $ cat share-dest1b/.hg/sharedpath; echo |
|
853 | $ cat share-dest1b/.hg/sharedpath; echo | |
852 | $TESTTMP/share/b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1/.hg |
|
854 | $TESTTMP/share/b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1/.hg | |
853 |
|
855 | |||
854 | We only get bookmarks from the remote, not everything in the share |
|
856 | We only get bookmarks from the remote, not everything in the share | |
855 |
|
857 | |||
856 | $ hg -R share-dest1b bookmarks |
|
858 | $ hg -R share-dest1b bookmarks | |
857 | head1 3:4a8dc1ab4c13 |
|
859 | head1 3:4a8dc1ab4c13 | |
858 | head2 4:99f71071f117 |
|
860 | head2 4:99f71071f117 | |
859 |
|
861 | |||
860 | Default path should be source, not share. |
|
862 | Default path should be source, not share. | |
861 |
|
863 | |||
862 | $ hg -R share-dest1b config paths.default |
|
864 | $ hg -R share-dest1b config paths.default | |
863 | $TESTTMP/source1b |
|
865 | $TESTTMP/source1b | |
864 |
|
866 | |||
865 | Checked out revision should be head of default branch |
|
867 | Checked out revision should be head of default branch | |
866 |
|
868 | |||
867 | $ hg -R share-dest1b log -r . |
|
869 | $ hg -R share-dest1b log -r . | |
868 | changeset: 4:99f71071f117 |
|
870 | changeset: 4:99f71071f117 | |
869 | bookmark: head2 |
|
871 | bookmark: head2 | |
870 | parent: 0:b5f04eac9d8f |
|
872 | parent: 0:b5f04eac9d8f | |
871 | user: test |
|
873 | user: test | |
872 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
874 | date: Thu Jan 01 00:00:00 1970 +0000 | |
873 | summary: head2 |
|
875 | summary: head2 | |
874 |
|
876 | |||
875 |
|
877 | |||
876 | Clone from unrelated repo should result in new share |
|
878 | Clone from unrelated repo should result in new share | |
877 |
|
879 | |||
878 | $ hg --config share.pool=share clone source2 share-dest2 |
|
880 | $ hg --config share.pool=share clone source2 share-dest2 | |
879 | (sharing from new pooled repository 22aeff664783fd44c6d9b435618173c118c3448e) |
|
881 | (sharing from new pooled repository 22aeff664783fd44c6d9b435618173c118c3448e) | |
880 | requesting all changes |
|
882 | requesting all changes | |
881 | adding changesets |
|
883 | adding changesets | |
882 | adding manifests |
|
884 | adding manifests | |
883 | adding file changes |
|
885 | adding file changes | |
884 | added 2 changesets with 2 changes to 1 files |
|
886 | added 2 changesets with 2 changes to 1 files | |
885 | new changesets 22aeff664783:63cf6c3dba4a |
|
887 | new changesets 22aeff664783:63cf6c3dba4a | |
886 | searching for changes |
|
888 | searching for changes | |
887 | no changes found |
|
889 | no changes found | |
888 | updating working directory |
|
890 | updating working directory | |
889 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
891 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
890 |
|
892 | |||
891 | $ ls share |
|
893 | $ ls share | |
892 | 22aeff664783fd44c6d9b435618173c118c3448e |
|
894 | 22aeff664783fd44c6d9b435618173c118c3448e | |
893 | b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1 |
|
895 | b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1 | |
894 |
|
896 | |||
895 | remote naming mode works as advertised |
|
897 | remote naming mode works as advertised | |
896 |
|
898 | |||
897 | $ hg --config share.pool=shareremote --config share.poolnaming=remote clone source1a share-remote1a |
|
899 | $ hg --config share.pool=shareremote --config share.poolnaming=remote clone source1a share-remote1a | |
898 | (sharing from new pooled repository 195bb1fcdb595c14a6c13e0269129ed78f6debde) |
|
900 | (sharing from new pooled repository 195bb1fcdb595c14a6c13e0269129ed78f6debde) | |
899 | requesting all changes |
|
901 | requesting all changes | |
900 | adding changesets |
|
902 | adding changesets | |
901 | adding manifests |
|
903 | adding manifests | |
902 | adding file changes |
|
904 | adding file changes | |
903 | added 3 changesets with 3 changes to 1 files |
|
905 | added 3 changesets with 3 changes to 1 files | |
904 | new changesets b5f04eac9d8f:e5bfe23c0b47 |
|
906 | new changesets b5f04eac9d8f:e5bfe23c0b47 | |
905 | searching for changes |
|
907 | searching for changes | |
906 | no changes found |
|
908 | no changes found | |
907 | adding remote bookmark bookA |
|
909 | adding remote bookmark bookA | |
908 | updating working directory |
|
910 | updating working directory | |
909 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
911 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
910 |
|
912 | |||
911 | $ ls shareremote |
|
913 | $ ls shareremote | |
912 | 195bb1fcdb595c14a6c13e0269129ed78f6debde |
|
914 | 195bb1fcdb595c14a6c13e0269129ed78f6debde | |
913 |
|
915 | |||
914 | $ hg --config share.pool=shareremote --config share.poolnaming=remote clone source1b share-remote1b |
|
916 | $ hg --config share.pool=shareremote --config share.poolnaming=remote clone source1b share-remote1b | |
915 | (sharing from new pooled repository c0d4f83847ca2a873741feb7048a45085fd47c46) |
|
917 | (sharing from new pooled repository c0d4f83847ca2a873741feb7048a45085fd47c46) | |
916 | requesting all changes |
|
918 | requesting all changes | |
917 | adding changesets |
|
919 | adding changesets | |
918 | adding manifests |
|
920 | adding manifests | |
919 | adding file changes |
|
921 | adding file changes | |
920 | added 6 changesets with 6 changes to 1 files (+4 heads) |
|
922 | added 6 changesets with 6 changes to 1 files (+4 heads) | |
921 | new changesets b5f04eac9d8f:6bacf4683960 |
|
923 | new changesets b5f04eac9d8f:6bacf4683960 | |
922 | searching for changes |
|
924 | searching for changes | |
923 | no changes found |
|
925 | no changes found | |
924 | adding remote bookmark head1 |
|
926 | adding remote bookmark head1 | |
925 | adding remote bookmark head2 |
|
927 | adding remote bookmark head2 | |
926 | updating working directory |
|
928 | updating working directory | |
927 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
929 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
928 |
|
930 | |||
929 | $ ls shareremote |
|
931 | $ ls shareremote | |
930 | 195bb1fcdb595c14a6c13e0269129ed78f6debde |
|
932 | 195bb1fcdb595c14a6c13e0269129ed78f6debde | |
931 | c0d4f83847ca2a873741feb7048a45085fd47c46 |
|
933 | c0d4f83847ca2a873741feb7048a45085fd47c46 | |
932 |
|
934 | |||
933 | request to clone a single revision is respected in sharing mode |
|
935 | request to clone a single revision is respected in sharing mode | |
934 |
|
936 | |||
935 | $ hg --config share.pool=sharerevs clone -r 4a8dc1ab4c13 source1b share-1arev |
|
937 | $ hg --config share.pool=sharerevs clone -r 4a8dc1ab4c13 source1b share-1arev | |
936 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
938 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
937 | adding changesets |
|
939 | adding changesets | |
938 | adding manifests |
|
940 | adding manifests | |
939 | adding file changes |
|
941 | adding file changes | |
940 | added 2 changesets with 2 changes to 1 files |
|
942 | added 2 changesets with 2 changes to 1 files | |
941 | new changesets b5f04eac9d8f:4a8dc1ab4c13 |
|
943 | new changesets b5f04eac9d8f:4a8dc1ab4c13 | |
942 | no changes found |
|
944 | no changes found | |
943 | adding remote bookmark head1 |
|
945 | adding remote bookmark head1 | |
944 | updating working directory |
|
946 | updating working directory | |
945 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
947 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
946 |
|
948 | |||
947 | $ hg -R share-1arev log -G |
|
949 | $ hg -R share-1arev log -G | |
948 | @ changeset: 1:4a8dc1ab4c13 |
|
950 | @ changeset: 1:4a8dc1ab4c13 | |
949 | | bookmark: head1 |
|
951 | | bookmark: head1 | |
950 | | tag: tip |
|
952 | | tag: tip | |
951 | | user: test |
|
953 | | user: test | |
952 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
954 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
953 | | summary: head1 |
|
955 | | summary: head1 | |
954 | | |
|
956 | | | |
955 | o changeset: 0:b5f04eac9d8f |
|
957 | o changeset: 0:b5f04eac9d8f | |
956 | user: test |
|
958 | user: test | |
957 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
959 | date: Thu Jan 01 00:00:00 1970 +0000 | |
958 | summary: initial |
|
960 | summary: initial | |
959 |
|
961 | |||
960 |
|
962 | |||
961 | making another clone should only pull down requested rev |
|
963 | making another clone should only pull down requested rev | |
962 |
|
964 | |||
963 | $ hg --config share.pool=sharerevs clone -r 99f71071f117 source1b share-1brev |
|
965 | $ hg --config share.pool=sharerevs clone -r 99f71071f117 source1b share-1brev | |
964 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
966 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
965 | searching for changes |
|
967 | searching for changes | |
966 | adding changesets |
|
968 | adding changesets | |
967 | adding manifests |
|
969 | adding manifests | |
968 | adding file changes |
|
970 | adding file changes | |
969 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
971 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
970 | adding remote bookmark head1 |
|
972 | adding remote bookmark head1 | |
971 | adding remote bookmark head2 |
|
973 | adding remote bookmark head2 | |
972 | new changesets 99f71071f117 |
|
974 | new changesets 99f71071f117 | |
973 | updating working directory |
|
975 | updating working directory | |
974 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
976 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
975 |
|
977 | |||
976 | $ hg -R share-1brev log -G |
|
978 | $ hg -R share-1brev log -G | |
977 | @ changeset: 2:99f71071f117 |
|
979 | @ changeset: 2:99f71071f117 | |
978 | | bookmark: head2 |
|
980 | | bookmark: head2 | |
979 | | tag: tip |
|
981 | | tag: tip | |
980 | | parent: 0:b5f04eac9d8f |
|
982 | | parent: 0:b5f04eac9d8f | |
981 | | user: test |
|
983 | | user: test | |
982 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
984 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
983 | | summary: head2 |
|
985 | | summary: head2 | |
984 | | |
|
986 | | | |
985 | | o changeset: 1:4a8dc1ab4c13 |
|
987 | | o changeset: 1:4a8dc1ab4c13 | |
986 | |/ bookmark: head1 |
|
988 | |/ bookmark: head1 | |
987 | | user: test |
|
989 | | user: test | |
988 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
990 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
989 | | summary: head1 |
|
991 | | summary: head1 | |
990 | | |
|
992 | | | |
991 | o changeset: 0:b5f04eac9d8f |
|
993 | o changeset: 0:b5f04eac9d8f | |
992 | user: test |
|
994 | user: test | |
993 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
995 | date: Thu Jan 01 00:00:00 1970 +0000 | |
994 | summary: initial |
|
996 | summary: initial | |
995 |
|
997 | |||
996 |
|
998 | |||
997 | Request to clone a single branch is respected in sharing mode |
|
999 | Request to clone a single branch is respected in sharing mode | |
998 |
|
1000 | |||
999 | $ hg --config share.pool=sharebranch clone -b branch1 source1b share-1bbranch1 |
|
1001 | $ hg --config share.pool=sharebranch clone -b branch1 source1b share-1bbranch1 | |
1000 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
1002 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
1001 | adding changesets |
|
1003 | adding changesets | |
1002 | adding manifests |
|
1004 | adding manifests | |
1003 | adding file changes |
|
1005 | adding file changes | |
1004 | added 2 changesets with 2 changes to 1 files |
|
1006 | added 2 changesets with 2 changes to 1 files | |
1005 | new changesets b5f04eac9d8f:5f92a6c1a1b1 |
|
1007 | new changesets b5f04eac9d8f:5f92a6c1a1b1 | |
1006 | no changes found |
|
1008 | no changes found | |
1007 | updating working directory |
|
1009 | updating working directory | |
1008 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1010 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1009 |
|
1011 | |||
1010 | $ hg -R share-1bbranch1 log -G |
|
1012 | $ hg -R share-1bbranch1 log -G | |
1011 | o changeset: 1:5f92a6c1a1b1 |
|
1013 | o changeset: 1:5f92a6c1a1b1 | |
1012 | | branch: branch1 |
|
1014 | | branch: branch1 | |
1013 | | tag: tip |
|
1015 | | tag: tip | |
1014 | | user: test |
|
1016 | | user: test | |
1015 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1017 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1016 | | summary: branch1 |
|
1018 | | summary: branch1 | |
1017 | | |
|
1019 | | | |
1018 | @ changeset: 0:b5f04eac9d8f |
|
1020 | @ changeset: 0:b5f04eac9d8f | |
1019 | user: test |
|
1021 | user: test | |
1020 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1022 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1021 | summary: initial |
|
1023 | summary: initial | |
1022 |
|
1024 | |||
1023 |
|
1025 | |||
1024 | $ hg --config share.pool=sharebranch clone -b branch2 source1b share-1bbranch2 |
|
1026 | $ hg --config share.pool=sharebranch clone -b branch2 source1b share-1bbranch2 | |
1025 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
1027 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
1026 | searching for changes |
|
1028 | searching for changes | |
1027 | adding changesets |
|
1029 | adding changesets | |
1028 | adding manifests |
|
1030 | adding manifests | |
1029 | adding file changes |
|
1031 | adding file changes | |
1030 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
1032 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
1031 | new changesets 6bacf4683960 |
|
1033 | new changesets 6bacf4683960 | |
1032 | updating working directory |
|
1034 | updating working directory | |
1033 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1035 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1034 |
|
1036 | |||
1035 | $ hg -R share-1bbranch2 log -G |
|
1037 | $ hg -R share-1bbranch2 log -G | |
1036 | o changeset: 2:6bacf4683960 |
|
1038 | o changeset: 2:6bacf4683960 | |
1037 | | branch: branch2 |
|
1039 | | branch: branch2 | |
1038 | | tag: tip |
|
1040 | | tag: tip | |
1039 | | parent: 0:b5f04eac9d8f |
|
1041 | | parent: 0:b5f04eac9d8f | |
1040 | | user: test |
|
1042 | | user: test | |
1041 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1043 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1042 | | summary: branch2 |
|
1044 | | summary: branch2 | |
1043 | | |
|
1045 | | | |
1044 | | o changeset: 1:5f92a6c1a1b1 |
|
1046 | | o changeset: 1:5f92a6c1a1b1 | |
1045 | |/ branch: branch1 |
|
1047 | |/ branch: branch1 | |
1046 | | user: test |
|
1048 | | user: test | |
1047 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1049 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1048 | | summary: branch1 |
|
1050 | | summary: branch1 | |
1049 | | |
|
1051 | | | |
1050 | @ changeset: 0:b5f04eac9d8f |
|
1052 | @ changeset: 0:b5f04eac9d8f | |
1051 | user: test |
|
1053 | user: test | |
1052 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1054 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1053 | summary: initial |
|
1055 | summary: initial | |
1054 |
|
1056 | |||
1055 |
|
1057 | |||
1056 | -U is respected in share clone mode |
|
1058 | -U is respected in share clone mode | |
1057 |
|
1059 | |||
1058 | $ hg --config share.pool=share clone -U source1a share-1anowc |
|
1060 | $ hg --config share.pool=share clone -U source1a share-1anowc | |
1059 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
1061 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
1060 | searching for changes |
|
1062 | searching for changes | |
1061 | no changes found |
|
1063 | no changes found | |
1062 | adding remote bookmark bookA |
|
1064 | adding remote bookmark bookA | |
1063 |
|
1065 | |||
1064 | $ ls share-1anowc |
|
1066 | $ ls share-1anowc | |
1065 |
|
1067 | |||
1066 | Test that auto sharing doesn't cause failure of "hg clone local remote" |
|
1068 | Test that auto sharing doesn't cause failure of "hg clone local remote" | |
1067 |
|
1069 | |||
1068 | $ cd $TESTTMP |
|
1070 | $ cd $TESTTMP | |
1069 | $ hg -R a id -r 0 |
|
1071 | $ hg -R a id -r 0 | |
1070 | acb14030fe0a |
|
1072 | acb14030fe0a | |
1071 | $ hg id -R remote -r 0 |
|
1073 | $ hg id -R remote -r 0 | |
1072 | abort: repository remote not found! |
|
1074 | abort: repository remote not found! | |
1073 | [255] |
|
1075 | [255] | |
1074 | $ hg --config share.pool=share -q clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" a ssh://user@dummy/remote |
|
1076 | $ hg --config share.pool=share -q clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" a ssh://user@dummy/remote | |
1075 | $ hg -R remote id -r 0 |
|
1077 | $ hg -R remote id -r 0 | |
1076 | acb14030fe0a |
|
1078 | acb14030fe0a | |
1077 |
|
1079 | |||
1078 | Cloning into pooled storage doesn't race (issue5104) |
|
1080 | Cloning into pooled storage doesn't race (issue5104) | |
1079 |
|
1081 | |||
1080 | $ HGPOSTLOCKDELAY=2.0 hg --config share.pool=racepool --config extensions.lockdelay=$TESTDIR/lockdelay.py clone source1a share-destrace1 > race1.log 2>&1 & |
|
1082 | $ HGPOSTLOCKDELAY=2.0 hg --config share.pool=racepool --config extensions.lockdelay=$TESTDIR/lockdelay.py clone source1a share-destrace1 > race1.log 2>&1 & | |
1081 | $ HGPRELOCKDELAY=1.0 hg --config share.pool=racepool --config extensions.lockdelay=$TESTDIR/lockdelay.py clone source1a share-destrace2 > race2.log 2>&1 |
|
1083 | $ HGPRELOCKDELAY=1.0 hg --config share.pool=racepool --config extensions.lockdelay=$TESTDIR/lockdelay.py clone source1a share-destrace2 > race2.log 2>&1 | |
1082 | $ wait |
|
1084 | $ wait | |
1083 |
|
1085 | |||
1084 | $ hg -R share-destrace1 log -r tip |
|
1086 | $ hg -R share-destrace1 log -r tip | |
1085 | changeset: 2:e5bfe23c0b47 |
|
1087 | changeset: 2:e5bfe23c0b47 | |
1086 | bookmark: bookA |
|
1088 | bookmark: bookA | |
1087 | tag: tip |
|
1089 | tag: tip | |
1088 | user: test |
|
1090 | user: test | |
1089 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1091 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1090 | summary: 1a |
|
1092 | summary: 1a | |
1091 |
|
1093 | |||
1092 |
|
1094 | |||
1093 | $ hg -R share-destrace2 log -r tip |
|
1095 | $ hg -R share-destrace2 log -r tip | |
1094 | changeset: 2:e5bfe23c0b47 |
|
1096 | changeset: 2:e5bfe23c0b47 | |
1095 | bookmark: bookA |
|
1097 | bookmark: bookA | |
1096 | tag: tip |
|
1098 | tag: tip | |
1097 | user: test |
|
1099 | user: test | |
1098 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1100 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1099 | summary: 1a |
|
1101 | summary: 1a | |
1100 |
|
1102 | |||
1101 | One repo should be new, the other should be shared from the pool. We |
|
1103 | One repo should be new, the other should be shared from the pool. We | |
1102 | don't care which is which, so we just make sure we always print the |
|
1104 | don't care which is which, so we just make sure we always print the | |
1103 | one containing "new pooled" first, then one one containing "existing |
|
1105 | one containing "new pooled" first, then one one containing "existing | |
1104 | pooled". |
|
1106 | pooled". | |
1105 |
|
1107 | |||
1106 | $ (grep 'new pooled' race1.log > /dev/null && cat race1.log || cat race2.log) | grep -v lock |
|
1108 | $ (grep 'new pooled' race1.log > /dev/null && cat race1.log || cat race2.log) | grep -v lock | |
1107 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
1109 | (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
1108 | requesting all changes |
|
1110 | requesting all changes | |
1109 | adding changesets |
|
1111 | adding changesets | |
1110 | adding manifests |
|
1112 | adding manifests | |
1111 | adding file changes |
|
1113 | adding file changes | |
1112 | added 3 changesets with 3 changes to 1 files |
|
1114 | added 3 changesets with 3 changes to 1 files | |
1113 | new changesets b5f04eac9d8f:e5bfe23c0b47 |
|
1115 | new changesets b5f04eac9d8f:e5bfe23c0b47 | |
1114 | searching for changes |
|
1116 | searching for changes | |
1115 | no changes found |
|
1117 | no changes found | |
1116 | adding remote bookmark bookA |
|
1118 | adding remote bookmark bookA | |
1117 | updating working directory |
|
1119 | updating working directory | |
1118 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1120 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1119 |
|
1121 | |||
1120 | $ (grep 'existing pooled' race1.log > /dev/null && cat race1.log || cat race2.log) | grep -v lock |
|
1122 | $ (grep 'existing pooled' race1.log > /dev/null && cat race1.log || cat race2.log) | grep -v lock | |
1121 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) |
|
1123 | (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1) | |
1122 | searching for changes |
|
1124 | searching for changes | |
1123 | no changes found |
|
1125 | no changes found | |
1124 | adding remote bookmark bookA |
|
1126 | adding remote bookmark bookA | |
1125 | updating working directory |
|
1127 | updating working directory | |
1126 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1128 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1127 |
|
1129 | |||
1128 | SEC: check for unsafe ssh url |
|
1130 | SEC: check for unsafe ssh url | |
1129 |
|
1131 | |||
1130 | $ cat >> $HGRCPATH << EOF |
|
1132 | $ cat >> $HGRCPATH << EOF | |
1131 | > [ui] |
|
1133 | > [ui] | |
1132 | > ssh = sh -c "read l; read l; read l" |
|
1134 | > ssh = sh -c "read l; read l; read l" | |
1133 | > EOF |
|
1135 | > EOF | |
1134 |
|
1136 | |||
1135 | $ hg clone 'ssh://-oProxyCommand=touch${IFS}owned/path' |
|
1137 | $ hg clone 'ssh://-oProxyCommand=touch${IFS}owned/path' | |
1136 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' |
|
1138 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' | |
1137 | [255] |
|
1139 | [255] | |
1138 | $ hg clone 'ssh://%2DoProxyCommand=touch${IFS}owned/path' |
|
1140 | $ hg clone 'ssh://%2DoProxyCommand=touch${IFS}owned/path' | |
1139 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' |
|
1141 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' | |
1140 | [255] |
|
1142 | [255] | |
1141 | $ hg clone 'ssh://fakehost|touch%20owned/path' |
|
1143 | $ hg clone 'ssh://fakehost|touch%20owned/path' | |
1142 | abort: no suitable response from remote hg! |
|
1144 | abort: no suitable response from remote hg! | |
1143 | [255] |
|
1145 | [255] | |
1144 | $ hg clone 'ssh://fakehost%7Ctouch%20owned/path' |
|
1146 | $ hg clone 'ssh://fakehost%7Ctouch%20owned/path' | |
1145 | abort: no suitable response from remote hg! |
|
1147 | abort: no suitable response from remote hg! | |
1146 | [255] |
|
1148 | [255] | |
1147 |
|
1149 | |||
1148 | $ hg clone 'ssh://-oProxyCommand=touch owned%20foo@example.com/nonexistent/path' |
|
1150 | $ hg clone 'ssh://-oProxyCommand=touch owned%20foo@example.com/nonexistent/path' | |
1149 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch owned foo@example.com/nonexistent/path' |
|
1151 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch owned foo@example.com/nonexistent/path' | |
1150 | [255] |
|
1152 | [255] | |
1151 |
|
1153 | |||
1152 | #if windows |
|
1154 | #if windows | |
1153 | $ hg clone "ssh://%26touch%20owned%20/" --debug |
|
1155 | $ hg clone "ssh://%26touch%20owned%20/" --debug | |
1154 | running sh -c "read l; read l; read l" "&touch owned " "hg -R . serve --stdio" |
|
1156 | running sh -c "read l; read l; read l" "&touch owned " "hg -R . serve --stdio" | |
1155 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) |
|
1157 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) | |
1156 | sending hello command |
|
1158 | sending hello command | |
1157 | sending between command |
|
1159 | sending between command | |
1158 | abort: no suitable response from remote hg! |
|
1160 | abort: no suitable response from remote hg! | |
1159 | [255] |
|
1161 | [255] | |
1160 | $ hg clone "ssh://example.com:%26touch%20owned%20/" --debug |
|
1162 | $ hg clone "ssh://example.com:%26touch%20owned%20/" --debug | |
1161 | running sh -c "read l; read l; read l" -p "&touch owned " example.com "hg -R . serve --stdio" |
|
1163 | running sh -c "read l; read l; read l" -p "&touch owned " example.com "hg -R . serve --stdio" | |
1162 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) |
|
1164 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) | |
1163 | sending hello command |
|
1165 | sending hello command | |
1164 | sending between command |
|
1166 | sending between command | |
1165 | abort: no suitable response from remote hg! |
|
1167 | abort: no suitable response from remote hg! | |
1166 | [255] |
|
1168 | [255] | |
1167 | #else |
|
1169 | #else | |
1168 | $ hg clone "ssh://%3btouch%20owned%20/" --debug |
|
1170 | $ hg clone "ssh://%3btouch%20owned%20/" --debug | |
1169 | running sh -c "read l; read l; read l" ';touch owned ' 'hg -R . serve --stdio' |
|
1171 | running sh -c "read l; read l; read l" ';touch owned ' 'hg -R . serve --stdio' | |
1170 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) |
|
1172 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) | |
1171 | sending hello command |
|
1173 | sending hello command | |
1172 | sending between command |
|
1174 | sending between command | |
1173 | abort: no suitable response from remote hg! |
|
1175 | abort: no suitable response from remote hg! | |
1174 | [255] |
|
1176 | [255] | |
1175 | $ hg clone "ssh://example.com:%3btouch%20owned%20/" --debug |
|
1177 | $ hg clone "ssh://example.com:%3btouch%20owned%20/" --debug | |
1176 | running sh -c "read l; read l; read l" -p ';touch owned ' example.com 'hg -R . serve --stdio' |
|
1178 | running sh -c "read l; read l; read l" -p ';touch owned ' example.com 'hg -R . serve --stdio' | |
1177 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) |
|
1179 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) | |
1178 | sending hello command |
|
1180 | sending hello command | |
1179 | sending between command |
|
1181 | sending between command | |
1180 | abort: no suitable response from remote hg! |
|
1182 | abort: no suitable response from remote hg! | |
1181 | [255] |
|
1183 | [255] | |
1182 | #endif |
|
1184 | #endif | |
1183 |
|
1185 | |||
1184 | $ hg clone "ssh://v-alid.example.com/" --debug |
|
1186 | $ hg clone "ssh://v-alid.example.com/" --debug | |
1185 | running sh -c "read l; read l; read l" v-alid\.example\.com ['"]hg -R \. serve --stdio['"] (re) |
|
1187 | running sh -c "read l; read l; read l" v-alid\.example\.com ['"]hg -R \. serve --stdio['"] (re) | |
1186 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) |
|
1188 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) | |
1187 | sending hello command |
|
1189 | sending hello command | |
1188 | sending between command |
|
1190 | sending between command | |
1189 | abort: no suitable response from remote hg! |
|
1191 | abort: no suitable response from remote hg! | |
1190 | [255] |
|
1192 | [255] | |
1191 |
|
1193 | |||
1192 | We should not have created a file named owned - if it exists, the |
|
1194 | We should not have created a file named owned - if it exists, the | |
1193 | attack succeeded. |
|
1195 | attack succeeded. | |
1194 | $ if test -f owned; then echo 'you got owned'; fi |
|
1196 | $ if test -f owned; then echo 'you got owned'; fi | |
1195 |
|
1197 | |||
1196 | Cloning without fsmonitor enabled does not print a warning for small repos |
|
1198 | Cloning without fsmonitor enabled does not print a warning for small repos | |
1197 |
|
1199 | |||
1198 | $ hg clone a fsmonitor-default |
|
1200 | $ hg clone a fsmonitor-default | |
1199 | updating to bookmark @ on branch stable |
|
1201 | updating to bookmark @ on branch stable | |
1200 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1202 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1201 |
|
1203 | |||
1202 | Lower the warning threshold to simulate a large repo |
|
1204 | Lower the warning threshold to simulate a large repo | |
1203 |
|
1205 | |||
1204 | $ cat >> $HGRCPATH << EOF |
|
1206 | $ cat >> $HGRCPATH << EOF | |
1205 | > [fsmonitor] |
|
1207 | > [fsmonitor] | |
1206 | > warn_update_file_count = 2 |
|
1208 | > warn_update_file_count = 2 | |
1207 | > EOF |
|
1209 | > EOF | |
1208 |
|
1210 | |||
1209 | We should see a warning about no fsmonitor on supported platforms |
|
1211 | We should see a warning about no fsmonitor on supported platforms | |
1210 |
|
1212 | |||
1211 | #if linuxormacos no-fsmonitor |
|
1213 | #if linuxormacos no-fsmonitor | |
1212 | $ hg clone a nofsmonitor |
|
1214 | $ hg clone a nofsmonitor | |
1213 | updating to bookmark @ on branch stable |
|
1215 | updating to bookmark @ on branch stable | |
1214 | (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor") |
|
1216 | (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor") | |
1215 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1217 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1216 | #else |
|
1218 | #else | |
1217 | $ hg clone a nofsmonitor |
|
1219 | $ hg clone a nofsmonitor | |
1218 | updating to bookmark @ on branch stable |
|
1220 | updating to bookmark @ on branch stable | |
1219 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1221 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1220 | #endif |
|
1222 | #endif | |
1221 |
|
1223 | |||
1222 | We should not see warning about fsmonitor when it is enabled |
|
1224 | We should not see warning about fsmonitor when it is enabled | |
1223 |
|
1225 | |||
1224 | #if fsmonitor |
|
1226 | #if fsmonitor | |
1225 | $ hg clone a fsmonitor-enabled |
|
1227 | $ hg clone a fsmonitor-enabled | |
1226 | updating to bookmark @ on branch stable |
|
1228 | updating to bookmark @ on branch stable | |
1227 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1229 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1228 | #endif |
|
1230 | #endif | |
1229 |
|
1231 | |||
1230 | We can disable the fsmonitor warning |
|
1232 | We can disable the fsmonitor warning | |
1231 |
|
1233 | |||
1232 | $ hg --config fsmonitor.warn_when_unused=false clone a fsmonitor-disable-warning |
|
1234 | $ hg --config fsmonitor.warn_when_unused=false clone a fsmonitor-disable-warning | |
1233 | updating to bookmark @ on branch stable |
|
1235 | updating to bookmark @ on branch stable | |
1234 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1236 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1235 |
|
1237 | |||
1236 | Loaded fsmonitor but disabled in config should still print warning |
|
1238 | Loaded fsmonitor but disabled in config should still print warning | |
1237 |
|
1239 | |||
1238 | #if linuxormacos fsmonitor |
|
1240 | #if linuxormacos fsmonitor | |
1239 | $ hg --config fsmonitor.mode=off clone a fsmonitor-mode-off |
|
1241 | $ hg --config fsmonitor.mode=off clone a fsmonitor-mode-off | |
1240 | updating to bookmark @ on branch stable |
|
1242 | updating to bookmark @ on branch stable | |
1241 | (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor") (fsmonitor !) |
|
1243 | (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor") (fsmonitor !) | |
1242 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1244 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1243 | #endif |
|
1245 | #endif | |
1244 |
|
1246 | |||
1245 | Warning not printed if working directory isn't empty |
|
1247 | Warning not printed if working directory isn't empty | |
1246 |
|
1248 | |||
1247 | $ hg -q clone a fsmonitor-update |
|
1249 | $ hg -q clone a fsmonitor-update | |
1248 | (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor") (?) |
|
1250 | (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor") (?) | |
1249 | $ cd fsmonitor-update |
|
1251 | $ cd fsmonitor-update | |
1250 | $ hg up acb14030fe0a |
|
1252 | $ hg up acb14030fe0a | |
1251 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1253 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
1252 | (leaving bookmark @) |
|
1254 | (leaving bookmark @) | |
1253 | $ hg up cf0fe1914066 |
|
1255 | $ hg up cf0fe1914066 | |
1254 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1256 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1255 |
|
1257 | |||
1256 | `hg update` from null revision also prints |
|
1258 | `hg update` from null revision also prints | |
1257 |
|
1259 | |||
1258 | $ hg up null |
|
1260 | $ hg up null | |
1259 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1261 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
1260 |
|
1262 | |||
1261 | #if linuxormacos no-fsmonitor |
|
1263 | #if linuxormacos no-fsmonitor | |
1262 | $ hg up cf0fe1914066 |
|
1264 | $ hg up cf0fe1914066 | |
1263 | (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor") |
|
1265 | (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor") | |
1264 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1266 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1265 | #else |
|
1267 | #else | |
1266 | $ hg up cf0fe1914066 |
|
1268 | $ hg up cf0fe1914066 | |
1267 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1269 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1268 | #endif |
|
1270 | #endif | |
1269 |
|
1271 | |||
1270 | $ cd .. |
|
1272 | $ cd .. | |
1271 |
|
1273 |
@@ -1,184 +1,186 | |||||
1 | #require test-repo |
|
1 | #require test-repo | |
2 |
|
2 | |||
3 | Set vars: |
|
3 | Set vars: | |
4 |
|
4 | |||
5 | $ . "$TESTDIR/helpers-testrepo.sh" |
|
5 | $ . "$TESTDIR/helpers-testrepo.sh" | |
6 | $ CONTRIBDIR="$TESTDIR/../contrib" |
|
6 | $ CONTRIBDIR="$TESTDIR/../contrib" | |
7 |
|
7 | |||
8 | Prepare repo: |
|
8 | Prepare repo: | |
9 |
|
9 | |||
10 | $ hg init |
|
10 | $ hg init | |
11 |
|
11 | |||
12 | $ echo this is file a > a |
|
12 | $ echo this is file a > a | |
13 | $ hg add a |
|
13 | $ hg add a | |
14 | $ hg commit -m first |
|
14 | $ hg commit -m first | |
15 |
|
15 | |||
16 | $ echo adding to file a >> a |
|
16 | $ echo adding to file a >> a | |
17 | $ hg commit -m second |
|
17 | $ hg commit -m second | |
18 |
|
18 | |||
19 | $ echo adding more to file a >> a |
|
19 | $ echo adding more to file a >> a | |
20 | $ hg commit -m third |
|
20 | $ hg commit -m third | |
21 |
|
21 | |||
22 | $ hg up -r 0 |
|
22 | $ hg up -r 0 | |
23 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
23 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
24 | $ echo merge-this >> a |
|
24 | $ echo merge-this >> a | |
25 | $ hg commit -m merge-able |
|
25 | $ hg commit -m merge-able | |
26 | created new head |
|
26 | created new head | |
27 |
|
27 | |||
28 | $ hg up -r 2 |
|
28 | $ hg up -r 2 | |
29 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
29 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
30 |
|
30 | |||
31 | perfstatus |
|
31 | perfstatus | |
32 |
|
32 | |||
33 | $ cat >> $HGRCPATH << EOF |
|
33 | $ cat >> $HGRCPATH << EOF | |
34 | > [extensions] |
|
34 | > [extensions] | |
35 | > perfstatusext=$CONTRIBDIR/perf.py |
|
35 | > perfstatusext=$CONTRIBDIR/perf.py | |
36 | > [perf] |
|
36 | > [perf] | |
37 | > presleep=0 |
|
37 | > presleep=0 | |
38 | > stub=on |
|
38 | > stub=on | |
39 | > parentscount=1 |
|
39 | > parentscount=1 | |
40 | > EOF |
|
40 | > EOF | |
41 | $ hg help perfstatusext |
|
41 | $ hg help perfstatusext | |
42 | perfstatusext extension - helper extension to measure performance |
|
42 | perfstatusext extension - helper extension to measure performance | |
43 |
|
43 | |||
44 | list of commands: |
|
44 | list of commands: | |
45 |
|
45 | |||
46 | perfaddremove |
|
46 | perfaddremove | |
47 | (no help text available) |
|
47 | (no help text available) | |
48 | perfancestors |
|
48 | perfancestors | |
49 | (no help text available) |
|
49 | (no help text available) | |
50 | perfancestorset |
|
50 | perfancestorset | |
51 | (no help text available) |
|
51 | (no help text available) | |
52 | perfannotate (no help text available) |
|
52 | perfannotate (no help text available) | |
53 | perfbdiff benchmark a bdiff between revisions |
|
53 | perfbdiff benchmark a bdiff between revisions | |
54 | perfbookmarks |
|
54 | perfbookmarks | |
55 | benchmark parsing bookmarks from disk to memory |
|
55 | benchmark parsing bookmarks from disk to memory | |
56 | perfbranchmap |
|
56 | perfbranchmap | |
57 | benchmark the update of a branchmap |
|
57 | benchmark the update of a branchmap | |
58 | perfbundleread |
|
58 | perfbundleread | |
59 | Benchmark reading of bundle files. |
|
59 | Benchmark reading of bundle files. | |
60 | perfcca (no help text available) |
|
60 | perfcca (no help text available) | |
61 | perfchangegroupchangelog |
|
61 | perfchangegroupchangelog | |
62 | Benchmark producing a changelog group for a changegroup. |
|
62 | Benchmark producing a changelog group for a changegroup. | |
63 | perfchangeset |
|
63 | perfchangeset | |
64 | (no help text available) |
|
64 | (no help text available) | |
65 | perfctxfiles (no help text available) |
|
65 | perfctxfiles (no help text available) | |
66 | perfdiffwd Profile diff of working directory changes |
|
66 | perfdiffwd Profile diff of working directory changes | |
67 | perfdirfoldmap |
|
67 | perfdirfoldmap | |
68 | (no help text available) |
|
68 | (no help text available) | |
69 | perfdirs (no help text available) |
|
69 | perfdirs (no help text available) | |
70 | perfdirstate (no help text available) |
|
70 | perfdirstate (no help text available) | |
71 | perfdirstatedirs |
|
71 | perfdirstatedirs | |
72 | (no help text available) |
|
72 | (no help text available) | |
73 | perfdirstatefoldmap |
|
73 | perfdirstatefoldmap | |
74 | (no help text available) |
|
74 | (no help text available) | |
75 | perfdirstatewrite |
|
75 | perfdirstatewrite | |
76 | (no help text available) |
|
76 | (no help text available) | |
77 | perffncacheencode |
|
77 | perffncacheencode | |
78 | (no help text available) |
|
78 | (no help text available) | |
79 | perffncacheload |
|
79 | perffncacheload | |
80 | (no help text available) |
|
80 | (no help text available) | |
81 | perffncachewrite |
|
81 | perffncachewrite | |
82 | (no help text available) |
|
82 | (no help text available) | |
83 | perfheads (no help text available) |
|
83 | perfheads (no help text available) | |
84 | perfindex (no help text available) |
|
84 | perfindex (no help text available) | |
85 | perfloadmarkers |
|
85 | perfloadmarkers | |
86 | benchmark the time to parse the on-disk markers for a repo |
|
86 | benchmark the time to parse the on-disk markers for a repo | |
87 | perflog (no help text available) |
|
87 | perflog (no help text available) | |
88 | perflookup (no help text available) |
|
88 | perflookup (no help text available) | |
89 | perflrucachedict |
|
89 | perflrucachedict | |
90 | (no help text available) |
|
90 | (no help text available) | |
91 | perfmanifest (no help text available) |
|
91 | perfmanifest (no help text available) | |
92 | perfmergecalculate |
|
92 | perfmergecalculate | |
93 | (no help text available) |
|
93 | (no help text available) | |
94 | perfmoonwalk benchmark walking the changelog backwards |
|
94 | perfmoonwalk benchmark walking the changelog backwards | |
95 | perfnodelookup |
|
95 | perfnodelookup | |
96 | (no help text available) |
|
96 | (no help text available) | |
97 | perfparents (no help text available) |
|
97 | perfparents (no help text available) | |
98 | perfpathcopies |
|
98 | perfpathcopies | |
99 | (no help text available) |
|
99 | (no help text available) | |
100 | perfphases benchmark phasesets computation |
|
100 | perfphases benchmark phasesets computation | |
101 | perfrawfiles (no help text available) |
|
101 | perfrawfiles (no help text available) | |
102 | perfrevlogchunks |
|
102 | perfrevlogchunks | |
103 | Benchmark operations on revlog chunks. |
|
103 | Benchmark operations on revlog chunks. | |
104 | perfrevlogindex |
|
104 | perfrevlogindex | |
105 | Benchmark operations against a revlog index. |
|
105 | Benchmark operations against a revlog index. | |
106 | perfrevlogrevision |
|
106 | perfrevlogrevision | |
107 | Benchmark obtaining a revlog revision. |
|
107 | Benchmark obtaining a revlog revision. | |
108 | perfrevlogrevisions |
|
108 | perfrevlogrevisions | |
109 | Benchmark reading a series of revisions from a revlog. |
|
109 | Benchmark reading a series of revisions from a revlog. | |
110 | perfrevrange (no help text available) |
|
110 | perfrevrange (no help text available) | |
111 | perfrevset benchmark the execution time of a revset |
|
111 | perfrevset benchmark the execution time of a revset | |
112 | perfstartup (no help text available) |
|
112 | perfstartup (no help text available) | |
113 | perfstatus (no help text available) |
|
113 | perfstatus (no help text available) | |
114 | perftags (no help text available) |
|
114 | perftags (no help text available) | |
115 | perftemplating |
|
115 | perftemplating | |
116 | (no help text available) |
|
116 | (no help text available) | |
117 | perfunidiff benchmark a unified diff between revisions |
|
117 | perfunidiff benchmark a unified diff between revisions | |
118 | perfvolatilesets |
|
118 | perfvolatilesets | |
119 | benchmark the computation of various volatile set |
|
119 | benchmark the computation of various volatile set | |
120 | perfwalk (no help text available) |
|
120 | perfwalk (no help text available) | |
121 | perfwrite microbenchmark ui.write |
|
121 | perfwrite microbenchmark ui.write | |
122 |
|
122 | |||
123 | (use 'hg help -v perfstatusext' to show built-in aliases and global options) |
|
123 | (use 'hg help -v perfstatusext' to show built-in aliases and global options) | |
124 | $ hg perfaddremove |
|
124 | $ hg perfaddremove | |
125 | $ hg perfancestors |
|
125 | $ hg perfancestors | |
126 | $ hg perfancestorset 2 |
|
126 | $ hg perfancestorset 2 | |
127 | $ hg perfannotate a |
|
127 | $ hg perfannotate a | |
128 | $ hg perfbdiff -c 1 |
|
128 | $ hg perfbdiff -c 1 | |
129 | $ hg perfbdiff --alldata 1 |
|
129 | $ hg perfbdiff --alldata 1 | |
130 | $ hg perfunidiff -c 1 |
|
130 | $ hg perfunidiff -c 1 | |
131 | $ hg perfunidiff --alldata 1 |
|
131 | $ hg perfunidiff --alldata 1 | |
132 | $ hg perfbookmarks |
|
132 | $ hg perfbookmarks | |
133 | $ hg perfbranchmap |
|
133 | $ hg perfbranchmap | |
134 | $ hg perfcca |
|
134 | $ hg perfcca | |
135 | $ hg perfchangegroupchangelog |
|
135 | $ hg perfchangegroupchangelog | |
136 | $ hg perfchangeset 2 |
|
136 | $ hg perfchangeset 2 | |
137 | $ hg perfctxfiles 2 |
|
137 | $ hg perfctxfiles 2 | |
138 | $ hg perfdiffwd |
|
138 | $ hg perfdiffwd | |
139 | $ hg perfdirfoldmap |
|
139 | $ hg perfdirfoldmap | |
140 | $ hg perfdirs |
|
140 | $ hg perfdirs | |
141 | $ hg perfdirstate |
|
141 | $ hg perfdirstate | |
142 | $ hg perfdirstatedirs |
|
142 | $ hg perfdirstatedirs | |
143 | $ hg perfdirstatefoldmap |
|
143 | $ hg perfdirstatefoldmap | |
144 | $ hg perfdirstatewrite |
|
144 | $ hg perfdirstatewrite | |
145 | $ hg perffncacheencode |
|
145 | $ hg perffncacheencode | |
146 | $ hg perffncacheload |
|
146 | $ hg perffncacheload | |
147 | $ hg perffncachewrite |
|
147 | $ hg perffncachewrite | |
148 | $ hg perfheads |
|
148 | $ hg perfheads | |
149 | $ hg perfindex |
|
149 | $ hg perfindex | |
150 | $ hg perfloadmarkers |
|
150 | $ hg perfloadmarkers | |
151 | $ hg perflog |
|
151 | $ hg perflog | |
152 | $ hg perflookup 2 |
|
152 | $ hg perflookup 2 | |
153 | $ hg perflrucache |
|
153 | $ hg perflrucache | |
154 | $ hg perfmanifest 2 |
|
154 | $ hg perfmanifest 2 | |
155 | $ hg perfmergecalculate -r 3 |
|
155 | $ hg perfmergecalculate -r 3 | |
156 | $ hg perfmoonwalk |
|
156 | $ hg perfmoonwalk | |
157 | $ hg perfnodelookup 2 |
|
157 | $ hg perfnodelookup 2 | |
158 | $ hg perfpathcopies 1 2 |
|
158 | $ hg perfpathcopies 1 2 | |
159 | $ hg perfrawfiles 2 |
|
159 | $ hg perfrawfiles 2 | |
160 | $ hg perfrevlogindex -c |
|
160 | $ hg perfrevlogindex -c | |
|
161 | #if reporevlogstore | |||
161 | $ hg perfrevlogrevisions .hg/store/data/a.i |
|
162 | $ hg perfrevlogrevisions .hg/store/data/a.i | |
|
163 | #endif | |||
162 | $ hg perfrevlogrevision -m 0 |
|
164 | $ hg perfrevlogrevision -m 0 | |
163 | $ hg perfrevlogchunks -c |
|
165 | $ hg perfrevlogchunks -c | |
164 | $ hg perfrevrange |
|
166 | $ hg perfrevrange | |
165 | $ hg perfrevset 'all()' |
|
167 | $ hg perfrevset 'all()' | |
166 | $ hg perfstartup |
|
168 | $ hg perfstartup | |
167 | $ hg perfstatus |
|
169 | $ hg perfstatus | |
168 | $ hg perftags |
|
170 | $ hg perftags | |
169 | $ hg perftemplating |
|
171 | $ hg perftemplating | |
170 | $ hg perfvolatilesets |
|
172 | $ hg perfvolatilesets | |
171 | $ hg perfwalk |
|
173 | $ hg perfwalk | |
172 | $ hg perfparents |
|
174 | $ hg perfparents | |
173 |
|
175 | |||
174 | Check perf.py for historical portability |
|
176 | Check perf.py for historical portability | |
175 |
|
177 | |||
176 | $ cd "$TESTDIR/.." |
|
178 | $ cd "$TESTDIR/.." | |
177 |
|
179 | |||
178 | $ (testrepohg files -r 1.2 glob:mercurial/*.c glob:mercurial/*.py; |
|
180 | $ (testrepohg files -r 1.2 glob:mercurial/*.c glob:mercurial/*.py; | |
179 | > testrepohg files -r tip glob:mercurial/*.c glob:mercurial/*.py) | |
|
181 | > testrepohg files -r tip glob:mercurial/*.c glob:mercurial/*.py) | | |
180 | > "$TESTDIR"/check-perf-code.py contrib/perf.py |
|
182 | > "$TESTDIR"/check-perf-code.py contrib/perf.py | |
181 | contrib/perf.py:\d+: (re) |
|
183 | contrib/perf.py:\d+: (re) | |
182 | > from mercurial import ( |
|
184 | > from mercurial import ( | |
183 | import newer module separately in try clause for early Mercurial |
|
185 | import newer module separately in try clause for early Mercurial | |
184 | [1] |
|
186 | [1] |
@@ -1,616 +1,622 | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > convert= |
|
3 | > convert= | |
4 | > [convert] |
|
4 | > [convert] | |
5 | > hg.saverev=False |
|
5 | > hg.saverev=False | |
6 | > EOF |
|
6 | > EOF | |
7 | $ hg help convert |
|
7 | $ hg help convert | |
8 | hg convert [OPTION]... SOURCE [DEST [REVMAP]] |
|
8 | hg convert [OPTION]... SOURCE [DEST [REVMAP]] | |
9 |
|
9 | |||
10 | convert a foreign SCM repository to a Mercurial one. |
|
10 | convert a foreign SCM repository to a Mercurial one. | |
11 |
|
11 | |||
12 | Accepted source formats [identifiers]: |
|
12 | Accepted source formats [identifiers]: | |
13 |
|
13 | |||
14 | - Mercurial [hg] |
|
14 | - Mercurial [hg] | |
15 | - CVS [cvs] |
|
15 | - CVS [cvs] | |
16 | - Darcs [darcs] |
|
16 | - Darcs [darcs] | |
17 | - git [git] |
|
17 | - git [git] | |
18 | - Subversion [svn] |
|
18 | - Subversion [svn] | |
19 | - Monotone [mtn] |
|
19 | - Monotone [mtn] | |
20 | - GNU Arch [gnuarch] |
|
20 | - GNU Arch [gnuarch] | |
21 | - Bazaar [bzr] |
|
21 | - Bazaar [bzr] | |
22 | - Perforce [p4] |
|
22 | - Perforce [p4] | |
23 |
|
23 | |||
24 | Accepted destination formats [identifiers]: |
|
24 | Accepted destination formats [identifiers]: | |
25 |
|
25 | |||
26 | - Mercurial [hg] |
|
26 | - Mercurial [hg] | |
27 | - Subversion [svn] (history on branches is not preserved) |
|
27 | - Subversion [svn] (history on branches is not preserved) | |
28 |
|
28 | |||
29 | If no revision is given, all revisions will be converted. Otherwise, |
|
29 | If no revision is given, all revisions will be converted. Otherwise, | |
30 | convert will only import up to the named revision (given in a format |
|
30 | convert will only import up to the named revision (given in a format | |
31 | understood by the source). |
|
31 | understood by the source). | |
32 |
|
32 | |||
33 | If no destination directory name is specified, it defaults to the basename |
|
33 | If no destination directory name is specified, it defaults to the basename | |
34 | of the source with "-hg" appended. If the destination repository doesn't |
|
34 | of the source with "-hg" appended. If the destination repository doesn't | |
35 | exist, it will be created. |
|
35 | exist, it will be created. | |
36 |
|
36 | |||
37 | By default, all sources except Mercurial will use --branchsort. Mercurial |
|
37 | By default, all sources except Mercurial will use --branchsort. Mercurial | |
38 | uses --sourcesort to preserve original revision numbers order. Sort modes |
|
38 | uses --sourcesort to preserve original revision numbers order. Sort modes | |
39 | have the following effects: |
|
39 | have the following effects: | |
40 |
|
40 | |||
41 | --branchsort convert from parent to child revision when possible, which |
|
41 | --branchsort convert from parent to child revision when possible, which | |
42 | means branches are usually converted one after the other. |
|
42 | means branches are usually converted one after the other. | |
43 | It generates more compact repositories. |
|
43 | It generates more compact repositories. | |
44 | --datesort sort revisions by date. Converted repositories have good- |
|
44 | --datesort sort revisions by date. Converted repositories have good- | |
45 | looking changelogs but are often an order of magnitude |
|
45 | looking changelogs but are often an order of magnitude | |
46 | larger than the same ones generated by --branchsort. |
|
46 | larger than the same ones generated by --branchsort. | |
47 | --sourcesort try to preserve source revisions order, only supported by |
|
47 | --sourcesort try to preserve source revisions order, only supported by | |
48 | Mercurial sources. |
|
48 | Mercurial sources. | |
49 | --closesort try to move closed revisions as close as possible to parent |
|
49 | --closesort try to move closed revisions as close as possible to parent | |
50 | branches, only supported by Mercurial sources. |
|
50 | branches, only supported by Mercurial sources. | |
51 |
|
51 | |||
52 | If "REVMAP" isn't given, it will be put in a default location |
|
52 | If "REVMAP" isn't given, it will be put in a default location | |
53 | ("<dest>/.hg/shamap" by default). The "REVMAP" is a simple text file that |
|
53 | ("<dest>/.hg/shamap" by default). The "REVMAP" is a simple text file that | |
54 | maps each source commit ID to the destination ID for that revision, like |
|
54 | maps each source commit ID to the destination ID for that revision, like | |
55 | so: |
|
55 | so: | |
56 |
|
56 | |||
57 | <source ID> <destination ID> |
|
57 | <source ID> <destination ID> | |
58 |
|
58 | |||
59 | If the file doesn't exist, it's automatically created. It's updated on |
|
59 | If the file doesn't exist, it's automatically created. It's updated on | |
60 | each commit copied, so 'hg convert' can be interrupted and can be run |
|
60 | each commit copied, so 'hg convert' can be interrupted and can be run | |
61 | repeatedly to copy new commits. |
|
61 | repeatedly to copy new commits. | |
62 |
|
62 | |||
63 | The authormap is a simple text file that maps each source commit author to |
|
63 | The authormap is a simple text file that maps each source commit author to | |
64 | a destination commit author. It is handy for source SCMs that use unix |
|
64 | a destination commit author. It is handy for source SCMs that use unix | |
65 | logins to identify authors (e.g.: CVS). One line per author mapping and |
|
65 | logins to identify authors (e.g.: CVS). One line per author mapping and | |
66 | the line format is: |
|
66 | the line format is: | |
67 |
|
67 | |||
68 | source author = destination author |
|
68 | source author = destination author | |
69 |
|
69 | |||
70 | Empty lines and lines starting with a "#" are ignored. |
|
70 | Empty lines and lines starting with a "#" are ignored. | |
71 |
|
71 | |||
72 | The filemap is a file that allows filtering and remapping of files and |
|
72 | The filemap is a file that allows filtering and remapping of files and | |
73 | directories. Each line can contain one of the following directives: |
|
73 | directories. Each line can contain one of the following directives: | |
74 |
|
74 | |||
75 | include path/to/file-or-dir |
|
75 | include path/to/file-or-dir | |
76 |
|
76 | |||
77 | exclude path/to/file-or-dir |
|
77 | exclude path/to/file-or-dir | |
78 |
|
78 | |||
79 | rename path/to/source path/to/destination |
|
79 | rename path/to/source path/to/destination | |
80 |
|
80 | |||
81 | Comment lines start with "#". A specified path matches if it equals the |
|
81 | Comment lines start with "#". A specified path matches if it equals the | |
82 | full relative name of a file or one of its parent directories. The |
|
82 | full relative name of a file or one of its parent directories. The | |
83 | "include" or "exclude" directive with the longest matching path applies, |
|
83 | "include" or "exclude" directive with the longest matching path applies, | |
84 | so line order does not matter. |
|
84 | so line order does not matter. | |
85 |
|
85 | |||
86 | The "include" directive causes a file, or all files under a directory, to |
|
86 | The "include" directive causes a file, or all files under a directory, to | |
87 | be included in the destination repository. The default if there are no |
|
87 | be included in the destination repository. The default if there are no | |
88 | "include" statements is to include everything. If there are any "include" |
|
88 | "include" statements is to include everything. If there are any "include" | |
89 | statements, nothing else is included. The "exclude" directive causes files |
|
89 | statements, nothing else is included. The "exclude" directive causes files | |
90 | or directories to be omitted. The "rename" directive renames a file or |
|
90 | or directories to be omitted. The "rename" directive renames a file or | |
91 | directory if it is converted. To rename from a subdirectory into the root |
|
91 | directory if it is converted. To rename from a subdirectory into the root | |
92 | of the repository, use "." as the path to rename to. |
|
92 | of the repository, use "." as the path to rename to. | |
93 |
|
93 | |||
94 | "--full" will make sure the converted changesets contain exactly the right |
|
94 | "--full" will make sure the converted changesets contain exactly the right | |
95 | files with the right content. It will make a full conversion of all files, |
|
95 | files with the right content. It will make a full conversion of all files, | |
96 | not just the ones that have changed. Files that already are correct will |
|
96 | not just the ones that have changed. Files that already are correct will | |
97 | not be changed. This can be used to apply filemap changes when converting |
|
97 | not be changed. This can be used to apply filemap changes when converting | |
98 | incrementally. This is currently only supported for Mercurial and |
|
98 | incrementally. This is currently only supported for Mercurial and | |
99 | Subversion. |
|
99 | Subversion. | |
100 |
|
100 | |||
101 | The splicemap is a file that allows insertion of synthetic history, |
|
101 | The splicemap is a file that allows insertion of synthetic history, | |
102 | letting you specify the parents of a revision. This is useful if you want |
|
102 | letting you specify the parents of a revision. This is useful if you want | |
103 | to e.g. give a Subversion merge two parents, or graft two disconnected |
|
103 | to e.g. give a Subversion merge two parents, or graft two disconnected | |
104 | series of history together. Each entry contains a key, followed by a |
|
104 | series of history together. Each entry contains a key, followed by a | |
105 | space, followed by one or two comma-separated values: |
|
105 | space, followed by one or two comma-separated values: | |
106 |
|
106 | |||
107 | key parent1, parent2 |
|
107 | key parent1, parent2 | |
108 |
|
108 | |||
109 | The key is the revision ID in the source revision control system whose |
|
109 | The key is the revision ID in the source revision control system whose | |
110 | parents should be modified (same format as a key in .hg/shamap). The |
|
110 | parents should be modified (same format as a key in .hg/shamap). The | |
111 | values are the revision IDs (in either the source or destination revision |
|
111 | values are the revision IDs (in either the source or destination revision | |
112 | control system) that should be used as the new parents for that node. For |
|
112 | control system) that should be used as the new parents for that node. For | |
113 | example, if you have merged "release-1.0" into "trunk", then you should |
|
113 | example, if you have merged "release-1.0" into "trunk", then you should | |
114 | specify the revision on "trunk" as the first parent and the one on the |
|
114 | specify the revision on "trunk" as the first parent and the one on the | |
115 | "release-1.0" branch as the second. |
|
115 | "release-1.0" branch as the second. | |
116 |
|
116 | |||
117 | The branchmap is a file that allows you to rename a branch when it is |
|
117 | The branchmap is a file that allows you to rename a branch when it is | |
118 | being brought in from whatever external repository. When used in |
|
118 | being brought in from whatever external repository. When used in | |
119 | conjunction with a splicemap, it allows for a powerful combination to help |
|
119 | conjunction with a splicemap, it allows for a powerful combination to help | |
120 | fix even the most badly mismanaged repositories and turn them into nicely |
|
120 | fix even the most badly mismanaged repositories and turn them into nicely | |
121 | structured Mercurial repositories. The branchmap contains lines of the |
|
121 | structured Mercurial repositories. The branchmap contains lines of the | |
122 | form: |
|
122 | form: | |
123 |
|
123 | |||
124 | original_branch_name new_branch_name |
|
124 | original_branch_name new_branch_name | |
125 |
|
125 | |||
126 | where "original_branch_name" is the name of the branch in the source |
|
126 | where "original_branch_name" is the name of the branch in the source | |
127 | repository, and "new_branch_name" is the name of the branch is the |
|
127 | repository, and "new_branch_name" is the name of the branch is the | |
128 | destination repository. No whitespace is allowed in the new branch name. |
|
128 | destination repository. No whitespace is allowed in the new branch name. | |
129 | This can be used to (for instance) move code in one repository from |
|
129 | This can be used to (for instance) move code in one repository from | |
130 | "default" to a named branch. |
|
130 | "default" to a named branch. | |
131 |
|
131 | |||
132 | Mercurial Source |
|
132 | Mercurial Source | |
133 | ################ |
|
133 | ################ | |
134 |
|
134 | |||
135 | The Mercurial source recognizes the following configuration options, which |
|
135 | The Mercurial source recognizes the following configuration options, which | |
136 | you can set on the command line with "--config": |
|
136 | you can set on the command line with "--config": | |
137 |
|
137 | |||
138 | convert.hg.ignoreerrors |
|
138 | convert.hg.ignoreerrors | |
139 | ignore integrity errors when reading. Use it to fix |
|
139 | ignore integrity errors when reading. Use it to fix | |
140 | Mercurial repositories with missing revlogs, by converting |
|
140 | Mercurial repositories with missing revlogs, by converting | |
141 | from and to Mercurial. Default is False. |
|
141 | from and to Mercurial. Default is False. | |
142 | convert.hg.saverev |
|
142 | convert.hg.saverev | |
143 | store original revision ID in changeset (forces target IDs |
|
143 | store original revision ID in changeset (forces target IDs | |
144 | to change). It takes a boolean argument and defaults to |
|
144 | to change). It takes a boolean argument and defaults to | |
145 | False. |
|
145 | False. | |
146 | convert.hg.startrev |
|
146 | convert.hg.startrev | |
147 | specify the initial Mercurial revision. The default is 0. |
|
147 | specify the initial Mercurial revision. The default is 0. | |
148 | convert.hg.revs |
|
148 | convert.hg.revs | |
149 | revset specifying the source revisions to convert. |
|
149 | revset specifying the source revisions to convert. | |
150 |
|
150 | |||
151 | CVS Source |
|
151 | CVS Source | |
152 | ########## |
|
152 | ########## | |
153 |
|
153 | |||
154 | CVS source will use a sandbox (i.e. a checked-out copy) from CVS to |
|
154 | CVS source will use a sandbox (i.e. a checked-out copy) from CVS to | |
155 | indicate the starting point of what will be converted. Direct access to |
|
155 | indicate the starting point of what will be converted. Direct access to | |
156 | the repository files is not needed, unless of course the repository is |
|
156 | the repository files is not needed, unless of course the repository is | |
157 | ":local:". The conversion uses the top level directory in the sandbox to |
|
157 | ":local:". The conversion uses the top level directory in the sandbox to | |
158 | find the CVS repository, and then uses CVS rlog commands to find files to |
|
158 | find the CVS repository, and then uses CVS rlog commands to find files to | |
159 | convert. This means that unless a filemap is given, all files under the |
|
159 | convert. This means that unless a filemap is given, all files under the | |
160 | starting directory will be converted, and that any directory |
|
160 | starting directory will be converted, and that any directory | |
161 | reorganization in the CVS sandbox is ignored. |
|
161 | reorganization in the CVS sandbox is ignored. | |
162 |
|
162 | |||
163 | The following options can be used with "--config": |
|
163 | The following options can be used with "--config": | |
164 |
|
164 | |||
165 | convert.cvsps.cache |
|
165 | convert.cvsps.cache | |
166 | Set to False to disable remote log caching, for testing and |
|
166 | Set to False to disable remote log caching, for testing and | |
167 | debugging purposes. Default is True. |
|
167 | debugging purposes. Default is True. | |
168 | convert.cvsps.fuzz |
|
168 | convert.cvsps.fuzz | |
169 | Specify the maximum time (in seconds) that is allowed |
|
169 | Specify the maximum time (in seconds) that is allowed | |
170 | between commits with identical user and log message in a |
|
170 | between commits with identical user and log message in a | |
171 | single changeset. When very large files were checked in as |
|
171 | single changeset. When very large files were checked in as | |
172 | part of a changeset then the default may not be long enough. |
|
172 | part of a changeset then the default may not be long enough. | |
173 | The default is 60. |
|
173 | The default is 60. | |
174 | convert.cvsps.logencoding |
|
174 | convert.cvsps.logencoding | |
175 | Specify encoding name to be used for transcoding CVS log |
|
175 | Specify encoding name to be used for transcoding CVS log | |
176 | messages. Multiple encoding names can be specified as a list |
|
176 | messages. Multiple encoding names can be specified as a list | |
177 | (see 'hg help config.Syntax'), but only the first acceptable |
|
177 | (see 'hg help config.Syntax'), but only the first acceptable | |
178 | encoding in the list is used per CVS log entries. This |
|
178 | encoding in the list is used per CVS log entries. This | |
179 | transcoding is executed before cvslog hook below. |
|
179 | transcoding is executed before cvslog hook below. | |
180 | convert.cvsps.mergeto |
|
180 | convert.cvsps.mergeto | |
181 | Specify a regular expression to which commit log messages |
|
181 | Specify a regular expression to which commit log messages | |
182 | are matched. If a match occurs, then the conversion process |
|
182 | are matched. If a match occurs, then the conversion process | |
183 | will insert a dummy revision merging the branch on which |
|
183 | will insert a dummy revision merging the branch on which | |
184 | this log message occurs to the branch indicated in the |
|
184 | this log message occurs to the branch indicated in the | |
185 | regex. Default is "{{mergetobranch ([-\w]+)}}" |
|
185 | regex. Default is "{{mergetobranch ([-\w]+)}}" | |
186 | convert.cvsps.mergefrom |
|
186 | convert.cvsps.mergefrom | |
187 | Specify a regular expression to which commit log messages |
|
187 | Specify a regular expression to which commit log messages | |
188 | are matched. If a match occurs, then the conversion process |
|
188 | are matched. If a match occurs, then the conversion process | |
189 | will add the most recent revision on the branch indicated in |
|
189 | will add the most recent revision on the branch indicated in | |
190 | the regex as the second parent of the changeset. Default is |
|
190 | the regex as the second parent of the changeset. Default is | |
191 | "{{mergefrombranch ([-\w]+)}}" |
|
191 | "{{mergefrombranch ([-\w]+)}}" | |
192 | convert.localtimezone |
|
192 | convert.localtimezone | |
193 | use local time (as determined by the TZ environment |
|
193 | use local time (as determined by the TZ environment | |
194 | variable) for changeset date/times. The default is False |
|
194 | variable) for changeset date/times. The default is False | |
195 | (use UTC). |
|
195 | (use UTC). | |
196 | hooks.cvslog Specify a Python function to be called at the end of |
|
196 | hooks.cvslog Specify a Python function to be called at the end of | |
197 | gathering the CVS log. The function is passed a list with |
|
197 | gathering the CVS log. The function is passed a list with | |
198 | the log entries, and can modify the entries in-place, or add |
|
198 | the log entries, and can modify the entries in-place, or add | |
199 | or delete them. |
|
199 | or delete them. | |
200 | hooks.cvschangesets |
|
200 | hooks.cvschangesets | |
201 | Specify a Python function to be called after the changesets |
|
201 | Specify a Python function to be called after the changesets | |
202 | are calculated from the CVS log. The function is passed a |
|
202 | are calculated from the CVS log. The function is passed a | |
203 | list with the changeset entries, and can modify the |
|
203 | list with the changeset entries, and can modify the | |
204 | changesets in-place, or add or delete them. |
|
204 | changesets in-place, or add or delete them. | |
205 |
|
205 | |||
206 | An additional "debugcvsps" Mercurial command allows the builtin changeset |
|
206 | An additional "debugcvsps" Mercurial command allows the builtin changeset | |
207 | merging code to be run without doing a conversion. Its parameters and |
|
207 | merging code to be run without doing a conversion. Its parameters and | |
208 | output are similar to that of cvsps 2.1. Please see the command help for |
|
208 | output are similar to that of cvsps 2.1. Please see the command help for | |
209 | more details. |
|
209 | more details. | |
210 |
|
210 | |||
211 | Subversion Source |
|
211 | Subversion Source | |
212 | ################# |
|
212 | ################# | |
213 |
|
213 | |||
214 | Subversion source detects classical trunk/branches/tags layouts. By |
|
214 | Subversion source detects classical trunk/branches/tags layouts. By | |
215 | default, the supplied "svn://repo/path/" source URL is converted as a |
|
215 | default, the supplied "svn://repo/path/" source URL is converted as a | |
216 | single branch. If "svn://repo/path/trunk" exists it replaces the default |
|
216 | single branch. If "svn://repo/path/trunk" exists it replaces the default | |
217 | branch. If "svn://repo/path/branches" exists, its subdirectories are |
|
217 | branch. If "svn://repo/path/branches" exists, its subdirectories are | |
218 | listed as possible branches. If "svn://repo/path/tags" exists, it is |
|
218 | listed as possible branches. If "svn://repo/path/tags" exists, it is | |
219 | looked for tags referencing converted branches. Default "trunk", |
|
219 | looked for tags referencing converted branches. Default "trunk", | |
220 | "branches" and "tags" values can be overridden with following options. Set |
|
220 | "branches" and "tags" values can be overridden with following options. Set | |
221 | them to paths relative to the source URL, or leave them blank to disable |
|
221 | them to paths relative to the source URL, or leave them blank to disable | |
222 | auto detection. |
|
222 | auto detection. | |
223 |
|
223 | |||
224 | The following options can be set with "--config": |
|
224 | The following options can be set with "--config": | |
225 |
|
225 | |||
226 | convert.svn.branches |
|
226 | convert.svn.branches | |
227 | specify the directory containing branches. The default is |
|
227 | specify the directory containing branches. The default is | |
228 | "branches". |
|
228 | "branches". | |
229 | convert.svn.tags |
|
229 | convert.svn.tags | |
230 | specify the directory containing tags. The default is |
|
230 | specify the directory containing tags. The default is | |
231 | "tags". |
|
231 | "tags". | |
232 | convert.svn.trunk |
|
232 | convert.svn.trunk | |
233 | specify the name of the trunk branch. The default is |
|
233 | specify the name of the trunk branch. The default is | |
234 | "trunk". |
|
234 | "trunk". | |
235 | convert.localtimezone |
|
235 | convert.localtimezone | |
236 | use local time (as determined by the TZ environment |
|
236 | use local time (as determined by the TZ environment | |
237 | variable) for changeset date/times. The default is False |
|
237 | variable) for changeset date/times. The default is False | |
238 | (use UTC). |
|
238 | (use UTC). | |
239 |
|
239 | |||
240 | Source history can be retrieved starting at a specific revision, instead |
|
240 | Source history can be retrieved starting at a specific revision, instead | |
241 | of being integrally converted. Only single branch conversions are |
|
241 | of being integrally converted. Only single branch conversions are | |
242 | supported. |
|
242 | supported. | |
243 |
|
243 | |||
244 | convert.svn.startrev |
|
244 | convert.svn.startrev | |
245 | specify start Subversion revision number. The default is 0. |
|
245 | specify start Subversion revision number. The default is 0. | |
246 |
|
246 | |||
247 | Git Source |
|
247 | Git Source | |
248 | ########## |
|
248 | ########## | |
249 |
|
249 | |||
250 | The Git importer converts commits from all reachable branches (refs in |
|
250 | The Git importer converts commits from all reachable branches (refs in | |
251 | refs/heads) and remotes (refs in refs/remotes) to Mercurial. Branches are |
|
251 | refs/heads) and remotes (refs in refs/remotes) to Mercurial. Branches are | |
252 | converted to bookmarks with the same name, with the leading 'refs/heads' |
|
252 | converted to bookmarks with the same name, with the leading 'refs/heads' | |
253 | stripped. Git submodules are converted to Git subrepos in Mercurial. |
|
253 | stripped. Git submodules are converted to Git subrepos in Mercurial. | |
254 |
|
254 | |||
255 | The following options can be set with "--config": |
|
255 | The following options can be set with "--config": | |
256 |
|
256 | |||
257 | convert.git.similarity |
|
257 | convert.git.similarity | |
258 | specify how similar files modified in a commit must be to be |
|
258 | specify how similar files modified in a commit must be to be | |
259 | imported as renames or copies, as a percentage between "0" |
|
259 | imported as renames or copies, as a percentage between "0" | |
260 | (disabled) and "100" (files must be identical). For example, |
|
260 | (disabled) and "100" (files must be identical). For example, | |
261 | "90" means that a delete/add pair will be imported as a |
|
261 | "90" means that a delete/add pair will be imported as a | |
262 | rename if more than 90% of the file hasn't changed. The |
|
262 | rename if more than 90% of the file hasn't changed. The | |
263 | default is "50". |
|
263 | default is "50". | |
264 | convert.git.findcopiesharder |
|
264 | convert.git.findcopiesharder | |
265 | while detecting copies, look at all files in the working |
|
265 | while detecting copies, look at all files in the working | |
266 | copy instead of just changed ones. This is very expensive |
|
266 | copy instead of just changed ones. This is very expensive | |
267 | for large projects, and is only effective when |
|
267 | for large projects, and is only effective when | |
268 | "convert.git.similarity" is greater than 0. The default is |
|
268 | "convert.git.similarity" is greater than 0. The default is | |
269 | False. |
|
269 | False. | |
270 | convert.git.renamelimit |
|
270 | convert.git.renamelimit | |
271 | perform rename and copy detection up to this many changed |
|
271 | perform rename and copy detection up to this many changed | |
272 | files in a commit. Increasing this will make rename and copy |
|
272 | files in a commit. Increasing this will make rename and copy | |
273 | detection more accurate but will significantly slow down |
|
273 | detection more accurate but will significantly slow down | |
274 | computation on large projects. The option is only relevant |
|
274 | computation on large projects. The option is only relevant | |
275 | if "convert.git.similarity" is greater than 0. The default |
|
275 | if "convert.git.similarity" is greater than 0. The default | |
276 | is "400". |
|
276 | is "400". | |
277 | convert.git.committeractions |
|
277 | convert.git.committeractions | |
278 | list of actions to take when processing author and committer |
|
278 | list of actions to take when processing author and committer | |
279 | values. |
|
279 | values. | |
280 |
|
280 | |||
281 | Git commits have separate author (who wrote the commit) and committer |
|
281 | Git commits have separate author (who wrote the commit) and committer | |
282 | (who applied the commit) fields. Not all destinations support separate |
|
282 | (who applied the commit) fields. Not all destinations support separate | |
283 | author and committer fields (including Mercurial). This config option |
|
283 | author and committer fields (including Mercurial). This config option | |
284 | controls what to do with these author and committer fields during |
|
284 | controls what to do with these author and committer fields during | |
285 | conversion. |
|
285 | conversion. | |
286 |
|
286 | |||
287 | A value of "messagedifferent" will append a "committer: ..." line to |
|
287 | A value of "messagedifferent" will append a "committer: ..." line to | |
288 | the commit message if the Git committer is different from the author. |
|
288 | the commit message if the Git committer is different from the author. | |
289 | The prefix of that line can be specified using the syntax |
|
289 | The prefix of that line can be specified using the syntax | |
290 | "messagedifferent=<prefix>". e.g. "messagedifferent=git-committer:". |
|
290 | "messagedifferent=<prefix>". e.g. "messagedifferent=git-committer:". | |
291 | When a prefix is specified, a space will always be inserted between |
|
291 | When a prefix is specified, a space will always be inserted between | |
292 | the prefix and the value. |
|
292 | the prefix and the value. | |
293 |
|
293 | |||
294 | "messagealways" behaves like "messagedifferent" except it will always |
|
294 | "messagealways" behaves like "messagedifferent" except it will always | |
295 | result in a "committer: ..." line being appended to the commit |
|
295 | result in a "committer: ..." line being appended to the commit | |
296 | message. This value is mutually exclusive with "messagedifferent". |
|
296 | message. This value is mutually exclusive with "messagedifferent". | |
297 |
|
297 | |||
298 | "dropcommitter" will remove references to the committer. Only |
|
298 | "dropcommitter" will remove references to the committer. Only | |
299 | references to the author will remain. Actions that add references to |
|
299 | references to the author will remain. Actions that add references to | |
300 | the committer will have no effect when this is set. |
|
300 | the committer will have no effect when this is set. | |
301 |
|
301 | |||
302 | "replaceauthor" will replace the value of the author field with the |
|
302 | "replaceauthor" will replace the value of the author field with the | |
303 | committer. Other actions that add references to the committer will |
|
303 | committer. Other actions that add references to the committer will | |
304 | still take effect when this is set. |
|
304 | still take effect when this is set. | |
305 |
|
305 | |||
306 | The default is "messagedifferent". |
|
306 | The default is "messagedifferent". | |
307 |
|
307 | |||
308 | convert.git.extrakeys |
|
308 | convert.git.extrakeys | |
309 | list of extra keys from commit metadata to copy to the |
|
309 | list of extra keys from commit metadata to copy to the | |
310 | destination. Some Git repositories store extra metadata in |
|
310 | destination. Some Git repositories store extra metadata in | |
311 | commits. By default, this non-default metadata will be lost |
|
311 | commits. By default, this non-default metadata will be lost | |
312 | during conversion. Setting this config option can retain |
|
312 | during conversion. Setting this config option can retain | |
313 | that metadata. Some built-in keys such as "parent" and |
|
313 | that metadata. Some built-in keys such as "parent" and | |
314 | "branch" are not allowed to be copied. |
|
314 | "branch" are not allowed to be copied. | |
315 | convert.git.remoteprefix |
|
315 | convert.git.remoteprefix | |
316 | remote refs are converted as bookmarks with |
|
316 | remote refs are converted as bookmarks with | |
317 | "convert.git.remoteprefix" as a prefix followed by a /. The |
|
317 | "convert.git.remoteprefix" as a prefix followed by a /. The | |
318 | default is 'remote'. |
|
318 | default is 'remote'. | |
319 | convert.git.saverev |
|
319 | convert.git.saverev | |
320 | whether to store the original Git commit ID in the metadata |
|
320 | whether to store the original Git commit ID in the metadata | |
321 | of the destination commit. The default is True. |
|
321 | of the destination commit. The default is True. | |
322 | convert.git.skipsubmodules |
|
322 | convert.git.skipsubmodules | |
323 | does not convert root level .gitmodules files or files with |
|
323 | does not convert root level .gitmodules files or files with | |
324 | 160000 mode indicating a submodule. Default is False. |
|
324 | 160000 mode indicating a submodule. Default is False. | |
325 |
|
325 | |||
326 | Perforce Source |
|
326 | Perforce Source | |
327 | ############### |
|
327 | ############### | |
328 |
|
328 | |||
329 | The Perforce (P4) importer can be given a p4 depot path or a client |
|
329 | The Perforce (P4) importer can be given a p4 depot path or a client | |
330 | specification as source. It will convert all files in the source to a flat |
|
330 | specification as source. It will convert all files in the source to a flat | |
331 | Mercurial repository, ignoring labels, branches and integrations. Note |
|
331 | Mercurial repository, ignoring labels, branches and integrations. Note | |
332 | that when a depot path is given you then usually should specify a target |
|
332 | that when a depot path is given you then usually should specify a target | |
333 | directory, because otherwise the target may be named "...-hg". |
|
333 | directory, because otherwise the target may be named "...-hg". | |
334 |
|
334 | |||
335 | The following options can be set with "--config": |
|
335 | The following options can be set with "--config": | |
336 |
|
336 | |||
337 | convert.p4.encoding |
|
337 | convert.p4.encoding | |
338 | specify the encoding to use when decoding standard output of |
|
338 | specify the encoding to use when decoding standard output of | |
339 | the Perforce command line tool. The default is default |
|
339 | the Perforce command line tool. The default is default | |
340 | system encoding. |
|
340 | system encoding. | |
341 | convert.p4.startrev |
|
341 | convert.p4.startrev | |
342 | specify initial Perforce revision (a Perforce changelist |
|
342 | specify initial Perforce revision (a Perforce changelist | |
343 | number). |
|
343 | number). | |
344 |
|
344 | |||
345 | Mercurial Destination |
|
345 | Mercurial Destination | |
346 | ##################### |
|
346 | ##################### | |
347 |
|
347 | |||
348 | The Mercurial destination will recognize Mercurial subrepositories in the |
|
348 | The Mercurial destination will recognize Mercurial subrepositories in the | |
349 | destination directory, and update the .hgsubstate file automatically if |
|
349 | destination directory, and update the .hgsubstate file automatically if | |
350 | the destination subrepositories contain the <dest>/<sub>/.hg/shamap file. |
|
350 | the destination subrepositories contain the <dest>/<sub>/.hg/shamap file. | |
351 | Converting a repository with subrepositories requires converting a single |
|
351 | Converting a repository with subrepositories requires converting a single | |
352 | repository at a time, from the bottom up. |
|
352 | repository at a time, from the bottom up. | |
353 |
|
353 | |||
354 | The following options are supported: |
|
354 | The following options are supported: | |
355 |
|
355 | |||
356 | convert.hg.clonebranches |
|
356 | convert.hg.clonebranches | |
357 | dispatch source branches in separate clones. The default is |
|
357 | dispatch source branches in separate clones. The default is | |
358 | False. |
|
358 | False. | |
359 | convert.hg.tagsbranch |
|
359 | convert.hg.tagsbranch | |
360 | branch name for tag revisions, defaults to "default". |
|
360 | branch name for tag revisions, defaults to "default". | |
361 | convert.hg.usebranchnames |
|
361 | convert.hg.usebranchnames | |
362 | preserve branch names. The default is True. |
|
362 | preserve branch names. The default is True. | |
363 | convert.hg.sourcename |
|
363 | convert.hg.sourcename | |
364 | records the given string as a 'convert_source' extra value |
|
364 | records the given string as a 'convert_source' extra value | |
365 | on each commit made in the target repository. The default is |
|
365 | on each commit made in the target repository. The default is | |
366 | None. |
|
366 | None. | |
367 |
|
367 | |||
368 | All Destinations |
|
368 | All Destinations | |
369 | ################ |
|
369 | ################ | |
370 |
|
370 | |||
371 | All destination types accept the following options: |
|
371 | All destination types accept the following options: | |
372 |
|
372 | |||
373 | convert.skiptags |
|
373 | convert.skiptags | |
374 | does not convert tags from the source repo to the target |
|
374 | does not convert tags from the source repo to the target | |
375 | repo. The default is False. |
|
375 | repo. The default is False. | |
376 |
|
376 | |||
377 | options ([+] can be repeated): |
|
377 | options ([+] can be repeated): | |
378 |
|
378 | |||
379 | -s --source-type TYPE source repository type |
|
379 | -s --source-type TYPE source repository type | |
380 | -d --dest-type TYPE destination repository type |
|
380 | -d --dest-type TYPE destination repository type | |
381 | -r --rev REV [+] import up to source revision REV |
|
381 | -r --rev REV [+] import up to source revision REV | |
382 | -A --authormap FILE remap usernames using this file |
|
382 | -A --authormap FILE remap usernames using this file | |
383 | --filemap FILE remap file names using contents of file |
|
383 | --filemap FILE remap file names using contents of file | |
384 | --full apply filemap changes by converting all files again |
|
384 | --full apply filemap changes by converting all files again | |
385 | --splicemap FILE splice synthesized history into place |
|
385 | --splicemap FILE splice synthesized history into place | |
386 | --branchmap FILE change branch names while converting |
|
386 | --branchmap FILE change branch names while converting | |
387 | --branchsort try to sort changesets by branches |
|
387 | --branchsort try to sort changesets by branches | |
388 | --datesort try to sort changesets by date |
|
388 | --datesort try to sort changesets by date | |
389 | --sourcesort preserve source changesets order |
|
389 | --sourcesort preserve source changesets order | |
390 | --closesort try to reorder closed revisions |
|
390 | --closesort try to reorder closed revisions | |
391 |
|
391 | |||
392 | (some details hidden, use --verbose to show complete help) |
|
392 | (some details hidden, use --verbose to show complete help) | |
393 | $ hg init a |
|
393 | $ hg init a | |
394 | $ cd a |
|
394 | $ cd a | |
395 | $ echo a > a |
|
395 | $ echo a > a | |
396 | $ hg ci -d'0 0' -Ama |
|
396 | $ hg ci -d'0 0' -Ama | |
397 | adding a |
|
397 | adding a | |
398 | $ hg cp a b |
|
398 | $ hg cp a b | |
399 | $ hg ci -d'1 0' -mb |
|
399 | $ hg ci -d'1 0' -mb | |
400 | $ hg rm a |
|
400 | $ hg rm a | |
401 | $ hg ci -d'2 0' -mc |
|
401 | $ hg ci -d'2 0' -mc | |
402 | $ hg mv b a |
|
402 | $ hg mv b a | |
403 | $ hg ci -d'3 0' -md |
|
403 | $ hg ci -d'3 0' -md | |
404 | $ echo a >> a |
|
404 | $ echo a >> a | |
405 | $ hg ci -d'4 0' -me |
|
405 | $ hg ci -d'4 0' -me | |
406 | $ cd .. |
|
406 | $ cd .. | |
407 | $ hg convert a 2>&1 | grep -v 'subversion python bindings could not be loaded' |
|
407 | $ hg convert a 2>&1 | grep -v 'subversion python bindings could not be loaded' | |
408 | assuming destination a-hg |
|
408 | assuming destination a-hg | |
409 | initializing destination a-hg repository |
|
409 | initializing destination a-hg repository | |
410 | scanning source... |
|
410 | scanning source... | |
411 | sorting... |
|
411 | sorting... | |
412 | converting... |
|
412 | converting... | |
413 | 4 a |
|
413 | 4 a | |
414 | 3 b |
|
414 | 3 b | |
415 | 2 c |
|
415 | 2 c | |
416 | 1 d |
|
416 | 1 d | |
417 | 0 e |
|
417 | 0 e | |
418 | $ hg --cwd a-hg pull ../a |
|
418 | $ hg --cwd a-hg pull ../a | |
419 | pulling from ../a |
|
419 | pulling from ../a | |
420 | searching for changes |
|
420 | searching for changes | |
421 | no changes found |
|
421 | no changes found | |
422 |
|
422 | |||
423 | conversion to existing file should fail |
|
423 | conversion to existing file should fail | |
424 |
|
424 | |||
425 | $ touch bogusfile |
|
425 | $ touch bogusfile | |
426 | $ hg convert a bogusfile |
|
426 | $ hg convert a bogusfile | |
427 | initializing destination bogusfile repository |
|
427 | initializing destination bogusfile repository | |
428 | abort: cannot create new bundle repository |
|
428 | abort: cannot create new bundle repository | |
429 | [255] |
|
429 | [255] | |
430 |
|
430 | |||
431 | #if unix-permissions no-root |
|
431 | #if unix-permissions no-root | |
432 |
|
432 | |||
433 | conversion to dir without permissions should fail |
|
433 | conversion to dir without permissions should fail | |
434 |
|
434 | |||
435 | $ mkdir bogusdir |
|
435 | $ mkdir bogusdir | |
436 | $ chmod 000 bogusdir |
|
436 | $ chmod 000 bogusdir | |
437 |
|
437 | |||
438 | $ hg convert a bogusdir |
|
438 | $ hg convert a bogusdir | |
439 | abort: Permission denied: 'bogusdir' |
|
439 | abort: Permission denied: 'bogusdir' | |
440 | [255] |
|
440 | [255] | |
441 |
|
441 | |||
442 | user permissions should succeed |
|
442 | user permissions should succeed | |
443 |
|
443 | |||
444 | $ chmod 700 bogusdir |
|
444 | $ chmod 700 bogusdir | |
445 | $ hg convert a bogusdir |
|
445 | $ hg convert a bogusdir | |
446 | initializing destination bogusdir repository |
|
446 | initializing destination bogusdir repository | |
447 | scanning source... |
|
447 | scanning source... | |
448 | sorting... |
|
448 | sorting... | |
449 | converting... |
|
449 | converting... | |
450 | 4 a |
|
450 | 4 a | |
451 | 3 b |
|
451 | 3 b | |
452 | 2 c |
|
452 | 2 c | |
453 | 1 d |
|
453 | 1 d | |
454 | 0 e |
|
454 | 0 e | |
455 |
|
455 | |||
456 | #endif |
|
456 | #endif | |
457 |
|
457 | |||
458 | test pre and post conversion actions |
|
458 | test pre and post conversion actions | |
459 |
|
459 | |||
460 | $ echo 'include b' > filemap |
|
460 | $ echo 'include b' > filemap | |
461 | $ hg convert --debug --filemap filemap a partialb | \ |
|
461 | $ hg convert --debug --filemap filemap a partialb | \ | |
462 | > grep 'run hg' |
|
462 | > grep 'run hg' | |
463 | run hg source pre-conversion action |
|
463 | run hg source pre-conversion action | |
464 | run hg sink pre-conversion action |
|
464 | run hg sink pre-conversion action | |
465 | run hg sink post-conversion action |
|
465 | run hg sink post-conversion action | |
466 | run hg source post-conversion action |
|
466 | run hg source post-conversion action | |
467 |
|
467 | |||
468 | converting empty dir should fail "nicely |
|
468 | converting empty dir should fail "nicely | |
469 |
|
469 | |||
470 | $ mkdir emptydir |
|
470 | $ mkdir emptydir | |
471 |
|
471 | |||
472 | override $PATH to ensure p4 not visible; use $PYTHON in case we're |
|
472 | override $PATH to ensure p4 not visible; use $PYTHON in case we're | |
473 | running from a devel copy, not a temp installation |
|
473 | running from a devel copy, not a temp installation | |
474 |
|
474 | |||
475 | $ PATH="$BINDIR" $PYTHON "$BINDIR"/hg convert emptydir |
|
475 | $ PATH="$BINDIR" $PYTHON "$BINDIR"/hg convert emptydir | |
476 | assuming destination emptydir-hg |
|
476 | assuming destination emptydir-hg | |
477 | initializing destination emptydir-hg repository |
|
477 | initializing destination emptydir-hg repository | |
478 | emptydir does not look like a CVS checkout |
|
478 | emptydir does not look like a CVS checkout | |
479 | $TESTTMP/emptydir does not look like a Git repository |
|
479 | $TESTTMP/emptydir does not look like a Git repository | |
480 | emptydir does not look like a Subversion repository |
|
480 | emptydir does not look like a Subversion repository | |
481 | emptydir is not a local Mercurial repository |
|
481 | emptydir is not a local Mercurial repository | |
482 | emptydir does not look like a darcs repository |
|
482 | emptydir does not look like a darcs repository | |
483 | emptydir does not look like a monotone repository |
|
483 | emptydir does not look like a monotone repository | |
484 | emptydir does not look like a GNU Arch repository |
|
484 | emptydir does not look like a GNU Arch repository | |
485 | emptydir does not look like a Bazaar repository |
|
485 | emptydir does not look like a Bazaar repository | |
486 | cannot find required "p4" tool |
|
486 | cannot find required "p4" tool | |
487 | abort: emptydir: missing or unsupported repository |
|
487 | abort: emptydir: missing or unsupported repository | |
488 | [255] |
|
488 | [255] | |
489 |
|
489 | |||
490 | convert with imaginary source type |
|
490 | convert with imaginary source type | |
491 |
|
491 | |||
492 | $ hg convert --source-type foo a a-foo |
|
492 | $ hg convert --source-type foo a a-foo | |
493 | initializing destination a-foo repository |
|
493 | initializing destination a-foo repository | |
494 | abort: foo: invalid source repository type |
|
494 | abort: foo: invalid source repository type | |
495 | [255] |
|
495 | [255] | |
496 |
|
496 | |||
497 | convert with imaginary sink type |
|
497 | convert with imaginary sink type | |
498 |
|
498 | |||
499 | $ hg convert --dest-type foo a a-foo |
|
499 | $ hg convert --dest-type foo a a-foo | |
500 | abort: foo: invalid destination repository type |
|
500 | abort: foo: invalid destination repository type | |
501 | [255] |
|
501 | [255] | |
502 |
|
502 | |||
503 | testing: convert must not produce duplicate entries in fncache |
|
503 | testing: convert must not produce duplicate entries in fncache | |
504 |
|
504 | |||
505 | $ hg convert a b |
|
505 | $ hg convert a b | |
506 | initializing destination b repository |
|
506 | initializing destination b repository | |
507 | scanning source... |
|
507 | scanning source... | |
508 | sorting... |
|
508 | sorting... | |
509 | converting... |
|
509 | converting... | |
510 | 4 a |
|
510 | 4 a | |
511 | 3 b |
|
511 | 3 b | |
512 | 2 c |
|
512 | 2 c | |
513 | 1 d |
|
513 | 1 d | |
514 | 0 e |
|
514 | 0 e | |
515 |
|
515 | |||
516 | contents of fncache file: |
|
516 | contents of fncache file: | |
517 |
|
517 | |||
518 | $ cat b/.hg/store/fncache | sort |
|
518 | $ cat b/.hg/store/fncache | sort | |
519 | data/a.i |
|
519 | data/a.i (reporevlogstore !) | |
520 | data/b.i |
|
520 | data/b.i (reporevlogstore !) | |
|
521 | data/a/0f3078c2d7345d887b54f7c9dab0d91bfa57fd07 (reposimplestore !) | |||
|
522 | data/a/4271c3e84237016935a176b6f282fde2128458b0 (reposimplestore !) | |||
|
523 | data/a/b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 (reposimplestore !) | |||
|
524 | data/a/index (reposimplestore !) | |||
|
525 | data/b/37d9b5d994eab34eda9c16b195ace52c7b129980 (reposimplestore !) | |||
|
526 | data/b/index (reposimplestore !) | |||
521 |
|
527 | |||
522 | test bogus URL |
|
528 | test bogus URL | |
523 |
|
529 | |||
524 | $ hg convert -q bzr+ssh://foobar@selenic.com/baz baz |
|
530 | $ hg convert -q bzr+ssh://foobar@selenic.com/baz baz | |
525 | abort: bzr+ssh://foobar@selenic.com/baz: missing or unsupported repository |
|
531 | abort: bzr+ssh://foobar@selenic.com/baz: missing or unsupported repository | |
526 | [255] |
|
532 | [255] | |
527 |
|
533 | |||
528 | test revset converted() lookup |
|
534 | test revset converted() lookup | |
529 |
|
535 | |||
530 | $ hg --config convert.hg.saverev=True convert a c |
|
536 | $ hg --config convert.hg.saverev=True convert a c | |
531 | initializing destination c repository |
|
537 | initializing destination c repository | |
532 | scanning source... |
|
538 | scanning source... | |
533 | sorting... |
|
539 | sorting... | |
534 | converting... |
|
540 | converting... | |
535 | 4 a |
|
541 | 4 a | |
536 | 3 b |
|
542 | 3 b | |
537 | 2 c |
|
543 | 2 c | |
538 | 1 d |
|
544 | 1 d | |
539 | 0 e |
|
545 | 0 e | |
540 | $ echo f > c/f |
|
546 | $ echo f > c/f | |
541 | $ hg -R c ci -d'0 0' -Amf |
|
547 | $ hg -R c ci -d'0 0' -Amf | |
542 | adding f |
|
548 | adding f | |
543 | created new head |
|
549 | created new head | |
544 | $ hg -R c log -r "converted(09d945a62ce6)" |
|
550 | $ hg -R c log -r "converted(09d945a62ce6)" | |
545 | changeset: 1:98c3dd46a874 |
|
551 | changeset: 1:98c3dd46a874 | |
546 | user: test |
|
552 | user: test | |
547 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
553 | date: Thu Jan 01 00:00:01 1970 +0000 | |
548 | summary: b |
|
554 | summary: b | |
549 |
|
555 | |||
550 | $ hg -R c log -r "converted()" |
|
556 | $ hg -R c log -r "converted()" | |
551 | changeset: 0:31ed57b2037c |
|
557 | changeset: 0:31ed57b2037c | |
552 | user: test |
|
558 | user: test | |
553 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
559 | date: Thu Jan 01 00:00:00 1970 +0000 | |
554 | summary: a |
|
560 | summary: a | |
555 |
|
561 | |||
556 | changeset: 1:98c3dd46a874 |
|
562 | changeset: 1:98c3dd46a874 | |
557 | user: test |
|
563 | user: test | |
558 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
564 | date: Thu Jan 01 00:00:01 1970 +0000 | |
559 | summary: b |
|
565 | summary: b | |
560 |
|
566 | |||
561 | changeset: 2:3b9ca06ef716 |
|
567 | changeset: 2:3b9ca06ef716 | |
562 | user: test |
|
568 | user: test | |
563 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
569 | date: Thu Jan 01 00:00:02 1970 +0000 | |
564 | summary: c |
|
570 | summary: c | |
565 |
|
571 | |||
566 | changeset: 3:4e0debd37cf2 |
|
572 | changeset: 3:4e0debd37cf2 | |
567 | user: test |
|
573 | user: test | |
568 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
574 | date: Thu Jan 01 00:00:03 1970 +0000 | |
569 | summary: d |
|
575 | summary: d | |
570 |
|
576 | |||
571 | changeset: 4:9de3bc9349c5 |
|
577 | changeset: 4:9de3bc9349c5 | |
572 | user: test |
|
578 | user: test | |
573 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
579 | date: Thu Jan 01 00:00:04 1970 +0000 | |
574 | summary: e |
|
580 | summary: e | |
575 |
|
581 | |||
576 |
|
582 | |||
577 | test specifying a sourcename |
|
583 | test specifying a sourcename | |
578 | $ echo g > a/g |
|
584 | $ echo g > a/g | |
579 | $ hg -R a ci -d'0 0' -Amg |
|
585 | $ hg -R a ci -d'0 0' -Amg | |
580 | adding g |
|
586 | adding g | |
581 | $ hg --config convert.hg.sourcename=mysource --config convert.hg.saverev=True convert a c |
|
587 | $ hg --config convert.hg.sourcename=mysource --config convert.hg.saverev=True convert a c | |
582 | scanning source... |
|
588 | scanning source... | |
583 | sorting... |
|
589 | sorting... | |
584 | converting... |
|
590 | converting... | |
585 | 0 g |
|
591 | 0 g | |
586 | $ hg -R c log -r tip --template '{extras % "{extra}\n"}' |
|
592 | $ hg -R c log -r tip --template '{extras % "{extra}\n"}' | |
587 | branch=default |
|
593 | branch=default | |
588 | convert_revision=a3bc6100aa8ec03e00aaf271f1f50046fb432072 |
|
594 | convert_revision=a3bc6100aa8ec03e00aaf271f1f50046fb432072 | |
589 | convert_source=mysource |
|
595 | convert_source=mysource | |
590 |
|
596 | |||
591 | $ cat > branchmap.txt << EOF |
|
597 | $ cat > branchmap.txt << EOF | |
592 | > old branch new_branch |
|
598 | > old branch new_branch | |
593 | > EOF |
|
599 | > EOF | |
594 |
|
600 | |||
595 | $ hg -R a branch -q 'old branch' |
|
601 | $ hg -R a branch -q 'old branch' | |
596 | $ echo gg > a/g |
|
602 | $ echo gg > a/g | |
597 | $ hg -R a ci -m 'branch name with spaces' |
|
603 | $ hg -R a ci -m 'branch name with spaces' | |
598 | $ hg convert --branchmap branchmap.txt a d |
|
604 | $ hg convert --branchmap branchmap.txt a d | |
599 | initializing destination d repository |
|
605 | initializing destination d repository | |
600 | scanning source... |
|
606 | scanning source... | |
601 | sorting... |
|
607 | sorting... | |
602 | converting... |
|
608 | converting... | |
603 | 6 a |
|
609 | 6 a | |
604 | 5 b |
|
610 | 5 b | |
605 | 4 c |
|
611 | 4 c | |
606 | 3 d |
|
612 | 3 d | |
607 | 2 e |
|
613 | 2 e | |
608 | 1 g |
|
614 | 1 g | |
609 | 0 branch name with spaces |
|
615 | 0 branch name with spaces | |
610 |
|
616 | |||
611 | $ hg -R a branches |
|
617 | $ hg -R a branches | |
612 | old branch 6:a24a66ade009 |
|
618 | old branch 6:a24a66ade009 | |
613 | default 5:a3bc6100aa8e (inactive) |
|
619 | default 5:a3bc6100aa8e (inactive) | |
614 | $ hg -R d branches |
|
620 | $ hg -R d branches | |
615 | new_branch 6:64ed208b732b |
|
621 | new_branch 6:64ed208b732b | |
616 | default 5:a3bc6100aa8e (inactive) |
|
622 | default 5:a3bc6100aa8e (inactive) |
@@ -1,243 +1,245 | |||||
1 | $ mkdir part1 |
|
1 | $ mkdir part1 | |
2 | $ cd part1 |
|
2 | $ cd part1 | |
3 |
|
3 | |||
4 | $ hg init |
|
4 | $ hg init | |
5 | $ echo a > a |
|
5 | $ echo a > a | |
6 | $ hg add a |
|
6 | $ hg add a | |
7 | $ hg commit -m "1" |
|
7 | $ hg commit -m "1" | |
8 | $ hg status |
|
8 | $ hg status | |
9 | $ hg copy a b |
|
9 | $ hg copy a b | |
10 | $ hg --config ui.portablefilenames=abort copy a con.xml |
|
10 | $ hg --config ui.portablefilenames=abort copy a con.xml | |
11 | abort: filename contains 'con', which is reserved on Windows: con.xml |
|
11 | abort: filename contains 'con', which is reserved on Windows: con.xml | |
12 | [255] |
|
12 | [255] | |
13 | $ hg status |
|
13 | $ hg status | |
14 | A b |
|
14 | A b | |
15 | $ hg sum |
|
15 | $ hg sum | |
16 | parent: 0:c19d34741b0a tip |
|
16 | parent: 0:c19d34741b0a tip | |
17 | 1 |
|
17 | 1 | |
18 | branch: default |
|
18 | branch: default | |
19 | commit: 1 copied |
|
19 | commit: 1 copied | |
20 | update: (current) |
|
20 | update: (current) | |
21 | phases: 1 draft |
|
21 | phases: 1 draft | |
22 | $ hg --debug commit -m "2" |
|
22 | $ hg --debug commit -m "2" | |
23 | committing files: |
|
23 | committing files: | |
24 | b |
|
24 | b | |
25 | b: copy a:b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 |
|
25 | b: copy a:b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 | |
26 | committing manifest |
|
26 | committing manifest | |
27 | committing changelog |
|
27 | committing changelog | |
28 | updating the branch cache |
|
28 | updating the branch cache | |
29 | committed changeset 1:93580a2c28a50a56f63526fb305067e6fbf739c4 |
|
29 | committed changeset 1:93580a2c28a50a56f63526fb305067e6fbf739c4 | |
30 |
|
30 | |||
31 | we should see two history entries |
|
31 | we should see two history entries | |
32 |
|
32 | |||
33 | $ hg history -v |
|
33 | $ hg history -v | |
34 | changeset: 1:93580a2c28a5 |
|
34 | changeset: 1:93580a2c28a5 | |
35 | tag: tip |
|
35 | tag: tip | |
36 | user: test |
|
36 | user: test | |
37 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
37 | date: Thu Jan 01 00:00:00 1970 +0000 | |
38 | files: b |
|
38 | files: b | |
39 | description: |
|
39 | description: | |
40 | 2 |
|
40 | 2 | |
41 |
|
41 | |||
42 |
|
42 | |||
43 | changeset: 0:c19d34741b0a |
|
43 | changeset: 0:c19d34741b0a | |
44 | user: test |
|
44 | user: test | |
45 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
45 | date: Thu Jan 01 00:00:00 1970 +0000 | |
46 | files: a |
|
46 | files: a | |
47 | description: |
|
47 | description: | |
48 | 1 |
|
48 | 1 | |
49 |
|
49 | |||
50 |
|
50 | |||
51 |
|
51 | |||
52 | we should see one log entry for a |
|
52 | we should see one log entry for a | |
53 |
|
53 | |||
54 | $ hg log a |
|
54 | $ hg log a | |
55 | changeset: 0:c19d34741b0a |
|
55 | changeset: 0:c19d34741b0a | |
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: 1 |
|
58 | summary: 1 | |
59 |
|
59 | |||
60 |
|
60 | |||
61 | this should show a revision linked to changeset 0 |
|
61 | this should show a revision linked to changeset 0 | |
62 |
|
62 | |||
63 | $ hg debugindex a |
|
63 | $ hg debugindex a | |
64 | rev linkrev nodeid p1 p2 |
|
64 | rev linkrev nodeid p1 p2 | |
65 | 0 0 b789fdd96dc2 000000000000 000000000000 |
|
65 | 0 0 b789fdd96dc2 000000000000 000000000000 | |
66 |
|
66 | |||
67 | we should see one log entry for b |
|
67 | we should see one log entry for b | |
68 |
|
68 | |||
69 | $ hg log b |
|
69 | $ hg log b | |
70 | changeset: 1:93580a2c28a5 |
|
70 | changeset: 1:93580a2c28a5 | |
71 | tag: tip |
|
71 | tag: tip | |
72 | user: test |
|
72 | user: test | |
73 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
73 | date: Thu Jan 01 00:00:00 1970 +0000 | |
74 | summary: 2 |
|
74 | summary: 2 | |
75 |
|
75 | |||
76 |
|
76 | |||
77 | this should show a revision linked to changeset 1 |
|
77 | this should show a revision linked to changeset 1 | |
78 |
|
78 | |||
79 | $ hg debugindex b |
|
79 | $ hg debugindex b | |
80 | rev linkrev nodeid p1 p2 |
|
80 | rev linkrev nodeid p1 p2 | |
81 | 0 1 37d9b5d994ea 000000000000 000000000000 |
|
81 | 0 1 37d9b5d994ea 000000000000 000000000000 | |
82 |
|
82 | |||
83 | this should show the rename information in the metadata |
|
83 | this should show the rename information in the metadata | |
84 |
|
84 | |||
85 | $ hg debugdata b 0 | head -3 | tail -2 |
|
85 | $ hg debugdata b 0 | head -3 | tail -2 | |
86 | copy: a |
|
86 | copy: a | |
87 | copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 |
|
87 | copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 | |
88 |
|
88 | |||
|
89 | #if reporevlogstore | |||
89 | $ md5sum.py .hg/store/data/b.i |
|
90 | $ md5sum.py .hg/store/data/b.i | |
90 | 44913824c8f5890ae218f9829535922e .hg/store/data/b.i |
|
91 | 44913824c8f5890ae218f9829535922e .hg/store/data/b.i | |
|
92 | #endif | |||
91 | $ hg cat b > bsum |
|
93 | $ hg cat b > bsum | |
92 | $ md5sum.py bsum |
|
94 | $ md5sum.py bsum | |
93 | 60b725f10c9c85c70d97880dfe8191b3 bsum |
|
95 | 60b725f10c9c85c70d97880dfe8191b3 bsum | |
94 | $ hg cat a > asum |
|
96 | $ hg cat a > asum | |
95 | $ md5sum.py asum |
|
97 | $ md5sum.py asum | |
96 | 60b725f10c9c85c70d97880dfe8191b3 asum |
|
98 | 60b725f10c9c85c70d97880dfe8191b3 asum | |
97 | $ hg verify |
|
99 | $ hg verify | |
98 | checking changesets |
|
100 | checking changesets | |
99 | checking manifests |
|
101 | checking manifests | |
100 | crosschecking files in changesets and manifests |
|
102 | crosschecking files in changesets and manifests | |
101 | checking files |
|
103 | checking files | |
102 | 2 files, 2 changesets, 2 total revisions |
|
104 | 2 files, 2 changesets, 2 total revisions | |
103 |
|
105 | |||
104 | $ cd .. |
|
106 | $ cd .. | |
105 |
|
107 | |||
106 |
|
108 | |||
107 | $ mkdir part2 |
|
109 | $ mkdir part2 | |
108 | $ cd part2 |
|
110 | $ cd part2 | |
109 |
|
111 | |||
110 | $ hg init |
|
112 | $ hg init | |
111 | $ echo foo > foo |
|
113 | $ echo foo > foo | |
112 | should fail - foo is not managed |
|
114 | should fail - foo is not managed | |
113 | $ hg mv foo bar |
|
115 | $ hg mv foo bar | |
114 | foo: not copying - file is not managed |
|
116 | foo: not copying - file is not managed | |
115 | abort: no files to copy |
|
117 | abort: no files to copy | |
116 | [255] |
|
118 | [255] | |
117 | $ hg st -A |
|
119 | $ hg st -A | |
118 | ? foo |
|
120 | ? foo | |
119 | $ hg add foo |
|
121 | $ hg add foo | |
120 | dry-run; print a warning that this is not a real copy; foo is added |
|
122 | dry-run; print a warning that this is not a real copy; foo is added | |
121 | $ hg mv --dry-run foo bar |
|
123 | $ hg mv --dry-run foo bar | |
122 | foo has not been committed yet, so no copy data will be stored for bar. |
|
124 | foo has not been committed yet, so no copy data will be stored for bar. | |
123 | $ hg st -A |
|
125 | $ hg st -A | |
124 | A foo |
|
126 | A foo | |
125 | should print a warning that this is not a real copy; bar is added |
|
127 | should print a warning that this is not a real copy; bar is added | |
126 | $ hg mv foo bar |
|
128 | $ hg mv foo bar | |
127 | foo has not been committed yet, so no copy data will be stored for bar. |
|
129 | foo has not been committed yet, so no copy data will be stored for bar. | |
128 | $ hg st -A |
|
130 | $ hg st -A | |
129 | A bar |
|
131 | A bar | |
130 | should print a warning that this is not a real copy; foo is added |
|
132 | should print a warning that this is not a real copy; foo is added | |
131 | $ hg cp bar foo |
|
133 | $ hg cp bar foo | |
132 | bar has not been committed yet, so no copy data will be stored for foo. |
|
134 | bar has not been committed yet, so no copy data will be stored for foo. | |
133 | $ hg rm -f bar |
|
135 | $ hg rm -f bar | |
134 | $ rm bar |
|
136 | $ rm bar | |
135 | $ hg st -A |
|
137 | $ hg st -A | |
136 | A foo |
|
138 | A foo | |
137 | $ hg commit -m1 |
|
139 | $ hg commit -m1 | |
138 |
|
140 | |||
139 | moving a missing file |
|
141 | moving a missing file | |
140 | $ rm foo |
|
142 | $ rm foo | |
141 | $ hg mv foo foo3 |
|
143 | $ hg mv foo foo3 | |
142 | foo: deleted in working directory |
|
144 | foo: deleted in working directory | |
143 | foo3 does not exist! |
|
145 | foo3 does not exist! | |
144 | $ hg up -qC . |
|
146 | $ hg up -qC . | |
145 |
|
147 | |||
146 | copy --after to a nonexistent target filename |
|
148 | copy --after to a nonexistent target filename | |
147 | $ hg cp -A foo dummy |
|
149 | $ hg cp -A foo dummy | |
148 | foo: not recording copy - dummy does not exist |
|
150 | foo: not recording copy - dummy does not exist | |
149 |
|
151 | |||
150 | dry-run; should show that foo is clean |
|
152 | dry-run; should show that foo is clean | |
151 | $ hg copy --dry-run foo bar |
|
153 | $ hg copy --dry-run foo bar | |
152 | $ hg st -A |
|
154 | $ hg st -A | |
153 | C foo |
|
155 | C foo | |
154 | should show copy |
|
156 | should show copy | |
155 | $ hg copy foo bar |
|
157 | $ hg copy foo bar | |
156 | $ hg st -C |
|
158 | $ hg st -C | |
157 | A bar |
|
159 | A bar | |
158 | foo |
|
160 | foo | |
159 |
|
161 | |||
160 | shouldn't show copy |
|
162 | shouldn't show copy | |
161 | $ hg commit -m2 |
|
163 | $ hg commit -m2 | |
162 | $ hg st -C |
|
164 | $ hg st -C | |
163 |
|
165 | |||
164 | should match |
|
166 | should match | |
165 | $ hg debugindex foo |
|
167 | $ hg debugindex foo | |
166 | rev linkrev nodeid p1 p2 |
|
168 | rev linkrev nodeid p1 p2 | |
167 | 0 0 2ed2a3912a0b 000000000000 000000000000 |
|
169 | 0 0 2ed2a3912a0b 000000000000 000000000000 | |
168 | $ hg debugrename bar |
|
170 | $ hg debugrename bar | |
169 | bar renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd |
|
171 | bar renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd | |
170 |
|
172 | |||
171 | $ echo bleah > foo |
|
173 | $ echo bleah > foo | |
172 | $ echo quux > bar |
|
174 | $ echo quux > bar | |
173 | $ hg commit -m3 |
|
175 | $ hg commit -m3 | |
174 |
|
176 | |||
175 | should not be renamed |
|
177 | should not be renamed | |
176 | $ hg debugrename bar |
|
178 | $ hg debugrename bar | |
177 | bar not renamed |
|
179 | bar not renamed | |
178 |
|
180 | |||
179 | $ hg copy -f foo bar |
|
181 | $ hg copy -f foo bar | |
180 | should show copy |
|
182 | should show copy | |
181 | $ hg st -C |
|
183 | $ hg st -C | |
182 | M bar |
|
184 | M bar | |
183 | foo |
|
185 | foo | |
184 |
|
186 | |||
185 | XXX: filtering lfilesrepo.status() in 3.3-rc causes the copy source to not be |
|
187 | XXX: filtering lfilesrepo.status() in 3.3-rc causes the copy source to not be | |
186 | displayed. |
|
188 | displayed. | |
187 | $ hg st -C --config extensions.largefiles= |
|
189 | $ hg st -C --config extensions.largefiles= | |
188 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) |
|
190 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) | |
189 | M bar |
|
191 | M bar | |
190 | foo |
|
192 | foo | |
191 |
|
193 | |||
192 | $ hg commit -m3 |
|
194 | $ hg commit -m3 | |
193 |
|
195 | |||
194 | should show no parents for tip |
|
196 | should show no parents for tip | |
195 | $ hg debugindex bar |
|
197 | $ hg debugindex bar | |
196 | rev linkrev nodeid p1 p2 |
|
198 | rev linkrev nodeid p1 p2 | |
197 | 0 1 7711d36246cc 000000000000 000000000000 |
|
199 | 0 1 7711d36246cc 000000000000 000000000000 | |
198 | 1 2 bdf70a2b8d03 7711d36246cc 000000000000 |
|
200 | 1 2 bdf70a2b8d03 7711d36246cc 000000000000 | |
199 | 2 3 b2558327ea8d 000000000000 000000000000 |
|
201 | 2 3 b2558327ea8d 000000000000 000000000000 | |
200 | should match |
|
202 | should match | |
201 | $ hg debugindex foo |
|
203 | $ hg debugindex foo | |
202 | rev linkrev nodeid p1 p2 |
|
204 | rev linkrev nodeid p1 p2 | |
203 | 0 0 2ed2a3912a0b 000000000000 000000000000 |
|
205 | 0 0 2ed2a3912a0b 000000000000 000000000000 | |
204 | 1 2 dd12c926cf16 2ed2a3912a0b 000000000000 |
|
206 | 1 2 dd12c926cf16 2ed2a3912a0b 000000000000 | |
205 | $ hg debugrename bar |
|
207 | $ hg debugrename bar | |
206 | bar renamed from foo:dd12c926cf165e3eb4cf87b084955cb617221c17 |
|
208 | bar renamed from foo:dd12c926cf165e3eb4cf87b084955cb617221c17 | |
207 |
|
209 | |||
208 | should show no copies |
|
210 | should show no copies | |
209 | $ hg st -C |
|
211 | $ hg st -C | |
210 |
|
212 | |||
211 | copy --after on an added file |
|
213 | copy --after on an added file | |
212 | $ cp bar baz |
|
214 | $ cp bar baz | |
213 | $ hg add baz |
|
215 | $ hg add baz | |
214 | $ hg cp -A bar baz |
|
216 | $ hg cp -A bar baz | |
215 | $ hg st -C |
|
217 | $ hg st -C | |
216 | A baz |
|
218 | A baz | |
217 | bar |
|
219 | bar | |
218 |
|
220 | |||
219 | foo was clean: |
|
221 | foo was clean: | |
220 | $ hg st -AC foo |
|
222 | $ hg st -AC foo | |
221 | C foo |
|
223 | C foo | |
222 | Trying to copy on top of an existing file fails, |
|
224 | Trying to copy on top of an existing file fails, | |
223 | $ hg copy -A bar foo |
|
225 | $ hg copy -A bar foo | |
224 | foo: not overwriting - file already committed |
|
226 | foo: not overwriting - file already committed | |
225 | (hg copy --after --force to replace the file by recording a copy) |
|
227 | (hg copy --after --force to replace the file by recording a copy) | |
226 | same error without the --after, so the user doesn't have to go through |
|
228 | same error without the --after, so the user doesn't have to go through | |
227 | two hints: |
|
229 | two hints: | |
228 | $ hg copy bar foo |
|
230 | $ hg copy bar foo | |
229 | foo: not overwriting - file already committed |
|
231 | foo: not overwriting - file already committed | |
230 | (hg copy --force to replace the file by recording a copy) |
|
232 | (hg copy --force to replace the file by recording a copy) | |
231 | but it's considered modified after a copy --after --force |
|
233 | but it's considered modified after a copy --after --force | |
232 | $ hg copy -Af bar foo |
|
234 | $ hg copy -Af bar foo | |
233 | $ hg st -AC foo |
|
235 | $ hg st -AC foo | |
234 | M foo |
|
236 | M foo | |
235 | bar |
|
237 | bar | |
236 | The hint for a file that exists but is not in file history doesn't |
|
238 | The hint for a file that exists but is not in file history doesn't | |
237 | mention --force: |
|
239 | mention --force: | |
238 | $ touch xyzzy |
|
240 | $ touch xyzzy | |
239 | $ hg cp bar xyzzy |
|
241 | $ hg cp bar xyzzy | |
240 | xyzzy: not overwriting - file exists |
|
242 | xyzzy: not overwriting - file exists | |
241 | (hg copy --after to record the copy) |
|
243 | (hg copy --after to record the copy) | |
242 |
|
244 | |||
243 | $ cd .. |
|
245 | $ cd .. |
@@ -1,429 +1,429 | |||||
1 | #require hardlink |
|
1 | #require hardlink reporevlogstore | |
2 |
|
2 | |||
3 | $ cat > nlinks.py <<EOF |
|
3 | $ cat > nlinks.py <<EOF | |
4 | > from __future__ import print_function |
|
4 | > from __future__ import print_function | |
5 | > import sys |
|
5 | > import sys | |
6 | > from mercurial import util |
|
6 | > from mercurial import util | |
7 | > for f in sorted(sys.stdin.readlines()): |
|
7 | > for f in sorted(sys.stdin.readlines()): | |
8 | > f = f[:-1] |
|
8 | > f = f[:-1] | |
9 | > print(util.nlinks(f), f) |
|
9 | > print(util.nlinks(f), f) | |
10 | > EOF |
|
10 | > EOF | |
11 |
|
11 | |||
12 | $ nlinksdir() |
|
12 | $ nlinksdir() | |
13 | > { |
|
13 | > { | |
14 | > find "$@" -type f | $PYTHON $TESTTMP/nlinks.py |
|
14 | > find "$@" -type f | $PYTHON $TESTTMP/nlinks.py | |
15 | > } |
|
15 | > } | |
16 |
|
16 | |||
17 | Some implementations of cp can't create hardlinks (replaces 'cp -al' on Linux): |
|
17 | Some implementations of cp can't create hardlinks (replaces 'cp -al' on Linux): | |
18 |
|
18 | |||
19 | $ cat > linkcp.py <<EOF |
|
19 | $ cat > linkcp.py <<EOF | |
20 | > from __future__ import absolute_import |
|
20 | > from __future__ import absolute_import | |
21 | > import sys |
|
21 | > import sys | |
22 | > from mercurial import util |
|
22 | > from mercurial import util | |
23 | > util.copyfiles(sys.argv[1], sys.argv[2], hardlink=True) |
|
23 | > util.copyfiles(sys.argv[1], sys.argv[2], hardlink=True) | |
24 | > EOF |
|
24 | > EOF | |
25 |
|
25 | |||
26 | $ linkcp() |
|
26 | $ linkcp() | |
27 | > { |
|
27 | > { | |
28 | > $PYTHON $TESTTMP/linkcp.py $1 $2 |
|
28 | > $PYTHON $TESTTMP/linkcp.py $1 $2 | |
29 | > } |
|
29 | > } | |
30 |
|
30 | |||
31 | Prepare repo r1: |
|
31 | Prepare repo r1: | |
32 |
|
32 | |||
33 | $ hg init r1 |
|
33 | $ hg init r1 | |
34 | $ cd r1 |
|
34 | $ cd r1 | |
35 |
|
35 | |||
36 | $ echo c1 > f1 |
|
36 | $ echo c1 > f1 | |
37 | $ hg add f1 |
|
37 | $ hg add f1 | |
38 | $ hg ci -m0 |
|
38 | $ hg ci -m0 | |
39 |
|
39 | |||
40 | $ mkdir d1 |
|
40 | $ mkdir d1 | |
41 | $ cd d1 |
|
41 | $ cd d1 | |
42 | $ echo c2 > f2 |
|
42 | $ echo c2 > f2 | |
43 | $ hg add f2 |
|
43 | $ hg add f2 | |
44 | $ hg ci -m1 |
|
44 | $ hg ci -m1 | |
45 | $ cd ../.. |
|
45 | $ cd ../.. | |
46 |
|
46 | |||
47 | $ nlinksdir r1/.hg/store |
|
47 | $ nlinksdir r1/.hg/store | |
48 | 1 r1/.hg/store/00changelog.i |
|
48 | 1 r1/.hg/store/00changelog.i | |
49 | 1 r1/.hg/store/00manifest.i |
|
49 | 1 r1/.hg/store/00manifest.i | |
50 | 1 r1/.hg/store/data/d1/f2.i |
|
50 | 1 r1/.hg/store/data/d1/f2.i | |
51 | 1 r1/.hg/store/data/f1.i |
|
51 | 1 r1/.hg/store/data/f1.i | |
52 | 1 r1/.hg/store/fncache |
|
52 | 1 r1/.hg/store/fncache | |
53 | 1 r1/.hg/store/phaseroots |
|
53 | 1 r1/.hg/store/phaseroots | |
54 | 1 r1/.hg/store/undo |
|
54 | 1 r1/.hg/store/undo | |
55 | 1 r1/.hg/store/undo.backup.fncache |
|
55 | 1 r1/.hg/store/undo.backup.fncache | |
56 | 1 r1/.hg/store/undo.backupfiles |
|
56 | 1 r1/.hg/store/undo.backupfiles | |
57 | 1 r1/.hg/store/undo.phaseroots |
|
57 | 1 r1/.hg/store/undo.phaseroots | |
58 |
|
58 | |||
59 |
|
59 | |||
60 | Create hardlinked clone r2: |
|
60 | Create hardlinked clone r2: | |
61 |
|
61 | |||
62 | $ hg clone -U --debug r1 r2 --config progress.debug=true |
|
62 | $ hg clone -U --debug r1 r2 --config progress.debug=true | |
63 | linking: 1 |
|
63 | linking: 1 | |
64 | linking: 2 |
|
64 | linking: 2 | |
65 | linking: 3 |
|
65 | linking: 3 | |
66 | linking: 4 |
|
66 | linking: 4 | |
67 | linking: 5 |
|
67 | linking: 5 | |
68 | linking: 6 |
|
68 | linking: 6 | |
69 | linking: 7 |
|
69 | linking: 7 | |
70 | linked 7 files |
|
70 | linked 7 files | |
71 |
|
71 | |||
72 | Create non-hardlinked clone r3: |
|
72 | Create non-hardlinked clone r3: | |
73 |
|
73 | |||
74 | $ hg clone --pull r1 r3 |
|
74 | $ hg clone --pull r1 r3 | |
75 | requesting all changes |
|
75 | requesting all changes | |
76 | adding changesets |
|
76 | adding changesets | |
77 | adding manifests |
|
77 | adding manifests | |
78 | adding file changes |
|
78 | adding file changes | |
79 | added 2 changesets with 2 changes to 2 files |
|
79 | added 2 changesets with 2 changes to 2 files | |
80 | new changesets 40d85e9847f2:7069c422939c |
|
80 | new changesets 40d85e9847f2:7069c422939c | |
81 | updating to branch default |
|
81 | updating to branch default | |
82 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
82 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
83 |
|
83 | |||
84 |
|
84 | |||
85 | Repos r1 and r2 should now contain hardlinked files: |
|
85 | Repos r1 and r2 should now contain hardlinked files: | |
86 |
|
86 | |||
87 | $ nlinksdir r1/.hg/store |
|
87 | $ nlinksdir r1/.hg/store | |
88 | 2 r1/.hg/store/00changelog.i |
|
88 | 2 r1/.hg/store/00changelog.i | |
89 | 2 r1/.hg/store/00manifest.i |
|
89 | 2 r1/.hg/store/00manifest.i | |
90 | 2 r1/.hg/store/data/d1/f2.i |
|
90 | 2 r1/.hg/store/data/d1/f2.i | |
91 | 2 r1/.hg/store/data/f1.i |
|
91 | 2 r1/.hg/store/data/f1.i | |
92 | 2 r1/.hg/store/fncache |
|
92 | 2 r1/.hg/store/fncache | |
93 | 1 r1/.hg/store/phaseroots |
|
93 | 1 r1/.hg/store/phaseroots | |
94 | 1 r1/.hg/store/undo |
|
94 | 1 r1/.hg/store/undo | |
95 | 1 r1/.hg/store/undo.backup.fncache |
|
95 | 1 r1/.hg/store/undo.backup.fncache | |
96 | 1 r1/.hg/store/undo.backupfiles |
|
96 | 1 r1/.hg/store/undo.backupfiles | |
97 | 1 r1/.hg/store/undo.phaseroots |
|
97 | 1 r1/.hg/store/undo.phaseroots | |
98 |
|
98 | |||
99 | $ nlinksdir r2/.hg/store |
|
99 | $ nlinksdir r2/.hg/store | |
100 | 2 r2/.hg/store/00changelog.i |
|
100 | 2 r2/.hg/store/00changelog.i | |
101 | 2 r2/.hg/store/00manifest.i |
|
101 | 2 r2/.hg/store/00manifest.i | |
102 | 2 r2/.hg/store/data/d1/f2.i |
|
102 | 2 r2/.hg/store/data/d1/f2.i | |
103 | 2 r2/.hg/store/data/f1.i |
|
103 | 2 r2/.hg/store/data/f1.i | |
104 | 2 r2/.hg/store/fncache |
|
104 | 2 r2/.hg/store/fncache | |
105 |
|
105 | |||
106 | Repo r3 should not be hardlinked: |
|
106 | Repo r3 should not be hardlinked: | |
107 |
|
107 | |||
108 | $ nlinksdir r3/.hg/store |
|
108 | $ nlinksdir r3/.hg/store | |
109 | 1 r3/.hg/store/00changelog.i |
|
109 | 1 r3/.hg/store/00changelog.i | |
110 | 1 r3/.hg/store/00manifest.i |
|
110 | 1 r3/.hg/store/00manifest.i | |
111 | 1 r3/.hg/store/data/d1/f2.i |
|
111 | 1 r3/.hg/store/data/d1/f2.i | |
112 | 1 r3/.hg/store/data/f1.i |
|
112 | 1 r3/.hg/store/data/f1.i | |
113 | 1 r3/.hg/store/fncache |
|
113 | 1 r3/.hg/store/fncache | |
114 | 1 r3/.hg/store/phaseroots |
|
114 | 1 r3/.hg/store/phaseroots | |
115 | 1 r3/.hg/store/undo |
|
115 | 1 r3/.hg/store/undo | |
116 | 1 r3/.hg/store/undo.backupfiles |
|
116 | 1 r3/.hg/store/undo.backupfiles | |
117 | 1 r3/.hg/store/undo.phaseroots |
|
117 | 1 r3/.hg/store/undo.phaseroots | |
118 |
|
118 | |||
119 |
|
119 | |||
120 | Create a non-inlined filelog in r3: |
|
120 | Create a non-inlined filelog in r3: | |
121 |
|
121 | |||
122 | $ cd r3/d1 |
|
122 | $ cd r3/d1 | |
123 | >>> f = open('data1', 'wb') |
|
123 | >>> f = open('data1', 'wb') | |
124 | >>> for x in range(10000): |
|
124 | >>> for x in range(10000): | |
125 | ... f.write("%s\n" % str(x)) |
|
125 | ... f.write("%s\n" % str(x)) | |
126 | >>> f.close() |
|
126 | >>> f.close() | |
127 | $ for j in 0 1 2 3 4 5 6 7 8 9; do |
|
127 | $ for j in 0 1 2 3 4 5 6 7 8 9; do | |
128 | > cat data1 >> f2 |
|
128 | > cat data1 >> f2 | |
129 | > hg commit -m$j |
|
129 | > hg commit -m$j | |
130 | > done |
|
130 | > done | |
131 | $ cd ../.. |
|
131 | $ cd ../.. | |
132 |
|
132 | |||
133 | $ nlinksdir r3/.hg/store |
|
133 | $ nlinksdir r3/.hg/store | |
134 | 1 r3/.hg/store/00changelog.i |
|
134 | 1 r3/.hg/store/00changelog.i | |
135 | 1 r3/.hg/store/00manifest.i |
|
135 | 1 r3/.hg/store/00manifest.i | |
136 | 1 r3/.hg/store/data/d1/f2.d |
|
136 | 1 r3/.hg/store/data/d1/f2.d | |
137 | 1 r3/.hg/store/data/d1/f2.i |
|
137 | 1 r3/.hg/store/data/d1/f2.i | |
138 | 1 r3/.hg/store/data/f1.i |
|
138 | 1 r3/.hg/store/data/f1.i | |
139 | 1 r3/.hg/store/fncache |
|
139 | 1 r3/.hg/store/fncache | |
140 | 1 r3/.hg/store/phaseroots |
|
140 | 1 r3/.hg/store/phaseroots | |
141 | 1 r3/.hg/store/undo |
|
141 | 1 r3/.hg/store/undo | |
142 | 1 r3/.hg/store/undo.backup.fncache |
|
142 | 1 r3/.hg/store/undo.backup.fncache | |
143 | 1 r3/.hg/store/undo.backup.phaseroots |
|
143 | 1 r3/.hg/store/undo.backup.phaseroots | |
144 | 1 r3/.hg/store/undo.backupfiles |
|
144 | 1 r3/.hg/store/undo.backupfiles | |
145 | 1 r3/.hg/store/undo.phaseroots |
|
145 | 1 r3/.hg/store/undo.phaseroots | |
146 |
|
146 | |||
147 | Push to repo r1 should break up most hardlinks in r2: |
|
147 | Push to repo r1 should break up most hardlinks in r2: | |
148 |
|
148 | |||
149 | $ hg -R r2 verify |
|
149 | $ hg -R r2 verify | |
150 | checking changesets |
|
150 | checking changesets | |
151 | checking manifests |
|
151 | checking manifests | |
152 | crosschecking files in changesets and manifests |
|
152 | crosschecking files in changesets and manifests | |
153 | checking files |
|
153 | checking files | |
154 | 2 files, 2 changesets, 2 total revisions |
|
154 | 2 files, 2 changesets, 2 total revisions | |
155 |
|
155 | |||
156 | $ cd r3 |
|
156 | $ cd r3 | |
157 | $ hg push |
|
157 | $ hg push | |
158 | pushing to $TESTTMP/r1 |
|
158 | pushing to $TESTTMP/r1 | |
159 | searching for changes |
|
159 | searching for changes | |
160 | adding changesets |
|
160 | adding changesets | |
161 | adding manifests |
|
161 | adding manifests | |
162 | adding file changes |
|
162 | adding file changes | |
163 | added 10 changesets with 10 changes to 1 files |
|
163 | added 10 changesets with 10 changes to 1 files | |
164 |
|
164 | |||
165 | $ cd .. |
|
165 | $ cd .. | |
166 |
|
166 | |||
167 | $ nlinksdir r2/.hg/store |
|
167 | $ nlinksdir r2/.hg/store | |
168 | 1 r2/.hg/store/00changelog.i |
|
168 | 1 r2/.hg/store/00changelog.i | |
169 | 1 r2/.hg/store/00manifest.i |
|
169 | 1 r2/.hg/store/00manifest.i | |
170 | 1 r2/.hg/store/data/d1/f2.i |
|
170 | 1 r2/.hg/store/data/d1/f2.i | |
171 | 2 r2/.hg/store/data/f1.i |
|
171 | 2 r2/.hg/store/data/f1.i | |
172 | [12] r2/\.hg/store/fncache (re) |
|
172 | [12] r2/\.hg/store/fncache (re) | |
173 |
|
173 | |||
174 | #if hardlink-whitelisted |
|
174 | #if hardlink-whitelisted | |
175 | $ nlinksdir r2/.hg/store/fncache |
|
175 | $ nlinksdir r2/.hg/store/fncache | |
176 | 2 r2/.hg/store/fncache |
|
176 | 2 r2/.hg/store/fncache | |
177 | #endif |
|
177 | #endif | |
178 |
|
178 | |||
179 | $ hg -R r2 verify |
|
179 | $ hg -R r2 verify | |
180 | checking changesets |
|
180 | checking changesets | |
181 | checking manifests |
|
181 | checking manifests | |
182 | crosschecking files in changesets and manifests |
|
182 | crosschecking files in changesets and manifests | |
183 | checking files |
|
183 | checking files | |
184 | 2 files, 2 changesets, 2 total revisions |
|
184 | 2 files, 2 changesets, 2 total revisions | |
185 |
|
185 | |||
186 |
|
186 | |||
187 | $ cd r1 |
|
187 | $ cd r1 | |
188 | $ hg up |
|
188 | $ hg up | |
189 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
189 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
190 |
|
190 | |||
191 | Committing a change to f1 in r1 must break up hardlink f1.i in r2: |
|
191 | Committing a change to f1 in r1 must break up hardlink f1.i in r2: | |
192 |
|
192 | |||
193 | $ echo c1c1 >> f1 |
|
193 | $ echo c1c1 >> f1 | |
194 | $ hg ci -m00 |
|
194 | $ hg ci -m00 | |
195 | $ cd .. |
|
195 | $ cd .. | |
196 |
|
196 | |||
197 | $ nlinksdir r2/.hg/store |
|
197 | $ nlinksdir r2/.hg/store | |
198 | 1 r2/.hg/store/00changelog.i |
|
198 | 1 r2/.hg/store/00changelog.i | |
199 | 1 r2/.hg/store/00manifest.i |
|
199 | 1 r2/.hg/store/00manifest.i | |
200 | 1 r2/.hg/store/data/d1/f2.i |
|
200 | 1 r2/.hg/store/data/d1/f2.i | |
201 | 1 r2/.hg/store/data/f1.i |
|
201 | 1 r2/.hg/store/data/f1.i | |
202 | [12] r2/\.hg/store/fncache (re) |
|
202 | [12] r2/\.hg/store/fncache (re) | |
203 |
|
203 | |||
204 | #if hardlink-whitelisted |
|
204 | #if hardlink-whitelisted | |
205 | $ nlinksdir r2/.hg/store/fncache |
|
205 | $ nlinksdir r2/.hg/store/fncache | |
206 | 2 r2/.hg/store/fncache |
|
206 | 2 r2/.hg/store/fncache | |
207 | #endif |
|
207 | #endif | |
208 |
|
208 | |||
209 | Create a file which exec permissions we will change |
|
209 | Create a file which exec permissions we will change | |
210 | $ cd r3 |
|
210 | $ cd r3 | |
211 | $ echo "echo hello world" > f3 |
|
211 | $ echo "echo hello world" > f3 | |
212 | $ hg add f3 |
|
212 | $ hg add f3 | |
213 | $ hg ci -mf3 |
|
213 | $ hg ci -mf3 | |
214 | $ cd .. |
|
214 | $ cd .. | |
215 |
|
215 | |||
216 | $ cd r3 |
|
216 | $ cd r3 | |
217 | $ hg tip --template '{rev}:{node|short}\n' |
|
217 | $ hg tip --template '{rev}:{node|short}\n' | |
218 | 12:d3b77733a28a |
|
218 | 12:d3b77733a28a | |
219 | $ echo bla > f1 |
|
219 | $ echo bla > f1 | |
220 | $ chmod +x f3 |
|
220 | $ chmod +x f3 | |
221 | $ hg ci -m1 |
|
221 | $ hg ci -m1 | |
222 | $ cd .. |
|
222 | $ cd .. | |
223 |
|
223 | |||
224 | Create hardlinked copy r4 of r3 (on Linux, we would call 'cp -al'): |
|
224 | Create hardlinked copy r4 of r3 (on Linux, we would call 'cp -al'): | |
225 |
|
225 | |||
226 | $ linkcp r3 r4 |
|
226 | $ linkcp r3 r4 | |
227 |
|
227 | |||
228 | 'checklink' is produced by hardlinking a symlink, which is undefined whether |
|
228 | 'checklink' is produced by hardlinking a symlink, which is undefined whether | |
229 | the symlink should be followed or not. It does behave differently on Linux and |
|
229 | the symlink should be followed or not. It does behave differently on Linux and | |
230 | BSD. Just remove it so the test pass on both platforms. |
|
230 | BSD. Just remove it so the test pass on both platforms. | |
231 |
|
231 | |||
232 | $ rm -f r4/.hg/cache/checklink |
|
232 | $ rm -f r4/.hg/cache/checklink | |
233 |
|
233 | |||
234 | r4 has hardlinks in the working dir (not just inside .hg): |
|
234 | r4 has hardlinks in the working dir (not just inside .hg): | |
235 |
|
235 | |||
236 | $ nlinksdir r4 |
|
236 | $ nlinksdir r4 | |
237 | 2 r4/.hg/00changelog.i |
|
237 | 2 r4/.hg/00changelog.i | |
238 | 2 r4/.hg/branch |
|
238 | 2 r4/.hg/branch | |
239 | 2 r4/.hg/cache/branch2-base |
|
239 | 2 r4/.hg/cache/branch2-base | |
240 | 2 r4/.hg/cache/branch2-served |
|
240 | 2 r4/.hg/cache/branch2-served | |
241 | 2 r4/.hg/cache/checkisexec (execbit !) |
|
241 | 2 r4/.hg/cache/checkisexec (execbit !) | |
242 | ? r4/.hg/cache/checklink-target (glob) (symlink !) |
|
242 | ? r4/.hg/cache/checklink-target (glob) (symlink !) | |
243 | 2 r4/.hg/cache/checknoexec (execbit !) |
|
243 | 2 r4/.hg/cache/checknoexec (execbit !) | |
244 | 2 r4/.hg/cache/rbc-names-v1 |
|
244 | 2 r4/.hg/cache/rbc-names-v1 | |
245 | 2 r4/.hg/cache/rbc-revs-v1 |
|
245 | 2 r4/.hg/cache/rbc-revs-v1 | |
246 | 2 r4/.hg/dirstate |
|
246 | 2 r4/.hg/dirstate | |
247 | 2 r4/.hg/fsmonitor.state (fsmonitor !) |
|
247 | 2 r4/.hg/fsmonitor.state (fsmonitor !) | |
248 | 2 r4/.hg/hgrc |
|
248 | 2 r4/.hg/hgrc | |
249 | 2 r4/.hg/last-message.txt |
|
249 | 2 r4/.hg/last-message.txt | |
250 | 2 r4/.hg/requires |
|
250 | 2 r4/.hg/requires | |
251 | 2 r4/.hg/store/00changelog.i |
|
251 | 2 r4/.hg/store/00changelog.i | |
252 | 2 r4/.hg/store/00manifest.i |
|
252 | 2 r4/.hg/store/00manifest.i | |
253 | 2 r4/.hg/store/data/d1/f2.d |
|
253 | 2 r4/.hg/store/data/d1/f2.d | |
254 | 2 r4/.hg/store/data/d1/f2.i |
|
254 | 2 r4/.hg/store/data/d1/f2.i | |
255 | 2 r4/.hg/store/data/f1.i |
|
255 | 2 r4/.hg/store/data/f1.i | |
256 | 2 r4/.hg/store/data/f3.i |
|
256 | 2 r4/.hg/store/data/f3.i | |
257 | 2 r4/.hg/store/fncache |
|
257 | 2 r4/.hg/store/fncache | |
258 | 2 r4/.hg/store/phaseroots |
|
258 | 2 r4/.hg/store/phaseroots | |
259 | 2 r4/.hg/store/undo |
|
259 | 2 r4/.hg/store/undo | |
260 | 2 r4/.hg/store/undo.backup.fncache |
|
260 | 2 r4/.hg/store/undo.backup.fncache | |
261 | 2 r4/.hg/store/undo.backup.phaseroots |
|
261 | 2 r4/.hg/store/undo.backup.phaseroots | |
262 | 2 r4/.hg/store/undo.backupfiles |
|
262 | 2 r4/.hg/store/undo.backupfiles | |
263 | 2 r4/.hg/store/undo.phaseroots |
|
263 | 2 r4/.hg/store/undo.phaseroots | |
264 | [24] r4/\.hg/undo\.backup\.dirstate (re) |
|
264 | [24] r4/\.hg/undo\.backup\.dirstate (re) | |
265 | 2 r4/.hg/undo.bookmarks |
|
265 | 2 r4/.hg/undo.bookmarks | |
266 | 2 r4/.hg/undo.branch |
|
266 | 2 r4/.hg/undo.branch | |
267 | 2 r4/.hg/undo.desc |
|
267 | 2 r4/.hg/undo.desc | |
268 | [24] r4/\.hg/undo\.dirstate (re) |
|
268 | [24] r4/\.hg/undo\.dirstate (re) | |
269 | 2 r4/d1/data1 |
|
269 | 2 r4/d1/data1 | |
270 | 2 r4/d1/f2 |
|
270 | 2 r4/d1/f2 | |
271 | 2 r4/f1 |
|
271 | 2 r4/f1 | |
272 | 2 r4/f3 |
|
272 | 2 r4/f3 | |
273 |
|
273 | |||
274 | Update back to revision 12 in r4 should break hardlink of file f1 and f3: |
|
274 | Update back to revision 12 in r4 should break hardlink of file f1 and f3: | |
275 | #if hardlink-whitelisted |
|
275 | #if hardlink-whitelisted | |
276 | $ nlinksdir r4/.hg/undo.backup.dirstate r4/.hg/undo.dirstate |
|
276 | $ nlinksdir r4/.hg/undo.backup.dirstate r4/.hg/undo.dirstate | |
277 | 4 r4/.hg/undo.backup.dirstate |
|
277 | 4 r4/.hg/undo.backup.dirstate | |
278 | 4 r4/.hg/undo.dirstate |
|
278 | 4 r4/.hg/undo.dirstate | |
279 | #endif |
|
279 | #endif | |
280 |
|
280 | |||
281 |
|
281 | |||
282 | $ hg -R r4 up 12 |
|
282 | $ hg -R r4 up 12 | |
283 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (execbit !) |
|
283 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (execbit !) | |
284 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-execbit !) |
|
284 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-execbit !) | |
285 |
|
285 | |||
286 | $ nlinksdir r4 |
|
286 | $ nlinksdir r4 | |
287 | 2 r4/.hg/00changelog.i |
|
287 | 2 r4/.hg/00changelog.i | |
288 | 1 r4/.hg/branch |
|
288 | 1 r4/.hg/branch | |
289 | 2 r4/.hg/cache/branch2-base |
|
289 | 2 r4/.hg/cache/branch2-base | |
290 | 2 r4/.hg/cache/branch2-served |
|
290 | 2 r4/.hg/cache/branch2-served | |
291 | 2 r4/.hg/cache/checkisexec (execbit !) |
|
291 | 2 r4/.hg/cache/checkisexec (execbit !) | |
292 | 2 r4/.hg/cache/checklink-target (symlink !) |
|
292 | 2 r4/.hg/cache/checklink-target (symlink !) | |
293 | 2 r4/.hg/cache/checknoexec (execbit !) |
|
293 | 2 r4/.hg/cache/checknoexec (execbit !) | |
294 | 2 r4/.hg/cache/rbc-names-v1 |
|
294 | 2 r4/.hg/cache/rbc-names-v1 | |
295 | 2 r4/.hg/cache/rbc-revs-v1 |
|
295 | 2 r4/.hg/cache/rbc-revs-v1 | |
296 | 1 r4/.hg/dirstate |
|
296 | 1 r4/.hg/dirstate | |
297 | 1 r4/.hg/fsmonitor.state (fsmonitor !) |
|
297 | 1 r4/.hg/fsmonitor.state (fsmonitor !) | |
298 | 2 r4/.hg/hgrc |
|
298 | 2 r4/.hg/hgrc | |
299 | 2 r4/.hg/last-message.txt |
|
299 | 2 r4/.hg/last-message.txt | |
300 | 2 r4/.hg/requires |
|
300 | 2 r4/.hg/requires | |
301 | 2 r4/.hg/store/00changelog.i |
|
301 | 2 r4/.hg/store/00changelog.i | |
302 | 2 r4/.hg/store/00manifest.i |
|
302 | 2 r4/.hg/store/00manifest.i | |
303 | 2 r4/.hg/store/data/d1/f2.d |
|
303 | 2 r4/.hg/store/data/d1/f2.d | |
304 | 2 r4/.hg/store/data/d1/f2.i |
|
304 | 2 r4/.hg/store/data/d1/f2.i | |
305 | 2 r4/.hg/store/data/f1.i |
|
305 | 2 r4/.hg/store/data/f1.i | |
306 | 2 r4/.hg/store/data/f3.i |
|
306 | 2 r4/.hg/store/data/f3.i | |
307 | 2 r4/.hg/store/fncache |
|
307 | 2 r4/.hg/store/fncache | |
308 | 2 r4/.hg/store/phaseroots |
|
308 | 2 r4/.hg/store/phaseroots | |
309 | 2 r4/.hg/store/undo |
|
309 | 2 r4/.hg/store/undo | |
310 | 2 r4/.hg/store/undo.backup.fncache |
|
310 | 2 r4/.hg/store/undo.backup.fncache | |
311 | 2 r4/.hg/store/undo.backup.phaseroots |
|
311 | 2 r4/.hg/store/undo.backup.phaseroots | |
312 | 2 r4/.hg/store/undo.backupfiles |
|
312 | 2 r4/.hg/store/undo.backupfiles | |
313 | 2 r4/.hg/store/undo.phaseroots |
|
313 | 2 r4/.hg/store/undo.phaseroots | |
314 | [24] r4/\.hg/undo\.backup\.dirstate (re) |
|
314 | [24] r4/\.hg/undo\.backup\.dirstate (re) | |
315 | 2 r4/.hg/undo.bookmarks |
|
315 | 2 r4/.hg/undo.bookmarks | |
316 | 2 r4/.hg/undo.branch |
|
316 | 2 r4/.hg/undo.branch | |
317 | 2 r4/.hg/undo.desc |
|
317 | 2 r4/.hg/undo.desc | |
318 | [24] r4/\.hg/undo\.dirstate (re) |
|
318 | [24] r4/\.hg/undo\.dirstate (re) | |
319 | 2 r4/d1/data1 |
|
319 | 2 r4/d1/data1 | |
320 | 2 r4/d1/f2 |
|
320 | 2 r4/d1/f2 | |
321 | 1 r4/f1 |
|
321 | 1 r4/f1 | |
322 | 1 r4/f3 (execbit !) |
|
322 | 1 r4/f3 (execbit !) | |
323 | 2 r4/f3 (no-execbit !) |
|
323 | 2 r4/f3 (no-execbit !) | |
324 |
|
324 | |||
325 | #if hardlink-whitelisted |
|
325 | #if hardlink-whitelisted | |
326 | $ nlinksdir r4/.hg/undo.backup.dirstate r4/.hg/undo.dirstate |
|
326 | $ nlinksdir r4/.hg/undo.backup.dirstate r4/.hg/undo.dirstate | |
327 | 4 r4/.hg/undo.backup.dirstate |
|
327 | 4 r4/.hg/undo.backup.dirstate | |
328 | 4 r4/.hg/undo.dirstate |
|
328 | 4 r4/.hg/undo.dirstate | |
329 | #endif |
|
329 | #endif | |
330 |
|
330 | |||
331 | Test hardlinking outside hg: |
|
331 | Test hardlinking outside hg: | |
332 |
|
332 | |||
333 | $ mkdir x |
|
333 | $ mkdir x | |
334 | $ echo foo > x/a |
|
334 | $ echo foo > x/a | |
335 |
|
335 | |||
336 | $ linkcp x y |
|
336 | $ linkcp x y | |
337 | $ echo bar >> y/a |
|
337 | $ echo bar >> y/a | |
338 |
|
338 | |||
339 | No diff if hardlink: |
|
339 | No diff if hardlink: | |
340 |
|
340 | |||
341 | $ diff x/a y/a |
|
341 | $ diff x/a y/a | |
342 |
|
342 | |||
343 | Test mq hardlinking: |
|
343 | Test mq hardlinking: | |
344 |
|
344 | |||
345 | $ echo "[extensions]" >> $HGRCPATH |
|
345 | $ echo "[extensions]" >> $HGRCPATH | |
346 | $ echo "mq=" >> $HGRCPATH |
|
346 | $ echo "mq=" >> $HGRCPATH | |
347 |
|
347 | |||
348 | $ hg init a |
|
348 | $ hg init a | |
349 | $ cd a |
|
349 | $ cd a | |
350 |
|
350 | |||
351 | $ hg qimport -n foo - << EOF |
|
351 | $ hg qimport -n foo - << EOF | |
352 | > # HG changeset patch |
|
352 | > # HG changeset patch | |
353 | > # Date 1 0 |
|
353 | > # Date 1 0 | |
354 | > diff -r 2588a8b53d66 a |
|
354 | > diff -r 2588a8b53d66 a | |
355 | > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
355 | > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
356 | > +++ b/a Wed Jul 23 15:54:29 2008 +0200 |
|
356 | > +++ b/a Wed Jul 23 15:54:29 2008 +0200 | |
357 | > @@ -0,0 +1,1 @@ |
|
357 | > @@ -0,0 +1,1 @@ | |
358 | > +a |
|
358 | > +a | |
359 | > EOF |
|
359 | > EOF | |
360 | adding foo to series file |
|
360 | adding foo to series file | |
361 |
|
361 | |||
362 | $ hg qpush |
|
362 | $ hg qpush | |
363 | applying foo |
|
363 | applying foo | |
364 | now at: foo |
|
364 | now at: foo | |
365 |
|
365 | |||
366 | $ cd .. |
|
366 | $ cd .. | |
367 | $ linkcp a b |
|
367 | $ linkcp a b | |
368 | $ cd b |
|
368 | $ cd b | |
369 |
|
369 | |||
370 | $ hg qimport -n bar - << EOF |
|
370 | $ hg qimport -n bar - << EOF | |
371 | > # HG changeset patch |
|
371 | > # HG changeset patch | |
372 | > # Date 2 0 |
|
372 | > # Date 2 0 | |
373 | > diff -r 2588a8b53d66 a |
|
373 | > diff -r 2588a8b53d66 a | |
374 | > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
374 | > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
375 | > +++ b/b Wed Jul 23 15:54:29 2008 +0200 |
|
375 | > +++ b/b Wed Jul 23 15:54:29 2008 +0200 | |
376 | > @@ -0,0 +1,1 @@ |
|
376 | > @@ -0,0 +1,1 @@ | |
377 | > +b |
|
377 | > +b | |
378 | > EOF |
|
378 | > EOF | |
379 | adding bar to series file |
|
379 | adding bar to series file | |
380 |
|
380 | |||
381 | $ hg qpush |
|
381 | $ hg qpush | |
382 | applying bar |
|
382 | applying bar | |
383 | now at: bar |
|
383 | now at: bar | |
384 |
|
384 | |||
385 | $ cat .hg/patches/status |
|
385 | $ cat .hg/patches/status | |
386 | 430ed4828a74fa4047bc816a25500f7472ab4bfe:foo |
|
386 | 430ed4828a74fa4047bc816a25500f7472ab4bfe:foo | |
387 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c:bar |
|
387 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c:bar | |
388 |
|
388 | |||
389 | $ cat .hg/patches/series |
|
389 | $ cat .hg/patches/series | |
390 | foo |
|
390 | foo | |
391 | bar |
|
391 | bar | |
392 |
|
392 | |||
393 | $ cat ../a/.hg/patches/status |
|
393 | $ cat ../a/.hg/patches/status | |
394 | 430ed4828a74fa4047bc816a25500f7472ab4bfe:foo |
|
394 | 430ed4828a74fa4047bc816a25500f7472ab4bfe:foo | |
395 |
|
395 | |||
396 | $ cat ../a/.hg/patches/series |
|
396 | $ cat ../a/.hg/patches/series | |
397 | foo |
|
397 | foo | |
398 |
|
398 | |||
399 | Test tags hardlinking: |
|
399 | Test tags hardlinking: | |
400 |
|
400 | |||
401 | $ hg qdel -r qbase:qtip |
|
401 | $ hg qdel -r qbase:qtip | |
402 | patch foo finalized without changeset message |
|
402 | patch foo finalized without changeset message | |
403 | patch bar finalized without changeset message |
|
403 | patch bar finalized without changeset message | |
404 |
|
404 | |||
405 | $ hg tag -l lfoo |
|
405 | $ hg tag -l lfoo | |
406 | $ hg tag foo |
|
406 | $ hg tag foo | |
407 |
|
407 | |||
408 | $ cd .. |
|
408 | $ cd .. | |
409 | $ linkcp b c |
|
409 | $ linkcp b c | |
410 | $ cd c |
|
410 | $ cd c | |
411 |
|
411 | |||
412 | $ hg tag -l -r 0 lbar |
|
412 | $ hg tag -l -r 0 lbar | |
413 | $ hg tag -r 0 bar |
|
413 | $ hg tag -r 0 bar | |
414 |
|
414 | |||
415 | $ cat .hgtags |
|
415 | $ cat .hgtags | |
416 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c foo |
|
416 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c foo | |
417 | 430ed4828a74fa4047bc816a25500f7472ab4bfe bar |
|
417 | 430ed4828a74fa4047bc816a25500f7472ab4bfe bar | |
418 |
|
418 | |||
419 | $ cat .hg/localtags |
|
419 | $ cat .hg/localtags | |
420 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c lfoo |
|
420 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c lfoo | |
421 | 430ed4828a74fa4047bc816a25500f7472ab4bfe lbar |
|
421 | 430ed4828a74fa4047bc816a25500f7472ab4bfe lbar | |
422 |
|
422 | |||
423 | $ cat ../b/.hgtags |
|
423 | $ cat ../b/.hgtags | |
424 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c foo |
|
424 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c foo | |
425 |
|
425 | |||
426 | $ cat ../b/.hg/localtags |
|
426 | $ cat ../b/.hg/localtags | |
427 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c lfoo |
|
427 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c lfoo | |
428 |
|
428 | |||
429 | $ cd .. |
|
429 | $ cd .. |
@@ -1,125 +1,126 | |||||
1 | #require serve |
|
1 | #require serve | |
2 |
|
2 | |||
3 | $ hg init a |
|
3 | $ hg init a | |
4 | $ cd a |
|
4 | $ cd a | |
5 | $ echo a > a |
|
5 | $ echo a > a | |
6 | $ hg ci -Ama -d '1123456789 0' |
|
6 | $ hg ci -Ama -d '1123456789 0' | |
7 | adding a |
|
7 | adding a | |
8 | $ hg serve --config server.uncompressed=True -p $HGPORT -d --pid-file=hg.pid |
|
8 | $ hg serve --config server.uncompressed=True -p $HGPORT -d --pid-file=hg.pid | |
9 | $ cat hg.pid >> $DAEMON_PIDS |
|
9 | $ cat hg.pid >> $DAEMON_PIDS | |
10 | $ cd .. |
|
10 | $ cd .. | |
11 | $ tinyproxy.py $HGPORT1 localhost 2>proxy.log >/dev/null </dev/null & |
|
11 | $ tinyproxy.py $HGPORT1 localhost 2>proxy.log >/dev/null </dev/null & | |
12 | $ while [ ! -f proxy.pid ]; do sleep 0; done |
|
12 | $ while [ ! -f proxy.pid ]; do sleep 0; done | |
13 | $ cat proxy.pid >> $DAEMON_PIDS |
|
13 | $ cat proxy.pid >> $DAEMON_PIDS | |
14 |
|
14 | |||
15 | url for proxy, stream |
|
15 | url for proxy, stream | |
16 |
|
16 | |||
17 | $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone --stream http://localhost:$HGPORT/ b |
|
17 | $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone --stream http://localhost:$HGPORT/ b | |
18 | streaming all changes |
|
18 | streaming all changes | |
19 | 3 files to transfer, 303 bytes of data |
|
19 | 3 files to transfer, 303 bytes of data (reporevlogstore !) | |
|
20 | 4 files to transfer, 330 bytes of data (reposimplestore !) | |||
20 | transferred * bytes in * seconds (*/sec) (glob) |
|
21 | transferred * bytes in * seconds (*/sec) (glob) | |
21 | searching for changes |
|
22 | searching for changes | |
22 | no changes found |
|
23 | no changes found | |
23 | updating to branch default |
|
24 | updating to branch default | |
24 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
25 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
25 | $ cd b |
|
26 | $ cd b | |
26 | $ hg verify |
|
27 | $ hg verify | |
27 | checking changesets |
|
28 | checking changesets | |
28 | checking manifests |
|
29 | checking manifests | |
29 | crosschecking files in changesets and manifests |
|
30 | crosschecking files in changesets and manifests | |
30 | checking files |
|
31 | checking files | |
31 | 1 files, 1 changesets, 1 total revisions |
|
32 | 1 files, 1 changesets, 1 total revisions | |
32 | $ cd .. |
|
33 | $ cd .. | |
33 |
|
34 | |||
34 | url for proxy, pull |
|
35 | url for proxy, pull | |
35 |
|
36 | |||
36 | $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone http://localhost:$HGPORT/ b-pull |
|
37 | $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone http://localhost:$HGPORT/ b-pull | |
37 | requesting all changes |
|
38 | requesting all changes | |
38 | adding changesets |
|
39 | adding changesets | |
39 | adding manifests |
|
40 | adding manifests | |
40 | adding file changes |
|
41 | adding file changes | |
41 | added 1 changesets with 1 changes to 1 files |
|
42 | added 1 changesets with 1 changes to 1 files | |
42 | new changesets 83180e7845de |
|
43 | new changesets 83180e7845de | |
43 | updating to branch default |
|
44 | updating to branch default | |
44 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
45 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
45 | $ cd b-pull |
|
46 | $ cd b-pull | |
46 | $ hg verify |
|
47 | $ hg verify | |
47 | checking changesets |
|
48 | checking changesets | |
48 | checking manifests |
|
49 | checking manifests | |
49 | crosschecking files in changesets and manifests |
|
50 | crosschecking files in changesets and manifests | |
50 | checking files |
|
51 | checking files | |
51 | 1 files, 1 changesets, 1 total revisions |
|
52 | 1 files, 1 changesets, 1 total revisions | |
52 | $ cd .. |
|
53 | $ cd .. | |
53 |
|
54 | |||
54 | host:port for proxy |
|
55 | host:port for proxy | |
55 |
|
56 | |||
56 | $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ c |
|
57 | $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ c | |
57 | requesting all changes |
|
58 | requesting all changes | |
58 | adding changesets |
|
59 | adding changesets | |
59 | adding manifests |
|
60 | adding manifests | |
60 | adding file changes |
|
61 | adding file changes | |
61 | added 1 changesets with 1 changes to 1 files |
|
62 | added 1 changesets with 1 changes to 1 files | |
62 | new changesets 83180e7845de |
|
63 | new changesets 83180e7845de | |
63 | updating to branch default |
|
64 | updating to branch default | |
64 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
65 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
65 |
|
66 | |||
66 | proxy url with user name and password |
|
67 | proxy url with user name and password | |
67 |
|
68 | |||
68 | $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ d |
|
69 | $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ d | |
69 | requesting all changes |
|
70 | requesting all changes | |
70 | adding changesets |
|
71 | adding changesets | |
71 | adding manifests |
|
72 | adding manifests | |
72 | adding file changes |
|
73 | adding file changes | |
73 | added 1 changesets with 1 changes to 1 files |
|
74 | added 1 changesets with 1 changes to 1 files | |
74 | new changesets 83180e7845de |
|
75 | new changesets 83180e7845de | |
75 | updating to branch default |
|
76 | updating to branch default | |
76 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
77 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
77 |
|
78 | |||
78 | url with user name and password |
|
79 | url with user name and password | |
79 |
|
80 | |||
80 | $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://user:passwd@localhost:$HGPORT/ e |
|
81 | $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://user:passwd@localhost:$HGPORT/ e | |
81 | requesting all changes |
|
82 | requesting all changes | |
82 | adding changesets |
|
83 | adding changesets | |
83 | adding manifests |
|
84 | adding manifests | |
84 | adding file changes |
|
85 | adding file changes | |
85 | added 1 changesets with 1 changes to 1 files |
|
86 | added 1 changesets with 1 changes to 1 files | |
86 | new changesets 83180e7845de |
|
87 | new changesets 83180e7845de | |
87 | updating to branch default |
|
88 | updating to branch default | |
88 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
89 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
89 |
|
90 | |||
90 | bad host:port for proxy ("Protocol not supported" can happen on |
|
91 | bad host:port for proxy ("Protocol not supported" can happen on | |
91 | misconfigured hosts) |
|
92 | misconfigured hosts) | |
92 |
|
93 | |||
93 | $ http_proxy=localhost:$HGPORT2 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ f |
|
94 | $ http_proxy=localhost:$HGPORT2 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ f | |
94 | abort: error: (Connection refused|Protocol not supported|.* actively refused it|Cannot assign requested address) (re) |
|
95 | abort: error: (Connection refused|Protocol not supported|.* actively refused it|Cannot assign requested address) (re) | |
95 | [255] |
|
96 | [255] | |
96 |
|
97 | |||
97 | do not use the proxy if it is in the no list |
|
98 | do not use the proxy if it is in the no list | |
98 |
|
99 | |||
99 | $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.no=localhost http://localhost:$HGPORT/ g |
|
100 | $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.no=localhost http://localhost:$HGPORT/ g | |
100 | requesting all changes |
|
101 | requesting all changes | |
101 | adding changesets |
|
102 | adding changesets | |
102 | adding manifests |
|
103 | adding manifests | |
103 | adding file changes |
|
104 | adding file changes | |
104 | added 1 changesets with 1 changes to 1 files |
|
105 | added 1 changesets with 1 changes to 1 files | |
105 | new changesets 83180e7845de |
|
106 | new changesets 83180e7845de | |
106 | updating to branch default |
|
107 | updating to branch default | |
107 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
108 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
108 | $ cat proxy.log |
|
109 | $ cat proxy.log | |
109 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) |
|
110 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) | |
110 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=branchmap HTTP/1.1" - - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
111 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=branchmap HTTP/1.1" - - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
111 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=stream_out HTTP/1.1" - - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
112 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=stream_out HTTP/1.1" - - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
112 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D83180e7845de420a1bb46896fd5fe05294f8d629 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
113 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D83180e7845de420a1bb46896fd5fe05294f8d629 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
113 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=83180e7845de420a1bb46896fd5fe05294f8d629&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
114 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=83180e7845de420a1bb46896fd5fe05294f8d629&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
114 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) |
|
115 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) | |
115 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
116 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
116 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
117 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
117 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) |
|
118 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) | |
118 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
119 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
119 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
120 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
120 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) |
|
121 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) | |
121 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
122 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
122 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
123 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
123 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) |
|
124 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) | |
124 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
125 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
125 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
126 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
@@ -1,793 +1,793 | |||||
1 | $ hg init a |
|
1 | $ hg init a | |
2 | $ cd a |
|
2 | $ cd a | |
3 | $ echo foo > t1 |
|
3 | $ echo foo > t1 | |
4 | $ hg add t1 |
|
4 | $ hg add t1 | |
5 | $ hg commit -m "1" |
|
5 | $ hg commit -m "1" | |
6 |
|
6 | |||
7 | $ cd .. |
|
7 | $ cd .. | |
8 | $ hg clone a b |
|
8 | $ hg clone a b | |
9 | updating to branch default |
|
9 | updating to branch default | |
10 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
10 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
11 |
|
11 | |||
12 | $ cd a |
|
12 | $ cd a | |
13 | $ echo foo > t2 |
|
13 | $ echo foo > t2 | |
14 | $ hg add t2 |
|
14 | $ hg add t2 | |
15 | $ hg commit -m "2" |
|
15 | $ hg commit -m "2" | |
16 |
|
16 | |||
17 | $ cd ../b |
|
17 | $ cd ../b | |
18 | $ echo foo > t3 |
|
18 | $ echo foo > t3 | |
19 | $ hg add t3 |
|
19 | $ hg add t3 | |
20 | $ hg commit -m "3" |
|
20 | $ hg commit -m "3" | |
21 |
|
21 | |||
22 | Specifying a revset that evaluates to null will abort |
|
22 | Specifying a revset that evaluates to null will abort | |
23 |
|
23 | |||
24 | $ hg push -r '0 & 1' ../a |
|
24 | $ hg push -r '0 & 1' ../a | |
25 | pushing to ../a |
|
25 | pushing to ../a | |
26 | abort: specified revisions evaluate to an empty set |
|
26 | abort: specified revisions evaluate to an empty set | |
27 | (use different revision arguments) |
|
27 | (use different revision arguments) | |
28 | [255] |
|
28 | [255] | |
29 |
|
29 | |||
30 | $ hg push ../a |
|
30 | $ hg push ../a | |
31 | pushing to ../a |
|
31 | pushing to ../a | |
32 | searching for changes |
|
32 | searching for changes | |
33 | remote has heads on branch 'default' that are not known locally: 1c9246a22a0a |
|
33 | remote has heads on branch 'default' that are not known locally: 1c9246a22a0a | |
34 | abort: push creates new remote head 1e108cc5548c! |
|
34 | abort: push creates new remote head 1e108cc5548c! | |
35 | (pull and merge or see 'hg help push' for details about pushing new heads) |
|
35 | (pull and merge or see 'hg help push' for details about pushing new heads) | |
36 | [255] |
|
36 | [255] | |
37 |
|
37 | |||
38 | $ hg push --debug ../a |
|
38 | $ hg push --debug ../a | |
39 | pushing to ../a |
|
39 | pushing to ../a | |
40 | query 1; heads |
|
40 | query 1; heads | |
41 | searching for changes |
|
41 | searching for changes | |
42 | taking quick initial sample |
|
42 | taking quick initial sample | |
43 | query 2; still undecided: 1, sample size is: 1 |
|
43 | query 2; still undecided: 1, sample size is: 1 | |
44 | 2 total queries in *.????s (glob) |
|
44 | 2 total queries in *.????s (glob) | |
45 | listing keys for "phases" |
|
45 | listing keys for "phases" | |
46 | checking for updated bookmarks |
|
46 | checking for updated bookmarks | |
47 | listing keys for "bookmarks" |
|
47 | listing keys for "bookmarks" | |
48 | listing keys for "bookmarks" |
|
48 | listing keys for "bookmarks" | |
49 | remote has heads on branch 'default' that are not known locally: 1c9246a22a0a |
|
49 | remote has heads on branch 'default' that are not known locally: 1c9246a22a0a | |
50 | new remote heads on branch 'default': |
|
50 | new remote heads on branch 'default': | |
51 | 1e108cc5548c |
|
51 | 1e108cc5548c | |
52 | abort: push creates new remote head 1e108cc5548c! |
|
52 | abort: push creates new remote head 1e108cc5548c! | |
53 | (pull and merge or see 'hg help push' for details about pushing new heads) |
|
53 | (pull and merge or see 'hg help push' for details about pushing new heads) | |
54 | [255] |
|
54 | [255] | |
55 |
|
55 | |||
56 | $ hg pull ../a |
|
56 | $ hg pull ../a | |
57 | pulling from ../a |
|
57 | pulling from ../a | |
58 | searching for changes |
|
58 | searching for changes | |
59 | adding changesets |
|
59 | adding changesets | |
60 | adding manifests |
|
60 | adding manifests | |
61 | adding file changes |
|
61 | adding file changes | |
62 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
62 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
63 | new changesets 1c9246a22a0a |
|
63 | new changesets 1c9246a22a0a | |
64 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
64 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
65 |
|
65 | |||
66 | $ hg push ../a |
|
66 | $ hg push ../a | |
67 | pushing to ../a |
|
67 | pushing to ../a | |
68 | searching for changes |
|
68 | searching for changes | |
69 | abort: push creates new remote head 1e108cc5548c! |
|
69 | abort: push creates new remote head 1e108cc5548c! | |
70 | (merge or see 'hg help push' for details about pushing new heads) |
|
70 | (merge or see 'hg help push' for details about pushing new heads) | |
71 | [255] |
|
71 | [255] | |
72 |
|
72 | |||
73 | $ hg merge |
|
73 | $ hg merge | |
74 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
74 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
75 | (branch merge, don't forget to commit) |
|
75 | (branch merge, don't forget to commit) | |
76 |
|
76 | |||
77 | $ hg commit -m "4" |
|
77 | $ hg commit -m "4" | |
78 | $ hg push ../a |
|
78 | $ hg push ../a | |
79 | pushing to ../a |
|
79 | pushing to ../a | |
80 | searching for changes |
|
80 | searching for changes | |
81 | adding changesets |
|
81 | adding changesets | |
82 | adding manifests |
|
82 | adding manifests | |
83 | adding file changes |
|
83 | adding file changes | |
84 | added 2 changesets with 1 changes to 1 files |
|
84 | added 2 changesets with 1 changes to 1 files | |
85 |
|
85 | |||
86 | $ cd .. |
|
86 | $ cd .. | |
87 |
|
87 | |||
88 | $ hg init c |
|
88 | $ hg init c | |
89 | $ cd c |
|
89 | $ cd c | |
90 | $ for i in 0 1 2; do |
|
90 | $ for i in 0 1 2; do | |
91 | > echo $i >> foo |
|
91 | > echo $i >> foo | |
92 | > hg ci -Am $i |
|
92 | > hg ci -Am $i | |
93 | > done |
|
93 | > done | |
94 | adding foo |
|
94 | adding foo | |
95 | $ cd .. |
|
95 | $ cd .. | |
96 |
|
96 | |||
97 | $ hg clone c d |
|
97 | $ hg clone c d | |
98 | updating to branch default |
|
98 | updating to branch default | |
99 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
99 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
100 |
|
100 | |||
101 | $ cd d |
|
101 | $ cd d | |
102 | $ for i in 0 1; do |
|
102 | $ for i in 0 1; do | |
103 | > hg co -C $i |
|
103 | > hg co -C $i | |
104 | > echo d-$i >> foo |
|
104 | > echo d-$i >> foo | |
105 | > hg ci -m d-$i |
|
105 | > hg ci -m d-$i | |
106 | > done |
|
106 | > done | |
107 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
107 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
108 | created new head |
|
108 | created new head | |
109 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
109 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
110 | created new head |
|
110 | created new head | |
111 |
|
111 | |||
112 | $ HGMERGE=true hg merge 3 |
|
112 | $ HGMERGE=true hg merge 3 | |
113 | merging foo |
|
113 | merging foo | |
114 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
114 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
115 | (branch merge, don't forget to commit) |
|
115 | (branch merge, don't forget to commit) | |
116 |
|
116 | |||
117 | $ hg ci -m c-d |
|
117 | $ hg ci -m c-d | |
118 |
|
118 | |||
119 | $ hg push ../c |
|
119 | $ hg push ../c | |
120 | pushing to ../c |
|
120 | pushing to ../c | |
121 | searching for changes |
|
121 | searching for changes | |
122 | abort: push creates new remote head 6346d66eb9f5! |
|
122 | abort: push creates new remote head 6346d66eb9f5! | |
123 | (merge or see 'hg help push' for details about pushing new heads) |
|
123 | (merge or see 'hg help push' for details about pushing new heads) | |
124 | [255] |
|
124 | [255] | |
125 |
|
125 | |||
126 | $ hg push -r 2 ../c |
|
126 | $ hg push -r 2 ../c | |
127 | pushing to ../c |
|
127 | pushing to ../c | |
128 | searching for changes |
|
128 | searching for changes | |
129 | no changes found |
|
129 | no changes found | |
130 | [1] |
|
130 | [1] | |
131 |
|
131 | |||
132 | $ hg push -r 3 ../c |
|
132 | $ hg push -r 3 ../c | |
133 | pushing to ../c |
|
133 | pushing to ../c | |
134 | searching for changes |
|
134 | searching for changes | |
135 | abort: push creates new remote head a5dda829a167! |
|
135 | abort: push creates new remote head a5dda829a167! | |
136 | (merge or see 'hg help push' for details about pushing new heads) |
|
136 | (merge or see 'hg help push' for details about pushing new heads) | |
137 | [255] |
|
137 | [255] | |
138 |
|
138 | |||
139 | $ hg push -v -r 3 -r 4 ../c |
|
139 | $ hg push -v -r 3 -r 4 ../c | |
140 | pushing to ../c |
|
140 | pushing to ../c | |
141 | searching for changes |
|
141 | searching for changes | |
142 | new remote heads on branch 'default': |
|
142 | new remote heads on branch 'default': | |
143 | a5dda829a167 |
|
143 | a5dda829a167 | |
144 | ee8fbc7a0295 |
|
144 | ee8fbc7a0295 | |
145 | abort: push creates new remote head a5dda829a167! |
|
145 | abort: push creates new remote head a5dda829a167! | |
146 | (merge or see 'hg help push' for details about pushing new heads) |
|
146 | (merge or see 'hg help push' for details about pushing new heads) | |
147 | [255] |
|
147 | [255] | |
148 |
|
148 | |||
149 | $ hg push -v -f -r 3 -r 4 ../c |
|
149 | $ hg push -v -f -r 3 -r 4 ../c | |
150 | pushing to ../c |
|
150 | pushing to ../c | |
151 | searching for changes |
|
151 | searching for changes | |
152 | 2 changesets found |
|
152 | 2 changesets found | |
153 | uncompressed size of bundle content: |
|
153 | uncompressed size of bundle content: | |
154 | 352 (changelog) |
|
154 | 352 (changelog) | |
155 | 326 (manifests) |
|
155 | 326 (manifests) | |
156 |
25 |
|
156 | 25\d foo (re) | |
157 | adding changesets |
|
157 | adding changesets | |
158 | adding manifests |
|
158 | adding manifests | |
159 | adding file changes |
|
159 | adding file changes | |
160 | added 2 changesets with 2 changes to 1 files (+2 heads) |
|
160 | added 2 changesets with 2 changes to 1 files (+2 heads) | |
161 |
|
161 | |||
162 | $ hg push -r 5 ../c |
|
162 | $ hg push -r 5 ../c | |
163 | pushing to ../c |
|
163 | pushing to ../c | |
164 | searching for changes |
|
164 | searching for changes | |
165 | adding changesets |
|
165 | adding changesets | |
166 | adding manifests |
|
166 | adding manifests | |
167 | adding file changes |
|
167 | adding file changes | |
168 | added 1 changesets with 1 changes to 1 files (-1 heads) |
|
168 | added 1 changesets with 1 changes to 1 files (-1 heads) | |
169 |
|
169 | |||
170 | $ hg in ../c |
|
170 | $ hg in ../c | |
171 | comparing with ../c |
|
171 | comparing with ../c | |
172 | searching for changes |
|
172 | searching for changes | |
173 | no changes found |
|
173 | no changes found | |
174 | [1] |
|
174 | [1] | |
175 |
|
175 | |||
176 |
|
176 | |||
177 | Issue450: push -r warns about remote head creation even if no heads |
|
177 | Issue450: push -r warns about remote head creation even if no heads | |
178 | will be created |
|
178 | will be created | |
179 |
|
179 | |||
180 | $ hg init ../e |
|
180 | $ hg init ../e | |
181 | $ hg push -r 0 ../e |
|
181 | $ hg push -r 0 ../e | |
182 | pushing to ../e |
|
182 | pushing to ../e | |
183 | searching for changes |
|
183 | searching for changes | |
184 | adding changesets |
|
184 | adding changesets | |
185 | adding manifests |
|
185 | adding manifests | |
186 | adding file changes |
|
186 | adding file changes | |
187 | added 1 changesets with 1 changes to 1 files |
|
187 | added 1 changesets with 1 changes to 1 files | |
188 |
|
188 | |||
189 | $ hg push -r 1 ../e |
|
189 | $ hg push -r 1 ../e | |
190 | pushing to ../e |
|
190 | pushing to ../e | |
191 | searching for changes |
|
191 | searching for changes | |
192 | adding changesets |
|
192 | adding changesets | |
193 | adding manifests |
|
193 | adding manifests | |
194 | adding file changes |
|
194 | adding file changes | |
195 | added 1 changesets with 1 changes to 1 files |
|
195 | added 1 changesets with 1 changes to 1 files | |
196 |
|
196 | |||
197 | $ cd .. |
|
197 | $ cd .. | |
198 |
|
198 | |||
199 |
|
199 | |||
200 | Issue736: named branches are not considered for detection of |
|
200 | Issue736: named branches are not considered for detection of | |
201 | unmerged heads in "hg push" |
|
201 | unmerged heads in "hg push" | |
202 |
|
202 | |||
203 | $ hg init f |
|
203 | $ hg init f | |
204 | $ cd f |
|
204 | $ cd f | |
205 | $ hg -q branch a |
|
205 | $ hg -q branch a | |
206 | $ echo 0 > foo |
|
206 | $ echo 0 > foo | |
207 | $ hg -q ci -Am 0 |
|
207 | $ hg -q ci -Am 0 | |
208 | $ echo 1 > foo |
|
208 | $ echo 1 > foo | |
209 | $ hg -q ci -m 1 |
|
209 | $ hg -q ci -m 1 | |
210 | $ hg -q up 0 |
|
210 | $ hg -q up 0 | |
211 | $ echo 2 > foo |
|
211 | $ echo 2 > foo | |
212 | $ hg -q ci -m 2 |
|
212 | $ hg -q ci -m 2 | |
213 | $ hg -q up 0 |
|
213 | $ hg -q up 0 | |
214 | $ hg -q branch b |
|
214 | $ hg -q branch b | |
215 | $ echo 3 > foo |
|
215 | $ echo 3 > foo | |
216 | $ hg -q ci -m 3 |
|
216 | $ hg -q ci -m 3 | |
217 | $ cd .. |
|
217 | $ cd .. | |
218 |
|
218 | |||
219 | $ hg -q clone f g |
|
219 | $ hg -q clone f g | |
220 | $ cd g |
|
220 | $ cd g | |
221 |
|
221 | |||
222 | Push on existing branch and new branch: |
|
222 | Push on existing branch and new branch: | |
223 |
|
223 | |||
224 | $ hg -q up 1 |
|
224 | $ hg -q up 1 | |
225 | $ echo 4 > foo |
|
225 | $ echo 4 > foo | |
226 | $ hg -q ci -m 4 |
|
226 | $ hg -q ci -m 4 | |
227 | $ hg -q up 0 |
|
227 | $ hg -q up 0 | |
228 | $ echo 5 > foo |
|
228 | $ echo 5 > foo | |
229 | $ hg -q branch c |
|
229 | $ hg -q branch c | |
230 | $ hg -q ci -m 5 |
|
230 | $ hg -q ci -m 5 | |
231 |
|
231 | |||
232 | $ hg push ../f |
|
232 | $ hg push ../f | |
233 | pushing to ../f |
|
233 | pushing to ../f | |
234 | searching for changes |
|
234 | searching for changes | |
235 | abort: push creates new remote branches: c! |
|
235 | abort: push creates new remote branches: c! | |
236 | (use 'hg push --new-branch' to create new remote branches) |
|
236 | (use 'hg push --new-branch' to create new remote branches) | |
237 | [255] |
|
237 | [255] | |
238 |
|
238 | |||
239 | $ hg push -r 4 -r 5 ../f |
|
239 | $ hg push -r 4 -r 5 ../f | |
240 | pushing to ../f |
|
240 | pushing to ../f | |
241 | searching for changes |
|
241 | searching for changes | |
242 | abort: push creates new remote branches: c! |
|
242 | abort: push creates new remote branches: c! | |
243 | (use 'hg push --new-branch' to create new remote branches) |
|
243 | (use 'hg push --new-branch' to create new remote branches) | |
244 | [255] |
|
244 | [255] | |
245 |
|
245 | |||
246 |
|
246 | |||
247 | Multiple new branches: |
|
247 | Multiple new branches: | |
248 |
|
248 | |||
249 | $ hg -q branch d |
|
249 | $ hg -q branch d | |
250 | $ echo 6 > foo |
|
250 | $ echo 6 > foo | |
251 | $ hg -q ci -m 6 |
|
251 | $ hg -q ci -m 6 | |
252 |
|
252 | |||
253 | $ hg push ../f |
|
253 | $ hg push ../f | |
254 | pushing to ../f |
|
254 | pushing to ../f | |
255 | searching for changes |
|
255 | searching for changes | |
256 | abort: push creates new remote branches: c, d! |
|
256 | abort: push creates new remote branches: c, d! | |
257 | (use 'hg push --new-branch' to create new remote branches) |
|
257 | (use 'hg push --new-branch' to create new remote branches) | |
258 | [255] |
|
258 | [255] | |
259 |
|
259 | |||
260 | $ hg push -r 4 -r 6 ../f |
|
260 | $ hg push -r 4 -r 6 ../f | |
261 | pushing to ../f |
|
261 | pushing to ../f | |
262 | searching for changes |
|
262 | searching for changes | |
263 | abort: push creates new remote branches: c, d! |
|
263 | abort: push creates new remote branches: c, d! | |
264 | (use 'hg push --new-branch' to create new remote branches) |
|
264 | (use 'hg push --new-branch' to create new remote branches) | |
265 | [255] |
|
265 | [255] | |
266 |
|
266 | |||
267 | $ cd ../g |
|
267 | $ cd ../g | |
268 |
|
268 | |||
269 |
|
269 | |||
270 | Fail on multiple head push: |
|
270 | Fail on multiple head push: | |
271 |
|
271 | |||
272 | $ hg -q up 1 |
|
272 | $ hg -q up 1 | |
273 | $ echo 7 > foo |
|
273 | $ echo 7 > foo | |
274 | $ hg -q ci -m 7 |
|
274 | $ hg -q ci -m 7 | |
275 |
|
275 | |||
276 | $ hg push -r 4 -r 7 ../f |
|
276 | $ hg push -r 4 -r 7 ../f | |
277 | pushing to ../f |
|
277 | pushing to ../f | |
278 | searching for changes |
|
278 | searching for changes | |
279 | abort: push creates new remote head 0b715ef6ff8f on branch 'a'! |
|
279 | abort: push creates new remote head 0b715ef6ff8f on branch 'a'! | |
280 | (merge or see 'hg help push' for details about pushing new heads) |
|
280 | (merge or see 'hg help push' for details about pushing new heads) | |
281 | [255] |
|
281 | [255] | |
282 |
|
282 | |||
283 | Push replacement head on existing branches: |
|
283 | Push replacement head on existing branches: | |
284 |
|
284 | |||
285 | $ hg -q up 3 |
|
285 | $ hg -q up 3 | |
286 | $ echo 8 > foo |
|
286 | $ echo 8 > foo | |
287 | $ hg -q ci -m 8 |
|
287 | $ hg -q ci -m 8 | |
288 |
|
288 | |||
289 | $ hg push -r 7 -r 8 ../f |
|
289 | $ hg push -r 7 -r 8 ../f | |
290 | pushing to ../f |
|
290 | pushing to ../f | |
291 | searching for changes |
|
291 | searching for changes | |
292 | adding changesets |
|
292 | adding changesets | |
293 | adding manifests |
|
293 | adding manifests | |
294 | adding file changes |
|
294 | adding file changes | |
295 | added 2 changesets with 2 changes to 1 files |
|
295 | added 2 changesets with 2 changes to 1 files | |
296 |
|
296 | |||
297 |
|
297 | |||
298 | Merge of branch a to other branch b followed by unrelated push |
|
298 | Merge of branch a to other branch b followed by unrelated push | |
299 | on branch a: |
|
299 | on branch a: | |
300 |
|
300 | |||
301 | $ hg -q up 7 |
|
301 | $ hg -q up 7 | |
302 | $ HGMERGE=true hg -q merge 8 |
|
302 | $ HGMERGE=true hg -q merge 8 | |
303 | $ hg -q ci -m 9 |
|
303 | $ hg -q ci -m 9 | |
304 | $ hg -q up 8 |
|
304 | $ hg -q up 8 | |
305 | $ echo 10 > foo |
|
305 | $ echo 10 > foo | |
306 | $ hg -q ci -m 10 |
|
306 | $ hg -q ci -m 10 | |
307 |
|
307 | |||
308 | $ hg push -r 9 ../f |
|
308 | $ hg push -r 9 ../f | |
309 | pushing to ../f |
|
309 | pushing to ../f | |
310 | searching for changes |
|
310 | searching for changes | |
311 | adding changesets |
|
311 | adding changesets | |
312 | adding manifests |
|
312 | adding manifests | |
313 | adding file changes |
|
313 | adding file changes | |
314 | added 1 changesets with 1 changes to 1 files (-1 heads) |
|
314 | added 1 changesets with 1 changes to 1 files (-1 heads) | |
315 |
|
315 | |||
316 | $ hg push -r 10 ../f |
|
316 | $ hg push -r 10 ../f | |
317 | pushing to ../f |
|
317 | pushing to ../f | |
318 | searching for changes |
|
318 | searching for changes | |
319 | adding changesets |
|
319 | adding changesets | |
320 | adding manifests |
|
320 | adding manifests | |
321 | adding file changes |
|
321 | adding file changes | |
322 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
322 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
323 |
|
323 | |||
324 |
|
324 | |||
325 | Cheating the counting algorithm: |
|
325 | Cheating the counting algorithm: | |
326 |
|
326 | |||
327 | $ hg -q up 9 |
|
327 | $ hg -q up 9 | |
328 | $ HGMERGE=true hg -q merge 2 |
|
328 | $ HGMERGE=true hg -q merge 2 | |
329 | $ hg -q ci -m 11 |
|
329 | $ hg -q ci -m 11 | |
330 | $ hg -q up 1 |
|
330 | $ hg -q up 1 | |
331 | $ echo 12 > foo |
|
331 | $ echo 12 > foo | |
332 | $ hg -q ci -m 12 |
|
332 | $ hg -q ci -m 12 | |
333 |
|
333 | |||
334 | $ hg push -r 11 -r 12 ../f |
|
334 | $ hg push -r 11 -r 12 ../f | |
335 | pushing to ../f |
|
335 | pushing to ../f | |
336 | searching for changes |
|
336 | searching for changes | |
337 | adding changesets |
|
337 | adding changesets | |
338 | adding manifests |
|
338 | adding manifests | |
339 | adding file changes |
|
339 | adding file changes | |
340 | added 2 changesets with 2 changes to 1 files |
|
340 | added 2 changesets with 2 changes to 1 files | |
341 |
|
341 | |||
342 |
|
342 | |||
343 | Failed push of new named branch: |
|
343 | Failed push of new named branch: | |
344 |
|
344 | |||
345 | $ echo 12 > foo |
|
345 | $ echo 12 > foo | |
346 | $ hg -q ci -m 12a |
|
346 | $ hg -q ci -m 12a | |
347 | [1] |
|
347 | [1] | |
348 | $ hg -q up 11 |
|
348 | $ hg -q up 11 | |
349 | $ echo 13 > foo |
|
349 | $ echo 13 > foo | |
350 | $ hg -q branch e |
|
350 | $ hg -q branch e | |
351 | $ hg -q ci -m 13d |
|
351 | $ hg -q ci -m 13d | |
352 |
|
352 | |||
353 | $ hg push -r 12 -r 13 ../f |
|
353 | $ hg push -r 12 -r 13 ../f | |
354 | pushing to ../f |
|
354 | pushing to ../f | |
355 | searching for changes |
|
355 | searching for changes | |
356 | abort: push creates new remote branches: e! |
|
356 | abort: push creates new remote branches: e! | |
357 | (use 'hg push --new-branch' to create new remote branches) |
|
357 | (use 'hg push --new-branch' to create new remote branches) | |
358 | [255] |
|
358 | [255] | |
359 |
|
359 | |||
360 |
|
360 | |||
361 | Using --new-branch to push new named branch: |
|
361 | Using --new-branch to push new named branch: | |
362 |
|
362 | |||
363 | $ hg push --new-branch -r 12 -r 13 ../f |
|
363 | $ hg push --new-branch -r 12 -r 13 ../f | |
364 | pushing to ../f |
|
364 | pushing to ../f | |
365 | searching for changes |
|
365 | searching for changes | |
366 | adding changesets |
|
366 | adding changesets | |
367 | adding manifests |
|
367 | adding manifests | |
368 | adding file changes |
|
368 | adding file changes | |
369 | added 1 changesets with 1 changes to 1 files |
|
369 | added 1 changesets with 1 changes to 1 files | |
370 |
|
370 | |||
371 | Pushing multi headed new branch: |
|
371 | Pushing multi headed new branch: | |
372 |
|
372 | |||
373 | $ echo 14 > foo |
|
373 | $ echo 14 > foo | |
374 | $ hg -q branch f |
|
374 | $ hg -q branch f | |
375 | $ hg -q ci -m 14 |
|
375 | $ hg -q ci -m 14 | |
376 | $ echo 15 > foo |
|
376 | $ echo 15 > foo | |
377 | $ hg -q ci -m 15 |
|
377 | $ hg -q ci -m 15 | |
378 | $ hg -q up 14 |
|
378 | $ hg -q up 14 | |
379 | $ echo 16 > foo |
|
379 | $ echo 16 > foo | |
380 | $ hg -q ci -m 16 |
|
380 | $ hg -q ci -m 16 | |
381 | $ hg push --branch f --new-branch ../f |
|
381 | $ hg push --branch f --new-branch ../f | |
382 | pushing to ../f |
|
382 | pushing to ../f | |
383 | searching for changes |
|
383 | searching for changes | |
384 | abort: push creates new branch 'f' with multiple heads |
|
384 | abort: push creates new branch 'f' with multiple heads | |
385 | (merge or see 'hg help push' for details about pushing new heads) |
|
385 | (merge or see 'hg help push' for details about pushing new heads) | |
386 | [255] |
|
386 | [255] | |
387 | $ hg push --branch f --new-branch --force ../f |
|
387 | $ hg push --branch f --new-branch --force ../f | |
388 | pushing to ../f |
|
388 | pushing to ../f | |
389 | searching for changes |
|
389 | searching for changes | |
390 | adding changesets |
|
390 | adding changesets | |
391 | adding manifests |
|
391 | adding manifests | |
392 | adding file changes |
|
392 | adding file changes | |
393 | added 3 changesets with 3 changes to 1 files (+1 heads) |
|
393 | added 3 changesets with 3 changes to 1 files (+1 heads) | |
394 |
|
394 | |||
395 | Checking prepush logic does not allow silently pushing |
|
395 | Checking prepush logic does not allow silently pushing | |
396 | multiple new heads but also doesn't report too many heads: |
|
396 | multiple new heads but also doesn't report too many heads: | |
397 |
|
397 | |||
398 | $ cd .. |
|
398 | $ cd .. | |
399 | $ hg init h |
|
399 | $ hg init h | |
400 | $ echo init > h/init |
|
400 | $ echo init > h/init | |
401 | $ hg -R h ci -Am init |
|
401 | $ hg -R h ci -Am init | |
402 | adding init |
|
402 | adding init | |
403 | $ echo a > h/a |
|
403 | $ echo a > h/a | |
404 | $ hg -R h ci -Am a |
|
404 | $ hg -R h ci -Am a | |
405 | adding a |
|
405 | adding a | |
406 | $ hg clone h i |
|
406 | $ hg clone h i | |
407 | updating to branch default |
|
407 | updating to branch default | |
408 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
408 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
409 | $ hg -R h up 0 |
|
409 | $ hg -R h up 0 | |
410 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
410 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
411 | $ echo b > h/b |
|
411 | $ echo b > h/b | |
412 | $ hg -R h ci -Am b |
|
412 | $ hg -R h ci -Am b | |
413 | adding b |
|
413 | adding b | |
414 | created new head |
|
414 | created new head | |
415 | $ hg -R i up 0 |
|
415 | $ hg -R i up 0 | |
416 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
416 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
417 | $ echo c > i/c |
|
417 | $ echo c > i/c | |
418 | $ hg -R i ci -Am c |
|
418 | $ hg -R i ci -Am c | |
419 | adding c |
|
419 | adding c | |
420 | created new head |
|
420 | created new head | |
421 |
|
421 | |||
422 | $ for i in `$PYTHON $TESTDIR/seq.py 3`; do hg -R h up -q 0; echo $i > h/b; hg -R h ci -qAm$i; done |
|
422 | $ for i in `$PYTHON $TESTDIR/seq.py 3`; do hg -R h up -q 0; echo $i > h/b; hg -R h ci -qAm$i; done | |
423 |
|
423 | |||
424 | $ hg -R i push h |
|
424 | $ hg -R i push h | |
425 | pushing to h |
|
425 | pushing to h | |
426 | searching for changes |
|
426 | searching for changes | |
427 | remote has heads on branch 'default' that are not known locally: 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847 |
|
427 | remote has heads on branch 'default' that are not known locally: 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847 | |
428 | abort: push creates new remote head 97bd0c84d346! |
|
428 | abort: push creates new remote head 97bd0c84d346! | |
429 | (pull and merge or see 'hg help push' for details about pushing new heads) |
|
429 | (pull and merge or see 'hg help push' for details about pushing new heads) | |
430 | [255] |
|
430 | [255] | |
431 | $ hg -R h up -q 0; echo x > h/b; hg -R h ci -qAmx |
|
431 | $ hg -R h up -q 0; echo x > h/b; hg -R h ci -qAmx | |
432 | $ hg -R i push h |
|
432 | $ hg -R i push h | |
433 | pushing to h |
|
433 | pushing to h | |
434 | searching for changes |
|
434 | searching for changes | |
435 | remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 and 1 others |
|
435 | remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 and 1 others | |
436 | abort: push creates new remote head 97bd0c84d346! |
|
436 | abort: push creates new remote head 97bd0c84d346! | |
437 | (pull and merge or see 'hg help push' for details about pushing new heads) |
|
437 | (pull and merge or see 'hg help push' for details about pushing new heads) | |
438 | [255] |
|
438 | [255] | |
439 | $ hg -R i push h -v |
|
439 | $ hg -R i push h -v | |
440 | pushing to h |
|
440 | pushing to h | |
441 | searching for changes |
|
441 | searching for changes | |
442 | remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847 |
|
442 | remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847 | |
443 | new remote heads on branch 'default': |
|
443 | new remote heads on branch 'default': | |
444 | 97bd0c84d346 |
|
444 | 97bd0c84d346 | |
445 | abort: push creates new remote head 97bd0c84d346! |
|
445 | abort: push creates new remote head 97bd0c84d346! | |
446 | (pull and merge or see 'hg help push' for details about pushing new heads) |
|
446 | (pull and merge or see 'hg help push' for details about pushing new heads) | |
447 | [255] |
|
447 | [255] | |
448 |
|
448 | |||
449 |
|
449 | |||
450 | Check prepush logic with merged branches: |
|
450 | Check prepush logic with merged branches: | |
451 |
|
451 | |||
452 | $ hg init j |
|
452 | $ hg init j | |
453 | $ hg -R j branch a |
|
453 | $ hg -R j branch a | |
454 | marked working directory as branch a |
|
454 | marked working directory as branch a | |
455 | (branches are permanent and global, did you want a bookmark?) |
|
455 | (branches are permanent and global, did you want a bookmark?) | |
456 | $ echo init > j/foo |
|
456 | $ echo init > j/foo | |
457 | $ hg -R j ci -Am init |
|
457 | $ hg -R j ci -Am init | |
458 | adding foo |
|
458 | adding foo | |
459 | $ hg clone j k |
|
459 | $ hg clone j k | |
460 | updating to branch a |
|
460 | updating to branch a | |
461 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
461 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
462 | $ echo a1 > j/foo |
|
462 | $ echo a1 > j/foo | |
463 | $ hg -R j ci -m a1 |
|
463 | $ hg -R j ci -m a1 | |
464 | $ hg -R k branch b |
|
464 | $ hg -R k branch b | |
465 | marked working directory as branch b |
|
465 | marked working directory as branch b | |
466 | $ echo b > k/foo |
|
466 | $ echo b > k/foo | |
467 | $ hg -R k ci -m b |
|
467 | $ hg -R k ci -m b | |
468 | $ hg -R k up 0 |
|
468 | $ hg -R k up 0 | |
469 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
469 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
470 |
|
470 | |||
471 | $ hg -R k merge b |
|
471 | $ hg -R k merge b | |
472 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
472 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
473 | (branch merge, don't forget to commit) |
|
473 | (branch merge, don't forget to commit) | |
474 |
|
474 | |||
475 | $ hg -R k ci -m merge |
|
475 | $ hg -R k ci -m merge | |
476 |
|
476 | |||
477 | $ hg -R k push -r a j |
|
477 | $ hg -R k push -r a j | |
478 | pushing to j |
|
478 | pushing to j | |
479 | searching for changes |
|
479 | searching for changes | |
480 | abort: push creates new remote branches: b! |
|
480 | abort: push creates new remote branches: b! | |
481 | (use 'hg push --new-branch' to create new remote branches) |
|
481 | (use 'hg push --new-branch' to create new remote branches) | |
482 | [255] |
|
482 | [255] | |
483 |
|
483 | |||
484 |
|
484 | |||
485 | Prepush -r should not allow you to sneak in new heads: |
|
485 | Prepush -r should not allow you to sneak in new heads: | |
486 |
|
486 | |||
487 | $ hg init l |
|
487 | $ hg init l | |
488 | $ cd l |
|
488 | $ cd l | |
489 | $ echo a >> foo |
|
489 | $ echo a >> foo | |
490 | $ hg -q add foo |
|
490 | $ hg -q add foo | |
491 | $ hg -q branch a |
|
491 | $ hg -q branch a | |
492 | $ hg -q ci -ma |
|
492 | $ hg -q ci -ma | |
493 | $ hg -q up null |
|
493 | $ hg -q up null | |
494 | $ echo a >> foo |
|
494 | $ echo a >> foo | |
495 | $ hg -q add foo |
|
495 | $ hg -q add foo | |
496 | $ hg -q branch b |
|
496 | $ hg -q branch b | |
497 | $ hg -q ci -mb |
|
497 | $ hg -q ci -mb | |
498 | $ cd .. |
|
498 | $ cd .. | |
499 | $ hg -q clone l m -u a |
|
499 | $ hg -q clone l m -u a | |
500 | $ cd m |
|
500 | $ cd m | |
501 | $ hg -q merge b |
|
501 | $ hg -q merge b | |
502 | $ hg -q ci -mmb |
|
502 | $ hg -q ci -mmb | |
503 | $ hg -q up 0 |
|
503 | $ hg -q up 0 | |
504 | $ echo a >> foo |
|
504 | $ echo a >> foo | |
505 | $ hg -q ci -ma2 |
|
505 | $ hg -q ci -ma2 | |
506 | $ hg -q up 2 |
|
506 | $ hg -q up 2 | |
507 | $ echo a >> foo |
|
507 | $ echo a >> foo | |
508 | $ hg -q branch -f b |
|
508 | $ hg -q branch -f b | |
509 | $ hg -q ci -mb2 |
|
509 | $ hg -q ci -mb2 | |
510 | $ hg -q merge 3 |
|
510 | $ hg -q merge 3 | |
511 | $ hg -q ci -mma |
|
511 | $ hg -q ci -mma | |
512 |
|
512 | |||
513 | $ hg push ../l -b b |
|
513 | $ hg push ../l -b b | |
514 | pushing to ../l |
|
514 | pushing to ../l | |
515 | searching for changes |
|
515 | searching for changes | |
516 | abort: push creates new remote head 451211cc22b0 on branch 'a'! |
|
516 | abort: push creates new remote head 451211cc22b0 on branch 'a'! | |
517 | (merge or see 'hg help push' for details about pushing new heads) |
|
517 | (merge or see 'hg help push' for details about pushing new heads) | |
518 | [255] |
|
518 | [255] | |
519 |
|
519 | |||
520 | $ cd .. |
|
520 | $ cd .. | |
521 |
|
521 | |||
522 |
|
522 | |||
523 | Check prepush with new branch head on former topo non-head: |
|
523 | Check prepush with new branch head on former topo non-head: | |
524 |
|
524 | |||
525 | $ hg init n |
|
525 | $ hg init n | |
526 | $ cd n |
|
526 | $ cd n | |
527 | $ hg branch A |
|
527 | $ hg branch A | |
528 | marked working directory as branch A |
|
528 | marked working directory as branch A | |
529 | (branches are permanent and global, did you want a bookmark?) |
|
529 | (branches are permanent and global, did you want a bookmark?) | |
530 | $ echo a >a |
|
530 | $ echo a >a | |
531 | $ hg ci -Ama |
|
531 | $ hg ci -Ama | |
532 | adding a |
|
532 | adding a | |
533 | $ hg branch B |
|
533 | $ hg branch B | |
534 | marked working directory as branch B |
|
534 | marked working directory as branch B | |
535 | $ echo b >b |
|
535 | $ echo b >b | |
536 | $ hg ci -Amb |
|
536 | $ hg ci -Amb | |
537 | adding b |
|
537 | adding b | |
538 |
|
538 | |||
539 | b is now branch head of B, and a topological head |
|
539 | b is now branch head of B, and a topological head | |
540 | a is now branch head of A, but not a topological head |
|
540 | a is now branch head of A, but not a topological head | |
541 |
|
541 | |||
542 | $ hg clone . inner |
|
542 | $ hg clone . inner | |
543 | updating to branch B |
|
543 | updating to branch B | |
544 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
544 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
545 | $ cd inner |
|
545 | $ cd inner | |
546 | $ hg up B |
|
546 | $ hg up B | |
547 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
547 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
548 | $ echo b1 >b1 |
|
548 | $ echo b1 >b1 | |
549 | $ hg ci -Amb1 |
|
549 | $ hg ci -Amb1 | |
550 | adding b1 |
|
550 | adding b1 | |
551 |
|
551 | |||
552 | in the clone b1 is now the head of B |
|
552 | in the clone b1 is now the head of B | |
553 |
|
553 | |||
554 | $ cd .. |
|
554 | $ cd .. | |
555 | $ hg up 0 |
|
555 | $ hg up 0 | |
556 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
556 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
557 | $ echo a2 >a2 |
|
557 | $ echo a2 >a2 | |
558 | $ hg ci -Ama2 |
|
558 | $ hg ci -Ama2 | |
559 | adding a2 |
|
559 | adding a2 | |
560 |
|
560 | |||
561 | a2 is now the new branch head of A, and a new topological head |
|
561 | a2 is now the new branch head of A, and a new topological head | |
562 | it replaces a former inner branch head, so it should at most warn about |
|
562 | it replaces a former inner branch head, so it should at most warn about | |
563 | A, not B |
|
563 | A, not B | |
564 |
|
564 | |||
565 | glog of local: |
|
565 | glog of local: | |
566 |
|
566 | |||
567 | $ hg log -G --template "{rev}: {branches} {desc}\n" |
|
567 | $ hg log -G --template "{rev}: {branches} {desc}\n" | |
568 | @ 2: A a2 |
|
568 | @ 2: A a2 | |
569 | | |
|
569 | | | |
570 | | o 1: B b |
|
570 | | o 1: B b | |
571 | |/ |
|
571 | |/ | |
572 | o 0: A a |
|
572 | o 0: A a | |
573 |
|
573 | |||
574 | glog of remote: |
|
574 | glog of remote: | |
575 |
|
575 | |||
576 | $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" |
|
576 | $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" | |
577 | @ 2: B b1 |
|
577 | @ 2: B b1 | |
578 | | |
|
578 | | | |
579 | o 1: B b |
|
579 | o 1: B b | |
580 | | |
|
580 | | | |
581 | o 0: A a |
|
581 | o 0: A a | |
582 |
|
582 | |||
583 | outgoing: |
|
583 | outgoing: | |
584 |
|
584 | |||
585 | $ hg out inner --template "{rev}: {branches} {desc}\n" |
|
585 | $ hg out inner --template "{rev}: {branches} {desc}\n" | |
586 | comparing with inner |
|
586 | comparing with inner | |
587 | searching for changes |
|
587 | searching for changes | |
588 | 2: A a2 |
|
588 | 2: A a2 | |
589 |
|
589 | |||
590 | $ hg push inner |
|
590 | $ hg push inner | |
591 | pushing to inner |
|
591 | pushing to inner | |
592 | searching for changes |
|
592 | searching for changes | |
593 | adding changesets |
|
593 | adding changesets | |
594 | adding manifests |
|
594 | adding manifests | |
595 | adding file changes |
|
595 | adding file changes | |
596 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
596 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
597 |
|
597 | |||
598 | $ cd .. |
|
598 | $ cd .. | |
599 |
|
599 | |||
600 |
|
600 | |||
601 | Check prepush with new branch head on former topo head: |
|
601 | Check prepush with new branch head on former topo head: | |
602 |
|
602 | |||
603 | $ hg init o |
|
603 | $ hg init o | |
604 | $ cd o |
|
604 | $ cd o | |
605 | $ hg branch A |
|
605 | $ hg branch A | |
606 | marked working directory as branch A |
|
606 | marked working directory as branch A | |
607 | (branches are permanent and global, did you want a bookmark?) |
|
607 | (branches are permanent and global, did you want a bookmark?) | |
608 | $ echo a >a |
|
608 | $ echo a >a | |
609 | $ hg ci -Ama |
|
609 | $ hg ci -Ama | |
610 | adding a |
|
610 | adding a | |
611 | $ hg branch B |
|
611 | $ hg branch B | |
612 | marked working directory as branch B |
|
612 | marked working directory as branch B | |
613 | $ echo b >b |
|
613 | $ echo b >b | |
614 | $ hg ci -Amb |
|
614 | $ hg ci -Amb | |
615 | adding b |
|
615 | adding b | |
616 |
|
616 | |||
617 | b is now branch head of B, and a topological head |
|
617 | b is now branch head of B, and a topological head | |
618 |
|
618 | |||
619 | $ hg up 0 |
|
619 | $ hg up 0 | |
620 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
620 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
621 | $ echo a1 >a1 |
|
621 | $ echo a1 >a1 | |
622 | $ hg ci -Ama1 |
|
622 | $ hg ci -Ama1 | |
623 | adding a1 |
|
623 | adding a1 | |
624 |
|
624 | |||
625 | a1 is now branch head of A, and a topological head |
|
625 | a1 is now branch head of A, and a topological head | |
626 |
|
626 | |||
627 | $ hg clone . inner |
|
627 | $ hg clone . inner | |
628 | updating to branch A |
|
628 | updating to branch A | |
629 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
629 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
630 | $ cd inner |
|
630 | $ cd inner | |
631 | $ hg up B |
|
631 | $ hg up B | |
632 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
632 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
633 | $ echo b1 >b1 |
|
633 | $ echo b1 >b1 | |
634 | $ hg ci -Amb1 |
|
634 | $ hg ci -Amb1 | |
635 | adding b1 |
|
635 | adding b1 | |
636 |
|
636 | |||
637 | in the clone b1 is now the head of B |
|
637 | in the clone b1 is now the head of B | |
638 |
|
638 | |||
639 | $ cd .. |
|
639 | $ cd .. | |
640 | $ echo a2 >a2 |
|
640 | $ echo a2 >a2 | |
641 | $ hg ci -Ama2 |
|
641 | $ hg ci -Ama2 | |
642 | adding a2 |
|
642 | adding a2 | |
643 |
|
643 | |||
644 | a2 is now the new branch head of A, and a topological head |
|
644 | a2 is now the new branch head of A, and a topological head | |
645 | it replaces a former topological and branch head, so this should not warn |
|
645 | it replaces a former topological and branch head, so this should not warn | |
646 |
|
646 | |||
647 | glog of local: |
|
647 | glog of local: | |
648 |
|
648 | |||
649 | $ hg log -G --template "{rev}: {branches} {desc}\n" |
|
649 | $ hg log -G --template "{rev}: {branches} {desc}\n" | |
650 | @ 3: A a2 |
|
650 | @ 3: A a2 | |
651 | | |
|
651 | | | |
652 | o 2: A a1 |
|
652 | o 2: A a1 | |
653 | | |
|
653 | | | |
654 | | o 1: B b |
|
654 | | o 1: B b | |
655 | |/ |
|
655 | |/ | |
656 | o 0: A a |
|
656 | o 0: A a | |
657 |
|
657 | |||
658 | glog of remote: |
|
658 | glog of remote: | |
659 |
|
659 | |||
660 | $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" |
|
660 | $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" | |
661 | @ 3: B b1 |
|
661 | @ 3: B b1 | |
662 | | |
|
662 | | | |
663 | | o 2: A a1 |
|
663 | | o 2: A a1 | |
664 | | | |
|
664 | | | | |
665 | o | 1: B b |
|
665 | o | 1: B b | |
666 | |/ |
|
666 | |/ | |
667 | o 0: A a |
|
667 | o 0: A a | |
668 |
|
668 | |||
669 | outgoing: |
|
669 | outgoing: | |
670 |
|
670 | |||
671 | $ hg out inner --template "{rev}: {branches} {desc}\n" |
|
671 | $ hg out inner --template "{rev}: {branches} {desc}\n" | |
672 | comparing with inner |
|
672 | comparing with inner | |
673 | searching for changes |
|
673 | searching for changes | |
674 | 3: A a2 |
|
674 | 3: A a2 | |
675 |
|
675 | |||
676 | $ hg push inner |
|
676 | $ hg push inner | |
677 | pushing to inner |
|
677 | pushing to inner | |
678 | searching for changes |
|
678 | searching for changes | |
679 | adding changesets |
|
679 | adding changesets | |
680 | adding manifests |
|
680 | adding manifests | |
681 | adding file changes |
|
681 | adding file changes | |
682 | added 1 changesets with 1 changes to 1 files |
|
682 | added 1 changesets with 1 changes to 1 files | |
683 |
|
683 | |||
684 | $ cd .. |
|
684 | $ cd .. | |
685 |
|
685 | |||
686 |
|
686 | |||
687 | Check prepush with new branch head and new child of former branch head |
|
687 | Check prepush with new branch head and new child of former branch head | |
688 | but child is on different branch: |
|
688 | but child is on different branch: | |
689 |
|
689 | |||
690 | $ hg init p |
|
690 | $ hg init p | |
691 | $ cd p |
|
691 | $ cd p | |
692 | $ hg branch A |
|
692 | $ hg branch A | |
693 | marked working directory as branch A |
|
693 | marked working directory as branch A | |
694 | (branches are permanent and global, did you want a bookmark?) |
|
694 | (branches are permanent and global, did you want a bookmark?) | |
695 | $ echo a0 >a |
|
695 | $ echo a0 >a | |
696 | $ hg ci -Ama0 |
|
696 | $ hg ci -Ama0 | |
697 | adding a |
|
697 | adding a | |
698 | $ echo a1 >a |
|
698 | $ echo a1 >a | |
699 | $ hg ci -ma1 |
|
699 | $ hg ci -ma1 | |
700 | $ hg up null |
|
700 | $ hg up null | |
701 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
701 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
702 | $ hg branch B |
|
702 | $ hg branch B | |
703 | marked working directory as branch B |
|
703 | marked working directory as branch B | |
704 | $ echo b0 >b |
|
704 | $ echo b0 >b | |
705 | $ hg ci -Amb0 |
|
705 | $ hg ci -Amb0 | |
706 | adding b |
|
706 | adding b | |
707 | $ echo b1 >b |
|
707 | $ echo b1 >b | |
708 | $ hg ci -mb1 |
|
708 | $ hg ci -mb1 | |
709 |
|
709 | |||
710 | $ hg clone . inner |
|
710 | $ hg clone . inner | |
711 | updating to branch B |
|
711 | updating to branch B | |
712 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
712 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
713 |
|
713 | |||
714 | $ hg up A |
|
714 | $ hg up A | |
715 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
715 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
716 | $ hg branch -f B |
|
716 | $ hg branch -f B | |
717 | marked working directory as branch B |
|
717 | marked working directory as branch B | |
718 | $ echo a3 >a |
|
718 | $ echo a3 >a | |
719 | $ hg ci -ma3 |
|
719 | $ hg ci -ma3 | |
720 | created new head |
|
720 | created new head | |
721 | $ hg up 3 |
|
721 | $ hg up 3 | |
722 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
722 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
723 | $ hg branch -f A |
|
723 | $ hg branch -f A | |
724 | marked working directory as branch A |
|
724 | marked working directory as branch A | |
725 | $ echo b3 >b |
|
725 | $ echo b3 >b | |
726 | $ hg ci -mb3 |
|
726 | $ hg ci -mb3 | |
727 | created new head |
|
727 | created new head | |
728 |
|
728 | |||
729 | glog of local: |
|
729 | glog of local: | |
730 |
|
730 | |||
731 | $ hg log -G --template "{rev}: {branches} {desc}\n" |
|
731 | $ hg log -G --template "{rev}: {branches} {desc}\n" | |
732 | @ 5: A b3 |
|
732 | @ 5: A b3 | |
733 | | |
|
733 | | | |
734 | | o 4: B a3 |
|
734 | | o 4: B a3 | |
735 | | | |
|
735 | | | | |
736 | o | 3: B b1 |
|
736 | o | 3: B b1 | |
737 | | | |
|
737 | | | | |
738 | o | 2: B b0 |
|
738 | o | 2: B b0 | |
739 | / |
|
739 | / | |
740 | o 1: A a1 |
|
740 | o 1: A a1 | |
741 | | |
|
741 | | | |
742 | o 0: A a0 |
|
742 | o 0: A a0 | |
743 |
|
743 | |||
744 | glog of remote: |
|
744 | glog of remote: | |
745 |
|
745 | |||
746 | $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" |
|
746 | $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" | |
747 | @ 3: B b1 |
|
747 | @ 3: B b1 | |
748 | | |
|
748 | | | |
749 | o 2: B b0 |
|
749 | o 2: B b0 | |
750 |
|
750 | |||
751 | o 1: A a1 |
|
751 | o 1: A a1 | |
752 | | |
|
752 | | | |
753 | o 0: A a0 |
|
753 | o 0: A a0 | |
754 |
|
754 | |||
755 | outgoing: |
|
755 | outgoing: | |
756 |
|
756 | |||
757 | $ hg out inner --template "{rev}: {branches} {desc}\n" |
|
757 | $ hg out inner --template "{rev}: {branches} {desc}\n" | |
758 | comparing with inner |
|
758 | comparing with inner | |
759 | searching for changes |
|
759 | searching for changes | |
760 | 4: B a3 |
|
760 | 4: B a3 | |
761 | 5: A b3 |
|
761 | 5: A b3 | |
762 |
|
762 | |||
763 | $ hg push inner |
|
763 | $ hg push inner | |
764 | pushing to inner |
|
764 | pushing to inner | |
765 | searching for changes |
|
765 | searching for changes | |
766 | abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'! |
|
766 | abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'! | |
767 | (merge or see 'hg help push' for details about pushing new heads) |
|
767 | (merge or see 'hg help push' for details about pushing new heads) | |
768 | [255] |
|
768 | [255] | |
769 |
|
769 | |||
770 | $ hg push inner -r4 -r5 |
|
770 | $ hg push inner -r4 -r5 | |
771 | pushing to inner |
|
771 | pushing to inner | |
772 | searching for changes |
|
772 | searching for changes | |
773 | abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'! |
|
773 | abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'! | |
774 | (merge or see 'hg help push' for details about pushing new heads) |
|
774 | (merge or see 'hg help push' for details about pushing new heads) | |
775 | [255] |
|
775 | [255] | |
776 |
|
776 | |||
777 | $ hg in inner |
|
777 | $ hg in inner | |
778 | comparing with inner |
|
778 | comparing with inner | |
779 | searching for changes |
|
779 | searching for changes | |
780 | no changes found |
|
780 | no changes found | |
781 | [1] |
|
781 | [1] | |
782 |
|
782 | |||
783 | Test fail hook |
|
783 | Test fail hook | |
784 |
|
784 | |||
785 | $ hg push inner --config hooks.fail-push="echo running fail-push hook" |
|
785 | $ hg push inner --config hooks.fail-push="echo running fail-push hook" | |
786 | pushing to inner |
|
786 | pushing to inner | |
787 | searching for changes |
|
787 | searching for changes | |
788 | running fail-push hook |
|
788 | running fail-push hook | |
789 | abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'! |
|
789 | abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'! | |
790 | (merge or see 'hg help push' for details about pushing new heads) |
|
790 | (merge or see 'hg help push' for details about pushing new heads) | |
791 | [255] |
|
791 | [255] | |
792 |
|
792 | |||
793 | $ cd .. |
|
793 | $ cd .. |
@@ -1,103 +1,106 | |||||
1 | #require hardlink |
|
1 | #require hardlink | |
2 |
|
2 | |||
3 | $ echo "[extensions]" >> $HGRCPATH |
|
3 | $ echo "[extensions]" >> $HGRCPATH | |
4 | $ echo "relink=" >> $HGRCPATH |
|
4 | $ echo "relink=" >> $HGRCPATH | |
5 |
|
5 | |||
6 | $ fix_path() { |
|
6 | $ fix_path() { | |
7 | > tr '\\' / |
|
7 | > tr '\\' / | |
8 | > } |
|
8 | > } | |
9 |
|
9 | |||
10 | $ cat > arelinked.py <<EOF |
|
10 | $ cat > arelinked.py <<EOF | |
11 | > from __future__ import absolute_import, print_function |
|
11 | > from __future__ import absolute_import, print_function | |
12 | > import os |
|
12 | > import os | |
13 | > import sys |
|
13 | > import sys | |
14 | > from mercurial import util |
|
14 | > from mercurial import util | |
15 | > path1, path2 = sys.argv[1:3] |
|
15 | > path1, path2 = sys.argv[1:3] | |
16 | > if util.samefile(path1, path2): |
|
16 | > if util.samefile(path1, path2): | |
17 | > print('%s == %s' % (path1, path2)) |
|
17 | > print('%s == %s' % (path1, path2)) | |
18 | > else: |
|
18 | > else: | |
19 | > print('%s != %s' % (path1, path2)) |
|
19 | > print('%s != %s' % (path1, path2)) | |
20 | > EOF |
|
20 | > EOF | |
21 |
|
21 | |||
22 |
|
22 | |||
23 | create source repository |
|
23 | create source repository | |
24 |
|
24 | |||
25 | $ hg init repo |
|
25 | $ hg init repo | |
26 | $ cd repo |
|
26 | $ cd repo | |
27 | $ echo a > a |
|
27 | $ echo a > a | |
28 | $ echo b > b |
|
28 | $ echo b > b | |
29 | $ hg ci -Am addfile |
|
29 | $ hg ci -Am addfile | |
30 | adding a |
|
30 | adding a | |
31 | adding b |
|
31 | adding b | |
32 | $ cat "$TESTDIR/binfile.bin" >> a |
|
32 | $ cat "$TESTDIR/binfile.bin" >> a | |
33 | $ cat "$TESTDIR/binfile.bin" >> b |
|
33 | $ cat "$TESTDIR/binfile.bin" >> b | |
34 | $ hg ci -Am changefiles |
|
34 | $ hg ci -Am changefiles | |
35 |
|
35 | |||
36 | make another commit to create files larger than 1 KB to test |
|
36 | make another commit to create files larger than 1 KB to test | |
37 | formatting of final byte count |
|
37 | formatting of final byte count | |
38 |
|
38 | |||
39 | $ cat "$TESTDIR/binfile.bin" >> a |
|
39 | $ cat "$TESTDIR/binfile.bin" >> a | |
40 | $ cat "$TESTDIR/binfile.bin" >> b |
|
40 | $ cat "$TESTDIR/binfile.bin" >> b | |
41 | $ hg ci -m anotherchange |
|
41 | $ hg ci -m anotherchange | |
42 |
|
42 | |||
43 | don't sit forever trying to double-lock the source repo |
|
43 | don't sit forever trying to double-lock the source repo | |
44 |
|
44 | |||
45 | $ hg relink . |
|
45 | $ hg relink . | |
46 | relinking $TESTTMP/repo/.hg/store to $TESTTMP/repo/.hg/store |
|
46 | relinking $TESTTMP/repo/.hg/store to $TESTTMP/repo/.hg/store | |
47 | there is nothing to relink |
|
47 | there is nothing to relink | |
48 |
|
48 | |||
49 |
|
49 | |||
50 | Test files are read in binary mode |
|
50 | Test files are read in binary mode | |
51 |
|
51 | |||
52 | $ $PYTHON -c "open('.hg/store/data/dummy.i', 'wb').write(b'a\r\nb\n')" |
|
52 | $ $PYTHON -c "open('.hg/store/data/dummy.i', 'wb').write(b'a\r\nb\n')" | |
53 | $ cd .. |
|
53 | $ cd .. | |
54 |
|
54 | |||
55 |
|
55 | |||
56 | clone and pull to break links |
|
56 | clone and pull to break links | |
57 |
|
57 | |||
58 | $ hg clone --pull -r0 repo clone |
|
58 | $ hg clone --pull -r0 repo clone | |
59 | adding changesets |
|
59 | adding changesets | |
60 | adding manifests |
|
60 | adding manifests | |
61 | adding file changes |
|
61 | adding file changes | |
62 | added 1 changesets with 2 changes to 2 files |
|
62 | added 1 changesets with 2 changes to 2 files | |
63 | new changesets 008c0c271c47 |
|
63 | new changesets 008c0c271c47 | |
64 | updating to branch default |
|
64 | updating to branch default | |
65 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
65 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
66 | $ cd clone |
|
66 | $ cd clone | |
67 | $ hg pull -q |
|
67 | $ hg pull -q | |
68 | $ echo b >> b |
|
68 | $ echo b >> b | |
69 | $ hg ci -m changeb |
|
69 | $ hg ci -m changeb | |
70 | created new head |
|
70 | created new head | |
71 | $ $PYTHON -c "open('.hg/store/data/dummy.i', 'wb').write(b'a\nb\r\n')" |
|
71 | $ $PYTHON -c "open('.hg/store/data/dummy.i', 'wb').write(b'a\nb\r\n')" | |
72 |
|
72 | |||
73 |
|
73 | |||
74 | relink |
|
74 | relink | |
75 |
|
75 | |||
|
76 | #if no-reposimplestore | |||
|
77 | ||||
76 | $ hg relink --debug --config progress.debug=true | fix_path |
|
78 | $ hg relink --debug --config progress.debug=true | fix_path | |
77 | relinking $TESTTMP/repo/.hg/store to $TESTTMP/clone/.hg/store |
|
79 | relinking $TESTTMP/repo/.hg/store to $TESTTMP/clone/.hg/store | |
78 | tip has 2 files, estimated total number of files: 3 |
|
80 | tip has 2 files, estimated total number of files: 3 | |
79 | collecting: 00changelog.i 1/3 files (33.33%) |
|
81 | collecting: 00changelog.i 1/3 files (33.33%) | |
80 | collecting: 00manifest.i 2/3 files (66.67%) |
|
82 | collecting: 00manifest.i 2/3 files (66.67%) | |
81 | collecting: a.i 3/3 files (100.00%) |
|
83 | collecting: a.i 3/3 files (100.00%) | |
82 | collecting: b.i 4/3 files (133.33%) |
|
84 | collecting: b.i 4/3 files (133.33%) | |
83 | collecting: dummy.i 5/3 files (166.67%) |
|
85 | collecting: dummy.i 5/3 files (166.67%) | |
84 | collected 5 candidate storage files |
|
86 | collected 5 candidate storage files | |
85 | not linkable: 00changelog.i |
|
87 | not linkable: 00changelog.i | |
86 | not linkable: 00manifest.i |
|
88 | not linkable: 00manifest.i | |
87 | pruning: data/a.i 3/5 files (60.00%) |
|
89 | pruning: data/a.i 3/5 files (60.00%) | |
88 | not linkable: data/b.i |
|
90 | not linkable: data/b.i | |
89 | pruning: data/dummy.i 5/5 files (100.00%) |
|
91 | pruning: data/dummy.i 5/5 files (100.00%) | |
90 | pruned down to 2 probably relinkable files |
|
92 | pruned down to 2 probably relinkable files | |
91 | relinking: data/a.i 1/2 files (50.00%) |
|
93 | relinking: data/a.i 1/2 files (50.00%) | |
92 | not linkable: data/dummy.i |
|
94 | not linkable: data/dummy.i | |
93 | relinked 1 files (1.36 KB reclaimed) |
|
95 | relinked 1 files (1.36 KB reclaimed) | |
94 | $ cd .. |
|
96 | $ cd .. | |
95 |
|
97 | |||
96 |
|
98 | |||
97 | check hardlinks |
|
99 | check hardlinks | |
98 |
|
100 | |||
99 | $ $PYTHON arelinked.py repo/.hg/store/data/a.i clone/.hg/store/data/a.i |
|
101 | $ $PYTHON arelinked.py repo/.hg/store/data/a.i clone/.hg/store/data/a.i | |
100 | repo/.hg/store/data/a.i == clone/.hg/store/data/a.i |
|
102 | repo/.hg/store/data/a.i == clone/.hg/store/data/a.i | |
101 | $ $PYTHON arelinked.py repo/.hg/store/data/b.i clone/.hg/store/data/b.i |
|
103 | $ $PYTHON arelinked.py repo/.hg/store/data/b.i clone/.hg/store/data/b.i | |
102 | repo/.hg/store/data/b.i != clone/.hg/store/data/b.i |
|
104 | repo/.hg/store/data/b.i != clone/.hg/store/data/b.i | |
103 |
|
105 | |||
|
106 | #endif |
@@ -1,1335 +1,1336 | |||||
1 | $ echo "[extensions]" >> $HGRCPATH |
|
1 | $ echo "[extensions]" >> $HGRCPATH | |
2 | $ echo "strip=" >> $HGRCPATH |
|
2 | $ echo "strip=" >> $HGRCPATH | |
3 | $ echo "drawdag=$TESTDIR/drawdag.py" >> $HGRCPATH |
|
3 | $ echo "drawdag=$TESTDIR/drawdag.py" >> $HGRCPATH | |
4 |
|
4 | |||
5 | $ restore() { |
|
5 | $ restore() { | |
6 | > hg unbundle -q .hg/strip-backup/* |
|
6 | > hg unbundle -q .hg/strip-backup/* | |
7 | > rm .hg/strip-backup/* |
|
7 | > rm .hg/strip-backup/* | |
8 | > } |
|
8 | > } | |
9 | $ teststrip() { |
|
9 | $ teststrip() { | |
10 | > hg up -C $1 |
|
10 | > hg up -C $1 | |
11 | > echo % before update $1, strip $2 |
|
11 | > echo % before update $1, strip $2 | |
12 | > hg parents |
|
12 | > hg parents | |
13 | > hg --traceback strip $2 |
|
13 | > hg --traceback strip $2 | |
14 | > echo % after update $1, strip $2 |
|
14 | > echo % after update $1, strip $2 | |
15 | > hg parents |
|
15 | > hg parents | |
16 | > restore |
|
16 | > restore | |
17 | > } |
|
17 | > } | |
18 |
|
18 | |||
19 | $ hg init test |
|
19 | $ hg init test | |
20 | $ cd test |
|
20 | $ cd test | |
21 |
|
21 | |||
22 | $ echo foo > bar |
|
22 | $ echo foo > bar | |
23 | $ hg ci -Ama |
|
23 | $ hg ci -Ama | |
24 | adding bar |
|
24 | adding bar | |
25 |
|
25 | |||
26 | $ echo more >> bar |
|
26 | $ echo more >> bar | |
27 | $ hg ci -Amb |
|
27 | $ hg ci -Amb | |
28 |
|
28 | |||
29 | $ echo blah >> bar |
|
29 | $ echo blah >> bar | |
30 | $ hg ci -Amc |
|
30 | $ hg ci -Amc | |
31 |
|
31 | |||
32 | $ hg up 1 |
|
32 | $ hg up 1 | |
33 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
33 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
34 | $ echo blah >> bar |
|
34 | $ echo blah >> bar | |
35 | $ hg ci -Amd |
|
35 | $ hg ci -Amd | |
36 | created new head |
|
36 | created new head | |
37 |
|
37 | |||
38 | $ echo final >> bar |
|
38 | $ echo final >> bar | |
39 | $ hg ci -Ame |
|
39 | $ hg ci -Ame | |
40 |
|
40 | |||
41 | $ hg log |
|
41 | $ hg log | |
42 | changeset: 4:443431ffac4f |
|
42 | changeset: 4:443431ffac4f | |
43 | tag: tip |
|
43 | tag: tip | |
44 | user: test |
|
44 | user: test | |
45 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
45 | date: Thu Jan 01 00:00:00 1970 +0000 | |
46 | summary: e |
|
46 | summary: e | |
47 |
|
47 | |||
48 | changeset: 3:65bd5f99a4a3 |
|
48 | changeset: 3:65bd5f99a4a3 | |
49 | parent: 1:ef3a871183d7 |
|
49 | parent: 1:ef3a871183d7 | |
50 | user: test |
|
50 | user: test | |
51 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
51 | date: Thu Jan 01 00:00:00 1970 +0000 | |
52 | summary: d |
|
52 | summary: d | |
53 |
|
53 | |||
54 | changeset: 2:264128213d29 |
|
54 | changeset: 2:264128213d29 | |
55 | user: test |
|
55 | user: test | |
56 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
56 | date: Thu Jan 01 00:00:00 1970 +0000 | |
57 | summary: c |
|
57 | summary: c | |
58 |
|
58 | |||
59 | changeset: 1:ef3a871183d7 |
|
59 | changeset: 1:ef3a871183d7 | |
60 | user: test |
|
60 | user: test | |
61 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
61 | date: Thu Jan 01 00:00:00 1970 +0000 | |
62 | summary: b |
|
62 | summary: b | |
63 |
|
63 | |||
64 | changeset: 0:9ab35a2d17cb |
|
64 | changeset: 0:9ab35a2d17cb | |
65 | user: test |
|
65 | user: test | |
66 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
66 | date: Thu Jan 01 00:00:00 1970 +0000 | |
67 | summary: a |
|
67 | summary: a | |
68 |
|
68 | |||
69 |
|
69 | |||
70 | $ teststrip 4 4 |
|
70 | $ teststrip 4 4 | |
71 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
71 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
72 | % before update 4, strip 4 |
|
72 | % before update 4, strip 4 | |
73 | changeset: 4:443431ffac4f |
|
73 | changeset: 4:443431ffac4f | |
74 | tag: tip |
|
74 | tag: tip | |
75 | user: test |
|
75 | user: test | |
76 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
76 | date: Thu Jan 01 00:00:00 1970 +0000 | |
77 | summary: e |
|
77 | summary: e | |
78 |
|
78 | |||
79 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
79 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
80 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
80 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
81 | % after update 4, strip 4 |
|
81 | % after update 4, strip 4 | |
82 | changeset: 3:65bd5f99a4a3 |
|
82 | changeset: 3:65bd5f99a4a3 | |
83 | tag: tip |
|
83 | tag: tip | |
84 | parent: 1:ef3a871183d7 |
|
84 | parent: 1:ef3a871183d7 | |
85 | user: test |
|
85 | user: test | |
86 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
86 | date: Thu Jan 01 00:00:00 1970 +0000 | |
87 | summary: d |
|
87 | summary: d | |
88 |
|
88 | |||
89 | $ teststrip 4 3 |
|
89 | $ teststrip 4 3 | |
90 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
90 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
91 | % before update 4, strip 3 |
|
91 | % before update 4, strip 3 | |
92 | changeset: 4:443431ffac4f |
|
92 | changeset: 4:443431ffac4f | |
93 | tag: tip |
|
93 | tag: tip | |
94 | user: test |
|
94 | user: test | |
95 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
95 | date: Thu Jan 01 00:00:00 1970 +0000 | |
96 | summary: e |
|
96 | summary: e | |
97 |
|
97 | |||
98 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
98 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
99 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
99 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
100 | % after update 4, strip 3 |
|
100 | % after update 4, strip 3 | |
101 | changeset: 1:ef3a871183d7 |
|
101 | changeset: 1:ef3a871183d7 | |
102 | user: test |
|
102 | user: test | |
103 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
103 | date: Thu Jan 01 00:00:00 1970 +0000 | |
104 | summary: b |
|
104 | summary: b | |
105 |
|
105 | |||
106 | $ teststrip 1 4 |
|
106 | $ teststrip 1 4 | |
107 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
107 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
108 | % before update 1, strip 4 |
|
108 | % before update 1, strip 4 | |
109 | changeset: 1:ef3a871183d7 |
|
109 | changeset: 1:ef3a871183d7 | |
110 | user: test |
|
110 | user: test | |
111 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
111 | date: Thu Jan 01 00:00:00 1970 +0000 | |
112 | summary: b |
|
112 | summary: b | |
113 |
|
113 | |||
114 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
114 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
115 | % after update 1, strip 4 |
|
115 | % after update 1, strip 4 | |
116 | changeset: 1:ef3a871183d7 |
|
116 | changeset: 1:ef3a871183d7 | |
117 | user: test |
|
117 | user: test | |
118 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
118 | date: Thu Jan 01 00:00:00 1970 +0000 | |
119 | summary: b |
|
119 | summary: b | |
120 |
|
120 | |||
121 | $ teststrip 4 2 |
|
121 | $ teststrip 4 2 | |
122 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
122 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
123 | % before update 4, strip 2 |
|
123 | % before update 4, strip 2 | |
124 | changeset: 4:443431ffac4f |
|
124 | changeset: 4:443431ffac4f | |
125 | tag: tip |
|
125 | tag: tip | |
126 | user: test |
|
126 | user: test | |
127 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
127 | date: Thu Jan 01 00:00:00 1970 +0000 | |
128 | summary: e |
|
128 | summary: e | |
129 |
|
129 | |||
130 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
130 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
131 | % after update 4, strip 2 |
|
131 | % after update 4, strip 2 | |
132 | changeset: 3:443431ffac4f |
|
132 | changeset: 3:443431ffac4f | |
133 | tag: tip |
|
133 | tag: tip | |
134 | user: test |
|
134 | user: test | |
135 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
135 | date: Thu Jan 01 00:00:00 1970 +0000 | |
136 | summary: e |
|
136 | summary: e | |
137 |
|
137 | |||
138 | $ teststrip 4 1 |
|
138 | $ teststrip 4 1 | |
139 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
139 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
140 | % before update 4, strip 1 |
|
140 | % before update 4, strip 1 | |
141 | changeset: 4:264128213d29 |
|
141 | changeset: 4:264128213d29 | |
142 | tag: tip |
|
142 | tag: tip | |
143 | parent: 1:ef3a871183d7 |
|
143 | parent: 1:ef3a871183d7 | |
144 | user: test |
|
144 | user: test | |
145 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
145 | date: Thu Jan 01 00:00:00 1970 +0000 | |
146 | summary: c |
|
146 | summary: c | |
147 |
|
147 | |||
148 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
148 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
149 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
149 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
150 | % after update 4, strip 1 |
|
150 | % after update 4, strip 1 | |
151 | changeset: 0:9ab35a2d17cb |
|
151 | changeset: 0:9ab35a2d17cb | |
152 | tag: tip |
|
152 | tag: tip | |
153 | user: test |
|
153 | user: test | |
154 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
154 | date: Thu Jan 01 00:00:00 1970 +0000 | |
155 | summary: a |
|
155 | summary: a | |
156 |
|
156 | |||
157 | $ teststrip null 4 |
|
157 | $ teststrip null 4 | |
158 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
158 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
159 | % before update null, strip 4 |
|
159 | % before update null, strip 4 | |
160 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
160 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
161 | % after update null, strip 4 |
|
161 | % after update null, strip 4 | |
162 |
|
162 | |||
163 | $ hg log |
|
163 | $ hg log | |
164 | changeset: 4:264128213d29 |
|
164 | changeset: 4:264128213d29 | |
165 | tag: tip |
|
165 | tag: tip | |
166 | parent: 1:ef3a871183d7 |
|
166 | parent: 1:ef3a871183d7 | |
167 | user: test |
|
167 | user: test | |
168 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
168 | date: Thu Jan 01 00:00:00 1970 +0000 | |
169 | summary: c |
|
169 | summary: c | |
170 |
|
170 | |||
171 | changeset: 3:443431ffac4f |
|
171 | changeset: 3:443431ffac4f | |
172 | user: test |
|
172 | user: test | |
173 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
173 | date: Thu Jan 01 00:00:00 1970 +0000 | |
174 | summary: e |
|
174 | summary: e | |
175 |
|
175 | |||
176 | changeset: 2:65bd5f99a4a3 |
|
176 | changeset: 2:65bd5f99a4a3 | |
177 | user: test |
|
177 | user: test | |
178 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
178 | date: Thu Jan 01 00:00:00 1970 +0000 | |
179 | summary: d |
|
179 | summary: d | |
180 |
|
180 | |||
181 | changeset: 1:ef3a871183d7 |
|
181 | changeset: 1:ef3a871183d7 | |
182 | user: test |
|
182 | user: test | |
183 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
183 | date: Thu Jan 01 00:00:00 1970 +0000 | |
184 | summary: b |
|
184 | summary: b | |
185 |
|
185 | |||
186 | changeset: 0:9ab35a2d17cb |
|
186 | changeset: 0:9ab35a2d17cb | |
187 | user: test |
|
187 | user: test | |
188 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
188 | date: Thu Jan 01 00:00:00 1970 +0000 | |
189 | summary: a |
|
189 | summary: a | |
190 |
|
190 | |||
191 | $ hg up -C 4 |
|
191 | $ hg up -C 4 | |
192 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
192 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
193 | $ hg parents |
|
193 | $ hg parents | |
194 | changeset: 4:264128213d29 |
|
194 | changeset: 4:264128213d29 | |
195 | tag: tip |
|
195 | tag: tip | |
196 | parent: 1:ef3a871183d7 |
|
196 | parent: 1:ef3a871183d7 | |
197 | user: test |
|
197 | user: test | |
198 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
198 | date: Thu Jan 01 00:00:00 1970 +0000 | |
199 | summary: c |
|
199 | summary: c | |
200 |
|
200 | |||
201 |
|
201 | |||
202 | $ hg --traceback strip 4 |
|
202 | $ hg --traceback strip 4 | |
203 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
203 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
204 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/264128213d29-0b39d6bf-backup.hg |
|
204 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/264128213d29-0b39d6bf-backup.hg | |
205 | $ hg parents |
|
205 | $ hg parents | |
206 | changeset: 1:ef3a871183d7 |
|
206 | changeset: 1:ef3a871183d7 | |
207 | user: test |
|
207 | user: test | |
208 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
208 | date: Thu Jan 01 00:00:00 1970 +0000 | |
209 | summary: b |
|
209 | summary: b | |
210 |
|
210 | |||
211 | $ hg debugbundle .hg/strip-backup/* |
|
211 | $ hg debugbundle .hg/strip-backup/* | |
212 | Stream params: {Compression: BZ} |
|
212 | Stream params: {Compression: BZ} | |
213 | changegroup -- {nbchanges: 1, version: 02} |
|
213 | changegroup -- {nbchanges: 1, version: 02} | |
214 | 264128213d290d868c54642d13aeaa3675551a78 |
|
214 | 264128213d290d868c54642d13aeaa3675551a78 | |
215 | cache:rev-branch-cache -- {} |
|
215 | cache:rev-branch-cache -- {} | |
216 | phase-heads -- {} |
|
216 | phase-heads -- {} | |
217 | 264128213d290d868c54642d13aeaa3675551a78 draft |
|
217 | 264128213d290d868c54642d13aeaa3675551a78 draft | |
218 | $ hg unbundle .hg/strip-backup/* |
|
218 | $ hg unbundle .hg/strip-backup/* | |
219 | adding changesets |
|
219 | adding changesets | |
220 | adding manifests |
|
220 | adding manifests | |
221 | adding file changes |
|
221 | adding file changes | |
222 | added 1 changesets with 0 changes to 1 files (+1 heads) |
|
222 | added 1 changesets with 0 changes to 1 files (+1 heads) | |
223 | new changesets 264128213d29 |
|
223 | new changesets 264128213d29 | |
224 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
224 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
225 | $ rm .hg/strip-backup/* |
|
225 | $ rm .hg/strip-backup/* | |
226 | $ hg log --graph |
|
226 | $ hg log --graph | |
227 | o changeset: 4:264128213d29 |
|
227 | o changeset: 4:264128213d29 | |
228 | | tag: tip |
|
228 | | tag: tip | |
229 | | parent: 1:ef3a871183d7 |
|
229 | | parent: 1:ef3a871183d7 | |
230 | | user: test |
|
230 | | user: test | |
231 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
231 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
232 | | summary: c |
|
232 | | summary: c | |
233 | | |
|
233 | | | |
234 | | o changeset: 3:443431ffac4f |
|
234 | | o changeset: 3:443431ffac4f | |
235 | | | user: test |
|
235 | | | user: test | |
236 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
236 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
237 | | | summary: e |
|
237 | | | summary: e | |
238 | | | |
|
238 | | | | |
239 | | o changeset: 2:65bd5f99a4a3 |
|
239 | | o changeset: 2:65bd5f99a4a3 | |
240 | |/ user: test |
|
240 | |/ user: test | |
241 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
241 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
242 | | summary: d |
|
242 | | summary: d | |
243 | | |
|
243 | | | |
244 | @ changeset: 1:ef3a871183d7 |
|
244 | @ changeset: 1:ef3a871183d7 | |
245 | | user: test |
|
245 | | user: test | |
246 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
246 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
247 | | summary: b |
|
247 | | summary: b | |
248 | | |
|
248 | | | |
249 | o changeset: 0:9ab35a2d17cb |
|
249 | o changeset: 0:9ab35a2d17cb | |
250 | user: test |
|
250 | user: test | |
251 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
251 | date: Thu Jan 01 00:00:00 1970 +0000 | |
252 | summary: a |
|
252 | summary: a | |
253 |
|
253 | |||
254 | $ hg up -C 2 |
|
254 | $ hg up -C 2 | |
255 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
255 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
256 | $ hg merge 4 |
|
256 | $ hg merge 4 | |
257 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
257 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
258 | (branch merge, don't forget to commit) |
|
258 | (branch merge, don't forget to commit) | |
259 |
|
259 | |||
260 | before strip of merge parent |
|
260 | before strip of merge parent | |
261 |
|
261 | |||
262 | $ hg parents |
|
262 | $ hg parents | |
263 | changeset: 2:65bd5f99a4a3 |
|
263 | changeset: 2:65bd5f99a4a3 | |
264 | user: test |
|
264 | user: test | |
265 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
265 | date: Thu Jan 01 00:00:00 1970 +0000 | |
266 | summary: d |
|
266 | summary: d | |
267 |
|
267 | |||
268 | changeset: 4:264128213d29 |
|
268 | changeset: 4:264128213d29 | |
269 | tag: tip |
|
269 | tag: tip | |
270 | parent: 1:ef3a871183d7 |
|
270 | parent: 1:ef3a871183d7 | |
271 | user: test |
|
271 | user: test | |
272 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
272 | date: Thu Jan 01 00:00:00 1970 +0000 | |
273 | summary: c |
|
273 | summary: c | |
274 |
|
274 | |||
275 | $ hg strip 4 |
|
275 | $ hg strip 4 | |
276 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
276 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
277 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
277 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
278 |
|
278 | |||
279 | after strip of merge parent |
|
279 | after strip of merge parent | |
280 |
|
280 | |||
281 | $ hg parents |
|
281 | $ hg parents | |
282 | changeset: 1:ef3a871183d7 |
|
282 | changeset: 1:ef3a871183d7 | |
283 | user: test |
|
283 | user: test | |
284 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
284 | date: Thu Jan 01 00:00:00 1970 +0000 | |
285 | summary: b |
|
285 | summary: b | |
286 |
|
286 | |||
287 | $ restore |
|
287 | $ restore | |
288 |
|
288 | |||
289 | $ hg up |
|
289 | $ hg up | |
290 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
290 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
291 | updated to "264128213d29: c" |
|
291 | updated to "264128213d29: c" | |
292 | 1 other heads for branch "default" |
|
292 | 1 other heads for branch "default" | |
293 | $ hg log -G |
|
293 | $ hg log -G | |
294 | @ changeset: 4:264128213d29 |
|
294 | @ changeset: 4:264128213d29 | |
295 | | tag: tip |
|
295 | | tag: tip | |
296 | | parent: 1:ef3a871183d7 |
|
296 | | parent: 1:ef3a871183d7 | |
297 | | user: test |
|
297 | | user: test | |
298 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
298 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
299 | | summary: c |
|
299 | | summary: c | |
300 | | |
|
300 | | | |
301 | | o changeset: 3:443431ffac4f |
|
301 | | o changeset: 3:443431ffac4f | |
302 | | | user: test |
|
302 | | | user: test | |
303 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
303 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
304 | | | summary: e |
|
304 | | | summary: e | |
305 | | | |
|
305 | | | | |
306 | | o changeset: 2:65bd5f99a4a3 |
|
306 | | o changeset: 2:65bd5f99a4a3 | |
307 | |/ user: test |
|
307 | |/ user: test | |
308 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
308 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
309 | | summary: d |
|
309 | | summary: d | |
310 | | |
|
310 | | | |
311 | o changeset: 1:ef3a871183d7 |
|
311 | o changeset: 1:ef3a871183d7 | |
312 | | user: test |
|
312 | | user: test | |
313 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
313 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
314 | | summary: b |
|
314 | | summary: b | |
315 | | |
|
315 | | | |
316 | o changeset: 0:9ab35a2d17cb |
|
316 | o changeset: 0:9ab35a2d17cb | |
317 | user: test |
|
317 | user: test | |
318 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
318 | date: Thu Jan 01 00:00:00 1970 +0000 | |
319 | summary: a |
|
319 | summary: a | |
320 |
|
320 | |||
321 |
|
321 | |||
322 | 2 is parent of 3, only one strip should happen |
|
322 | 2 is parent of 3, only one strip should happen | |
323 |
|
323 | |||
324 | $ hg strip "roots(2)" 3 |
|
324 | $ hg strip "roots(2)" 3 | |
325 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
325 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
326 | $ hg log -G |
|
326 | $ hg log -G | |
327 | @ changeset: 2:264128213d29 |
|
327 | @ changeset: 2:264128213d29 | |
328 | | tag: tip |
|
328 | | tag: tip | |
329 | | user: test |
|
329 | | user: test | |
330 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
330 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
331 | | summary: c |
|
331 | | summary: c | |
332 | | |
|
332 | | | |
333 | o changeset: 1:ef3a871183d7 |
|
333 | o changeset: 1:ef3a871183d7 | |
334 | | user: test |
|
334 | | user: test | |
335 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
335 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
336 | | summary: b |
|
336 | | summary: b | |
337 | | |
|
337 | | | |
338 | o changeset: 0:9ab35a2d17cb |
|
338 | o changeset: 0:9ab35a2d17cb | |
339 | user: test |
|
339 | user: test | |
340 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
340 | date: Thu Jan 01 00:00:00 1970 +0000 | |
341 | summary: a |
|
341 | summary: a | |
342 |
|
342 | |||
343 | $ restore |
|
343 | $ restore | |
344 | $ hg log -G |
|
344 | $ hg log -G | |
345 | o changeset: 4:443431ffac4f |
|
345 | o changeset: 4:443431ffac4f | |
346 | | tag: tip |
|
346 | | tag: tip | |
347 | | user: test |
|
347 | | user: test | |
348 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
348 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
349 | | summary: e |
|
349 | | summary: e | |
350 | | |
|
350 | | | |
351 | o changeset: 3:65bd5f99a4a3 |
|
351 | o changeset: 3:65bd5f99a4a3 | |
352 | | parent: 1:ef3a871183d7 |
|
352 | | parent: 1:ef3a871183d7 | |
353 | | user: test |
|
353 | | user: test | |
354 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
354 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
355 | | summary: d |
|
355 | | summary: d | |
356 | | |
|
356 | | | |
357 | | @ changeset: 2:264128213d29 |
|
357 | | @ changeset: 2:264128213d29 | |
358 | |/ user: test |
|
358 | |/ user: test | |
359 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
359 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
360 | | summary: c |
|
360 | | summary: c | |
361 | | |
|
361 | | | |
362 | o changeset: 1:ef3a871183d7 |
|
362 | o changeset: 1:ef3a871183d7 | |
363 | | user: test |
|
363 | | user: test | |
364 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
364 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
365 | | summary: b |
|
365 | | summary: b | |
366 | | |
|
366 | | | |
367 | o changeset: 0:9ab35a2d17cb |
|
367 | o changeset: 0:9ab35a2d17cb | |
368 | user: test |
|
368 | user: test | |
369 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
369 | date: Thu Jan 01 00:00:00 1970 +0000 | |
370 | summary: a |
|
370 | summary: a | |
371 |
|
371 | |||
372 | Failed hook while applying "saveheads" bundle. |
|
372 | Failed hook while applying "saveheads" bundle. | |
373 |
|
373 | |||
374 | $ hg strip 2 --config hooks.pretxnchangegroup.bad=false |
|
374 | $ hg strip 2 --config hooks.pretxnchangegroup.bad=false | |
375 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
375 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
376 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
376 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
377 | transaction abort! |
|
377 | transaction abort! | |
378 | rollback completed |
|
378 | rollback completed | |
379 | strip failed, backup bundle stored in '$TESTTMP/test/.hg/strip-backup/*-backup.hg' (glob) |
|
379 | strip failed, backup bundle stored in '$TESTTMP/test/.hg/strip-backup/*-backup.hg' (glob) | |
380 | strip failed, unrecovered changes stored in '$TESTTMP/test/.hg/strip-backup/*-temp.hg' (glob) |
|
380 | strip failed, unrecovered changes stored in '$TESTTMP/test/.hg/strip-backup/*-temp.hg' (glob) | |
381 | (fix the problem, then recover the changesets with "hg unbundle '$TESTTMP/test/.hg/strip-backup/*-temp.hg'") (glob) |
|
381 | (fix the problem, then recover the changesets with "hg unbundle '$TESTTMP/test/.hg/strip-backup/*-temp.hg'") (glob) | |
382 | abort: pretxnchangegroup.bad hook exited with status 1 |
|
382 | abort: pretxnchangegroup.bad hook exited with status 1 | |
383 | [255] |
|
383 | [255] | |
384 | $ restore |
|
384 | $ restore | |
385 | $ hg log -G |
|
385 | $ hg log -G | |
386 | o changeset: 4:443431ffac4f |
|
386 | o changeset: 4:443431ffac4f | |
387 | | tag: tip |
|
387 | | tag: tip | |
388 | | user: test |
|
388 | | user: test | |
389 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
389 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
390 | | summary: e |
|
390 | | summary: e | |
391 | | |
|
391 | | | |
392 | o changeset: 3:65bd5f99a4a3 |
|
392 | o changeset: 3:65bd5f99a4a3 | |
393 | | parent: 1:ef3a871183d7 |
|
393 | | parent: 1:ef3a871183d7 | |
394 | | user: test |
|
394 | | user: test | |
395 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
395 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
396 | | summary: d |
|
396 | | summary: d | |
397 | | |
|
397 | | | |
398 | | o changeset: 2:264128213d29 |
|
398 | | o changeset: 2:264128213d29 | |
399 | |/ user: test |
|
399 | |/ user: test | |
400 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
400 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
401 | | summary: c |
|
401 | | summary: c | |
402 | | |
|
402 | | | |
403 | @ changeset: 1:ef3a871183d7 |
|
403 | @ changeset: 1:ef3a871183d7 | |
404 | | user: test |
|
404 | | user: test | |
405 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
405 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
406 | | summary: b |
|
406 | | summary: b | |
407 | | |
|
407 | | | |
408 | o changeset: 0:9ab35a2d17cb |
|
408 | o changeset: 0:9ab35a2d17cb | |
409 | user: test |
|
409 | user: test | |
410 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
410 | date: Thu Jan 01 00:00:00 1970 +0000 | |
411 | summary: a |
|
411 | summary: a | |
412 |
|
412 | |||
413 |
|
413 | |||
414 | 2 different branches: 2 strips |
|
414 | 2 different branches: 2 strips | |
415 |
|
415 | |||
416 | $ hg strip 2 4 |
|
416 | $ hg strip 2 4 | |
417 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
417 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
418 | $ hg log -G |
|
418 | $ hg log -G | |
419 | o changeset: 2:65bd5f99a4a3 |
|
419 | o changeset: 2:65bd5f99a4a3 | |
420 | | tag: tip |
|
420 | | tag: tip | |
421 | | user: test |
|
421 | | user: test | |
422 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
422 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
423 | | summary: d |
|
423 | | summary: d | |
424 | | |
|
424 | | | |
425 | @ changeset: 1:ef3a871183d7 |
|
425 | @ changeset: 1:ef3a871183d7 | |
426 | | user: test |
|
426 | | user: test | |
427 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
427 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
428 | | summary: b |
|
428 | | summary: b | |
429 | | |
|
429 | | | |
430 | o changeset: 0:9ab35a2d17cb |
|
430 | o changeset: 0:9ab35a2d17cb | |
431 | user: test |
|
431 | user: test | |
432 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
432 | date: Thu Jan 01 00:00:00 1970 +0000 | |
433 | summary: a |
|
433 | summary: a | |
434 |
|
434 | |||
435 | $ restore |
|
435 | $ restore | |
436 |
|
436 | |||
437 | 2 different branches and a common ancestor: 1 strip |
|
437 | 2 different branches and a common ancestor: 1 strip | |
438 |
|
438 | |||
439 | $ hg strip 1 "2|4" |
|
439 | $ hg strip 1 "2|4" | |
440 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
440 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
441 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
441 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
442 | $ restore |
|
442 | $ restore | |
443 |
|
443 | |||
444 | verify fncache is kept up-to-date |
|
444 | verify fncache is kept up-to-date | |
445 |
|
445 | |||
446 | $ touch a |
|
446 | $ touch a | |
447 | $ hg ci -qAm a |
|
447 | $ hg ci -qAm a | |
448 | $ cat .hg/store/fncache | sort |
|
448 | $ cat .hg/store/fncache | sort | |
449 | data/a.i |
|
449 | data/a.i | |
450 | data/bar.i |
|
450 | data/bar.i | |
|
451 | ||||
451 | $ hg strip tip |
|
452 | $ hg strip tip | |
452 | 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 | |
453 | 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) | |
454 | $ cat .hg/store/fncache |
|
455 | $ cat .hg/store/fncache | |
455 | data/bar.i |
|
456 | data/bar.i | |
456 |
|
457 | |||
457 | stripping an empty revset |
|
458 | stripping an empty revset | |
458 |
|
459 | |||
459 | $ hg strip "1 and not 1" |
|
460 | $ hg strip "1 and not 1" | |
460 | abort: empty revision set |
|
461 | abort: empty revision set | |
461 | [255] |
|
462 | [255] | |
462 |
|
463 | |||
463 | remove branchy history for qimport tests |
|
464 | remove branchy history for qimport tests | |
464 |
|
465 | |||
465 | $ hg strip 3 |
|
466 | $ hg strip 3 | |
466 | 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) | |
467 |
|
468 | |||
468 |
|
469 | |||
469 | strip of applied mq should cleanup status file |
|
470 | strip of applied mq should cleanup status file | |
470 |
|
471 | |||
471 | $ echo "mq=" >> $HGRCPATH |
|
472 | $ echo "mq=" >> $HGRCPATH | |
472 | $ hg up -C 3 |
|
473 | $ hg up -C 3 | |
473 | 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 | |
474 | $ echo fooagain >> bar |
|
475 | $ echo fooagain >> bar | |
475 | $ hg ci -mf |
|
476 | $ hg ci -mf | |
476 | $ hg qimport -r tip:2 |
|
477 | $ hg qimport -r tip:2 | |
477 |
|
478 | |||
478 | applied patches before strip |
|
479 | applied patches before strip | |
479 |
|
480 | |||
480 | $ hg qapplied |
|
481 | $ hg qapplied | |
481 | d |
|
482 | d | |
482 | e |
|
483 | e | |
483 | f |
|
484 | f | |
484 |
|
485 | |||
485 | stripping revision in queue |
|
486 | stripping revision in queue | |
486 |
|
487 | |||
487 | $ hg strip 3 |
|
488 | $ hg strip 3 | |
488 | 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 | |
489 | 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) | |
490 |
|
491 | |||
491 | applied patches after stripping rev in queue |
|
492 | applied patches after stripping rev in queue | |
492 |
|
493 | |||
493 | $ hg qapplied |
|
494 | $ hg qapplied | |
494 | d |
|
495 | d | |
495 |
|
496 | |||
496 | stripping ancestor of queue |
|
497 | stripping ancestor of queue | |
497 |
|
498 | |||
498 | $ hg strip 1 |
|
499 | $ hg strip 1 | |
499 | 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 | |
500 | 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) | |
501 |
|
502 | |||
502 | applied patches after stripping ancestor of queue |
|
503 | applied patches after stripping ancestor of queue | |
503 |
|
504 | |||
504 | $ hg qapplied |
|
505 | $ hg qapplied | |
505 |
|
506 | |||
506 | 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 | |
507 |
|
508 | |||
508 | $ echo b > b |
|
509 | $ echo b > b | |
509 | $ echo bb > bar |
|
510 | $ echo bb > bar | |
510 | $ hg add b |
|
511 | $ hg add b | |
511 | $ hg ci -m 'b' |
|
512 | $ hg ci -m 'b' | |
512 | $ hg log --graph |
|
513 | $ hg log --graph | |
513 | @ changeset: 1:76dcf9fab855 |
|
514 | @ changeset: 1:76dcf9fab855 | |
514 | | tag: tip |
|
515 | | tag: tip | |
515 | | user: test |
|
516 | | user: test | |
516 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
517 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
517 | | summary: b |
|
518 | | summary: b | |
518 | | |
|
519 | | | |
519 | o changeset: 0:9ab35a2d17cb |
|
520 | o changeset: 0:9ab35a2d17cb | |
520 | user: test |
|
521 | user: test | |
521 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
522 | date: Thu Jan 01 00:00:00 1970 +0000 | |
522 | summary: a |
|
523 | summary: a | |
523 |
|
524 | |||
524 | $ hg up 0 |
|
525 | $ hg up 0 | |
525 | 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 | |
526 | $ echo c > bar |
|
527 | $ echo c > bar | |
527 | $ hg up -t false |
|
528 | $ hg up -t false | |
528 | merging bar |
|
529 | merging bar | |
529 | merging bar failed! |
|
530 | merging bar failed! | |
530 | 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 | |
531 | use 'hg resolve' to retry unresolved file merges |
|
532 | use 'hg resolve' to retry unresolved file merges | |
532 | [1] |
|
533 | [1] | |
533 | $ hg sum |
|
534 | $ hg sum | |
534 | parent: 1:76dcf9fab855 tip |
|
535 | parent: 1:76dcf9fab855 tip | |
535 | b |
|
536 | b | |
536 | branch: default |
|
537 | branch: default | |
537 | commit: 1 modified, 1 unknown, 1 unresolved |
|
538 | commit: 1 modified, 1 unknown, 1 unresolved | |
538 | update: (current) |
|
539 | update: (current) | |
539 | phases: 2 draft |
|
540 | phases: 2 draft | |
540 | mq: 3 unapplied |
|
541 | mq: 3 unapplied | |
541 |
|
542 | |||
542 | $ echo c > b |
|
543 | $ echo c > b | |
543 | $ hg strip tip |
|
544 | $ hg strip tip | |
544 | abort: local changes found |
|
545 | abort: local changes found | |
545 | [255] |
|
546 | [255] | |
546 | $ hg strip tip --keep |
|
547 | $ hg strip tip --keep | |
547 | 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) | |
548 | $ hg log --graph |
|
549 | $ hg log --graph | |
549 | @ changeset: 0:9ab35a2d17cb |
|
550 | @ changeset: 0:9ab35a2d17cb | |
550 | tag: tip |
|
551 | tag: tip | |
551 | user: test |
|
552 | user: test | |
552 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
553 | date: Thu Jan 01 00:00:00 1970 +0000 | |
553 | summary: a |
|
554 | summary: a | |
554 |
|
555 | |||
555 | $ hg status |
|
556 | $ hg status | |
556 | M bar |
|
557 | M bar | |
557 | ? b |
|
558 | ? b | |
558 | ? bar.orig |
|
559 | ? bar.orig | |
559 |
|
560 | |||
560 | $ rm bar.orig |
|
561 | $ rm bar.orig | |
561 | $ hg sum |
|
562 | $ hg sum | |
562 | parent: 0:9ab35a2d17cb tip |
|
563 | parent: 0:9ab35a2d17cb tip | |
563 | a |
|
564 | a | |
564 | branch: default |
|
565 | branch: default | |
565 | commit: 1 modified, 1 unknown |
|
566 | commit: 1 modified, 1 unknown | |
566 | update: (current) |
|
567 | update: (current) | |
567 | phases: 1 draft |
|
568 | phases: 1 draft | |
568 | mq: 3 unapplied |
|
569 | mq: 3 unapplied | |
569 |
|
570 | |||
570 | Strip adds, removes, modifies with --keep |
|
571 | Strip adds, removes, modifies with --keep | |
571 |
|
572 | |||
572 | $ touch b |
|
573 | $ touch b | |
573 | $ hg add b |
|
574 | $ hg add b | |
574 | $ hg commit -mb |
|
575 | $ hg commit -mb | |
575 | $ touch c |
|
576 | $ touch c | |
576 |
|
577 | |||
577 | ... with a clean working dir |
|
578 | ... with a clean working dir | |
578 |
|
579 | |||
579 | $ hg add c |
|
580 | $ hg add c | |
580 | $ hg rm bar |
|
581 | $ hg rm bar | |
581 | $ hg commit -mc |
|
582 | $ hg commit -mc | |
582 | $ hg status |
|
583 | $ hg status | |
583 | $ hg strip --keep tip |
|
584 | $ hg strip --keep tip | |
584 | 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) | |
585 | $ hg status |
|
586 | $ hg status | |
586 | ! bar |
|
587 | ! bar | |
587 | ? c |
|
588 | ? c | |
588 |
|
589 | |||
589 | ... with a dirty working dir |
|
590 | ... with a dirty working dir | |
590 |
|
591 | |||
591 | $ hg add c |
|
592 | $ hg add c | |
592 | $ hg rm bar |
|
593 | $ hg rm bar | |
593 | $ hg commit -mc |
|
594 | $ hg commit -mc | |
594 | $ hg status |
|
595 | $ hg status | |
595 | $ echo b > b |
|
596 | $ echo b > b | |
596 | $ echo d > d |
|
597 | $ echo d > d | |
597 | $ hg strip --keep tip |
|
598 | $ hg strip --keep tip | |
598 | 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) | |
599 | $ hg status |
|
600 | $ hg status | |
600 | M b |
|
601 | M b | |
601 | ! bar |
|
602 | ! bar | |
602 | ? c |
|
603 | ? c | |
603 | ? d |
|
604 | ? d | |
604 |
|
605 | |||
605 | ... after updating the dirstate |
|
606 | ... after updating the dirstate | |
606 | $ hg add c |
|
607 | $ hg add c | |
607 | $ hg commit -mc |
|
608 | $ hg commit -mc | |
608 | $ hg rm c |
|
609 | $ hg rm c | |
609 | $ hg commit -mc |
|
610 | $ hg commit -mc | |
610 | $ hg strip --keep '.^' -q |
|
611 | $ hg strip --keep '.^' -q | |
611 | $ cd .. |
|
612 | $ cd .. | |
612 |
|
613 | |||
613 | stripping many nodes on a complex graph (issue3299) |
|
614 | stripping many nodes on a complex graph (issue3299) | |
614 |
|
615 | |||
615 | $ hg init issue3299 |
|
616 | $ hg init issue3299 | |
616 | $ cd issue3299 |
|
617 | $ cd issue3299 | |
617 | $ 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' | |
618 | $ hg strip 'not ancestors(x)' |
|
619 | $ hg strip 'not ancestors(x)' | |
619 | 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) | |
620 |
|
621 | |||
621 | test hg strip -B bookmark |
|
622 | test hg strip -B bookmark | |
622 |
|
623 | |||
623 | $ cd .. |
|
624 | $ cd .. | |
624 | $ hg init bookmarks |
|
625 | $ hg init bookmarks | |
625 | $ cd bookmarks |
|
626 | $ cd bookmarks | |
626 | $ 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' | |
627 | $ hg bookmark -r 'a' 'todelete' |
|
628 | $ hg bookmark -r 'a' 'todelete' | |
628 | $ hg bookmark -r 'b' 'B' |
|
629 | $ hg bookmark -r 'b' 'B' | |
629 | $ hg bookmark -r 'b' 'nostrip' |
|
630 | $ hg bookmark -r 'b' 'nostrip' | |
630 | $ hg bookmark -r 'c' 'delete' |
|
631 | $ hg bookmark -r 'c' 'delete' | |
631 | $ hg bookmark -r 'd' 'multipledelete1' |
|
632 | $ hg bookmark -r 'd' 'multipledelete1' | |
632 | $ hg bookmark -r 'e' 'multipledelete2' |
|
633 | $ hg bookmark -r 'e' 'multipledelete2' | |
633 | $ hg bookmark -r 'f' 'singlenode1' |
|
634 | $ hg bookmark -r 'f' 'singlenode1' | |
634 | $ hg bookmark -r 'f' 'singlenode2' |
|
635 | $ hg bookmark -r 'f' 'singlenode2' | |
635 | $ hg up -C todelete |
|
636 | $ hg up -C todelete | |
636 | 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 | |
637 | (activating bookmark todelete) |
|
638 | (activating bookmark todelete) | |
638 | $ hg strip -B nostrip |
|
639 | $ hg strip -B nostrip | |
639 | bookmark 'nostrip' deleted |
|
640 | bookmark 'nostrip' deleted | |
640 | abort: empty revision set |
|
641 | abort: empty revision set | |
641 | [255] |
|
642 | [255] | |
642 | $ hg strip -B todelete |
|
643 | $ hg strip -B todelete | |
643 | 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 | |
644 | 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) | |
645 | bookmark 'todelete' deleted |
|
646 | bookmark 'todelete' deleted | |
646 | $ hg id -ir dcbb326fdec2 |
|
647 | $ hg id -ir dcbb326fdec2 | |
647 | abort: unknown revision 'dcbb326fdec2'! |
|
648 | abort: unknown revision 'dcbb326fdec2'! | |
648 | [255] |
|
649 | [255] | |
649 | $ hg id -ir d62d843c9a01 |
|
650 | $ hg id -ir d62d843c9a01 | |
650 | d62d843c9a01 |
|
651 | d62d843c9a01 | |
651 | $ hg bookmarks |
|
652 | $ hg bookmarks | |
652 | B 9:ff43616e5d0f |
|
653 | B 9:ff43616e5d0f | |
653 | delete 6:2702dd0c91e7 |
|
654 | delete 6:2702dd0c91e7 | |
654 | multipledelete1 11:e46a4836065c |
|
655 | multipledelete1 11:e46a4836065c | |
655 | multipledelete2 12:b4594d867745 |
|
656 | multipledelete2 12:b4594d867745 | |
656 | singlenode1 13:43227190fef8 |
|
657 | singlenode1 13:43227190fef8 | |
657 | singlenode2 13:43227190fef8 |
|
658 | singlenode2 13:43227190fef8 | |
658 | $ hg strip -B multipledelete1 -B multipledelete2 |
|
659 | $ hg strip -B multipledelete1 -B multipledelete2 | |
659 | saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/e46a4836065c-89ec65c2-backup.hg |
|
660 | saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/e46a4836065c-89ec65c2-backup.hg | |
660 | bookmark 'multipledelete1' deleted |
|
661 | bookmark 'multipledelete1' deleted | |
661 | bookmark 'multipledelete2' deleted |
|
662 | bookmark 'multipledelete2' deleted | |
662 | $ hg id -ir e46a4836065c |
|
663 | $ hg id -ir e46a4836065c | |
663 | abort: unknown revision 'e46a4836065c'! |
|
664 | abort: unknown revision 'e46a4836065c'! | |
664 | [255] |
|
665 | [255] | |
665 | $ hg id -ir b4594d867745 |
|
666 | $ hg id -ir b4594d867745 | |
666 | abort: unknown revision 'b4594d867745'! |
|
667 | abort: unknown revision 'b4594d867745'! | |
667 | [255] |
|
668 | [255] | |
668 | $ hg strip -B singlenode1 -B singlenode2 |
|
669 | $ hg strip -B singlenode1 -B singlenode2 | |
669 | saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/43227190fef8-8da858f2-backup.hg |
|
670 | saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/43227190fef8-8da858f2-backup.hg | |
670 | bookmark 'singlenode1' deleted |
|
671 | bookmark 'singlenode1' deleted | |
671 | bookmark 'singlenode2' deleted |
|
672 | bookmark 'singlenode2' deleted | |
672 | $ hg id -ir 43227190fef8 |
|
673 | $ hg id -ir 43227190fef8 | |
673 | abort: unknown revision '43227190fef8'! |
|
674 | abort: unknown revision '43227190fef8'! | |
674 | [255] |
|
675 | [255] | |
675 | $ hg strip -B unknownbookmark |
|
676 | $ hg strip -B unknownbookmark | |
676 | abort: bookmark 'unknownbookmark' not found |
|
677 | abort: bookmark 'unknownbookmark' not found | |
677 | [255] |
|
678 | [255] | |
678 | $ hg strip -B unknownbookmark1 -B unknownbookmark2 |
|
679 | $ hg strip -B unknownbookmark1 -B unknownbookmark2 | |
679 | abort: bookmark 'unknownbookmark1,unknownbookmark2' not found |
|
680 | abort: bookmark 'unknownbookmark1,unknownbookmark2' not found | |
680 | [255] |
|
681 | [255] | |
681 | $ hg strip -B delete -B unknownbookmark |
|
682 | $ hg strip -B delete -B unknownbookmark | |
682 | abort: bookmark 'unknownbookmark' not found |
|
683 | abort: bookmark 'unknownbookmark' not found | |
683 | [255] |
|
684 | [255] | |
684 | $ hg strip -B delete |
|
685 | $ hg strip -B delete | |
685 | 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) | |
686 | bookmark 'delete' deleted |
|
687 | bookmark 'delete' deleted | |
687 | $ hg id -ir 6:2702dd0c91e7 |
|
688 | $ hg id -ir 6:2702dd0c91e7 | |
688 | abort: unknown revision '2702dd0c91e7'! |
|
689 | abort: unknown revision '2702dd0c91e7'! | |
689 | [255] |
|
690 | [255] | |
690 | $ hg update B |
|
691 | $ hg update B | |
691 | 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 | |
692 | (activating bookmark B) |
|
693 | (activating bookmark B) | |
693 | $ echo a > a |
|
694 | $ echo a > a | |
694 | $ hg add a |
|
695 | $ hg add a | |
695 | $ hg strip -B B |
|
696 | $ hg strip -B B | |
696 | abort: local changes found |
|
697 | abort: local changes found | |
697 | [255] |
|
698 | [255] | |
698 | $ hg bookmarks |
|
699 | $ hg bookmarks | |
699 | * B 6:ff43616e5d0f |
|
700 | * B 6:ff43616e5d0f | |
700 |
|
701 | |||
701 | Make sure no one adds back a -b option: |
|
702 | Make sure no one adds back a -b option: | |
702 |
|
703 | |||
703 | $ hg strip -b tip |
|
704 | $ hg strip -b tip | |
704 | hg strip: option -b not recognized |
|
705 | hg strip: option -b not recognized | |
705 | hg strip [-k] [-f] [-B bookmark] [-r] REV... |
|
706 | hg strip [-k] [-f] [-B bookmark] [-r] REV... | |
706 |
|
707 | |||
707 | strip changesets and all their descendants from the repository |
|
708 | strip changesets and all their descendants from the repository | |
708 |
|
709 | |||
709 | (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) | |
710 |
|
711 | |||
711 | options ([+] can be repeated): |
|
712 | options ([+] can be repeated): | |
712 |
|
713 | |||
713 | -r --rev REV [+] strip specified revision (optional, can specify |
|
714 | -r --rev REV [+] strip specified revision (optional, can specify | |
714 | revisions without this option) |
|
715 | revisions without this option) | |
715 | -f --force force removal of changesets, discard uncommitted |
|
716 | -f --force force removal of changesets, discard uncommitted | |
716 | changes (no backup) |
|
717 | changes (no backup) | |
717 | --no-backup no backups |
|
718 | --no-backup no backups | |
718 | -k --keep do not modify working directory during strip |
|
719 | -k --keep do not modify working directory during strip | |
719 | -B --bookmark VALUE [+] remove revs only reachable from given bookmark |
|
720 | -B --bookmark VALUE [+] remove revs only reachable from given bookmark | |
720 | --mq operate on patch repository |
|
721 | --mq operate on patch repository | |
721 |
|
722 | |||
722 | (use 'hg strip -h' to show more help) |
|
723 | (use 'hg strip -h' to show more help) | |
723 | [255] |
|
724 | [255] | |
724 |
|
725 | |||
725 | $ cd .. |
|
726 | $ cd .. | |
726 |
|
727 | |||
727 | Verify bundles don't get overwritten: |
|
728 | Verify bundles don't get overwritten: | |
728 |
|
729 | |||
729 | $ hg init doublebundle |
|
730 | $ hg init doublebundle | |
730 | $ cd doublebundle |
|
731 | $ cd doublebundle | |
731 | $ touch a |
|
732 | $ touch a | |
732 | $ hg commit -Aqm a |
|
733 | $ hg commit -Aqm a | |
733 | $ touch b |
|
734 | $ touch b | |
734 | $ hg commit -Aqm b |
|
735 | $ hg commit -Aqm b | |
735 | $ hg strip -r 0 |
|
736 | $ hg strip -r 0 | |
736 | 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 | |
737 | saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-e68910bd-backup.hg |
|
738 | saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-e68910bd-backup.hg | |
738 | $ ls .hg/strip-backup |
|
739 | $ ls .hg/strip-backup | |
739 | 3903775176ed-e68910bd-backup.hg |
|
740 | 3903775176ed-e68910bd-backup.hg | |
740 | $ 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 | |
741 | $ hg strip -r 0 |
|
742 | $ hg strip -r 0 | |
742 | saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-54390173-backup.hg |
|
743 | saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-54390173-backup.hg | |
743 | $ ls .hg/strip-backup |
|
744 | $ ls .hg/strip-backup | |
744 | 3903775176ed-54390173-backup.hg |
|
745 | 3903775176ed-54390173-backup.hg | |
745 | 3903775176ed-e68910bd-backup.hg |
|
746 | 3903775176ed-e68910bd-backup.hg | |
746 | $ cd .. |
|
747 | $ cd .. | |
747 |
|
748 | |||
748 | Test that we only bundle the stripped changesets (issue4736) |
|
749 | Test that we only bundle the stripped changesets (issue4736) | |
749 | ------------------------------------------------------------ |
|
750 | ------------------------------------------------------------ | |
750 |
|
751 | |||
751 | initialization (previous repo is empty anyway) |
|
752 | initialization (previous repo is empty anyway) | |
752 |
|
753 | |||
753 | $ hg init issue4736 |
|
754 | $ hg init issue4736 | |
754 | $ cd issue4736 |
|
755 | $ cd issue4736 | |
755 | $ echo a > a |
|
756 | $ echo a > a | |
756 | $ hg add a |
|
757 | $ hg add a | |
757 | $ hg commit -m commitA |
|
758 | $ hg commit -m commitA | |
758 | $ echo b > b |
|
759 | $ echo b > b | |
759 | $ hg add b |
|
760 | $ hg add b | |
760 | $ hg commit -m commitB |
|
761 | $ hg commit -m commitB | |
761 | $ echo c > c |
|
762 | $ echo c > c | |
762 | $ hg add c |
|
763 | $ hg add c | |
763 | $ hg commit -m commitC |
|
764 | $ hg commit -m commitC | |
764 | $ hg up 'desc(commitB)' |
|
765 | $ hg up 'desc(commitB)' | |
765 | 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 | |
766 | $ echo d > d |
|
767 | $ echo d > d | |
767 | $ hg add d |
|
768 | $ hg add d | |
768 | $ hg commit -m commitD |
|
769 | $ hg commit -m commitD | |
769 | created new head |
|
770 | created new head | |
770 | $ hg up 'desc(commitC)' |
|
771 | $ hg up 'desc(commitC)' | |
771 | 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 | |
772 | $ hg merge 'desc(commitD)' |
|
773 | $ hg merge 'desc(commitD)' | |
773 | 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 | |
774 | (branch merge, don't forget to commit) |
|
775 | (branch merge, don't forget to commit) | |
775 | $ hg ci -m 'mergeCD' |
|
776 | $ hg ci -m 'mergeCD' | |
776 | $ hg log -G |
|
777 | $ hg log -G | |
777 | @ changeset: 4:d8db9d137221 |
|
778 | @ changeset: 4:d8db9d137221 | |
778 | |\ tag: tip |
|
779 | |\ tag: tip | |
779 | | | parent: 2:5c51d8d6557d |
|
780 | | | parent: 2:5c51d8d6557d | |
780 | | | parent: 3:6625a5168474 |
|
781 | | | parent: 3:6625a5168474 | |
781 | | | user: test |
|
782 | | | user: test | |
782 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
783 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
783 | | | summary: mergeCD |
|
784 | | | summary: mergeCD | |
784 | | | |
|
785 | | | | |
785 | | o changeset: 3:6625a5168474 |
|
786 | | o changeset: 3:6625a5168474 | |
786 | | | parent: 1:eca11cf91c71 |
|
787 | | | parent: 1:eca11cf91c71 | |
787 | | | user: test |
|
788 | | | user: test | |
788 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
789 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
789 | | | summary: commitD |
|
790 | | | summary: commitD | |
790 | | | |
|
791 | | | | |
791 | o | changeset: 2:5c51d8d6557d |
|
792 | o | changeset: 2:5c51d8d6557d | |
792 | |/ user: test |
|
793 | |/ user: test | |
793 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
794 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
794 | | summary: commitC |
|
795 | | summary: commitC | |
795 | | |
|
796 | | | |
796 | o changeset: 1:eca11cf91c71 |
|
797 | o changeset: 1:eca11cf91c71 | |
797 | | user: test |
|
798 | | user: test | |
798 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
799 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
799 | | summary: commitB |
|
800 | | summary: commitB | |
800 | | |
|
801 | | | |
801 | o changeset: 0:105141ef12d0 |
|
802 | o changeset: 0:105141ef12d0 | |
802 | user: test |
|
803 | user: test | |
803 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
804 | date: Thu Jan 01 00:00:00 1970 +0000 | |
804 | summary: commitA |
|
805 | summary: commitA | |
805 |
|
806 | |||
806 |
|
807 | |||
807 | Check bundle behavior: |
|
808 | Check bundle behavior: | |
808 |
|
809 | |||
809 | $ hg bundle -r 'desc(mergeCD)' --base 'desc(commitC)' ../issue4736.hg |
|
810 | $ hg bundle -r 'desc(mergeCD)' --base 'desc(commitC)' ../issue4736.hg | |
810 | 2 changesets found |
|
811 | 2 changesets found | |
811 | $ hg log -r 'bundle()' -R ../issue4736.hg |
|
812 | $ hg log -r 'bundle()' -R ../issue4736.hg | |
812 | changeset: 3:6625a5168474 |
|
813 | changeset: 3:6625a5168474 | |
813 | parent: 1:eca11cf91c71 |
|
814 | parent: 1:eca11cf91c71 | |
814 | user: test |
|
815 | user: test | |
815 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
816 | date: Thu Jan 01 00:00:00 1970 +0000 | |
816 | summary: commitD |
|
817 | summary: commitD | |
817 |
|
818 | |||
818 | changeset: 4:d8db9d137221 |
|
819 | changeset: 4:d8db9d137221 | |
819 | tag: tip |
|
820 | tag: tip | |
820 | parent: 2:5c51d8d6557d |
|
821 | parent: 2:5c51d8d6557d | |
821 | parent: 3:6625a5168474 |
|
822 | parent: 3:6625a5168474 | |
822 | user: test |
|
823 | user: test | |
823 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
824 | date: Thu Jan 01 00:00:00 1970 +0000 | |
824 | summary: mergeCD |
|
825 | summary: mergeCD | |
825 |
|
826 | |||
826 |
|
827 | |||
827 | check strip behavior |
|
828 | check strip behavior | |
828 |
|
829 | |||
829 | $ hg --config extensions.strip= strip 'desc(commitD)' --debug |
|
830 | $ hg --config extensions.strip= strip 'desc(commitD)' --debug | |
830 | resolving manifests |
|
831 | resolving manifests | |
831 | branchmerge: False, force: True, partial: False |
|
832 | branchmerge: False, force: True, partial: False | |
832 | ancestor: d8db9d137221+, local: d8db9d137221+, remote: eca11cf91c71 |
|
833 | ancestor: d8db9d137221+, local: d8db9d137221+, remote: eca11cf91c71 | |
833 | c: other deleted -> r |
|
834 | c: other deleted -> r | |
834 | removing c |
|
835 | removing c | |
835 | d: other deleted -> r |
|
836 | d: other deleted -> r | |
836 | removing d |
|
837 | removing d | |
837 | starting 4 threads for background file closing (?) |
|
838 | starting 4 threads for background file closing (?) | |
838 | 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 | |
839 | 2 changesets found |
|
840 | 2 changesets found | |
840 | list of changesets: |
|
841 | list of changesets: | |
841 | 6625a516847449b6f0fa3737b9ba56e9f0f3032c |
|
842 | 6625a516847449b6f0fa3737b9ba56e9f0f3032c | |
842 | d8db9d1372214336d2b5570f20ee468d2c72fa8b |
|
843 | d8db9d1372214336d2b5570f20ee468d2c72fa8b | |
843 | bundle2-output-bundle: "HG20", (1 params) 3 parts total |
|
844 | bundle2-output-bundle: "HG20", (1 params) 3 parts total | |
844 | bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload |
|
845 | bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload | |
845 | bundle2-output-part: "cache:rev-branch-cache" streamed payload |
|
846 | bundle2-output-part: "cache:rev-branch-cache" streamed payload | |
846 | bundle2-output-part: "phase-heads" 24 bytes payload |
|
847 | bundle2-output-part: "phase-heads" 24 bytes payload | |
847 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/6625a5168474-345bb43d-backup.hg |
|
848 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/6625a5168474-345bb43d-backup.hg | |
848 | updating the branch cache |
|
849 | updating the branch cache | |
849 | invalid branchheads cache (served): tip differs |
|
850 | invalid branchheads cache (served): tip differs | |
850 | $ hg log -G |
|
851 | $ hg log -G | |
851 | o changeset: 2:5c51d8d6557d |
|
852 | o changeset: 2:5c51d8d6557d | |
852 | | tag: tip |
|
853 | | tag: tip | |
853 | | user: test |
|
854 | | user: test | |
854 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
855 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
855 | | summary: commitC |
|
856 | | summary: commitC | |
856 | | |
|
857 | | | |
857 | @ changeset: 1:eca11cf91c71 |
|
858 | @ changeset: 1:eca11cf91c71 | |
858 | | user: test |
|
859 | | user: test | |
859 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
860 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
860 | | summary: commitB |
|
861 | | summary: commitB | |
861 | | |
|
862 | | | |
862 | o changeset: 0:105141ef12d0 |
|
863 | o changeset: 0:105141ef12d0 | |
863 | user: test |
|
864 | user: test | |
864 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
865 | date: Thu Jan 01 00:00:00 1970 +0000 | |
865 | summary: commitA |
|
866 | summary: commitA | |
866 |
|
867 | |||
867 |
|
868 | |||
868 | strip backup content |
|
869 | strip backup content | |
869 |
|
870 | |||
870 | $ hg log -r 'bundle()' -R .hg/strip-backup/6625a5168474-*-backup.hg |
|
871 | $ hg log -r 'bundle()' -R .hg/strip-backup/6625a5168474-*-backup.hg | |
871 | changeset: 3:6625a5168474 |
|
872 | changeset: 3:6625a5168474 | |
872 | parent: 1:eca11cf91c71 |
|
873 | parent: 1:eca11cf91c71 | |
873 | user: test |
|
874 | user: test | |
874 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
875 | date: Thu Jan 01 00:00:00 1970 +0000 | |
875 | summary: commitD |
|
876 | summary: commitD | |
876 |
|
877 | |||
877 | changeset: 4:d8db9d137221 |
|
878 | changeset: 4:d8db9d137221 | |
878 | tag: tip |
|
879 | tag: tip | |
879 | parent: 2:5c51d8d6557d |
|
880 | parent: 2:5c51d8d6557d | |
880 | parent: 3:6625a5168474 |
|
881 | parent: 3:6625a5168474 | |
881 | user: test |
|
882 | user: test | |
882 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
883 | date: Thu Jan 01 00:00:00 1970 +0000 | |
883 | summary: mergeCD |
|
884 | summary: mergeCD | |
884 |
|
885 | |||
885 | 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. | |
886 |
|
887 | |||
887 | $ cat > ../stripstalephasecache.py << EOF |
|
888 | $ cat > ../stripstalephasecache.py << EOF | |
888 | > from mercurial import extensions, localrepo |
|
889 | > from mercurial import extensions, localrepo | |
889 | > def transactioncallback(orig, repo, desc, *args, **kwargs): |
|
890 | > def transactioncallback(orig, repo, desc, *args, **kwargs): | |
890 | > def test(transaction): |
|
891 | > def test(transaction): | |
891 | > # observe cache inconsistency |
|
892 | > # observe cache inconsistency | |
892 | > try: |
|
893 | > try: | |
893 | > [repo.changelog.node(r) for r in repo.revs(b"not public()")] |
|
894 | > [repo.changelog.node(r) for r in repo.revs(b"not public()")] | |
894 | > except IndexError: |
|
895 | > except IndexError: | |
895 | > repo.ui.status(b"Index error!\n") |
|
896 | > repo.ui.status(b"Index error!\n") | |
896 | > transaction = orig(repo, desc, *args, **kwargs) |
|
897 | > transaction = orig(repo, desc, *args, **kwargs) | |
897 | > # warm up the phase cache |
|
898 | > # warm up the phase cache | |
898 | > list(repo.revs(b"not public()")) |
|
899 | > list(repo.revs(b"not public()")) | |
899 | > if desc != b'strip': |
|
900 | > if desc != b'strip': | |
900 | > transaction.addpostclose(b"phase invalidation test", test) |
|
901 | > transaction.addpostclose(b"phase invalidation test", test) | |
901 | > return transaction |
|
902 | > return transaction | |
902 | > def extsetup(ui): |
|
903 | > def extsetup(ui): | |
903 | > extensions.wrapfunction(localrepo.localrepository, b"transaction", |
|
904 | > extensions.wrapfunction(localrepo.localrepository, b"transaction", | |
904 | > transactioncallback) |
|
905 | > transactioncallback) | |
905 | > EOF |
|
906 | > EOF | |
906 | $ hg up -C 2 |
|
907 | $ hg up -C 2 | |
907 | 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 | |
908 | $ echo k > k |
|
909 | $ echo k > k | |
909 | $ hg add k |
|
910 | $ hg add k | |
910 | $ hg commit -m commitK |
|
911 | $ hg commit -m commitK | |
911 | $ echo l > l |
|
912 | $ echo l > l | |
912 | $ hg add l |
|
913 | $ hg add l | |
913 | $ hg commit -m commitL |
|
914 | $ hg commit -m commitL | |
914 | $ hg book -r tip blah |
|
915 | $ hg book -r tip blah | |
915 | $ hg strip ".^" --config extensions.crash=$TESTTMP/stripstalephasecache.py |
|
916 | $ hg strip ".^" --config extensions.crash=$TESTTMP/stripstalephasecache.py | |
916 | 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 | |
917 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/8f0b4384875c-4fa10deb-backup.hg |
|
918 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/8f0b4384875c-4fa10deb-backup.hg | |
918 | $ hg up -C 1 |
|
919 | $ hg up -C 1 | |
919 | 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 | |
920 |
|
921 | |||
921 | Error during post-close callback of the strip transaction |
|
922 | Error during post-close callback of the strip transaction | |
922 | (They should be gracefully handled and reported) |
|
923 | (They should be gracefully handled and reported) | |
923 |
|
924 | |||
924 | $ cat > ../crashstrip.py << EOF |
|
925 | $ cat > ../crashstrip.py << EOF | |
925 | > from mercurial import error |
|
926 | > from mercurial import error | |
926 | > def reposetup(ui, repo): |
|
927 | > def reposetup(ui, repo): | |
927 | > class crashstriprepo(repo.__class__): |
|
928 | > class crashstriprepo(repo.__class__): | |
928 | > def transaction(self, desc, *args, **kwargs): |
|
929 | > def transaction(self, desc, *args, **kwargs): | |
929 | > tr = super(crashstriprepo, self).transaction(desc, *args, **kwargs) |
|
930 | > tr = super(crashstriprepo, self).transaction(desc, *args, **kwargs) | |
930 | > if desc == b'strip': |
|
931 | > if desc == b'strip': | |
931 | > def crash(tra): raise error.Abort(b'boom') |
|
932 | > def crash(tra): raise error.Abort(b'boom') | |
932 | > tr.addpostclose(b'crash', crash) |
|
933 | > tr.addpostclose(b'crash', crash) | |
933 | > return tr |
|
934 | > return tr | |
934 | > repo.__class__ = crashstriprepo |
|
935 | > repo.__class__ = crashstriprepo | |
935 | > EOF |
|
936 | > EOF | |
936 | $ hg strip tip --config extensions.crash=$TESTTMP/crashstrip.py |
|
937 | $ hg strip tip --config extensions.crash=$TESTTMP/crashstrip.py | |
937 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg |
|
938 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg | |
938 | strip failed, backup bundle stored in '$TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg' |
|
939 | strip failed, backup bundle stored in '$TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg' | |
939 | abort: boom |
|
940 | abort: boom | |
940 | [255] |
|
941 | [255] | |
941 |
|
942 | |||
942 | test stripping a working directory parent doesn't switch named branches |
|
943 | test stripping a working directory parent doesn't switch named branches | |
943 |
|
944 | |||
944 | $ hg log -G |
|
945 | $ hg log -G | |
945 | @ changeset: 1:eca11cf91c71 |
|
946 | @ changeset: 1:eca11cf91c71 | |
946 | | tag: tip |
|
947 | | tag: tip | |
947 | | user: test |
|
948 | | user: test | |
948 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
949 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
949 | | summary: commitB |
|
950 | | summary: commitB | |
950 | | |
|
951 | | | |
951 | o changeset: 0:105141ef12d0 |
|
952 | o changeset: 0:105141ef12d0 | |
952 | user: test |
|
953 | user: test | |
953 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
954 | date: Thu Jan 01 00:00:00 1970 +0000 | |
954 | summary: commitA |
|
955 | summary: commitA | |
955 |
|
956 | |||
956 |
|
957 | |||
957 | $ hg branch new-branch |
|
958 | $ hg branch new-branch | |
958 | marked working directory as branch new-branch |
|
959 | marked working directory as branch new-branch | |
959 | (branches are permanent and global, did you want a bookmark?) |
|
960 | (branches are permanent and global, did you want a bookmark?) | |
960 | $ hg ci -m "start new branch" |
|
961 | $ hg ci -m "start new branch" | |
961 | $ echo 'foo' > foo.txt |
|
962 | $ echo 'foo' > foo.txt | |
962 | $ hg ci -Aqm foo |
|
963 | $ hg ci -Aqm foo | |
963 | $ hg up default |
|
964 | $ hg up default | |
964 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
965 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
965 | $ echo 'bar' > bar.txt |
|
966 | $ echo 'bar' > bar.txt | |
966 | $ hg ci -Aqm bar |
|
967 | $ hg ci -Aqm bar | |
967 | $ hg up new-branch |
|
968 | $ hg up new-branch | |
968 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
969 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
969 | $ hg merge default |
|
970 | $ hg merge default | |
970 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
971 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
971 | (branch merge, don't forget to commit) |
|
972 | (branch merge, don't forget to commit) | |
972 | $ hg log -G |
|
973 | $ hg log -G | |
973 | @ changeset: 4:35358f982181 |
|
974 | @ changeset: 4:35358f982181 | |
974 | | tag: tip |
|
975 | | tag: tip | |
975 | | parent: 1:eca11cf91c71 |
|
976 | | parent: 1:eca11cf91c71 | |
976 | | user: test |
|
977 | | user: test | |
977 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
978 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
978 | | summary: bar |
|
979 | | summary: bar | |
979 | | |
|
980 | | | |
980 | | @ changeset: 3:f62c6c09b707 |
|
981 | | @ changeset: 3:f62c6c09b707 | |
981 | | | branch: new-branch |
|
982 | | | branch: new-branch | |
982 | | | user: test |
|
983 | | | user: test | |
983 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
984 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
984 | | | summary: foo |
|
985 | | | summary: foo | |
985 | | | |
|
986 | | | | |
986 | | o changeset: 2:b1d33a8cadd9 |
|
987 | | o changeset: 2:b1d33a8cadd9 | |
987 | |/ branch: new-branch |
|
988 | |/ branch: new-branch | |
988 | | user: test |
|
989 | | user: test | |
989 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
990 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
990 | | summary: start new branch |
|
991 | | summary: start new branch | |
991 | | |
|
992 | | | |
992 | o changeset: 1:eca11cf91c71 |
|
993 | o changeset: 1:eca11cf91c71 | |
993 | | user: test |
|
994 | | user: test | |
994 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
995 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
995 | | summary: commitB |
|
996 | | summary: commitB | |
996 | | |
|
997 | | | |
997 | o changeset: 0:105141ef12d0 |
|
998 | o changeset: 0:105141ef12d0 | |
998 | user: test |
|
999 | user: test | |
999 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1000 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1000 | summary: commitA |
|
1001 | summary: commitA | |
1001 |
|
1002 | |||
1002 |
|
1003 | |||
1003 | $ hg strip --force -r 35358f982181 |
|
1004 | $ hg strip --force -r 35358f982181 | |
1004 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1005 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1005 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-50d992d4-backup.hg |
|
1006 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-50d992d4-backup.hg | |
1006 | $ hg log -G |
|
1007 | $ hg log -G | |
1007 | @ changeset: 3:f62c6c09b707 |
|
1008 | @ changeset: 3:f62c6c09b707 | |
1008 | | branch: new-branch |
|
1009 | | branch: new-branch | |
1009 | | tag: tip |
|
1010 | | tag: tip | |
1010 | | user: test |
|
1011 | | user: test | |
1011 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1012 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1012 | | summary: foo |
|
1013 | | summary: foo | |
1013 | | |
|
1014 | | | |
1014 | o changeset: 2:b1d33a8cadd9 |
|
1015 | o changeset: 2:b1d33a8cadd9 | |
1015 | | branch: new-branch |
|
1016 | | branch: new-branch | |
1016 | | user: test |
|
1017 | | user: test | |
1017 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1018 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1018 | | summary: start new branch |
|
1019 | | summary: start new branch | |
1019 | | |
|
1020 | | | |
1020 | o changeset: 1:eca11cf91c71 |
|
1021 | o changeset: 1:eca11cf91c71 | |
1021 | | user: test |
|
1022 | | user: test | |
1022 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1023 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1023 | | summary: commitB |
|
1024 | | summary: commitB | |
1024 | | |
|
1025 | | | |
1025 | o changeset: 0:105141ef12d0 |
|
1026 | o changeset: 0:105141ef12d0 | |
1026 | user: test |
|
1027 | user: test | |
1027 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1028 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1028 | summary: commitA |
|
1029 | summary: commitA | |
1029 |
|
1030 | |||
1030 |
|
1031 | |||
1031 | $ hg up default |
|
1032 | $ hg up default | |
1032 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1033 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1033 | $ echo 'bar' > bar.txt |
|
1034 | $ echo 'bar' > bar.txt | |
1034 | $ hg ci -Aqm bar |
|
1035 | $ hg ci -Aqm bar | |
1035 | $ hg up new-branch |
|
1036 | $ hg up new-branch | |
1036 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1037 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1037 | $ hg merge default |
|
1038 | $ hg merge default | |
1038 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1039 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1039 | (branch merge, don't forget to commit) |
|
1040 | (branch merge, don't forget to commit) | |
1040 | $ hg ci -m merge |
|
1041 | $ hg ci -m merge | |
1041 | $ hg log -G |
|
1042 | $ hg log -G | |
1042 | @ changeset: 5:4cf5e92caec2 |
|
1043 | @ changeset: 5:4cf5e92caec2 | |
1043 | |\ branch: new-branch |
|
1044 | |\ branch: new-branch | |
1044 | | | tag: tip |
|
1045 | | | tag: tip | |
1045 | | | parent: 3:f62c6c09b707 |
|
1046 | | | parent: 3:f62c6c09b707 | |
1046 | | | parent: 4:35358f982181 |
|
1047 | | | parent: 4:35358f982181 | |
1047 | | | user: test |
|
1048 | | | user: test | |
1048 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1049 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1049 | | | summary: merge |
|
1050 | | | summary: merge | |
1050 | | | |
|
1051 | | | | |
1051 | | o changeset: 4:35358f982181 |
|
1052 | | o changeset: 4:35358f982181 | |
1052 | | | parent: 1:eca11cf91c71 |
|
1053 | | | parent: 1:eca11cf91c71 | |
1053 | | | user: test |
|
1054 | | | user: test | |
1054 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1055 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1055 | | | summary: bar |
|
1056 | | | summary: bar | |
1056 | | | |
|
1057 | | | | |
1057 | o | changeset: 3:f62c6c09b707 |
|
1058 | o | changeset: 3:f62c6c09b707 | |
1058 | | | branch: new-branch |
|
1059 | | | branch: new-branch | |
1059 | | | user: test |
|
1060 | | | user: test | |
1060 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1061 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1061 | | | summary: foo |
|
1062 | | | summary: foo | |
1062 | | | |
|
1063 | | | | |
1063 | o | changeset: 2:b1d33a8cadd9 |
|
1064 | o | changeset: 2:b1d33a8cadd9 | |
1064 | |/ branch: new-branch |
|
1065 | |/ branch: new-branch | |
1065 | | user: test |
|
1066 | | user: test | |
1066 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1067 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1067 | | summary: start new branch |
|
1068 | | summary: start new branch | |
1068 | | |
|
1069 | | | |
1069 | o changeset: 1:eca11cf91c71 |
|
1070 | o changeset: 1:eca11cf91c71 | |
1070 | | user: test |
|
1071 | | user: test | |
1071 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1072 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1072 | | summary: commitB |
|
1073 | | summary: commitB | |
1073 | | |
|
1074 | | | |
1074 | o changeset: 0:105141ef12d0 |
|
1075 | o changeset: 0:105141ef12d0 | |
1075 | user: test |
|
1076 | user: test | |
1076 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1077 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1077 | summary: commitA |
|
1078 | summary: commitA | |
1078 |
|
1079 | |||
1079 |
|
1080 | |||
1080 | $ hg strip -r 35358f982181 |
|
1081 | $ hg strip -r 35358f982181 | |
1081 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1082 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1082 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg |
|
1083 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg | |
1083 | $ hg log -G |
|
1084 | $ hg log -G | |
1084 | @ changeset: 3:f62c6c09b707 |
|
1085 | @ changeset: 3:f62c6c09b707 | |
1085 | | branch: new-branch |
|
1086 | | branch: new-branch | |
1086 | | tag: tip |
|
1087 | | tag: tip | |
1087 | | user: test |
|
1088 | | user: test | |
1088 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1089 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1089 | | summary: foo |
|
1090 | | summary: foo | |
1090 | | |
|
1091 | | | |
1091 | o changeset: 2:b1d33a8cadd9 |
|
1092 | o changeset: 2:b1d33a8cadd9 | |
1092 | | branch: new-branch |
|
1093 | | branch: new-branch | |
1093 | | user: test |
|
1094 | | user: test | |
1094 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1095 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1095 | | summary: start new branch |
|
1096 | | summary: start new branch | |
1096 | | |
|
1097 | | | |
1097 | o changeset: 1:eca11cf91c71 |
|
1098 | o changeset: 1:eca11cf91c71 | |
1098 | | user: test |
|
1099 | | user: test | |
1099 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1100 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1100 | | summary: commitB |
|
1101 | | summary: commitB | |
1101 | | |
|
1102 | | | |
1102 | o changeset: 0:105141ef12d0 |
|
1103 | o changeset: 0:105141ef12d0 | |
1103 | user: test |
|
1104 | user: test | |
1104 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1105 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1105 | summary: commitA |
|
1106 | summary: commitA | |
1106 |
|
1107 | |||
1107 |
|
1108 | |||
1108 | $ hg unbundle -u $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg |
|
1109 | $ hg unbundle -u $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg | |
1109 | adding changesets |
|
1110 | adding changesets | |
1110 | adding manifests |
|
1111 | adding manifests | |
1111 | adding file changes |
|
1112 | adding file changes | |
1112 | added 2 changesets with 1 changes to 1 files |
|
1113 | added 2 changesets with 1 changes to 1 files | |
1113 | new changesets 35358f982181:4cf5e92caec2 |
|
1114 | new changesets 35358f982181:4cf5e92caec2 | |
1114 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1115 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1115 |
|
1116 | |||
1116 | $ hg strip -k -r 35358f982181 |
|
1117 | $ hg strip -k -r 35358f982181 | |
1117 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg |
|
1118 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg | |
1118 | $ hg log -G |
|
1119 | $ hg log -G | |
1119 | @ changeset: 3:f62c6c09b707 |
|
1120 | @ changeset: 3:f62c6c09b707 | |
1120 | | branch: new-branch |
|
1121 | | branch: new-branch | |
1121 | | tag: tip |
|
1122 | | tag: tip | |
1122 | | user: test |
|
1123 | | user: test | |
1123 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1124 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1124 | | summary: foo |
|
1125 | | summary: foo | |
1125 | | |
|
1126 | | | |
1126 | o changeset: 2:b1d33a8cadd9 |
|
1127 | o changeset: 2:b1d33a8cadd9 | |
1127 | | branch: new-branch |
|
1128 | | branch: new-branch | |
1128 | | user: test |
|
1129 | | user: test | |
1129 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1130 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1130 | | summary: start new branch |
|
1131 | | summary: start new branch | |
1131 | | |
|
1132 | | | |
1132 | o changeset: 1:eca11cf91c71 |
|
1133 | o changeset: 1:eca11cf91c71 | |
1133 | | user: test |
|
1134 | | user: test | |
1134 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1135 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1135 | | summary: commitB |
|
1136 | | summary: commitB | |
1136 | | |
|
1137 | | | |
1137 | o changeset: 0:105141ef12d0 |
|
1138 | o changeset: 0:105141ef12d0 | |
1138 | user: test |
|
1139 | user: test | |
1139 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1140 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1140 | summary: commitA |
|
1141 | summary: commitA | |
1141 |
|
1142 | |||
1142 | $ hg diff |
|
1143 | $ hg diff | |
1143 | diff -r f62c6c09b707 bar.txt |
|
1144 | diff -r f62c6c09b707 bar.txt | |
1144 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1145 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1145 | +++ b/bar.txt Thu Jan 01 00:00:00 1970 +0000 |
|
1146 | +++ b/bar.txt Thu Jan 01 00:00:00 1970 +0000 | |
1146 | @@ -0,0 +1,1 @@ |
|
1147 | @@ -0,0 +1,1 @@ | |
1147 | +bar |
|
1148 | +bar | |
1148 |
|
1149 | |||
1149 | Use delayedstrip to strip inside a transaction |
|
1150 | Use delayedstrip to strip inside a transaction | |
1150 |
|
1151 | |||
1151 | $ cd $TESTTMP |
|
1152 | $ cd $TESTTMP | |
1152 | $ hg init delayedstrip |
|
1153 | $ hg init delayedstrip | |
1153 | $ cd delayedstrip |
|
1154 | $ cd delayedstrip | |
1154 | $ hg debugdrawdag <<'EOS' |
|
1155 | $ hg debugdrawdag <<'EOS' | |
1155 | > D |
|
1156 | > D | |
1156 | > | |
|
1157 | > | | |
1157 | > C F H # Commit on top of "I", |
|
1158 | > C F H # Commit on top of "I", | |
1158 | > | |/| # Strip B+D+I+E+G+H+Z |
|
1159 | > | |/| # Strip B+D+I+E+G+H+Z | |
1159 | > I B E G |
|
1160 | > I B E G | |
1160 | > \|/ |
|
1161 | > \|/ | |
1161 | > A Z |
|
1162 | > A Z | |
1162 | > EOS |
|
1163 | > EOS | |
1163 | $ cp -R . ../scmutilcleanup |
|
1164 | $ cp -R . ../scmutilcleanup | |
1164 |
|
1165 | |||
1165 | $ hg up -C I |
|
1166 | $ hg up -C I | |
1166 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1167 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1167 | $ echo 3 >> I |
|
1168 | $ echo 3 >> I | |
1168 | $ cat > $TESTTMP/delayedstrip.py <<EOF |
|
1169 | $ cat > $TESTTMP/delayedstrip.py <<EOF | |
1169 | > from __future__ import absolute_import |
|
1170 | > from __future__ import absolute_import | |
1170 | > from mercurial import commands, registrar, repair |
|
1171 | > from mercurial import commands, registrar, repair | |
1171 | > cmdtable = {} |
|
1172 | > cmdtable = {} | |
1172 | > command = registrar.command(cmdtable) |
|
1173 | > command = registrar.command(cmdtable) | |
1173 | > @command(b'testdelayedstrip') |
|
1174 | > @command(b'testdelayedstrip') | |
1174 | > def testdelayedstrip(ui, repo): |
|
1175 | > def testdelayedstrip(ui, repo): | |
1175 | > def getnodes(expr): |
|
1176 | > def getnodes(expr): | |
1176 | > return [repo.changelog.node(r) for r in repo.revs(expr)] |
|
1177 | > return [repo.changelog.node(r) for r in repo.revs(expr)] | |
1177 | > with repo.wlock(): |
|
1178 | > with repo.wlock(): | |
1178 | > with repo.lock(): |
|
1179 | > with repo.lock(): | |
1179 | > with repo.transaction(b'delayedstrip'): |
|
1180 | > with repo.transaction(b'delayedstrip'): | |
1180 | > repair.delayedstrip(ui, repo, getnodes(b'B+I+Z+D+E'), b'J') |
|
1181 | > repair.delayedstrip(ui, repo, getnodes(b'B+I+Z+D+E'), b'J') | |
1181 | > repair.delayedstrip(ui, repo, getnodes(b'G+H+Z'), b'I') |
|
1182 | > repair.delayedstrip(ui, repo, getnodes(b'G+H+Z'), b'I') | |
1182 | > commands.commit(ui, repo, message=b'J', date=b'0 0') |
|
1183 | > commands.commit(ui, repo, message=b'J', date=b'0 0') | |
1183 | > EOF |
|
1184 | > EOF | |
1184 | $ hg testdelayedstrip --config extensions.t=$TESTTMP/delayedstrip.py |
|
1185 | $ hg testdelayedstrip --config extensions.t=$TESTTMP/delayedstrip.py | |
1185 | warning: orphaned descendants detected, not stripping 08ebfeb61bac, 112478962961, 7fb047a69f22 |
|
1186 | warning: orphaned descendants detected, not stripping 08ebfeb61bac, 112478962961, 7fb047a69f22 | |
1186 | saved backup bundle to $TESTTMP/delayedstrip/.hg/strip-backup/f585351a92f8-17475721-I.hg |
|
1187 | saved backup bundle to $TESTTMP/delayedstrip/.hg/strip-backup/f585351a92f8-17475721-I.hg | |
1187 |
|
1188 | |||
1188 | $ hg log -G -T '{rev}:{node|short} {desc}' -r 'sort(all(), topo)' |
|
1189 | $ hg log -G -T '{rev}:{node|short} {desc}' -r 'sort(all(), topo)' | |
1189 | @ 6:2f2d51af6205 J |
|
1190 | @ 6:2f2d51af6205 J | |
1190 | | |
|
1191 | | | |
1191 | o 3:08ebfeb61bac I |
|
1192 | o 3:08ebfeb61bac I | |
1192 | | |
|
1193 | | | |
1193 | | o 5:64a8289d2492 F |
|
1194 | | o 5:64a8289d2492 F | |
1194 | | | |
|
1195 | | | | |
1195 | | o 2:7fb047a69f22 E |
|
1196 | | o 2:7fb047a69f22 E | |
1196 | |/ |
|
1197 | |/ | |
1197 | | o 4:26805aba1e60 C |
|
1198 | | o 4:26805aba1e60 C | |
1198 | | | |
|
1199 | | | | |
1199 | | o 1:112478962961 B |
|
1200 | | o 1:112478962961 B | |
1200 | |/ |
|
1201 | |/ | |
1201 | o 0:426bada5c675 A |
|
1202 | o 0:426bada5c675 A | |
1202 |
|
1203 | |||
1203 | Test high-level scmutil.cleanupnodes API |
|
1204 | Test high-level scmutil.cleanupnodes API | |
1204 |
|
1205 | |||
1205 | $ cd $TESTTMP/scmutilcleanup |
|
1206 | $ cd $TESTTMP/scmutilcleanup | |
1206 | $ hg debugdrawdag <<'EOS' |
|
1207 | $ hg debugdrawdag <<'EOS' | |
1207 | > D2 F2 G2 # D2, F2, G2 are replacements for D, F, G |
|
1208 | > D2 F2 G2 # D2, F2, G2 are replacements for D, F, G | |
1208 | > | | | |
|
1209 | > | | | | |
1209 | > C H G |
|
1210 | > C H G | |
1210 | > EOS |
|
1211 | > EOS | |
1211 | $ for i in B C D F G I Z; do |
|
1212 | $ for i in B C D F G I Z; do | |
1212 | > hg bookmark -i -r $i b-$i |
|
1213 | > hg bookmark -i -r $i b-$i | |
1213 | > done |
|
1214 | > done | |
1214 | $ hg bookmark -i -r E 'b-F@divergent1' |
|
1215 | $ hg bookmark -i -r E 'b-F@divergent1' | |
1215 | $ hg bookmark -i -r H 'b-F@divergent2' |
|
1216 | $ hg bookmark -i -r H 'b-F@divergent2' | |
1216 | $ hg bookmark -i -r G 'b-F@divergent3' |
|
1217 | $ hg bookmark -i -r G 'b-F@divergent3' | |
1217 | $ cp -R . ../scmutilcleanup.obsstore |
|
1218 | $ cp -R . ../scmutilcleanup.obsstore | |
1218 |
|
1219 | |||
1219 | $ cat > $TESTTMP/scmutilcleanup.py <<EOF |
|
1220 | $ cat > $TESTTMP/scmutilcleanup.py <<EOF | |
1220 | > from mercurial import registrar, scmutil |
|
1221 | > from mercurial import registrar, scmutil | |
1221 | > cmdtable = {} |
|
1222 | > cmdtable = {} | |
1222 | > command = registrar.command(cmdtable) |
|
1223 | > command = registrar.command(cmdtable) | |
1223 | > @command(b'testnodescleanup') |
|
1224 | > @command(b'testnodescleanup') | |
1224 | > def testnodescleanup(ui, repo): |
|
1225 | > def testnodescleanup(ui, repo): | |
1225 | > def nodes(expr): |
|
1226 | > def nodes(expr): | |
1226 | > return [repo.changelog.node(r) for r in repo.revs(expr)] |
|
1227 | > return [repo.changelog.node(r) for r in repo.revs(expr)] | |
1227 | > def node(expr): |
|
1228 | > def node(expr): | |
1228 | > return nodes(expr)[0] |
|
1229 | > return nodes(expr)[0] | |
1229 | > with repo.wlock(): |
|
1230 | > with repo.wlock(): | |
1230 | > with repo.lock(): |
|
1231 | > with repo.lock(): | |
1231 | > with repo.transaction(b'delayedstrip'): |
|
1232 | > with repo.transaction(b'delayedstrip'): | |
1232 | > mapping = {node(b'F'): [node(b'F2')], |
|
1233 | > mapping = {node(b'F'): [node(b'F2')], | |
1233 | > node(b'D'): [node(b'D2')], |
|
1234 | > node(b'D'): [node(b'D2')], | |
1234 | > node(b'G'): [node(b'G2')]} |
|
1235 | > node(b'G'): [node(b'G2')]} | |
1235 | > scmutil.cleanupnodes(repo, mapping, b'replace') |
|
1236 | > scmutil.cleanupnodes(repo, mapping, b'replace') | |
1236 | > scmutil.cleanupnodes(repo, nodes(b'((B::)+I+Z)-D2'), |
|
1237 | > scmutil.cleanupnodes(repo, nodes(b'((B::)+I+Z)-D2'), | |
1237 | > b'replace') |
|
1238 | > b'replace') | |
1238 | > EOF |
|
1239 | > EOF | |
1239 | $ hg testnodescleanup --config extensions.t=$TESTTMP/scmutilcleanup.py |
|
1240 | $ hg testnodescleanup --config extensions.t=$TESTTMP/scmutilcleanup.py | |
1240 | warning: orphaned descendants detected, not stripping 112478962961, 1fc8102cda62, 26805aba1e60 |
|
1241 | warning: orphaned descendants detected, not stripping 112478962961, 1fc8102cda62, 26805aba1e60 | |
1241 | saved backup bundle to $TESTTMP/scmutilcleanup/.hg/strip-backup/f585351a92f8-73fb7c03-replace.hg |
|
1242 | saved backup bundle to $TESTTMP/scmutilcleanup/.hg/strip-backup/f585351a92f8-73fb7c03-replace.hg | |
1242 |
|
1243 | |||
1243 | $ hg log -G -T '{rev}:{node|short} {desc} {bookmarks}' -r 'sort(all(), topo)' |
|
1244 | $ hg log -G -T '{rev}:{node|short} {desc} {bookmarks}' -r 'sort(all(), topo)' | |
1244 | o 8:1473d4b996d1 G2 b-F@divergent3 b-G |
|
1245 | o 8:1473d4b996d1 G2 b-F@divergent3 b-G | |
1245 | | |
|
1246 | | | |
1246 | | o 7:d11b3456a873 F2 b-F |
|
1247 | | o 7:d11b3456a873 F2 b-F | |
1247 | | | |
|
1248 | | | | |
1248 | | o 5:5cb05ba470a7 H |
|
1249 | | o 5:5cb05ba470a7 H | |
1249 | |/| |
|
1250 | |/| | |
1250 | | o 3:7fb047a69f22 E b-F@divergent1 |
|
1251 | | o 3:7fb047a69f22 E b-F@divergent1 | |
1251 | | | |
|
1252 | | | | |
1252 | | | o 6:7c78f703e465 D2 b-D |
|
1253 | | | o 6:7c78f703e465 D2 b-D | |
1253 | | | | |
|
1254 | | | | | |
1254 | | | o 4:26805aba1e60 C |
|
1255 | | | o 4:26805aba1e60 C | |
1255 | | | | |
|
1256 | | | | | |
1256 | | | o 2:112478962961 B |
|
1257 | | | o 2:112478962961 B | |
1257 | | |/ |
|
1258 | | |/ | |
1258 | o | 1:1fc8102cda62 G |
|
1259 | o | 1:1fc8102cda62 G | |
1259 | / |
|
1260 | / | |
1260 | o 0:426bada5c675 A b-B b-C b-I |
|
1261 | o 0:426bada5c675 A b-B b-C b-I | |
1261 |
|
1262 | |||
1262 | $ hg bookmark |
|
1263 | $ hg bookmark | |
1263 | b-B 0:426bada5c675 |
|
1264 | b-B 0:426bada5c675 | |
1264 | b-C 0:426bada5c675 |
|
1265 | b-C 0:426bada5c675 | |
1265 | b-D 6:7c78f703e465 |
|
1266 | b-D 6:7c78f703e465 | |
1266 | b-F 7:d11b3456a873 |
|
1267 | b-F 7:d11b3456a873 | |
1267 | b-F@divergent1 3:7fb047a69f22 |
|
1268 | b-F@divergent1 3:7fb047a69f22 | |
1268 | b-F@divergent3 8:1473d4b996d1 |
|
1269 | b-F@divergent3 8:1473d4b996d1 | |
1269 | b-G 8:1473d4b996d1 |
|
1270 | b-G 8:1473d4b996d1 | |
1270 | b-I 0:426bada5c675 |
|
1271 | b-I 0:426bada5c675 | |
1271 | b-Z -1:000000000000 |
|
1272 | b-Z -1:000000000000 | |
1272 |
|
1273 | |||
1273 | Test the above using obsstore "by the way". Not directly related to strip, but |
|
1274 | Test the above using obsstore "by the way". Not directly related to strip, but | |
1274 | we have reusable code here |
|
1275 | we have reusable code here | |
1275 |
|
1276 | |||
1276 | $ cd $TESTTMP/scmutilcleanup.obsstore |
|
1277 | $ cd $TESTTMP/scmutilcleanup.obsstore | |
1277 | $ cat >> .hg/hgrc <<EOF |
|
1278 | $ cat >> .hg/hgrc <<EOF | |
1278 | > [experimental] |
|
1279 | > [experimental] | |
1279 | > evolution=true |
|
1280 | > evolution=true | |
1280 | > evolution.track-operation=1 |
|
1281 | > evolution.track-operation=1 | |
1281 | > EOF |
|
1282 | > EOF | |
1282 |
|
1283 | |||
1283 | $ hg testnodescleanup --config extensions.t=$TESTTMP/scmutilcleanup.py |
|
1284 | $ hg testnodescleanup --config extensions.t=$TESTTMP/scmutilcleanup.py | |
1284 | 4 new orphan changesets |
|
1285 | 4 new orphan changesets | |
1285 |
|
1286 | |||
1286 | $ rm .hg/localtags |
|
1287 | $ rm .hg/localtags | |
1287 | $ hg log -G -T '{rev}:{node|short} {desc} {bookmarks}' -r 'sort(all(), topo)' |
|
1288 | $ hg log -G -T '{rev}:{node|short} {desc} {bookmarks}' -r 'sort(all(), topo)' | |
1288 | * 12:1473d4b996d1 G2 b-F@divergent3 b-G |
|
1289 | * 12:1473d4b996d1 G2 b-F@divergent3 b-G | |
1289 | | |
|
1290 | | | |
1290 | | * 11:d11b3456a873 F2 b-F |
|
1291 | | * 11:d11b3456a873 F2 b-F | |
1291 | | | |
|
1292 | | | | |
1292 | | * 8:5cb05ba470a7 H |
|
1293 | | * 8:5cb05ba470a7 H | |
1293 | |/| |
|
1294 | |/| | |
1294 | | o 4:7fb047a69f22 E b-F@divergent1 |
|
1295 | | o 4:7fb047a69f22 E b-F@divergent1 | |
1295 | | | |
|
1296 | | | | |
1296 | | | * 10:7c78f703e465 D2 b-D |
|
1297 | | | * 10:7c78f703e465 D2 b-D | |
1297 | | | | |
|
1298 | | | | | |
1298 | | | x 6:26805aba1e60 C |
|
1299 | | | x 6:26805aba1e60 C | |
1299 | | | | |
|
1300 | | | | | |
1300 | | | x 3:112478962961 B |
|
1301 | | | x 3:112478962961 B | |
1301 | | |/ |
|
1302 | | |/ | |
1302 | x | 1:1fc8102cda62 G |
|
1303 | x | 1:1fc8102cda62 G | |
1303 | / |
|
1304 | / | |
1304 | o 0:426bada5c675 A b-B b-C b-I |
|
1305 | o 0:426bada5c675 A b-B b-C b-I | |
1305 |
|
1306 | |||
1306 | $ hg debugobsolete |
|
1307 | $ hg debugobsolete | |
1307 | 1fc8102cda6204549f031015641606ccf5513ec3 1473d4b996d1d1b121de6b39fab6a04fbf9d873e 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'replace', 'user': 'test'} |
|
1308 | 1fc8102cda6204549f031015641606ccf5513ec3 1473d4b996d1d1b121de6b39fab6a04fbf9d873e 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'replace', 'user': 'test'} | |
1308 | 64a8289d249234b9886244d379f15e6b650b28e3 d11b3456a873daec7c7bc53e5622e8df6d741bd2 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'replace', 'user': 'test'} |
|
1309 | 64a8289d249234b9886244d379f15e6b650b28e3 d11b3456a873daec7c7bc53e5622e8df6d741bd2 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'replace', 'user': 'test'} | |
1309 | f585351a92f85104bff7c284233c338b10eb1df7 7c78f703e465d73102cc8780667ce269c5208a40 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'operation': 'replace', 'user': 'test'} |
|
1310 | f585351a92f85104bff7c284233c338b10eb1df7 7c78f703e465d73102cc8780667ce269c5208a40 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'operation': 'replace', 'user': 'test'} | |
1310 | 48b9aae0607f43ff110d84e6883c151942add5ab 0 {0000000000000000000000000000000000000000} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'} |
|
1311 | 48b9aae0607f43ff110d84e6883c151942add5ab 0 {0000000000000000000000000000000000000000} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'} | |
1311 | 112478962961147124edd43549aedd1a335e44bf 0 {426bada5c67598ca65036d57d9e4b64b0c1ce7a0} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'} |
|
1312 | 112478962961147124edd43549aedd1a335e44bf 0 {426bada5c67598ca65036d57d9e4b64b0c1ce7a0} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'} | |
1312 | 08ebfeb61bac6e3f12079de774d285a0d6689eba 0 {426bada5c67598ca65036d57d9e4b64b0c1ce7a0} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'} |
|
1313 | 08ebfeb61bac6e3f12079de774d285a0d6689eba 0 {426bada5c67598ca65036d57d9e4b64b0c1ce7a0} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'} | |
1313 | 26805aba1e600a82e93661149f2313866a221a7b 0 {112478962961147124edd43549aedd1a335e44bf} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'} |
|
1314 | 26805aba1e600a82e93661149f2313866a221a7b 0 {112478962961147124edd43549aedd1a335e44bf} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'} | |
1314 | $ cd .. |
|
1315 | $ cd .. | |
1315 |
|
1316 | |||
1316 | Test that obsmarkers are restored even when not using generaldelta |
|
1317 | Test that obsmarkers are restored even when not using generaldelta | |
1317 |
|
1318 | |||
1318 | $ hg --config format.usegeneraldelta=no init issue5678 |
|
1319 | $ hg --config format.usegeneraldelta=no init issue5678 | |
1319 | $ cd issue5678 |
|
1320 | $ cd issue5678 | |
1320 | $ cat >> .hg/hgrc <<EOF |
|
1321 | $ cat >> .hg/hgrc <<EOF | |
1321 | > [experimental] |
|
1322 | > [experimental] | |
1322 | > evolution=true |
|
1323 | > evolution=true | |
1323 | > EOF |
|
1324 | > EOF | |
1324 | $ echo a > a |
|
1325 | $ echo a > a | |
1325 | $ hg ci -Aqm a |
|
1326 | $ hg ci -Aqm a | |
1326 | $ hg ci --amend -m a2 |
|
1327 | $ hg ci --amend -m a2 | |
1327 | $ hg debugobsolete |
|
1328 | $ hg debugobsolete | |
1328 | cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b 489bac576828490c0bb8d45eac9e5e172e4ec0a8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} |
|
1329 | cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b 489bac576828490c0bb8d45eac9e5e172e4ec0a8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} | |
1329 | $ hg strip . |
|
1330 | $ hg strip . | |
1330 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1331 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1331 | saved backup bundle to $TESTTMP/issue5678/.hg/strip-backup/489bac576828-bef27e14-backup.hg |
|
1332 | saved backup bundle to $TESTTMP/issue5678/.hg/strip-backup/489bac576828-bef27e14-backup.hg | |
1332 | $ hg unbundle -q .hg/strip-backup/* |
|
1333 | $ hg unbundle -q .hg/strip-backup/* | |
1333 | $ hg debugobsolete |
|
1334 | $ hg debugobsolete | |
1334 | cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b 489bac576828490c0bb8d45eac9e5e172e4ec0a8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} |
|
1335 | cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b 489bac576828490c0bb8d45eac9e5e172e4ec0a8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} | |
1335 | $ cd .. |
|
1336 | $ cd .. |
@@ -1,1193 +1,1211 | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [extdiff] |
|
2 | > [extdiff] | |
3 | > # for portability: |
|
3 | > # for portability: | |
4 | > pdiff = sh "$RUNTESTDIR/pdiff" |
|
4 | > pdiff = sh "$RUNTESTDIR/pdiff" | |
5 | > [progress] |
|
5 | > [progress] | |
6 | > disable=False |
|
6 | > disable=False | |
7 | > assume-tty = 1 |
|
7 | > assume-tty = 1 | |
8 | > delay = 0 |
|
8 | > delay = 0 | |
9 | > # set changedelay really large so we don't see nested topics |
|
9 | > # set changedelay really large so we don't see nested topics | |
10 | > changedelay = 30000 |
|
10 | > changedelay = 30000 | |
11 | > format = topic bar number |
|
11 | > format = topic bar number | |
12 | > refresh = 0 |
|
12 | > refresh = 0 | |
13 | > width = 60 |
|
13 | > width = 60 | |
14 | > EOF |
|
14 | > EOF | |
15 |
|
15 | |||
16 | Preparing the subrepository 'sub2' |
|
16 | Preparing the subrepository 'sub2' | |
17 |
|
17 | |||
18 | $ hg init sub2 |
|
18 | $ hg init sub2 | |
19 | $ echo sub2 > sub2/sub2 |
|
19 | $ echo sub2 > sub2/sub2 | |
20 | $ hg add -R sub2 |
|
20 | $ hg add -R sub2 | |
21 | adding sub2/sub2 |
|
21 | adding sub2/sub2 | |
22 | $ hg commit -R sub2 -m "sub2 import" |
|
22 | $ hg commit -R sub2 -m "sub2 import" | |
23 |
|
23 | |||
24 | Preparing the 'sub1' repo which depends on the subrepo 'sub2' |
|
24 | Preparing the 'sub1' repo which depends on the subrepo 'sub2' | |
25 |
|
25 | |||
26 | $ hg init sub1 |
|
26 | $ hg init sub1 | |
27 | $ echo sub1 > sub1/sub1 |
|
27 | $ echo sub1 > sub1/sub1 | |
28 | $ echo "sub2 = ../sub2" > sub1/.hgsub |
|
28 | $ echo "sub2 = ../sub2" > sub1/.hgsub | |
29 | $ hg clone sub2 sub1/sub2 |
|
29 | $ hg clone sub2 sub1/sub2 | |
30 | \r (no-eol) (esc) |
|
30 | \r (no-eol) (esc) | |
31 | linking [ <=> ] 1\r (no-eol) (esc) |
|
31 | linking [ <=> ] 1\r (no-eol) (esc) | |
32 | linking [ <=> ] 2\r (no-eol) (esc) |
|
32 | linking [ <=> ] 2\r (no-eol) (esc) | |
33 | linking [ <=> ] 3\r (no-eol) (esc) |
|
33 | linking [ <=> ] 3\r (no-eol) (esc) | |
34 | linking [ <=> ] 4\r (no-eol) (esc) |
|
34 | linking [ <=> ] 4\r (no-eol) (esc) | |
35 | linking [ <=> ] 5\r (no-eol) (esc) |
|
35 | linking [ <=> ] 5\r (no-eol) (esc) | |
36 | linking [ <=> ] 6\r (no-eol) (esc) |
|
36 | linking [ <=> ] 6\r (no-eol) (esc) | |
|
37 | linking [ <=> ] 7\r (no-eol) (esc) (reposimplestore !) | |||
37 | \r (no-eol) (esc) |
|
38 | \r (no-eol) (esc) | |
38 | \r (no-eol) (esc) |
|
39 | \r (no-eol) (esc) | |
39 | updating [===========================================>] 1/1\r (no-eol) (esc) |
|
40 | updating [===========================================>] 1/1\r (no-eol) (esc) | |
40 | \r (no-eol) (esc) |
|
41 | \r (no-eol) (esc) | |
41 | updating to branch default |
|
42 | updating to branch default | |
42 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
43 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
43 | $ hg add -R sub1 |
|
44 | $ hg add -R sub1 | |
44 | adding sub1/.hgsub |
|
45 | adding sub1/.hgsub | |
45 | adding sub1/sub1 |
|
46 | adding sub1/sub1 | |
46 | $ hg commit -R sub1 -m "sub1 import" |
|
47 | $ hg commit -R sub1 -m "sub1 import" | |
47 |
|
48 | |||
48 | Preparing the 'main' repo which depends on the subrepo 'sub1' |
|
49 | Preparing the 'main' repo which depends on the subrepo 'sub1' | |
49 |
|
50 | |||
50 | $ hg init main |
|
51 | $ hg init main | |
51 | $ echo main > main/main |
|
52 | $ echo main > main/main | |
52 | $ echo "sub1 = ../sub1" > main/.hgsub |
|
53 | $ echo "sub1 = ../sub1" > main/.hgsub | |
53 | $ hg clone sub1 main/sub1 |
|
54 | $ hg clone sub1 main/sub1 | |
54 | \r (no-eol) (esc) |
|
55 | \r (no-eol) (esc) | |
55 | linking [ <=> ] 1\r (no-eol) (esc) |
|
56 | linking [ <=> ] 1\r (no-eol) (esc) | |
56 | linking [ <=> ] 2\r (no-eol) (esc) |
|
57 | linking [ <=> ] 2\r (no-eol) (esc) | |
57 | linking [ <=> ] 3\r (no-eol) (esc) |
|
58 | linking [ <=> ] 3\r (no-eol) (esc) | |
58 | linking [ <=> ] 4\r (no-eol) (esc) |
|
59 | linking [ <=> ] 4\r (no-eol) (esc) | |
59 | linking [ <=> ] 5\r (no-eol) (esc) |
|
60 | linking [ <=> ] 5\r (no-eol) (esc) | |
60 | linking [ <=> ] 6\r (no-eol) (esc) |
|
61 | linking [ <=> ] 6\r (no-eol) (esc) | |
61 | linking [ <=> ] 7\r (no-eol) (esc) |
|
62 | linking [ <=> ] 7\r (no-eol) (esc) | |
62 | linking [ <=> ] 8\r (no-eol) (esc) |
|
63 | linking [ <=> ] 8\r (no-eol) (esc) | |
|
64 | linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !) | |||
|
65 | linking [ <=> ] 10\r (no-eol) (esc) (reposimplestore !) | |||
|
66 | linking [ <=> ] 11\r (no-eol) (esc) (reposimplestore !) | |||
63 | \r (no-eol) (esc) |
|
67 | \r (no-eol) (esc) | |
64 | \r (no-eol) (esc) |
|
68 | \r (no-eol) (esc) | |
65 | updating [===========================================>] 3/3\r (no-eol) (esc) |
|
69 | updating [===========================================>] 3/3\r (no-eol) (esc) | |
66 | \r (no-eol) (esc) |
|
70 | \r (no-eol) (esc) | |
67 | \r (no-eol) (esc) |
|
71 | \r (no-eol) (esc) | |
68 | linking [ <=> ] 1\r (no-eol) (esc) |
|
72 | linking [ <=> ] 1\r (no-eol) (esc) | |
69 | linking [ <=> ] 2\r (no-eol) (esc) |
|
73 | linking [ <=> ] 2\r (no-eol) (esc) | |
70 | linking [ <=> ] 3\r (no-eol) (esc) |
|
74 | linking [ <=> ] 3\r (no-eol) (esc) | |
71 | linking [ <=> ] 4\r (no-eol) (esc) |
|
75 | linking [ <=> ] 4\r (no-eol) (esc) | |
72 | linking [ <=> ] 5\r (no-eol) (esc) |
|
76 | linking [ <=> ] 5\r (no-eol) (esc) | |
73 | linking [ <=> ] 6\r (no-eol) (esc) |
|
77 | linking [ <=> ] 6\r (no-eol) (esc) | |
|
78 | linking [ <=> ] 7\r (no-eol) (esc) (reposimplestore !) | |||
74 | updating [===========================================>] 1/1\r (no-eol) (esc) |
|
79 | updating [===========================================>] 1/1\r (no-eol) (esc) | |
75 | \r (no-eol) (esc) |
|
80 | \r (no-eol) (esc) | |
76 | updating to branch default |
|
81 | updating to branch default | |
77 | cloning subrepo sub2 from $TESTTMP/sub2 |
|
82 | cloning subrepo sub2 from $TESTTMP/sub2 | |
78 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
83 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
79 | $ hg add -R main |
|
84 | $ hg add -R main | |
80 | adding main/.hgsub |
|
85 | adding main/.hgsub | |
81 | adding main/main |
|
86 | adding main/main | |
82 | $ hg commit -R main -m "main import" |
|
87 | $ hg commit -R main -m "main import" | |
83 |
|
88 | |||
84 | #if serve |
|
89 | #if serve | |
85 |
|
90 | |||
86 | Unfortunately, subrepos not at their nominal location cannot be cloned. But |
|
91 | Unfortunately, subrepos not at their nominal location cannot be cloned. But | |
87 | they are still served from their location within the local repository. The only |
|
92 | they are still served from their location within the local repository. The only | |
88 | reason why 'main' can be cloned via the filesystem is because 'sub1' and 'sub2' |
|
93 | reason why 'main' can be cloned via the filesystem is because 'sub1' and 'sub2' | |
89 | are also available as siblings of 'main'. |
|
94 | are also available as siblings of 'main'. | |
90 |
|
95 | |||
91 | $ hg serve -R main --debug -S -p $HGPORT -d --pid-file=hg1.pid -E error.log -A access.log |
|
96 | $ hg serve -R main --debug -S -p $HGPORT -d --pid-file=hg1.pid -E error.log -A access.log | |
92 | adding = $TESTTMP/main |
|
97 | adding = $TESTTMP/main | |
93 | adding sub1 = $TESTTMP/main/sub1 |
|
98 | adding sub1 = $TESTTMP/main/sub1 | |
94 | adding sub1/sub2 = $TESTTMP/main/sub1/sub2 |
|
99 | adding sub1/sub2 = $TESTTMP/main/sub1/sub2 | |
95 | listening at http://*:$HGPORT/ (bound to *:$HGPORT) (glob) (?) |
|
100 | listening at http://*:$HGPORT/ (bound to *:$HGPORT) (glob) (?) | |
96 | adding = $TESTTMP/main (?) |
|
101 | adding = $TESTTMP/main (?) | |
97 | adding sub1 = $TESTTMP/main/sub1 (?) |
|
102 | adding sub1 = $TESTTMP/main/sub1 (?) | |
98 | adding sub1/sub2 = $TESTTMP/main/sub1/sub2 (?) |
|
103 | adding sub1/sub2 = $TESTTMP/main/sub1/sub2 (?) | |
99 | $ cat hg1.pid >> $DAEMON_PIDS |
|
104 | $ cat hg1.pid >> $DAEMON_PIDS | |
100 |
|
105 | |||
101 | $ hg clone http://localhost:$HGPORT httpclone --config progress.disable=True |
|
106 | $ hg clone http://localhost:$HGPORT httpclone --config progress.disable=True | |
102 | requesting all changes |
|
107 | requesting all changes | |
103 | adding changesets |
|
108 | adding changesets | |
104 | adding manifests |
|
109 | adding manifests | |
105 | adding file changes |
|
110 | adding file changes | |
106 | added 1 changesets with 3 changes to 3 files |
|
111 | added 1 changesets with 3 changes to 3 files | |
107 | new changesets 7f491f53a367 |
|
112 | new changesets 7f491f53a367 | |
108 | updating to branch default |
|
113 | updating to branch default | |
109 | abort: HTTP Error 404: Not Found |
|
114 | abort: HTTP Error 404: Not Found | |
110 | [255] |
|
115 | [255] | |
111 |
|
116 | |||
112 | $ cat access.log |
|
117 | $ cat access.log | |
113 | * "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
118 | * "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
114 | * "GET /?cmd=batch HTTP/1.1" 200 - * (glob) |
|
119 | * "GET /?cmd=batch HTTP/1.1" 200 - * (glob) | |
115 | * "GET /?cmd=getbundle HTTP/1.1" 200 - * (glob) |
|
120 | * "GET /?cmd=getbundle HTTP/1.1" 200 - * (glob) | |
116 | * "GET /../sub1?cmd=capabilities HTTP/1.1" 404 - (glob) |
|
121 | * "GET /../sub1?cmd=capabilities HTTP/1.1" 404 - (glob) | |
117 | $ cat error.log |
|
122 | $ cat error.log | |
118 |
|
123 | |||
119 | $ killdaemons.py |
|
124 | $ killdaemons.py | |
120 | $ rm hg1.pid error.log access.log |
|
125 | $ rm hg1.pid error.log access.log | |
121 | #endif |
|
126 | #endif | |
122 |
|
127 | |||
123 | Cleaning both repositories, just as a clone -U |
|
128 | Cleaning both repositories, just as a clone -U | |
124 |
|
129 | |||
125 | $ hg up -C -R sub2 null |
|
130 | $ hg up -C -R sub2 null | |
126 | \r (no-eol) (esc) |
|
131 | \r (no-eol) (esc) | |
127 | updating [===========================================>] 1/1\r (no-eol) (esc) |
|
132 | updating [===========================================>] 1/1\r (no-eol) (esc) | |
128 | \r (no-eol) (esc) |
|
133 | \r (no-eol) (esc) | |
129 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
134 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
130 | $ hg up -C -R sub1 null |
|
135 | $ hg up -C -R sub1 null | |
131 | \r (no-eol) (esc) |
|
136 | \r (no-eol) (esc) | |
132 | updating [===========================================>] 1/1\r (no-eol) (esc) |
|
137 | updating [===========================================>] 1/1\r (no-eol) (esc) | |
133 | \r (no-eol) (esc) |
|
138 | \r (no-eol) (esc) | |
134 | \r (no-eol) (esc) |
|
139 | \r (no-eol) (esc) | |
135 | updating [===========================================>] 3/3\r (no-eol) (esc) |
|
140 | updating [===========================================>] 3/3\r (no-eol) (esc) | |
136 | \r (no-eol) (esc) |
|
141 | \r (no-eol) (esc) | |
137 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
142 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
138 | $ hg up -C -R main null |
|
143 | $ hg up -C -R main null | |
139 | \r (no-eol) (esc) |
|
144 | \r (no-eol) (esc) | |
140 | updating [===========================================>] 1/1\r (no-eol) (esc) |
|
145 | updating [===========================================>] 1/1\r (no-eol) (esc) | |
141 | \r (no-eol) (esc) |
|
146 | \r (no-eol) (esc) | |
142 | \r (no-eol) (esc) |
|
147 | \r (no-eol) (esc) | |
143 | updating [===========================================>] 3/3\r (no-eol) (esc) |
|
148 | updating [===========================================>] 3/3\r (no-eol) (esc) | |
144 | \r (no-eol) (esc) |
|
149 | \r (no-eol) (esc) | |
145 | \r (no-eol) (esc) |
|
150 | \r (no-eol) (esc) | |
146 | updating [===========================================>] 3/3\r (no-eol) (esc) |
|
151 | updating [===========================================>] 3/3\r (no-eol) (esc) | |
147 | \r (no-eol) (esc) |
|
152 | \r (no-eol) (esc) | |
148 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
153 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
149 | $ rm -rf main/sub1 |
|
154 | $ rm -rf main/sub1 | |
150 | $ rm -rf sub1/sub2 |
|
155 | $ rm -rf sub1/sub2 | |
151 |
|
156 | |||
152 | Clone main |
|
157 | Clone main | |
153 |
|
158 | |||
154 | $ hg --config extensions.largefiles= clone main cloned |
|
159 | $ hg --config extensions.largefiles= clone main cloned | |
155 | \r (no-eol) (esc) |
|
160 | \r (no-eol) (esc) | |
156 | linking [ <=> ] 1\r (no-eol) (esc) |
|
161 | linking [ <=> ] 1\r (no-eol) (esc) | |
157 | linking [ <=> ] 2\r (no-eol) (esc) |
|
162 | linking [ <=> ] 2\r (no-eol) (esc) | |
158 | linking [ <=> ] 3\r (no-eol) (esc) |
|
163 | linking [ <=> ] 3\r (no-eol) (esc) | |
159 | linking [ <=> ] 4\r (no-eol) (esc) |
|
164 | linking [ <=> ] 4\r (no-eol) (esc) | |
160 | linking [ <=> ] 5\r (no-eol) (esc) |
|
165 | linking [ <=> ] 5\r (no-eol) (esc) | |
161 | linking [ <=> ] 6\r (no-eol) (esc) |
|
166 | linking [ <=> ] 6\r (no-eol) (esc) | |
162 | linking [ <=> ] 7\r (no-eol) (esc) |
|
167 | linking [ <=> ] 7\r (no-eol) (esc) | |
163 | linking [ <=> ] 8\r (no-eol) (esc) |
|
168 | linking [ <=> ] 8\r (no-eol) (esc) | |
|
169 | linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !) | |||
|
170 | linking [ <=> ] 10\r (no-eol) (esc) (reposimplestore !) | |||
|
171 | linking [ <=> ] 11\r (no-eol) (esc) (reposimplestore !) | |||
164 | \r (no-eol) (esc) |
|
172 | \r (no-eol) (esc) | |
165 | \r (no-eol) (esc) |
|
173 | \r (no-eol) (esc) | |
166 | updating [===========================================>] 3/3\r (no-eol) (esc) |
|
174 | updating [===========================================>] 3/3\r (no-eol) (esc) | |
167 | \r (no-eol) (esc) |
|
175 | \r (no-eol) (esc) | |
168 | \r (no-eol) (esc) |
|
176 | \r (no-eol) (esc) | |
169 | linking [ <=> ] 1\r (no-eol) (esc) |
|
177 | linking [ <=> ] 1\r (no-eol) (esc) | |
170 | linking [ <=> ] 2\r (no-eol) (esc) |
|
178 | linking [ <=> ] 2\r (no-eol) (esc) | |
171 | linking [ <=> ] 3\r (no-eol) (esc) |
|
179 | linking [ <=> ] 3\r (no-eol) (esc) | |
172 | linking [ <=> ] 4\r (no-eol) (esc) |
|
180 | linking [ <=> ] 4\r (no-eol) (esc) | |
173 | linking [ <=> ] 5\r (no-eol) (esc) |
|
181 | linking [ <=> ] 5\r (no-eol) (esc) | |
174 | linking [ <=> ] 6\r (no-eol) (esc) |
|
182 | linking [ <=> ] 6\r (no-eol) (esc) | |
175 | linking [ <=> ] 7\r (no-eol) (esc) |
|
183 | linking [ <=> ] 7\r (no-eol) (esc) | |
176 | linking [ <=> ] 8\r (no-eol) (esc) |
|
184 | linking [ <=> ] 8\r (no-eol) (esc) | |
|
185 | linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !) | |||
|
186 | linking [ <=> ] 10\r (no-eol) (esc) (reposimplestore !) | |||
|
187 | linking [ <=> ] 11\r (no-eol) (esc) (reposimplestore !) | |||
177 | updating [===========================================>] 3/3\r (no-eol) (esc) |
|
188 | updating [===========================================>] 3/3\r (no-eol) (esc) | |
178 | \r (no-eol) (esc) |
|
189 | \r (no-eol) (esc) | |
179 | \r (no-eol) (esc) |
|
190 | \r (no-eol) (esc) | |
180 | linking [ <=> ] 1\r (no-eol) (esc) |
|
191 | linking [ <=> ] 1\r (no-eol) (esc) (no-reposimplestore !) | |
181 | linking [ <=> ] 2\r (no-eol) (esc) |
|
192 | linking [ <=> ] 2\r (no-eol) (esc) (no-reposimplestore !) | |
182 | linking [ <=> ] 3\r (no-eol) (esc) |
|
193 | linking [ <=> ] 3\r (no-eol) (esc) (no-reposimplestore !) | |
183 | linking [ <=> ] 4\r (no-eol) (esc) |
|
194 | linking [ <=> ] 4\r (no-eol) (esc) (no-reposimplestore !) | |
184 | linking [ <=> ] 5\r (no-eol) (esc) |
|
195 | linking [ <=> ] 5\r (no-eol) (esc) (no-reposimplestore !) | |
185 | linking [ <=> ] 6\r (no-eol) (esc) |
|
196 | linking [ <=> ] 6\r (no-eol) (esc) (no-reposimplestore !) | |
|
197 | linking [ <=> ] 1\r (no-eol) (esc) (reposimplestore !) | |||
|
198 | linking [ <=> ] 2\r (no-eol) (esc) (reposimplestore !) | |||
|
199 | linking [ <=> ] 3\r (no-eol) (esc) (reposimplestore !) | |||
|
200 | linking [ <=> ] 4\r (no-eol) (esc) (reposimplestore !) | |||
|
201 | linking [ <=> ] 5\r (no-eol) (esc) (reposimplestore !) | |||
|
202 | linking [ <=> ] 6\r (no-eol) (esc) (reposimplestore !) | |||
|
203 | linking [ <=> ] 7\r (no-eol) (esc) (reposimplestore !) | |||
186 | updating [===========================================>] 1/1\r (no-eol) (esc) |
|
204 | updating [===========================================>] 1/1\r (no-eol) (esc) | |
187 | \r (no-eol) (esc) |
|
205 | \r (no-eol) (esc) | |
188 | updating to branch default |
|
206 | updating to branch default | |
189 | cloning subrepo sub1 from $TESTTMP/sub1 |
|
207 | cloning subrepo sub1 from $TESTTMP/sub1 | |
190 | cloning subrepo sub1/sub2 from $TESTTMP/sub2 |
|
208 | cloning subrepo sub1/sub2 from $TESTTMP/sub2 | |
191 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
209 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
192 |
|
210 | |||
193 | Largefiles is NOT enabled in the clone if the source repo doesn't require it |
|
211 | Largefiles is NOT enabled in the clone if the source repo doesn't require it | |
194 | $ cat cloned/.hg/hgrc |
|
212 | $ cat cloned/.hg/hgrc | |
195 | # example repository config (see 'hg help config' for more info) |
|
213 | # example repository config (see 'hg help config' for more info) | |
196 | [paths] |
|
214 | [paths] | |
197 | default = $TESTTMP/main |
|
215 | default = $TESTTMP/main | |
198 |
|
216 | |||
199 | # path aliases to other clones of this repo in URLs or filesystem paths |
|
217 | # path aliases to other clones of this repo in URLs or filesystem paths | |
200 | # (see 'hg help config.paths' for more info) |
|
218 | # (see 'hg help config.paths' for more info) | |
201 | # |
|
219 | # | |
202 | # default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork |
|
220 | # default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork | |
203 | # my-fork = ssh://jdoe@example.net/hg/jdoes-fork |
|
221 | # my-fork = ssh://jdoe@example.net/hg/jdoes-fork | |
204 | # my-clone = /home/jdoe/jdoes-clone |
|
222 | # my-clone = /home/jdoe/jdoes-clone | |
205 |
|
223 | |||
206 | [ui] |
|
224 | [ui] | |
207 | # name and email (local to this repository, optional), e.g. |
|
225 | # name and email (local to this repository, optional), e.g. | |
208 | # username = Jane Doe <jdoe@example.com> |
|
226 | # username = Jane Doe <jdoe@example.com> | |
209 |
|
227 | |||
210 | Checking cloned repo ids |
|
228 | Checking cloned repo ids | |
211 |
|
229 | |||
212 | $ printf "cloned " ; hg id -R cloned |
|
230 | $ printf "cloned " ; hg id -R cloned | |
213 | cloned 7f491f53a367 tip |
|
231 | cloned 7f491f53a367 tip | |
214 | $ printf "cloned/sub1 " ; hg id -R cloned/sub1 |
|
232 | $ printf "cloned/sub1 " ; hg id -R cloned/sub1 | |
215 | cloned/sub1 fc3b4ce2696f tip |
|
233 | cloned/sub1 fc3b4ce2696f tip | |
216 | $ printf "cloned/sub1/sub2 " ; hg id -R cloned/sub1/sub2 |
|
234 | $ printf "cloned/sub1/sub2 " ; hg id -R cloned/sub1/sub2 | |
217 | cloned/sub1/sub2 c57a0840e3ba tip |
|
235 | cloned/sub1/sub2 c57a0840e3ba tip | |
218 |
|
236 | |||
219 | debugsub output for main and sub1 |
|
237 | debugsub output for main and sub1 | |
220 |
|
238 | |||
221 | $ hg debugsub -R cloned |
|
239 | $ hg debugsub -R cloned | |
222 | path sub1 |
|
240 | path sub1 | |
223 | source ../sub1 |
|
241 | source ../sub1 | |
224 | revision fc3b4ce2696f7741438c79207583768f2ce6b0dd |
|
242 | revision fc3b4ce2696f7741438c79207583768f2ce6b0dd | |
225 | $ hg debugsub -R cloned/sub1 |
|
243 | $ hg debugsub -R cloned/sub1 | |
226 | path sub2 |
|
244 | path sub2 | |
227 | source ../sub2 |
|
245 | source ../sub2 | |
228 | revision c57a0840e3badd667ef3c3ef65471609acb2ba3c |
|
246 | revision c57a0840e3badd667ef3c3ef65471609acb2ba3c | |
229 |
|
247 | |||
230 | Modifying deeply nested 'sub2' |
|
248 | Modifying deeply nested 'sub2' | |
231 |
|
249 | |||
232 | $ echo modified > cloned/sub1/sub2/sub2 |
|
250 | $ echo modified > cloned/sub1/sub2/sub2 | |
233 | $ hg commit --subrepos -m "deep nested modif should trigger a commit" -R cloned |
|
251 | $ hg commit --subrepos -m "deep nested modif should trigger a commit" -R cloned | |
234 | committing subrepository sub1 |
|
252 | committing subrepository sub1 | |
235 | committing subrepository sub1/sub2 |
|
253 | committing subrepository sub1/sub2 | |
236 |
|
254 | |||
237 | Checking modified node ids |
|
255 | Checking modified node ids | |
238 |
|
256 | |||
239 | $ printf "cloned " ; hg id -R cloned |
|
257 | $ printf "cloned " ; hg id -R cloned | |
240 | cloned ffe6649062fe tip |
|
258 | cloned ffe6649062fe tip | |
241 | $ printf "cloned/sub1 " ; hg id -R cloned/sub1 |
|
259 | $ printf "cloned/sub1 " ; hg id -R cloned/sub1 | |
242 | cloned/sub1 2ecb03bf44a9 tip |
|
260 | cloned/sub1 2ecb03bf44a9 tip | |
243 | $ printf "cloned/sub1/sub2 " ; hg id -R cloned/sub1/sub2 |
|
261 | $ printf "cloned/sub1/sub2 " ; hg id -R cloned/sub1/sub2 | |
244 | cloned/sub1/sub2 53dd3430bcaf tip |
|
262 | cloned/sub1/sub2 53dd3430bcaf tip | |
245 |
|
263 | |||
246 | debugsub output for main and sub1 |
|
264 | debugsub output for main and sub1 | |
247 |
|
265 | |||
248 | $ hg debugsub -R cloned |
|
266 | $ hg debugsub -R cloned | |
249 | path sub1 |
|
267 | path sub1 | |
250 | source ../sub1 |
|
268 | source ../sub1 | |
251 | revision 2ecb03bf44a94e749e8669481dd9069526ce7cb9 |
|
269 | revision 2ecb03bf44a94e749e8669481dd9069526ce7cb9 | |
252 | $ hg debugsub -R cloned/sub1 |
|
270 | $ hg debugsub -R cloned/sub1 | |
253 | path sub2 |
|
271 | path sub2 | |
254 | source ../sub2 |
|
272 | source ../sub2 | |
255 | revision 53dd3430bcaf5ab4a7c48262bcad6d441f510487 |
|
273 | revision 53dd3430bcaf5ab4a7c48262bcad6d441f510487 | |
256 |
|
274 | |||
257 | Check that deep archiving works |
|
275 | Check that deep archiving works | |
258 |
|
276 | |||
259 | $ cd cloned |
|
277 | $ cd cloned | |
260 | $ echo 'test' > sub1/sub2/test.txt |
|
278 | $ echo 'test' > sub1/sub2/test.txt | |
261 | $ hg --config extensions.largefiles=! add sub1/sub2/test.txt |
|
279 | $ hg --config extensions.largefiles=! add sub1/sub2/test.txt | |
262 | $ mkdir sub1/sub2/folder |
|
280 | $ mkdir sub1/sub2/folder | |
263 | $ echo 'subfolder' > sub1/sub2/folder/test.txt |
|
281 | $ echo 'subfolder' > sub1/sub2/folder/test.txt | |
264 | $ hg ci -ASm "add test.txt" |
|
282 | $ hg ci -ASm "add test.txt" | |
265 | adding sub1/sub2/folder/test.txt |
|
283 | adding sub1/sub2/folder/test.txt | |
266 | committing subrepository sub1 |
|
284 | committing subrepository sub1 | |
267 | committing subrepository sub1/sub2 |
|
285 | committing subrepository sub1/sub2 | |
268 |
|
286 | |||
269 | $ rm -r main |
|
287 | $ rm -r main | |
270 | $ hg archive -S -qr 'wdir()' ../wdir |
|
288 | $ hg archive -S -qr 'wdir()' ../wdir | |
271 | $ cat ../wdir/.hg_archival.txt |
|
289 | $ cat ../wdir/.hg_archival.txt | |
272 | repo: 7f491f53a367861f47ee64a80eb997d1f341b77a |
|
290 | repo: 7f491f53a367861f47ee64a80eb997d1f341b77a | |
273 | node: 9bb10eebee29dc0f1201dcf5977b811a540255fd+ |
|
291 | node: 9bb10eebee29dc0f1201dcf5977b811a540255fd+ | |
274 | branch: default |
|
292 | branch: default | |
275 | latesttag: null |
|
293 | latesttag: null | |
276 | latesttagdistance: 4 |
|
294 | latesttagdistance: 4 | |
277 | changessincelatesttag: 4 |
|
295 | changessincelatesttag: 4 | |
278 | $ hg update -Cq . |
|
296 | $ hg update -Cq . | |
279 |
|
297 | |||
280 | A deleted subrepo file is flagged as dirty, like the top level repo |
|
298 | A deleted subrepo file is flagged as dirty, like the top level repo | |
281 |
|
299 | |||
282 | $ rm -r ../wdir sub1/sub2/folder/test.txt |
|
300 | $ rm -r ../wdir sub1/sub2/folder/test.txt | |
283 | $ hg archive -S -qr 'wdir()' ../wdir |
|
301 | $ hg archive -S -qr 'wdir()' ../wdir | |
284 | $ cat ../wdir/.hg_archival.txt |
|
302 | $ cat ../wdir/.hg_archival.txt | |
285 | repo: 7f491f53a367861f47ee64a80eb997d1f341b77a |
|
303 | repo: 7f491f53a367861f47ee64a80eb997d1f341b77a | |
286 | node: 9bb10eebee29dc0f1201dcf5977b811a540255fd+ |
|
304 | node: 9bb10eebee29dc0f1201dcf5977b811a540255fd+ | |
287 | branch: default |
|
305 | branch: default | |
288 | latesttag: null |
|
306 | latesttag: null | |
289 | latesttagdistance: 4 |
|
307 | latesttagdistance: 4 | |
290 | changessincelatesttag: 4 |
|
308 | changessincelatesttag: 4 | |
291 | $ hg update -Cq . |
|
309 | $ hg update -Cq . | |
292 | $ rm -r ../wdir |
|
310 | $ rm -r ../wdir | |
293 |
|
311 | |||
294 | $ hg archive -S -qr 'wdir()' ../wdir \ |
|
312 | $ hg archive -S -qr 'wdir()' ../wdir \ | |
295 | > --config 'experimental.archivemetatemplate=archived {node|short}\n' |
|
313 | > --config 'experimental.archivemetatemplate=archived {node|short}\n' | |
296 | $ cat ../wdir/.hg_archival.txt |
|
314 | $ cat ../wdir/.hg_archival.txt | |
297 | archived ffffffffffff |
|
315 | archived ffffffffffff | |
298 | $ rm -r ../wdir |
|
316 | $ rm -r ../wdir | |
299 |
|
317 | |||
300 | .. but first take a detour through some deep removal testing |
|
318 | .. but first take a detour through some deep removal testing | |
301 |
|
319 | |||
302 | $ hg remove -S -I 're:.*.txt' . |
|
320 | $ hg remove -S -I 're:.*.txt' . | |
303 | \r (no-eol) (esc) |
|
321 | \r (no-eol) (esc) | |
304 | searching [==========================================>] 1/1\r (no-eol) (esc) |
|
322 | searching [==========================================>] 1/1\r (no-eol) (esc) | |
305 | searching [==========================================>] 1/1\r (no-eol) (esc) |
|
323 | searching [==========================================>] 1/1\r (no-eol) (esc) | |
306 | \r (no-eol) (esc) |
|
324 | \r (no-eol) (esc) | |
307 | \r (no-eol) (esc) |
|
325 | \r (no-eol) (esc) | |
308 | deleting [=====================> ] 1/2\r (no-eol) (esc) |
|
326 | deleting [=====================> ] 1/2\r (no-eol) (esc) | |
309 | \r (no-eol) (esc) |
|
327 | \r (no-eol) (esc) | |
310 | \r (no-eol) (esc) |
|
328 | \r (no-eol) (esc) | |
311 | deleting [===========================================>] 2/2\r (no-eol) (esc) |
|
329 | deleting [===========================================>] 2/2\r (no-eol) (esc) | |
312 | \r (no-eol) (esc) |
|
330 | \r (no-eol) (esc) | |
313 | removing sub1/sub2/folder/test.txt |
|
331 | removing sub1/sub2/folder/test.txt | |
314 | removing sub1/sub2/test.txt |
|
332 | removing sub1/sub2/test.txt | |
315 | $ hg status -S |
|
333 | $ hg status -S | |
316 | R sub1/sub2/folder/test.txt |
|
334 | R sub1/sub2/folder/test.txt | |
317 | R sub1/sub2/test.txt |
|
335 | R sub1/sub2/test.txt | |
318 | $ hg update -Cq |
|
336 | $ hg update -Cq | |
319 | $ hg remove -I 're:.*.txt' sub1 |
|
337 | $ hg remove -I 're:.*.txt' sub1 | |
320 | \r (no-eol) (esc) |
|
338 | \r (no-eol) (esc) | |
321 | searching [==========================================>] 1/1\r (no-eol) (esc) |
|
339 | searching [==========================================>] 1/1\r (no-eol) (esc) | |
322 | \r (no-eol) (esc) |
|
340 | \r (no-eol) (esc) | |
323 | \r (no-eol) (esc) |
|
341 | \r (no-eol) (esc) | |
324 | deleting [===========================================>] 1/1\r (no-eol) (esc) |
|
342 | deleting [===========================================>] 1/1\r (no-eol) (esc) | |
325 | \r (no-eol) (esc) |
|
343 | \r (no-eol) (esc) | |
326 | $ hg status -S |
|
344 | $ hg status -S | |
327 | $ hg remove sub1/sub2/folder/test.txt |
|
345 | $ hg remove sub1/sub2/folder/test.txt | |
328 | \r (no-eol) (esc) |
|
346 | \r (no-eol) (esc) | |
329 | searching [==========================================>] 1/1\r (no-eol) (esc) |
|
347 | searching [==========================================>] 1/1\r (no-eol) (esc) | |
330 | searching [==========================================>] 1/1\r (no-eol) (esc) |
|
348 | searching [==========================================>] 1/1\r (no-eol) (esc) | |
331 | \r (no-eol) (esc) |
|
349 | \r (no-eol) (esc) | |
332 | \r (no-eol) (esc) |
|
350 | \r (no-eol) (esc) | |
333 | deleting [===========================================>] 1/1\r (no-eol) (esc) |
|
351 | deleting [===========================================>] 1/1\r (no-eol) (esc) | |
334 | \r (no-eol) (esc) |
|
352 | \r (no-eol) (esc) | |
335 | \r (no-eol) (esc) |
|
353 | \r (no-eol) (esc) | |
336 | deleting [===========================================>] 1/1\r (no-eol) (esc) |
|
354 | deleting [===========================================>] 1/1\r (no-eol) (esc) | |
337 | \r (no-eol) (esc) |
|
355 | \r (no-eol) (esc) | |
338 | \r (no-eol) (esc) |
|
356 | \r (no-eol) (esc) | |
339 | deleting [===========================================>] 1/1\r (no-eol) (esc) |
|
357 | deleting [===========================================>] 1/1\r (no-eol) (esc) | |
340 | \r (no-eol) (esc) |
|
358 | \r (no-eol) (esc) | |
341 | $ hg remove sub1/.hgsubstate |
|
359 | $ hg remove sub1/.hgsubstate | |
342 | \r (no-eol) (esc) |
|
360 | \r (no-eol) (esc) | |
343 | searching [==========================================>] 1/1\r (no-eol) (esc) |
|
361 | searching [==========================================>] 1/1\r (no-eol) (esc) | |
344 | \r (no-eol) (esc) |
|
362 | \r (no-eol) (esc) | |
345 | \r (no-eol) (esc) |
|
363 | \r (no-eol) (esc) | |
346 | deleting [===========================================>] 1/1\r (no-eol) (esc) |
|
364 | deleting [===========================================>] 1/1\r (no-eol) (esc) | |
347 | \r (no-eol) (esc) |
|
365 | \r (no-eol) (esc) | |
348 | \r (no-eol) (esc) |
|
366 | \r (no-eol) (esc) | |
349 | deleting [===========================================>] 1/1\r (no-eol) (esc) |
|
367 | deleting [===========================================>] 1/1\r (no-eol) (esc) | |
350 | \r (no-eol) (esc) |
|
368 | \r (no-eol) (esc) | |
351 | $ mv sub1/.hgsub sub1/x.hgsub |
|
369 | $ mv sub1/.hgsub sub1/x.hgsub | |
352 | $ hg status -S |
|
370 | $ hg status -S | |
353 | warning: subrepo spec file 'sub1/.hgsub' not found |
|
371 | warning: subrepo spec file 'sub1/.hgsub' not found | |
354 | R sub1/.hgsubstate |
|
372 | R sub1/.hgsubstate | |
355 | R sub1/sub2/folder/test.txt |
|
373 | R sub1/sub2/folder/test.txt | |
356 | ! sub1/.hgsub |
|
374 | ! sub1/.hgsub | |
357 | ? sub1/x.hgsub |
|
375 | ? sub1/x.hgsub | |
358 | $ mv sub1/x.hgsub sub1/.hgsub |
|
376 | $ mv sub1/x.hgsub sub1/.hgsub | |
359 | $ hg update -Cq |
|
377 | $ hg update -Cq | |
360 | $ touch sub1/foo |
|
378 | $ touch sub1/foo | |
361 | $ hg forget sub1/sub2/folder/test.txt |
|
379 | $ hg forget sub1/sub2/folder/test.txt | |
362 | $ rm sub1/sub2/test.txt |
|
380 | $ rm sub1/sub2/test.txt | |
363 |
|
381 | |||
364 | Test relative path printing + subrepos |
|
382 | Test relative path printing + subrepos | |
365 | $ mkdir -p foo/bar |
|
383 | $ mkdir -p foo/bar | |
366 | $ cd foo |
|
384 | $ cd foo | |
367 | $ touch bar/abc |
|
385 | $ touch bar/abc | |
368 | $ hg addremove -S .. |
|
386 | $ hg addremove -S .. | |
369 | \r (no-eol) (esc) |
|
387 | \r (no-eol) (esc) | |
370 | searching for exact renames [ ] 0/1\r (no-eol) (esc) |
|
388 | searching for exact renames [ ] 0/1\r (no-eol) (esc) | |
371 | \r (no-eol) (esc) |
|
389 | \r (no-eol) (esc) | |
372 | adding ../sub1/sub2/folder/test.txt |
|
390 | adding ../sub1/sub2/folder/test.txt | |
373 | removing ../sub1/sub2/test.txt |
|
391 | removing ../sub1/sub2/test.txt | |
374 | adding ../sub1/foo |
|
392 | adding ../sub1/foo | |
375 | adding bar/abc |
|
393 | adding bar/abc | |
376 | $ cd .. |
|
394 | $ cd .. | |
377 | $ hg status -S |
|
395 | $ hg status -S | |
378 | A foo/bar/abc |
|
396 | A foo/bar/abc | |
379 | A sub1/foo |
|
397 | A sub1/foo | |
380 | R sub1/sub2/test.txt |
|
398 | R sub1/sub2/test.txt | |
381 |
|
399 | |||
382 | Archive wdir() with subrepos |
|
400 | Archive wdir() with subrepos | |
383 | $ hg rm main |
|
401 | $ hg rm main | |
384 | \r (no-eol) (esc) |
|
402 | \r (no-eol) (esc) | |
385 | deleting [===========================================>] 1/1\r (no-eol) (esc) |
|
403 | deleting [===========================================>] 1/1\r (no-eol) (esc) | |
386 | \r (no-eol) (esc) |
|
404 | \r (no-eol) (esc) | |
387 | $ hg archive -S -r 'wdir()' ../wdir |
|
405 | $ hg archive -S -r 'wdir()' ../wdir | |
388 | \r (no-eol) (esc) |
|
406 | \r (no-eol) (esc) | |
389 | archiving [ ] 0/3\r (no-eol) (esc) |
|
407 | archiving [ ] 0/3\r (no-eol) (esc) | |
390 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
408 | archiving [=============> ] 1/3\r (no-eol) (esc) | |
391 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
409 | archiving [===========================> ] 2/3\r (no-eol) (esc) | |
392 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
410 | archiving [==========================================>] 3/3\r (no-eol) (esc) | |
393 | \r (no-eol) (esc) |
|
411 | \r (no-eol) (esc) | |
394 | \r (no-eol) (esc) |
|
412 | \r (no-eol) (esc) | |
395 | archiving (sub1) [ ] 0/4\r (no-eol) (esc) |
|
413 | archiving (sub1) [ ] 0/4\r (no-eol) (esc) | |
396 | archiving (sub1) [========> ] 1/4\r (no-eol) (esc) |
|
414 | archiving (sub1) [========> ] 1/4\r (no-eol) (esc) | |
397 | archiving (sub1) [=================> ] 2/4\r (no-eol) (esc) |
|
415 | archiving (sub1) [=================> ] 2/4\r (no-eol) (esc) | |
398 | archiving (sub1) [==========================> ] 3/4\r (no-eol) (esc) |
|
416 | archiving (sub1) [==========================> ] 3/4\r (no-eol) (esc) | |
399 | archiving (sub1) [===================================>] 4/4\r (no-eol) (esc) |
|
417 | archiving (sub1) [===================================>] 4/4\r (no-eol) (esc) | |
400 | \r (no-eol) (esc) |
|
418 | \r (no-eol) (esc) | |
401 | \r (no-eol) (esc) |
|
419 | \r (no-eol) (esc) | |
402 | archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc) |
|
420 | archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc) | |
403 | archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc) |
|
421 | archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc) | |
404 | archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc) |
|
422 | archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc) | |
405 | \r (no-eol) (esc) |
|
423 | \r (no-eol) (esc) | |
406 | $ diff -r . ../wdir | egrep -v '\.hg$|^Common subdirectories:' |
|
424 | $ diff -r . ../wdir | egrep -v '\.hg$|^Common subdirectories:' | |
407 | Only in ../wdir: .hg_archival.txt |
|
425 | Only in ../wdir: .hg_archival.txt | |
408 |
|
426 | |||
409 | $ find ../wdir -type f | sort |
|
427 | $ find ../wdir -type f | sort | |
410 | ../wdir/.hg_archival.txt |
|
428 | ../wdir/.hg_archival.txt | |
411 | ../wdir/.hgsub |
|
429 | ../wdir/.hgsub | |
412 | ../wdir/.hgsubstate |
|
430 | ../wdir/.hgsubstate | |
413 | ../wdir/foo/bar/abc |
|
431 | ../wdir/foo/bar/abc | |
414 | ../wdir/sub1/.hgsub |
|
432 | ../wdir/sub1/.hgsub | |
415 | ../wdir/sub1/.hgsubstate |
|
433 | ../wdir/sub1/.hgsubstate | |
416 | ../wdir/sub1/foo |
|
434 | ../wdir/sub1/foo | |
417 | ../wdir/sub1/sub1 |
|
435 | ../wdir/sub1/sub1 | |
418 | ../wdir/sub1/sub2/folder/test.txt |
|
436 | ../wdir/sub1/sub2/folder/test.txt | |
419 | ../wdir/sub1/sub2/sub2 |
|
437 | ../wdir/sub1/sub2/sub2 | |
420 |
|
438 | |||
421 | $ cat ../wdir/.hg_archival.txt |
|
439 | $ cat ../wdir/.hg_archival.txt | |
422 | repo: 7f491f53a367861f47ee64a80eb997d1f341b77a |
|
440 | repo: 7f491f53a367861f47ee64a80eb997d1f341b77a | |
423 | node: 9bb10eebee29dc0f1201dcf5977b811a540255fd+ |
|
441 | node: 9bb10eebee29dc0f1201dcf5977b811a540255fd+ | |
424 | branch: default |
|
442 | branch: default | |
425 | latesttag: null |
|
443 | latesttag: null | |
426 | latesttagdistance: 4 |
|
444 | latesttagdistance: 4 | |
427 | changessincelatesttag: 4 |
|
445 | changessincelatesttag: 4 | |
428 |
|
446 | |||
429 | Attempting to archive 'wdir()' with a missing file is handled gracefully |
|
447 | Attempting to archive 'wdir()' with a missing file is handled gracefully | |
430 | $ rm sub1/sub1 |
|
448 | $ rm sub1/sub1 | |
431 | $ rm -r ../wdir |
|
449 | $ rm -r ../wdir | |
432 | $ hg archive -v -S -r 'wdir()' ../wdir |
|
450 | $ hg archive -v -S -r 'wdir()' ../wdir | |
433 | \r (no-eol) (esc) |
|
451 | \r (no-eol) (esc) | |
434 | archiving [ ] 0/3\r (no-eol) (esc) |
|
452 | archiving [ ] 0/3\r (no-eol) (esc) | |
435 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
453 | archiving [=============> ] 1/3\r (no-eol) (esc) | |
436 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
454 | archiving [===========================> ] 2/3\r (no-eol) (esc) | |
437 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
455 | archiving [==========================================>] 3/3\r (no-eol) (esc) | |
438 | \r (no-eol) (esc) |
|
456 | \r (no-eol) (esc) | |
439 | \r (no-eol) (esc) |
|
457 | \r (no-eol) (esc) | |
440 | archiving (sub1) [ ] 0/3\r (no-eol) (esc) |
|
458 | archiving (sub1) [ ] 0/3\r (no-eol) (esc) | |
441 | archiving (sub1) [===========> ] 1/3\r (no-eol) (esc) |
|
459 | archiving (sub1) [===========> ] 1/3\r (no-eol) (esc) | |
442 | archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc) |
|
460 | archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc) | |
443 | archiving (sub1) [===================================>] 3/3\r (no-eol) (esc) |
|
461 | archiving (sub1) [===================================>] 3/3\r (no-eol) (esc) | |
444 | \r (no-eol) (esc) |
|
462 | \r (no-eol) (esc) | |
445 | \r (no-eol) (esc) |
|
463 | \r (no-eol) (esc) | |
446 | archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc) |
|
464 | archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc) | |
447 | archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc) |
|
465 | archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc) | |
448 | archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc) |
|
466 | archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc) | |
449 | \r (no-eol) (esc) |
|
467 | \r (no-eol) (esc) | |
450 | $ find ../wdir -type f | sort |
|
468 | $ find ../wdir -type f | sort | |
451 | ../wdir/.hg_archival.txt |
|
469 | ../wdir/.hg_archival.txt | |
452 | ../wdir/.hgsub |
|
470 | ../wdir/.hgsub | |
453 | ../wdir/.hgsubstate |
|
471 | ../wdir/.hgsubstate | |
454 | ../wdir/foo/bar/abc |
|
472 | ../wdir/foo/bar/abc | |
455 | ../wdir/sub1/.hgsub |
|
473 | ../wdir/sub1/.hgsub | |
456 | ../wdir/sub1/.hgsubstate |
|
474 | ../wdir/sub1/.hgsubstate | |
457 | ../wdir/sub1/foo |
|
475 | ../wdir/sub1/foo | |
458 | ../wdir/sub1/sub2/folder/test.txt |
|
476 | ../wdir/sub1/sub2/folder/test.txt | |
459 | ../wdir/sub1/sub2/sub2 |
|
477 | ../wdir/sub1/sub2/sub2 | |
460 |
|
478 | |||
461 | Continue relative path printing + subrepos |
|
479 | Continue relative path printing + subrepos | |
462 | $ hg update -Cq |
|
480 | $ hg update -Cq | |
463 | $ rm -r ../wdir |
|
481 | $ rm -r ../wdir | |
464 | $ hg archive -S -r 'wdir()' ../wdir |
|
482 | $ hg archive -S -r 'wdir()' ../wdir | |
465 | \r (no-eol) (esc) |
|
483 | \r (no-eol) (esc) | |
466 | archiving [ ] 0/3\r (no-eol) (esc) |
|
484 | archiving [ ] 0/3\r (no-eol) (esc) | |
467 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
485 | archiving [=============> ] 1/3\r (no-eol) (esc) | |
468 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
486 | archiving [===========================> ] 2/3\r (no-eol) (esc) | |
469 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
487 | archiving [==========================================>] 3/3\r (no-eol) (esc) | |
470 | \r (no-eol) (esc) |
|
488 | \r (no-eol) (esc) | |
471 | \r (no-eol) (esc) |
|
489 | \r (no-eol) (esc) | |
472 | archiving (sub1) [ ] 0/3\r (no-eol) (esc) |
|
490 | archiving (sub1) [ ] 0/3\r (no-eol) (esc) | |
473 | archiving (sub1) [===========> ] 1/3\r (no-eol) (esc) |
|
491 | archiving (sub1) [===========> ] 1/3\r (no-eol) (esc) | |
474 | archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc) |
|
492 | archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc) | |
475 | archiving (sub1) [===================================>] 3/3\r (no-eol) (esc) |
|
493 | archiving (sub1) [===================================>] 3/3\r (no-eol) (esc) | |
476 | \r (no-eol) (esc) |
|
494 | \r (no-eol) (esc) | |
477 | \r (no-eol) (esc) |
|
495 | \r (no-eol) (esc) | |
478 | archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc) |
|
496 | archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc) | |
479 | archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc) |
|
497 | archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc) | |
480 | archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc) |
|
498 | archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc) | |
481 | archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc) |
|
499 | archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc) | |
482 | \r (no-eol) (esc) |
|
500 | \r (no-eol) (esc) | |
483 | $ cat ../wdir/.hg_archival.txt |
|
501 | $ cat ../wdir/.hg_archival.txt | |
484 | repo: 7f491f53a367861f47ee64a80eb997d1f341b77a |
|
502 | repo: 7f491f53a367861f47ee64a80eb997d1f341b77a | |
485 | node: 9bb10eebee29dc0f1201dcf5977b811a540255fd |
|
503 | node: 9bb10eebee29dc0f1201dcf5977b811a540255fd | |
486 | branch: default |
|
504 | branch: default | |
487 | latesttag: null |
|
505 | latesttag: null | |
488 | latesttagdistance: 4 |
|
506 | latesttagdistance: 4 | |
489 | changessincelatesttag: 4 |
|
507 | changessincelatesttag: 4 | |
490 |
|
508 | |||
491 | $ touch sub1/sub2/folder/bar |
|
509 | $ touch sub1/sub2/folder/bar | |
492 | $ hg addremove sub1/sub2 |
|
510 | $ hg addremove sub1/sub2 | |
493 | adding sub1/sub2/folder/bar |
|
511 | adding sub1/sub2/folder/bar | |
494 | $ hg status -S |
|
512 | $ hg status -S | |
495 | A sub1/sub2/folder/bar |
|
513 | A sub1/sub2/folder/bar | |
496 | ? foo/bar/abc |
|
514 | ? foo/bar/abc | |
497 | ? sub1/foo |
|
515 | ? sub1/foo | |
498 | $ hg update -Cq |
|
516 | $ hg update -Cq | |
499 | $ hg addremove sub1 |
|
517 | $ hg addremove sub1 | |
500 | adding sub1/sub2/folder/bar |
|
518 | adding sub1/sub2/folder/bar | |
501 | adding sub1/foo |
|
519 | adding sub1/foo | |
502 | $ hg update -Cq |
|
520 | $ hg update -Cq | |
503 | $ rm sub1/sub2/folder/test.txt |
|
521 | $ rm sub1/sub2/folder/test.txt | |
504 | $ rm sub1/sub2/test.txt |
|
522 | $ rm sub1/sub2/test.txt | |
505 | $ hg ci -ASm "remove test.txt" |
|
523 | $ hg ci -ASm "remove test.txt" | |
506 | adding sub1/sub2/folder/bar |
|
524 | adding sub1/sub2/folder/bar | |
507 | removing sub1/sub2/folder/test.txt |
|
525 | removing sub1/sub2/folder/test.txt | |
508 | removing sub1/sub2/test.txt |
|
526 | removing sub1/sub2/test.txt | |
509 | adding sub1/foo |
|
527 | adding sub1/foo | |
510 | adding foo/bar/abc |
|
528 | adding foo/bar/abc | |
511 | committing subrepository sub1 |
|
529 | committing subrepository sub1 | |
512 | committing subrepository sub1/sub2 |
|
530 | committing subrepository sub1/sub2 | |
513 |
|
531 | |||
514 | $ hg forget sub1/sub2/sub2 |
|
532 | $ hg forget sub1/sub2/sub2 | |
515 | $ echo x > sub1/sub2/x.txt |
|
533 | $ echo x > sub1/sub2/x.txt | |
516 | $ hg add sub1/sub2/x.txt |
|
534 | $ hg add sub1/sub2/x.txt | |
517 |
|
535 | |||
518 | Files sees uncommitted adds and removes in subrepos |
|
536 | Files sees uncommitted adds and removes in subrepos | |
519 | $ hg files -S |
|
537 | $ hg files -S | |
520 | .hgsub |
|
538 | .hgsub | |
521 | .hgsubstate |
|
539 | .hgsubstate | |
522 | foo/bar/abc |
|
540 | foo/bar/abc | |
523 | main |
|
541 | main | |
524 | sub1/.hgsub |
|
542 | sub1/.hgsub | |
525 | sub1/.hgsubstate |
|
543 | sub1/.hgsubstate | |
526 | sub1/foo |
|
544 | sub1/foo | |
527 | sub1/sub1 |
|
545 | sub1/sub1 | |
528 | sub1/sub2/folder/bar |
|
546 | sub1/sub2/folder/bar | |
529 | sub1/sub2/x.txt |
|
547 | sub1/sub2/x.txt | |
530 |
|
548 | |||
531 | $ hg files -S "set:eol('dos') or eol('unix') or size('<= 0')" |
|
549 | $ hg files -S "set:eol('dos') or eol('unix') or size('<= 0')" | |
532 | .hgsub |
|
550 | .hgsub | |
533 | .hgsubstate |
|
551 | .hgsubstate | |
534 | foo/bar/abc |
|
552 | foo/bar/abc | |
535 | main |
|
553 | main | |
536 | sub1/.hgsub |
|
554 | sub1/.hgsub | |
537 | sub1/.hgsubstate |
|
555 | sub1/.hgsubstate | |
538 | sub1/foo |
|
556 | sub1/foo | |
539 | sub1/sub1 |
|
557 | sub1/sub1 | |
540 | sub1/sub2/folder/bar |
|
558 | sub1/sub2/folder/bar | |
541 | sub1/sub2/x.txt |
|
559 | sub1/sub2/x.txt | |
542 |
|
560 | |||
543 | $ hg files -r '.^' -S "set:eol('dos') or eol('unix')" |
|
561 | $ hg files -r '.^' -S "set:eol('dos') or eol('unix')" | |
544 | .hgsub |
|
562 | .hgsub | |
545 | .hgsubstate |
|
563 | .hgsubstate | |
546 | main |
|
564 | main | |
547 | sub1/.hgsub |
|
565 | sub1/.hgsub | |
548 | sub1/.hgsubstate |
|
566 | sub1/.hgsubstate | |
549 | sub1/sub1 |
|
567 | sub1/sub1 | |
550 | sub1/sub2/folder/test.txt |
|
568 | sub1/sub2/folder/test.txt | |
551 | sub1/sub2/sub2 |
|
569 | sub1/sub2/sub2 | |
552 | sub1/sub2/test.txt |
|
570 | sub1/sub2/test.txt | |
553 |
|
571 | |||
554 | $ hg files sub1 |
|
572 | $ hg files sub1 | |
555 | sub1/.hgsub |
|
573 | sub1/.hgsub | |
556 | sub1/.hgsubstate |
|
574 | sub1/.hgsubstate | |
557 | sub1/foo |
|
575 | sub1/foo | |
558 | sub1/sub1 |
|
576 | sub1/sub1 | |
559 | sub1/sub2/folder/bar |
|
577 | sub1/sub2/folder/bar | |
560 | sub1/sub2/x.txt |
|
578 | sub1/sub2/x.txt | |
561 |
|
579 | |||
562 | $ hg files sub1/sub2 |
|
580 | $ hg files sub1/sub2 | |
563 | sub1/sub2/folder/bar |
|
581 | sub1/sub2/folder/bar | |
564 | sub1/sub2/x.txt |
|
582 | sub1/sub2/x.txt | |
565 |
|
583 | |||
566 | $ hg files |
|
584 | $ hg files | |
567 | .hgsub |
|
585 | .hgsub | |
568 | .hgsubstate |
|
586 | .hgsubstate | |
569 | foo/bar/abc |
|
587 | foo/bar/abc | |
570 | main |
|
588 | main | |
571 |
|
589 | |||
572 | $ hg files -S -r '.^' sub1/sub2/folder |
|
590 | $ hg files -S -r '.^' sub1/sub2/folder | |
573 | sub1/sub2/folder/test.txt |
|
591 | sub1/sub2/folder/test.txt | |
574 |
|
592 | |||
575 | $ hg files -S -r '.^' sub1/sub2/missing |
|
593 | $ hg files -S -r '.^' sub1/sub2/missing | |
576 | sub1/sub2/missing: no such file in rev 78026e779ea6 |
|
594 | sub1/sub2/missing: no such file in rev 78026e779ea6 | |
577 | [1] |
|
595 | [1] | |
578 |
|
596 | |||
579 | $ hg files -r '.^' sub1/ |
|
597 | $ hg files -r '.^' sub1/ | |
580 | sub1/.hgsub |
|
598 | sub1/.hgsub | |
581 | sub1/.hgsubstate |
|
599 | sub1/.hgsubstate | |
582 | sub1/sub1 |
|
600 | sub1/sub1 | |
583 | sub1/sub2/folder/test.txt |
|
601 | sub1/sub2/folder/test.txt | |
584 | sub1/sub2/sub2 |
|
602 | sub1/sub2/sub2 | |
585 | sub1/sub2/test.txt |
|
603 | sub1/sub2/test.txt | |
586 |
|
604 | |||
587 | $ hg files -r '.^' sub1/sub2 |
|
605 | $ hg files -r '.^' sub1/sub2 | |
588 | sub1/sub2/folder/test.txt |
|
606 | sub1/sub2/folder/test.txt | |
589 | sub1/sub2/sub2 |
|
607 | sub1/sub2/sub2 | |
590 | sub1/sub2/test.txt |
|
608 | sub1/sub2/test.txt | |
591 |
|
609 | |||
592 | $ hg rollback -q |
|
610 | $ hg rollback -q | |
593 | $ hg up -Cq |
|
611 | $ hg up -Cq | |
594 |
|
612 | |||
595 | $ hg --config extensions.largefiles=! archive -S ../archive_all |
|
613 | $ hg --config extensions.largefiles=! archive -S ../archive_all | |
596 | \r (no-eol) (esc) |
|
614 | \r (no-eol) (esc) | |
597 | archiving [ ] 0/3\r (no-eol) (esc) |
|
615 | archiving [ ] 0/3\r (no-eol) (esc) | |
598 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
616 | archiving [=============> ] 1/3\r (no-eol) (esc) | |
599 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
617 | archiving [===========================> ] 2/3\r (no-eol) (esc) | |
600 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
618 | archiving [==========================================>] 3/3\r (no-eol) (esc) | |
601 | \r (no-eol) (esc) |
|
619 | \r (no-eol) (esc) | |
602 | \r (no-eol) (esc) |
|
620 | \r (no-eol) (esc) | |
603 | archiving (sub1) [ ] 0/3\r (no-eol) (esc) |
|
621 | archiving (sub1) [ ] 0/3\r (no-eol) (esc) | |
604 | archiving (sub1) [===========> ] 1/3\r (no-eol) (esc) |
|
622 | archiving (sub1) [===========> ] 1/3\r (no-eol) (esc) | |
605 | archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc) |
|
623 | archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc) | |
606 | archiving (sub1) [===================================>] 3/3\r (no-eol) (esc) |
|
624 | archiving (sub1) [===================================>] 3/3\r (no-eol) (esc) | |
607 | \r (no-eol) (esc) |
|
625 | \r (no-eol) (esc) | |
608 | \r (no-eol) (esc) |
|
626 | \r (no-eol) (esc) | |
609 | archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc) |
|
627 | archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc) | |
610 | archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc) |
|
628 | archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc) | |
611 | archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc) |
|
629 | archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc) | |
612 | archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc) |
|
630 | archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc) | |
613 | \r (no-eol) (esc) |
|
631 | \r (no-eol) (esc) | |
614 | $ find ../archive_all | sort |
|
632 | $ find ../archive_all | sort | |
615 | ../archive_all |
|
633 | ../archive_all | |
616 | ../archive_all/.hg_archival.txt |
|
634 | ../archive_all/.hg_archival.txt | |
617 | ../archive_all/.hgsub |
|
635 | ../archive_all/.hgsub | |
618 | ../archive_all/.hgsubstate |
|
636 | ../archive_all/.hgsubstate | |
619 | ../archive_all/main |
|
637 | ../archive_all/main | |
620 | ../archive_all/sub1 |
|
638 | ../archive_all/sub1 | |
621 | ../archive_all/sub1/.hgsub |
|
639 | ../archive_all/sub1/.hgsub | |
622 | ../archive_all/sub1/.hgsubstate |
|
640 | ../archive_all/sub1/.hgsubstate | |
623 | ../archive_all/sub1/sub1 |
|
641 | ../archive_all/sub1/sub1 | |
624 | ../archive_all/sub1/sub2 |
|
642 | ../archive_all/sub1/sub2 | |
625 | ../archive_all/sub1/sub2/folder |
|
643 | ../archive_all/sub1/sub2/folder | |
626 | ../archive_all/sub1/sub2/folder/test.txt |
|
644 | ../archive_all/sub1/sub2/folder/test.txt | |
627 | ../archive_all/sub1/sub2/sub2 |
|
645 | ../archive_all/sub1/sub2/sub2 | |
628 | ../archive_all/sub1/sub2/test.txt |
|
646 | ../archive_all/sub1/sub2/test.txt | |
629 |
|
647 | |||
630 | Check that archive -X works in deep subrepos |
|
648 | Check that archive -X works in deep subrepos | |
631 |
|
649 | |||
632 | $ hg --config extensions.largefiles=! archive -S -X '**test*' ../archive_exclude |
|
650 | $ hg --config extensions.largefiles=! archive -S -X '**test*' ../archive_exclude | |
633 | \r (no-eol) (esc) |
|
651 | \r (no-eol) (esc) | |
634 | archiving [ ] 0/3\r (no-eol) (esc) |
|
652 | archiving [ ] 0/3\r (no-eol) (esc) | |
635 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
653 | archiving [=============> ] 1/3\r (no-eol) (esc) | |
636 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
654 | archiving [===========================> ] 2/3\r (no-eol) (esc) | |
637 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
655 | archiving [==========================================>] 3/3\r (no-eol) (esc) | |
638 | \r (no-eol) (esc) |
|
656 | \r (no-eol) (esc) | |
639 | \r (no-eol) (esc) |
|
657 | \r (no-eol) (esc) | |
640 | archiving (sub1) [ ] 0/3\r (no-eol) (esc) |
|
658 | archiving (sub1) [ ] 0/3\r (no-eol) (esc) | |
641 | archiving (sub1) [===========> ] 1/3\r (no-eol) (esc) |
|
659 | archiving (sub1) [===========> ] 1/3\r (no-eol) (esc) | |
642 | archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc) |
|
660 | archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc) | |
643 | archiving (sub1) [===================================>] 3/3\r (no-eol) (esc) |
|
661 | archiving (sub1) [===================================>] 3/3\r (no-eol) (esc) | |
644 | \r (no-eol) (esc) |
|
662 | \r (no-eol) (esc) | |
645 | \r (no-eol) (esc) |
|
663 | \r (no-eol) (esc) | |
646 | archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc) |
|
664 | archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc) | |
647 | archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc) |
|
665 | archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc) | |
648 | \r (no-eol) (esc) |
|
666 | \r (no-eol) (esc) | |
649 | $ find ../archive_exclude | sort |
|
667 | $ find ../archive_exclude | sort | |
650 | ../archive_exclude |
|
668 | ../archive_exclude | |
651 | ../archive_exclude/.hg_archival.txt |
|
669 | ../archive_exclude/.hg_archival.txt | |
652 | ../archive_exclude/.hgsub |
|
670 | ../archive_exclude/.hgsub | |
653 | ../archive_exclude/.hgsubstate |
|
671 | ../archive_exclude/.hgsubstate | |
654 | ../archive_exclude/main |
|
672 | ../archive_exclude/main | |
655 | ../archive_exclude/sub1 |
|
673 | ../archive_exclude/sub1 | |
656 | ../archive_exclude/sub1/.hgsub |
|
674 | ../archive_exclude/sub1/.hgsub | |
657 | ../archive_exclude/sub1/.hgsubstate |
|
675 | ../archive_exclude/sub1/.hgsubstate | |
658 | ../archive_exclude/sub1/sub1 |
|
676 | ../archive_exclude/sub1/sub1 | |
659 | ../archive_exclude/sub1/sub2 |
|
677 | ../archive_exclude/sub1/sub2 | |
660 | ../archive_exclude/sub1/sub2/sub2 |
|
678 | ../archive_exclude/sub1/sub2/sub2 | |
661 |
|
679 | |||
662 | $ hg --config extensions.largefiles=! archive -S -I '**test*' ../archive_include |
|
680 | $ hg --config extensions.largefiles=! archive -S -I '**test*' ../archive_include | |
663 | \r (no-eol) (esc) |
|
681 | \r (no-eol) (esc) | |
664 | archiving (sub1) [ <=> ] 0\r (no-eol) (esc) |
|
682 | archiving (sub1) [ <=> ] 0\r (no-eol) (esc) | |
665 | \r (no-eol) (esc) |
|
683 | \r (no-eol) (esc) | |
666 | \r (no-eol) (esc) |
|
684 | \r (no-eol) (esc) | |
667 | archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc) |
|
685 | archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc) | |
668 | archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc) |
|
686 | archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc) | |
669 | archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc) |
|
687 | archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc) | |
670 | \r (no-eol) (esc) |
|
688 | \r (no-eol) (esc) | |
671 | $ find ../archive_include | sort |
|
689 | $ find ../archive_include | sort | |
672 | ../archive_include |
|
690 | ../archive_include | |
673 | ../archive_include/sub1 |
|
691 | ../archive_include/sub1 | |
674 | ../archive_include/sub1/sub2 |
|
692 | ../archive_include/sub1/sub2 | |
675 | ../archive_include/sub1/sub2/folder |
|
693 | ../archive_include/sub1/sub2/folder | |
676 | ../archive_include/sub1/sub2/folder/test.txt |
|
694 | ../archive_include/sub1/sub2/folder/test.txt | |
677 | ../archive_include/sub1/sub2/test.txt |
|
695 | ../archive_include/sub1/sub2/test.txt | |
678 |
|
696 | |||
679 | Check that deep archive works with largefiles (which overrides hgsubrepo impl) |
|
697 | Check that deep archive works with largefiles (which overrides hgsubrepo impl) | |
680 | This also tests the repo.ui regression in 43fb170a23bd, and that lf subrepo |
|
698 | This also tests the repo.ui regression in 43fb170a23bd, and that lf subrepo | |
681 | subrepos are archived properly. |
|
699 | subrepos are archived properly. | |
682 | Note that add --large through a subrepo currently adds the file as a normal file |
|
700 | Note that add --large through a subrepo currently adds the file as a normal file | |
683 |
|
701 | |||
684 | $ echo "large" > sub1/sub2/large.bin |
|
702 | $ echo "large" > sub1/sub2/large.bin | |
685 | $ hg --config extensions.largefiles= add --large -R sub1/sub2 sub1/sub2/large.bin |
|
703 | $ hg --config extensions.largefiles= add --large -R sub1/sub2 sub1/sub2/large.bin | |
686 | $ echo "large" > large.bin |
|
704 | $ echo "large" > large.bin | |
687 | $ hg --config extensions.largefiles= add --large large.bin |
|
705 | $ hg --config extensions.largefiles= add --large large.bin | |
688 | $ hg --config extensions.largefiles= ci -S -m "add large files" |
|
706 | $ hg --config extensions.largefiles= ci -S -m "add large files" | |
689 | committing subrepository sub1 |
|
707 | committing subrepository sub1 | |
690 | committing subrepository sub1/sub2 |
|
708 | committing subrepository sub1/sub2 | |
691 |
|
709 | |||
692 | $ hg --config extensions.largefiles= archive -S ../archive_lf |
|
710 | $ hg --config extensions.largefiles= archive -S ../archive_lf | |
693 | $ find ../archive_lf | sort |
|
711 | $ find ../archive_lf | sort | |
694 | ../archive_lf |
|
712 | ../archive_lf | |
695 | ../archive_lf/.hg_archival.txt |
|
713 | ../archive_lf/.hg_archival.txt | |
696 | ../archive_lf/.hgsub |
|
714 | ../archive_lf/.hgsub | |
697 | ../archive_lf/.hgsubstate |
|
715 | ../archive_lf/.hgsubstate | |
698 | ../archive_lf/large.bin |
|
716 | ../archive_lf/large.bin | |
699 | ../archive_lf/main |
|
717 | ../archive_lf/main | |
700 | ../archive_lf/sub1 |
|
718 | ../archive_lf/sub1 | |
701 | ../archive_lf/sub1/.hgsub |
|
719 | ../archive_lf/sub1/.hgsub | |
702 | ../archive_lf/sub1/.hgsubstate |
|
720 | ../archive_lf/sub1/.hgsubstate | |
703 | ../archive_lf/sub1/sub1 |
|
721 | ../archive_lf/sub1/sub1 | |
704 | ../archive_lf/sub1/sub2 |
|
722 | ../archive_lf/sub1/sub2 | |
705 | ../archive_lf/sub1/sub2/folder |
|
723 | ../archive_lf/sub1/sub2/folder | |
706 | ../archive_lf/sub1/sub2/folder/test.txt |
|
724 | ../archive_lf/sub1/sub2/folder/test.txt | |
707 | ../archive_lf/sub1/sub2/large.bin |
|
725 | ../archive_lf/sub1/sub2/large.bin | |
708 | ../archive_lf/sub1/sub2/sub2 |
|
726 | ../archive_lf/sub1/sub2/sub2 | |
709 | ../archive_lf/sub1/sub2/test.txt |
|
727 | ../archive_lf/sub1/sub2/test.txt | |
710 | $ rm -rf ../archive_lf |
|
728 | $ rm -rf ../archive_lf | |
711 |
|
729 | |||
712 | Exclude large files from main and sub-sub repo |
|
730 | Exclude large files from main and sub-sub repo | |
713 |
|
731 | |||
714 | $ hg --config extensions.largefiles= archive -S -X '**.bin' ../archive_lf |
|
732 | $ hg --config extensions.largefiles= archive -S -X '**.bin' ../archive_lf | |
715 | $ find ../archive_lf | sort |
|
733 | $ find ../archive_lf | sort | |
716 | ../archive_lf |
|
734 | ../archive_lf | |
717 | ../archive_lf/.hg_archival.txt |
|
735 | ../archive_lf/.hg_archival.txt | |
718 | ../archive_lf/.hgsub |
|
736 | ../archive_lf/.hgsub | |
719 | ../archive_lf/.hgsubstate |
|
737 | ../archive_lf/.hgsubstate | |
720 | ../archive_lf/main |
|
738 | ../archive_lf/main | |
721 | ../archive_lf/sub1 |
|
739 | ../archive_lf/sub1 | |
722 | ../archive_lf/sub1/.hgsub |
|
740 | ../archive_lf/sub1/.hgsub | |
723 | ../archive_lf/sub1/.hgsubstate |
|
741 | ../archive_lf/sub1/.hgsubstate | |
724 | ../archive_lf/sub1/sub1 |
|
742 | ../archive_lf/sub1/sub1 | |
725 | ../archive_lf/sub1/sub2 |
|
743 | ../archive_lf/sub1/sub2 | |
726 | ../archive_lf/sub1/sub2/folder |
|
744 | ../archive_lf/sub1/sub2/folder | |
727 | ../archive_lf/sub1/sub2/folder/test.txt |
|
745 | ../archive_lf/sub1/sub2/folder/test.txt | |
728 | ../archive_lf/sub1/sub2/sub2 |
|
746 | ../archive_lf/sub1/sub2/sub2 | |
729 | ../archive_lf/sub1/sub2/test.txt |
|
747 | ../archive_lf/sub1/sub2/test.txt | |
730 | $ rm -rf ../archive_lf |
|
748 | $ rm -rf ../archive_lf | |
731 |
|
749 | |||
732 | Exclude normal files from main and sub-sub repo |
|
750 | Exclude normal files from main and sub-sub repo | |
733 |
|
751 | |||
734 | $ hg --config extensions.largefiles= archive -S -X '**.txt' -p '.' ../archive_lf.tgz |
|
752 | $ hg --config extensions.largefiles= archive -S -X '**.txt' -p '.' ../archive_lf.tgz | |
735 | $ tar -tzf ../archive_lf.tgz | sort |
|
753 | $ tar -tzf ../archive_lf.tgz | sort | |
736 | .hgsub |
|
754 | .hgsub | |
737 | .hgsubstate |
|
755 | .hgsubstate | |
738 | large.bin |
|
756 | large.bin | |
739 | main |
|
757 | main | |
740 | sub1/.hgsub |
|
758 | sub1/.hgsub | |
741 | sub1/.hgsubstate |
|
759 | sub1/.hgsubstate | |
742 | sub1/sub1 |
|
760 | sub1/sub1 | |
743 | sub1/sub2/large.bin |
|
761 | sub1/sub2/large.bin | |
744 | sub1/sub2/sub2 |
|
762 | sub1/sub2/sub2 | |
745 |
|
763 | |||
746 | Include normal files from within a largefiles subrepo |
|
764 | Include normal files from within a largefiles subrepo | |
747 |
|
765 | |||
748 | $ hg --config extensions.largefiles= archive -S -I '**.txt' ../archive_lf |
|
766 | $ hg --config extensions.largefiles= archive -S -I '**.txt' ../archive_lf | |
749 | $ find ../archive_lf | sort |
|
767 | $ find ../archive_lf | sort | |
750 | ../archive_lf |
|
768 | ../archive_lf | |
751 | ../archive_lf/.hg_archival.txt |
|
769 | ../archive_lf/.hg_archival.txt | |
752 | ../archive_lf/sub1 |
|
770 | ../archive_lf/sub1 | |
753 | ../archive_lf/sub1/sub2 |
|
771 | ../archive_lf/sub1/sub2 | |
754 | ../archive_lf/sub1/sub2/folder |
|
772 | ../archive_lf/sub1/sub2/folder | |
755 | ../archive_lf/sub1/sub2/folder/test.txt |
|
773 | ../archive_lf/sub1/sub2/folder/test.txt | |
756 | ../archive_lf/sub1/sub2/test.txt |
|
774 | ../archive_lf/sub1/sub2/test.txt | |
757 | $ rm -rf ../archive_lf |
|
775 | $ rm -rf ../archive_lf | |
758 |
|
776 | |||
759 | Include large files from within a largefiles subrepo |
|
777 | Include large files from within a largefiles subrepo | |
760 |
|
778 | |||
761 | $ hg --config extensions.largefiles= archive -S -I '**.bin' ../archive_lf |
|
779 | $ hg --config extensions.largefiles= archive -S -I '**.bin' ../archive_lf | |
762 | $ find ../archive_lf | sort |
|
780 | $ find ../archive_lf | sort | |
763 | ../archive_lf |
|
781 | ../archive_lf | |
764 | ../archive_lf/large.bin |
|
782 | ../archive_lf/large.bin | |
765 | ../archive_lf/sub1 |
|
783 | ../archive_lf/sub1 | |
766 | ../archive_lf/sub1/sub2 |
|
784 | ../archive_lf/sub1/sub2 | |
767 | ../archive_lf/sub1/sub2/large.bin |
|
785 | ../archive_lf/sub1/sub2/large.bin | |
768 | $ rm -rf ../archive_lf |
|
786 | $ rm -rf ../archive_lf | |
769 |
|
787 | |||
770 | Find an exact largefile match in a largefiles subrepo |
|
788 | Find an exact largefile match in a largefiles subrepo | |
771 |
|
789 | |||
772 | $ hg --config extensions.largefiles= archive -S -I 'sub1/sub2/large.bin' ../archive_lf |
|
790 | $ hg --config extensions.largefiles= archive -S -I 'sub1/sub2/large.bin' ../archive_lf | |
773 | $ find ../archive_lf | sort |
|
791 | $ find ../archive_lf | sort | |
774 | ../archive_lf |
|
792 | ../archive_lf | |
775 | ../archive_lf/sub1 |
|
793 | ../archive_lf/sub1 | |
776 | ../archive_lf/sub1/sub2 |
|
794 | ../archive_lf/sub1/sub2 | |
777 | ../archive_lf/sub1/sub2/large.bin |
|
795 | ../archive_lf/sub1/sub2/large.bin | |
778 | $ rm -rf ../archive_lf |
|
796 | $ rm -rf ../archive_lf | |
779 |
|
797 | |||
780 | The local repo enables largefiles if a largefiles repo is cloned |
|
798 | The local repo enables largefiles if a largefiles repo is cloned | |
781 | $ hg showconfig extensions |
|
799 | $ hg showconfig extensions | |
782 | abort: repository requires features unknown to this Mercurial: largefiles! |
|
800 | abort: repository requires features unknown to this Mercurial: largefiles! | |
783 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) |
|
801 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) | |
784 | [255] |
|
802 | [255] | |
785 | $ hg --config extensions.largefiles= clone -qU . ../lfclone |
|
803 | $ hg --config extensions.largefiles= clone -qU . ../lfclone | |
786 | $ cat ../lfclone/.hg/hgrc |
|
804 | $ cat ../lfclone/.hg/hgrc | |
787 | # example repository config (see 'hg help config' for more info) |
|
805 | # example repository config (see 'hg help config' for more info) | |
788 | [paths] |
|
806 | [paths] | |
789 | default = $TESTTMP/cloned |
|
807 | default = $TESTTMP/cloned | |
790 |
|
808 | |||
791 | # path aliases to other clones of this repo in URLs or filesystem paths |
|
809 | # path aliases to other clones of this repo in URLs or filesystem paths | |
792 | # (see 'hg help config.paths' for more info) |
|
810 | # (see 'hg help config.paths' for more info) | |
793 | # |
|
811 | # | |
794 | # default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork |
|
812 | # default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork | |
795 | # my-fork = ssh://jdoe@example.net/hg/jdoes-fork |
|
813 | # my-fork = ssh://jdoe@example.net/hg/jdoes-fork | |
796 | # my-clone = /home/jdoe/jdoes-clone |
|
814 | # my-clone = /home/jdoe/jdoes-clone | |
797 |
|
815 | |||
798 | [ui] |
|
816 | [ui] | |
799 | # name and email (local to this repository, optional), e.g. |
|
817 | # name and email (local to this repository, optional), e.g. | |
800 | # username = Jane Doe <jdoe@example.com> |
|
818 | # username = Jane Doe <jdoe@example.com> | |
801 |
|
819 | |||
802 | [extensions] |
|
820 | [extensions] | |
803 | largefiles= |
|
821 | largefiles= | |
804 |
|
822 | |||
805 | Find an exact match to a standin (should archive nothing) |
|
823 | Find an exact match to a standin (should archive nothing) | |
806 | $ hg --config extensions.largefiles= archive -S -I 'sub/sub2/.hglf/large.bin' ../archive_lf |
|
824 | $ hg --config extensions.largefiles= archive -S -I 'sub/sub2/.hglf/large.bin' ../archive_lf | |
807 | $ find ../archive_lf 2> /dev/null | sort |
|
825 | $ find ../archive_lf 2> /dev/null | sort | |
808 |
|
826 | |||
809 | $ cat >> $HGRCPATH <<EOF |
|
827 | $ cat >> $HGRCPATH <<EOF | |
810 | > [extensions] |
|
828 | > [extensions] | |
811 | > largefiles= |
|
829 | > largefiles= | |
812 | > [largefiles] |
|
830 | > [largefiles] | |
813 | > patterns=glob:**.dat |
|
831 | > patterns=glob:**.dat | |
814 | > EOF |
|
832 | > EOF | |
815 |
|
833 | |||
816 | Test forget through a deep subrepo with the largefiles extension, both a |
|
834 | Test forget through a deep subrepo with the largefiles extension, both a | |
817 | largefile and a normal file. Then a largefile that hasn't been committed yet. |
|
835 | largefile and a normal file. Then a largefile that hasn't been committed yet. | |
818 | $ touch sub1/sub2/untracked.txt |
|
836 | $ touch sub1/sub2/untracked.txt | |
819 | $ touch sub1/sub2/large.dat |
|
837 | $ touch sub1/sub2/large.dat | |
820 | $ hg forget sub1/sub2/large.bin sub1/sub2/test.txt sub1/sub2/untracked.txt |
|
838 | $ hg forget sub1/sub2/large.bin sub1/sub2/test.txt sub1/sub2/untracked.txt | |
821 | not removing sub1/sub2/untracked.txt: file is already untracked |
|
839 | not removing sub1/sub2/untracked.txt: file is already untracked | |
822 | [1] |
|
840 | [1] | |
823 | $ hg add --large --dry-run -v sub1/sub2/untracked.txt |
|
841 | $ hg add --large --dry-run -v sub1/sub2/untracked.txt | |
824 | adding sub1/sub2/untracked.txt as a largefile |
|
842 | adding sub1/sub2/untracked.txt as a largefile | |
825 | $ hg add --large -v sub1/sub2/untracked.txt |
|
843 | $ hg add --large -v sub1/sub2/untracked.txt | |
826 | adding sub1/sub2/untracked.txt as a largefile |
|
844 | adding sub1/sub2/untracked.txt as a largefile | |
827 | $ hg add --normal -v sub1/sub2/large.dat |
|
845 | $ hg add --normal -v sub1/sub2/large.dat | |
828 | adding sub1/sub2/large.dat |
|
846 | adding sub1/sub2/large.dat | |
829 | $ hg forget -v sub1/sub2/untracked.txt |
|
847 | $ hg forget -v sub1/sub2/untracked.txt | |
830 | removing sub1/sub2/untracked.txt |
|
848 | removing sub1/sub2/untracked.txt | |
831 | $ hg status -S |
|
849 | $ hg status -S | |
832 | A sub1/sub2/large.dat |
|
850 | A sub1/sub2/large.dat | |
833 | R sub1/sub2/large.bin |
|
851 | R sub1/sub2/large.bin | |
834 | R sub1/sub2/test.txt |
|
852 | R sub1/sub2/test.txt | |
835 | ? foo/bar/abc |
|
853 | ? foo/bar/abc | |
836 | ? sub1/sub2/untracked.txt |
|
854 | ? sub1/sub2/untracked.txt | |
837 | ? sub1/sub2/x.txt |
|
855 | ? sub1/sub2/x.txt | |
838 | $ hg add sub1/sub2 |
|
856 | $ hg add sub1/sub2 | |
839 |
|
857 | |||
840 | $ hg archive -S -r 'wdir()' ../wdir2 |
|
858 | $ hg archive -S -r 'wdir()' ../wdir2 | |
841 | $ diff -r . ../wdir2 | egrep -v '\.hg$|^Common subdirectories:' |
|
859 | $ diff -r . ../wdir2 | egrep -v '\.hg$|^Common subdirectories:' | |
842 | Only in ../wdir2: .hg_archival.txt |
|
860 | Only in ../wdir2: .hg_archival.txt | |
843 | Only in .: .hglf |
|
861 | Only in .: .hglf | |
844 | Only in .: foo |
|
862 | Only in .: foo | |
845 | Only in ./sub1/sub2: large.bin |
|
863 | Only in ./sub1/sub2: large.bin | |
846 | Only in ./sub1/sub2: test.txt |
|
864 | Only in ./sub1/sub2: test.txt | |
847 | Only in ./sub1/sub2: untracked.txt |
|
865 | Only in ./sub1/sub2: untracked.txt | |
848 | Only in ./sub1/sub2: x.txt |
|
866 | Only in ./sub1/sub2: x.txt | |
849 | $ find ../wdir2 -type f | sort |
|
867 | $ find ../wdir2 -type f | sort | |
850 | ../wdir2/.hg_archival.txt |
|
868 | ../wdir2/.hg_archival.txt | |
851 | ../wdir2/.hgsub |
|
869 | ../wdir2/.hgsub | |
852 | ../wdir2/.hgsubstate |
|
870 | ../wdir2/.hgsubstate | |
853 | ../wdir2/large.bin |
|
871 | ../wdir2/large.bin | |
854 | ../wdir2/main |
|
872 | ../wdir2/main | |
855 | ../wdir2/sub1/.hgsub |
|
873 | ../wdir2/sub1/.hgsub | |
856 | ../wdir2/sub1/.hgsubstate |
|
874 | ../wdir2/sub1/.hgsubstate | |
857 | ../wdir2/sub1/sub1 |
|
875 | ../wdir2/sub1/sub1 | |
858 | ../wdir2/sub1/sub2/folder/test.txt |
|
876 | ../wdir2/sub1/sub2/folder/test.txt | |
859 | ../wdir2/sub1/sub2/large.dat |
|
877 | ../wdir2/sub1/sub2/large.dat | |
860 | ../wdir2/sub1/sub2/sub2 |
|
878 | ../wdir2/sub1/sub2/sub2 | |
861 | $ hg status -S -mac -n | sort |
|
879 | $ hg status -S -mac -n | sort | |
862 | .hgsub |
|
880 | .hgsub | |
863 | .hgsubstate |
|
881 | .hgsubstate | |
864 | large.bin |
|
882 | large.bin | |
865 | main |
|
883 | main | |
866 | sub1/.hgsub |
|
884 | sub1/.hgsub | |
867 | sub1/.hgsubstate |
|
885 | sub1/.hgsubstate | |
868 | sub1/sub1 |
|
886 | sub1/sub1 | |
869 | sub1/sub2/folder/test.txt |
|
887 | sub1/sub2/folder/test.txt | |
870 | sub1/sub2/large.dat |
|
888 | sub1/sub2/large.dat | |
871 | sub1/sub2/sub2 |
|
889 | sub1/sub2/sub2 | |
872 |
|
890 | |||
873 | $ hg ci -Sqm 'forget testing' |
|
891 | $ hg ci -Sqm 'forget testing' | |
874 |
|
892 | |||
875 | Test 'wdir()' modified file archiving with largefiles |
|
893 | Test 'wdir()' modified file archiving with largefiles | |
876 | $ echo 'mod' > main |
|
894 | $ echo 'mod' > main | |
877 | $ echo 'mod' > large.bin |
|
895 | $ echo 'mod' > large.bin | |
878 | $ echo 'mod' > sub1/sub2/large.dat |
|
896 | $ echo 'mod' > sub1/sub2/large.dat | |
879 | $ hg archive -S -r 'wdir()' ../wdir3 |
|
897 | $ hg archive -S -r 'wdir()' ../wdir3 | |
880 | $ diff -r . ../wdir3 | egrep -v '\.hg$|^Common subdirectories' |
|
898 | $ diff -r . ../wdir3 | egrep -v '\.hg$|^Common subdirectories' | |
881 | Only in ../wdir3: .hg_archival.txt |
|
899 | Only in ../wdir3: .hg_archival.txt | |
882 | Only in .: .hglf |
|
900 | Only in .: .hglf | |
883 | Only in .: foo |
|
901 | Only in .: foo | |
884 | Only in ./sub1/sub2: large.bin |
|
902 | Only in ./sub1/sub2: large.bin | |
885 | Only in ./sub1/sub2: test.txt |
|
903 | Only in ./sub1/sub2: test.txt | |
886 | Only in ./sub1/sub2: untracked.txt |
|
904 | Only in ./sub1/sub2: untracked.txt | |
887 | Only in ./sub1/sub2: x.txt |
|
905 | Only in ./sub1/sub2: x.txt | |
888 | $ find ../wdir3 -type f | sort |
|
906 | $ find ../wdir3 -type f | sort | |
889 | ../wdir3/.hg_archival.txt |
|
907 | ../wdir3/.hg_archival.txt | |
890 | ../wdir3/.hgsub |
|
908 | ../wdir3/.hgsub | |
891 | ../wdir3/.hgsubstate |
|
909 | ../wdir3/.hgsubstate | |
892 | ../wdir3/large.bin |
|
910 | ../wdir3/large.bin | |
893 | ../wdir3/main |
|
911 | ../wdir3/main | |
894 | ../wdir3/sub1/.hgsub |
|
912 | ../wdir3/sub1/.hgsub | |
895 | ../wdir3/sub1/.hgsubstate |
|
913 | ../wdir3/sub1/.hgsubstate | |
896 | ../wdir3/sub1/sub1 |
|
914 | ../wdir3/sub1/sub1 | |
897 | ../wdir3/sub1/sub2/folder/test.txt |
|
915 | ../wdir3/sub1/sub2/folder/test.txt | |
898 | ../wdir3/sub1/sub2/large.dat |
|
916 | ../wdir3/sub1/sub2/large.dat | |
899 | ../wdir3/sub1/sub2/sub2 |
|
917 | ../wdir3/sub1/sub2/sub2 | |
900 | $ hg up -Cq |
|
918 | $ hg up -Cq | |
901 |
|
919 | |||
902 | Test issue4330: commit a directory where only normal files have changed |
|
920 | Test issue4330: commit a directory where only normal files have changed | |
903 | $ touch foo/bar/large.dat |
|
921 | $ touch foo/bar/large.dat | |
904 | $ hg add --large foo/bar/large.dat |
|
922 | $ hg add --large foo/bar/large.dat | |
905 | $ hg ci -m 'add foo/bar/large.dat' |
|
923 | $ hg ci -m 'add foo/bar/large.dat' | |
906 | $ touch a.txt |
|
924 | $ touch a.txt | |
907 | $ touch a.dat |
|
925 | $ touch a.dat | |
908 | $ hg add -v foo/bar/abc a.txt a.dat |
|
926 | $ hg add -v foo/bar/abc a.txt a.dat | |
909 | adding a.dat as a largefile |
|
927 | adding a.dat as a largefile | |
910 | adding a.txt |
|
928 | adding a.txt | |
911 | adding foo/bar/abc |
|
929 | adding foo/bar/abc | |
912 | $ hg ci -m 'dir commit with only normal file deltas' foo/bar |
|
930 | $ hg ci -m 'dir commit with only normal file deltas' foo/bar | |
913 | $ hg status |
|
931 | $ hg status | |
914 | A a.dat |
|
932 | A a.dat | |
915 | A a.txt |
|
933 | A a.txt | |
916 |
|
934 | |||
917 | Test a directory commit with a changed largefile and a changed normal file |
|
935 | Test a directory commit with a changed largefile and a changed normal file | |
918 | $ echo changed > foo/bar/large.dat |
|
936 | $ echo changed > foo/bar/large.dat | |
919 | $ echo changed > foo/bar/abc |
|
937 | $ echo changed > foo/bar/abc | |
920 | $ hg ci -m 'dir commit with normal and lf file deltas' foo |
|
938 | $ hg ci -m 'dir commit with normal and lf file deltas' foo | |
921 | $ hg status |
|
939 | $ hg status | |
922 | A a.dat |
|
940 | A a.dat | |
923 | A a.txt |
|
941 | A a.txt | |
924 |
|
942 | |||
925 | $ hg ci -m "add a.*" |
|
943 | $ hg ci -m "add a.*" | |
926 | $ hg mv a.dat b.dat |
|
944 | $ hg mv a.dat b.dat | |
927 | $ hg mv foo/bar/abc foo/bar/def |
|
945 | $ hg mv foo/bar/abc foo/bar/def | |
928 | $ hg status -C |
|
946 | $ hg status -C | |
929 | A b.dat |
|
947 | A b.dat | |
930 | a.dat |
|
948 | a.dat | |
931 | A foo/bar/def |
|
949 | A foo/bar/def | |
932 | foo/bar/abc |
|
950 | foo/bar/abc | |
933 | R a.dat |
|
951 | R a.dat | |
934 | R foo/bar/abc |
|
952 | R foo/bar/abc | |
935 |
|
953 | |||
936 | $ hg ci -m "move large and normal" |
|
954 | $ hg ci -m "move large and normal" | |
937 | $ hg status -C --rev '.^' --rev . |
|
955 | $ hg status -C --rev '.^' --rev . | |
938 | A b.dat |
|
956 | A b.dat | |
939 | a.dat |
|
957 | a.dat | |
940 | A foo/bar/def |
|
958 | A foo/bar/def | |
941 | foo/bar/abc |
|
959 | foo/bar/abc | |
942 | R a.dat |
|
960 | R a.dat | |
943 | R foo/bar/abc |
|
961 | R foo/bar/abc | |
944 |
|
962 | |||
945 |
|
963 | |||
946 | $ echo foo > main |
|
964 | $ echo foo > main | |
947 | $ hg ci -m "mod parent only" |
|
965 | $ hg ci -m "mod parent only" | |
948 | $ hg init sub3 |
|
966 | $ hg init sub3 | |
949 | $ echo "sub3 = sub3" >> .hgsub |
|
967 | $ echo "sub3 = sub3" >> .hgsub | |
950 | $ echo xyz > sub3/a.txt |
|
968 | $ echo xyz > sub3/a.txt | |
951 | $ hg add sub3/a.txt |
|
969 | $ hg add sub3/a.txt | |
952 | $ hg ci -Sm "add sub3" |
|
970 | $ hg ci -Sm "add sub3" | |
953 | committing subrepository sub3 |
|
971 | committing subrepository sub3 | |
954 | $ cat .hgsub | grep -v sub3 > .hgsub1 |
|
972 | $ cat .hgsub | grep -v sub3 > .hgsub1 | |
955 | $ mv .hgsub1 .hgsub |
|
973 | $ mv .hgsub1 .hgsub | |
956 | $ hg ci -m "remove sub3" |
|
974 | $ hg ci -m "remove sub3" | |
957 |
|
975 | |||
958 | $ hg log -r "subrepo()" --style compact |
|
976 | $ hg log -r "subrepo()" --style compact | |
959 | 0 7f491f53a367 1970-01-01 00:00 +0000 test |
|
977 | 0 7f491f53a367 1970-01-01 00:00 +0000 test | |
960 | main import |
|
978 | main import | |
961 |
|
979 | |||
962 | 1 ffe6649062fe 1970-01-01 00:00 +0000 test |
|
980 | 1 ffe6649062fe 1970-01-01 00:00 +0000 test | |
963 | deep nested modif should trigger a commit |
|
981 | deep nested modif should trigger a commit | |
964 |
|
982 | |||
965 | 2 9bb10eebee29 1970-01-01 00:00 +0000 test |
|
983 | 2 9bb10eebee29 1970-01-01 00:00 +0000 test | |
966 | add test.txt |
|
984 | add test.txt | |
967 |
|
985 | |||
968 | 3 7c64f035294f 1970-01-01 00:00 +0000 test |
|
986 | 3 7c64f035294f 1970-01-01 00:00 +0000 test | |
969 | add large files |
|
987 | add large files | |
970 |
|
988 | |||
971 | 4 f734a59e2e35 1970-01-01 00:00 +0000 test |
|
989 | 4 f734a59e2e35 1970-01-01 00:00 +0000 test | |
972 | forget testing |
|
990 | forget testing | |
973 |
|
991 | |||
974 | 11 9685a22af5db 1970-01-01 00:00 +0000 test |
|
992 | 11 9685a22af5db 1970-01-01 00:00 +0000 test | |
975 | add sub3 |
|
993 | add sub3 | |
976 |
|
994 | |||
977 | 12[tip] 2e0485b475b9 1970-01-01 00:00 +0000 test |
|
995 | 12[tip] 2e0485b475b9 1970-01-01 00:00 +0000 test | |
978 | remove sub3 |
|
996 | remove sub3 | |
979 |
|
997 | |||
980 | $ hg log -r "subrepo('sub3')" --style compact |
|
998 | $ hg log -r "subrepo('sub3')" --style compact | |
981 | 11 9685a22af5db 1970-01-01 00:00 +0000 test |
|
999 | 11 9685a22af5db 1970-01-01 00:00 +0000 test | |
982 | add sub3 |
|
1000 | add sub3 | |
983 |
|
1001 | |||
984 | 12[tip] 2e0485b475b9 1970-01-01 00:00 +0000 test |
|
1002 | 12[tip] 2e0485b475b9 1970-01-01 00:00 +0000 test | |
985 | remove sub3 |
|
1003 | remove sub3 | |
986 |
|
1004 | |||
987 | $ hg log -r "subrepo('bogus')" --style compact |
|
1005 | $ hg log -r "subrepo('bogus')" --style compact | |
988 |
|
1006 | |||
989 |
|
1007 | |||
990 | Test .hgsubstate in the R state |
|
1008 | Test .hgsubstate in the R state | |
991 |
|
1009 | |||
992 | $ hg rm .hgsub .hgsubstate |
|
1010 | $ hg rm .hgsub .hgsubstate | |
993 | \r (no-eol) (esc) |
|
1011 | \r (no-eol) (esc) | |
994 | deleting [=====================> ] 1/2\r (no-eol) (esc) |
|
1012 | deleting [=====================> ] 1/2\r (no-eol) (esc) | |
995 | deleting [===========================================>] 2/2\r (no-eol) (esc) |
|
1013 | deleting [===========================================>] 2/2\r (no-eol) (esc) | |
996 | \r (no-eol) (esc) |
|
1014 | \r (no-eol) (esc) | |
997 | $ hg ci -m 'trash subrepo tracking' |
|
1015 | $ hg ci -m 'trash subrepo tracking' | |
998 |
|
1016 | |||
999 | $ hg log -r "subrepo('re:sub\d+')" --style compact |
|
1017 | $ hg log -r "subrepo('re:sub\d+')" --style compact | |
1000 | 0 7f491f53a367 1970-01-01 00:00 +0000 test |
|
1018 | 0 7f491f53a367 1970-01-01 00:00 +0000 test | |
1001 | main import |
|
1019 | main import | |
1002 |
|
1020 | |||
1003 | 1 ffe6649062fe 1970-01-01 00:00 +0000 test |
|
1021 | 1 ffe6649062fe 1970-01-01 00:00 +0000 test | |
1004 | deep nested modif should trigger a commit |
|
1022 | deep nested modif should trigger a commit | |
1005 |
|
1023 | |||
1006 | 2 9bb10eebee29 1970-01-01 00:00 +0000 test |
|
1024 | 2 9bb10eebee29 1970-01-01 00:00 +0000 test | |
1007 | add test.txt |
|
1025 | add test.txt | |
1008 |
|
1026 | |||
1009 | 3 7c64f035294f 1970-01-01 00:00 +0000 test |
|
1027 | 3 7c64f035294f 1970-01-01 00:00 +0000 test | |
1010 | add large files |
|
1028 | add large files | |
1011 |
|
1029 | |||
1012 | 4 f734a59e2e35 1970-01-01 00:00 +0000 test |
|
1030 | 4 f734a59e2e35 1970-01-01 00:00 +0000 test | |
1013 | forget testing |
|
1031 | forget testing | |
1014 |
|
1032 | |||
1015 | 11 9685a22af5db 1970-01-01 00:00 +0000 test |
|
1033 | 11 9685a22af5db 1970-01-01 00:00 +0000 test | |
1016 | add sub3 |
|
1034 | add sub3 | |
1017 |
|
1035 | |||
1018 | 12 2e0485b475b9 1970-01-01 00:00 +0000 test |
|
1036 | 12 2e0485b475b9 1970-01-01 00:00 +0000 test | |
1019 | remove sub3 |
|
1037 | remove sub3 | |
1020 |
|
1038 | |||
1021 | 13[tip] a68b2c361653 1970-01-01 00:00 +0000 test |
|
1039 | 13[tip] a68b2c361653 1970-01-01 00:00 +0000 test | |
1022 | trash subrepo tracking |
|
1040 | trash subrepo tracking | |
1023 |
|
1041 | |||
1024 |
|
1042 | |||
1025 | Restore the trashed subrepo tracking |
|
1043 | Restore the trashed subrepo tracking | |
1026 |
|
1044 | |||
1027 | $ hg rollback -q |
|
1045 | $ hg rollback -q | |
1028 | $ hg update -Cq . |
|
1046 | $ hg update -Cq . | |
1029 |
|
1047 | |||
1030 | Interaction with extdiff, largefiles and subrepos |
|
1048 | Interaction with extdiff, largefiles and subrepos | |
1031 |
|
1049 | |||
1032 | $ hg --config extensions.extdiff= pdiff -S |
|
1050 | $ hg --config extensions.extdiff= pdiff -S | |
1033 |
|
1051 | |||
1034 | $ hg --config extensions.extdiff= pdiff -r '.^' -S |
|
1052 | $ hg --config extensions.extdiff= pdiff -r '.^' -S | |
1035 | \r (no-eol) (esc) |
|
1053 | \r (no-eol) (esc) | |
1036 | archiving [ ] 0/2\r (no-eol) (esc) |
|
1054 | archiving [ ] 0/2\r (no-eol) (esc) | |
1037 | archiving [====================> ] 1/2\r (no-eol) (esc) |
|
1055 | archiving [====================> ] 1/2\r (no-eol) (esc) | |
1038 | archiving [==========================================>] 2/2\r (no-eol) (esc) |
|
1056 | archiving [==========================================>] 2/2\r (no-eol) (esc) | |
1039 | \r (no-eol) (esc) |
|
1057 | \r (no-eol) (esc) | |
1040 | \r (no-eol) (esc) |
|
1058 | \r (no-eol) (esc) | |
1041 | archiving (sub1) [ <=> ] 0\r (no-eol) (esc) |
|
1059 | archiving (sub1) [ <=> ] 0\r (no-eol) (esc) | |
1042 | \r (no-eol) (esc) |
|
1060 | \r (no-eol) (esc) | |
1043 | \r (no-eol) (esc) |
|
1061 | \r (no-eol) (esc) | |
1044 | archiving (sub1/sub2) [ <=> ] 0\r (no-eol) (esc) |
|
1062 | archiving (sub1/sub2) [ <=> ] 0\r (no-eol) (esc) | |
1045 | \r (no-eol) (esc) |
|
1063 | \r (no-eol) (esc) | |
1046 | \r (no-eol) (esc) |
|
1064 | \r (no-eol) (esc) | |
1047 | archiving (sub3) [ <=> ] 0\r (no-eol) (esc) |
|
1065 | archiving (sub3) [ <=> ] 0\r (no-eol) (esc) | |
1048 | \r (no-eol) (esc) |
|
1066 | \r (no-eol) (esc) | |
1049 | \r (no-eol) (esc) |
|
1067 | \r (no-eol) (esc) | |
1050 | archiving [ ] 0/2\r (no-eol) (esc) |
|
1068 | archiving [ ] 0/2\r (no-eol) (esc) | |
1051 | archiving [====================> ] 1/2\r (no-eol) (esc) |
|
1069 | archiving [====================> ] 1/2\r (no-eol) (esc) | |
1052 | archiving [==========================================>] 2/2\r (no-eol) (esc) |
|
1070 | archiving [==========================================>] 2/2\r (no-eol) (esc) | |
1053 | \r (no-eol) (esc) |
|
1071 | \r (no-eol) (esc) | |
1054 | \r (no-eol) (esc) |
|
1072 | \r (no-eol) (esc) | |
1055 | archiving (sub1) [ <=> ] 0\r (no-eol) (esc) |
|
1073 | archiving (sub1) [ <=> ] 0\r (no-eol) (esc) | |
1056 | \r (no-eol) (esc) |
|
1074 | \r (no-eol) (esc) | |
1057 | \r (no-eol) (esc) |
|
1075 | \r (no-eol) (esc) | |
1058 | archiving (sub1/sub2) [ <=> ] 0\r (no-eol) (esc) |
|
1076 | archiving (sub1/sub2) [ <=> ] 0\r (no-eol) (esc) | |
1059 | \r (no-eol) (esc) |
|
1077 | \r (no-eol) (esc) | |
1060 | diff -Nru cloned.*/.hgsub cloned/.hgsub (glob) |
|
1078 | diff -Nru cloned.*/.hgsub cloned/.hgsub (glob) | |
1061 | --- cloned.*/.hgsub * (glob) |
|
1079 | --- cloned.*/.hgsub * (glob) | |
1062 | +++ cloned/.hgsub * (glob) |
|
1080 | +++ cloned/.hgsub * (glob) | |
1063 | @@ -1,2 +1* @@ (glob) |
|
1081 | @@ -1,2 +1* @@ (glob) | |
1064 | sub1 = ../sub1 |
|
1082 | sub1 = ../sub1 | |
1065 | -sub3 = sub3 |
|
1083 | -sub3 = sub3 | |
1066 | diff -Nru cloned.*/.hgsubstate cloned/.hgsubstate (glob) |
|
1084 | diff -Nru cloned.*/.hgsubstate cloned/.hgsubstate (glob) | |
1067 | --- cloned.*/.hgsubstate * (glob) |
|
1085 | --- cloned.*/.hgsubstate * (glob) | |
1068 | +++ cloned/.hgsubstate * (glob) |
|
1086 | +++ cloned/.hgsubstate * (glob) | |
1069 | @@ -1,2 +1* @@ (glob) |
|
1087 | @@ -1,2 +1* @@ (glob) | |
1070 | 7a36fa02b66e61f27f3d4a822809f159479b8ab2 sub1 |
|
1088 | 7a36fa02b66e61f27f3d4a822809f159479b8ab2 sub1 | |
1071 | -b1a26de6f2a045a9f079323693614ee322f1ff7e sub3 |
|
1089 | -b1a26de6f2a045a9f079323693614ee322f1ff7e sub3 | |
1072 | [1] |
|
1090 | [1] | |
1073 |
|
1091 | |||
1074 | $ hg --config extensions.extdiff= pdiff -r 0 -r '.^' -S |
|
1092 | $ hg --config extensions.extdiff= pdiff -r 0 -r '.^' -S | |
1075 | \r (no-eol) (esc) |
|
1093 | \r (no-eol) (esc) | |
1076 | archiving [ ] 0/3\r (no-eol) (esc) |
|
1094 | archiving [ ] 0/3\r (no-eol) (esc) | |
1077 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
1095 | archiving [=============> ] 1/3\r (no-eol) (esc) | |
1078 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
1096 | archiving [===========================> ] 2/3\r (no-eol) (esc) | |
1079 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
1097 | archiving [==========================================>] 3/3\r (no-eol) (esc) | |
1080 | \r (no-eol) (esc) |
|
1098 | \r (no-eol) (esc) | |
1081 | \r (no-eol) (esc) |
|
1099 | \r (no-eol) (esc) | |
1082 | archiving (sub1) [ ] 0/1\r (no-eol) (esc) |
|
1100 | archiving (sub1) [ ] 0/1\r (no-eol) (esc) | |
1083 | archiving (sub1) [===================================>] 1/1\r (no-eol) (esc) |
|
1101 | archiving (sub1) [===================================>] 1/1\r (no-eol) (esc) | |
1084 | \r (no-eol) (esc) |
|
1102 | \r (no-eol) (esc) | |
1085 | \r (no-eol) (esc) |
|
1103 | \r (no-eol) (esc) | |
1086 | archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc) |
|
1104 | archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc) | |
1087 | archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc) |
|
1105 | archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc) | |
1088 | \r (no-eol) (esc) |
|
1106 | \r (no-eol) (esc) | |
1089 | \r (no-eol) (esc) |
|
1107 | \r (no-eol) (esc) | |
1090 | archiving [ ] 0/8\r (no-eol) (esc) |
|
1108 | archiving [ ] 0/8\r (no-eol) (esc) | |
1091 | archiving [====> ] 1/8\r (no-eol) (esc) |
|
1109 | archiving [====> ] 1/8\r (no-eol) (esc) | |
1092 | archiving [=========> ] 2/8\r (no-eol) (esc) |
|
1110 | archiving [=========> ] 2/8\r (no-eol) (esc) | |
1093 | archiving [===============> ] 3/8\r (no-eol) (esc) |
|
1111 | archiving [===============> ] 3/8\r (no-eol) (esc) | |
1094 | archiving [====================> ] 4/8\r (no-eol) (esc) |
|
1112 | archiving [====================> ] 4/8\r (no-eol) (esc) | |
1095 | archiving [=========================> ] 5/8\r (no-eol) (esc) |
|
1113 | archiving [=========================> ] 5/8\r (no-eol) (esc) | |
1096 | archiving [===============================> ] 6/8\r (no-eol) (esc) |
|
1114 | archiving [===============================> ] 6/8\r (no-eol) (esc) | |
1097 | archiving [====================================> ] 7/8\r (no-eol) (esc) |
|
1115 | archiving [====================================> ] 7/8\r (no-eol) (esc) | |
1098 | archiving [==========================================>] 8/8\r (no-eol) (esc) |
|
1116 | archiving [==========================================>] 8/8\r (no-eol) (esc) | |
1099 | \r (no-eol) (esc) |
|
1117 | \r (no-eol) (esc) | |
1100 | \r (no-eol) (esc) |
|
1118 | \r (no-eol) (esc) | |
1101 | archiving (sub1) [ ] 0/1\r (no-eol) (esc) |
|
1119 | archiving (sub1) [ ] 0/1\r (no-eol) (esc) | |
1102 | archiving (sub1) [===================================>] 1/1\r (no-eol) (esc) |
|
1120 | archiving (sub1) [===================================>] 1/1\r (no-eol) (esc) | |
1103 | \r (no-eol) (esc) |
|
1121 | \r (no-eol) (esc) | |
1104 | \r (no-eol) (esc) |
|
1122 | \r (no-eol) (esc) | |
1105 | archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc) |
|
1123 | archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc) | |
1106 | archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc) |
|
1124 | archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc) | |
1107 | archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc) |
|
1125 | archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc) | |
1108 | archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc) |
|
1126 | archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc) | |
1109 | \r (no-eol) (esc) |
|
1127 | \r (no-eol) (esc) | |
1110 | \r (no-eol) (esc) |
|
1128 | \r (no-eol) (esc) | |
1111 | archiving (sub3) [ ] 0/1\r (no-eol) (esc) |
|
1129 | archiving (sub3) [ ] 0/1\r (no-eol) (esc) | |
1112 | archiving (sub3) [===================================>] 1/1\r (no-eol) (esc) |
|
1130 | archiving (sub3) [===================================>] 1/1\r (no-eol) (esc) | |
1113 | \r (no-eol) (esc) |
|
1131 | \r (no-eol) (esc) | |
1114 | diff -Nru cloned.*/.hglf/b.dat cloned.*/.hglf/b.dat (glob) |
|
1132 | diff -Nru cloned.*/.hglf/b.dat cloned.*/.hglf/b.dat (glob) | |
1115 | --- cloned.*/.hglf/b.dat * (glob) |
|
1133 | --- cloned.*/.hglf/b.dat * (glob) | |
1116 | +++ cloned.*/.hglf/b.dat * (glob) |
|
1134 | +++ cloned.*/.hglf/b.dat * (glob) | |
1117 | @@ -*,0 +1* @@ (glob) |
|
1135 | @@ -*,0 +1* @@ (glob) | |
1118 | +da39a3ee5e6b4b0d3255bfef95601890afd80709 |
|
1136 | +da39a3ee5e6b4b0d3255bfef95601890afd80709 | |
1119 | diff -Nru cloned.*/.hglf/foo/bar/large.dat cloned.*/.hglf/foo/bar/large.dat (glob) |
|
1137 | diff -Nru cloned.*/.hglf/foo/bar/large.dat cloned.*/.hglf/foo/bar/large.dat (glob) | |
1120 | --- cloned.*/.hglf/foo/bar/large.dat * (glob) |
|
1138 | --- cloned.*/.hglf/foo/bar/large.dat * (glob) | |
1121 | +++ cloned.*/.hglf/foo/bar/large.dat * (glob) |
|
1139 | +++ cloned.*/.hglf/foo/bar/large.dat * (glob) | |
1122 | @@ -*,0 +1* @@ (glob) |
|
1140 | @@ -*,0 +1* @@ (glob) | |
1123 | +2f6933b5ee0f5fdd823d9717d8729f3c2523811b |
|
1141 | +2f6933b5ee0f5fdd823d9717d8729f3c2523811b | |
1124 | diff -Nru cloned.*/.hglf/large.bin cloned.*/.hglf/large.bin (glob) |
|
1142 | diff -Nru cloned.*/.hglf/large.bin cloned.*/.hglf/large.bin (glob) | |
1125 | --- cloned.*/.hglf/large.bin * (glob) |
|
1143 | --- cloned.*/.hglf/large.bin * (glob) | |
1126 | +++ cloned.*/.hglf/large.bin * (glob) |
|
1144 | +++ cloned.*/.hglf/large.bin * (glob) | |
1127 | @@ -*,0 +1* @@ (glob) |
|
1145 | @@ -*,0 +1* @@ (glob) | |
1128 | +7f7097b041ccf68cc5561e9600da4655d21c6d18 |
|
1146 | +7f7097b041ccf68cc5561e9600da4655d21c6d18 | |
1129 | diff -Nru cloned.*/.hgsub cloned.*/.hgsub (glob) |
|
1147 | diff -Nru cloned.*/.hgsub cloned.*/.hgsub (glob) | |
1130 | --- cloned.*/.hgsub * (glob) |
|
1148 | --- cloned.*/.hgsub * (glob) | |
1131 | +++ cloned.*/.hgsub * (glob) |
|
1149 | +++ cloned.*/.hgsub * (glob) | |
1132 | @@ -1* +1,2 @@ (glob) |
|
1150 | @@ -1* +1,2 @@ (glob) | |
1133 | sub1 = ../sub1 |
|
1151 | sub1 = ../sub1 | |
1134 | +sub3 = sub3 |
|
1152 | +sub3 = sub3 | |
1135 | diff -Nru cloned.*/.hgsubstate cloned.*/.hgsubstate (glob) |
|
1153 | diff -Nru cloned.*/.hgsubstate cloned.*/.hgsubstate (glob) | |
1136 | --- cloned.*/.hgsubstate * (glob) |
|
1154 | --- cloned.*/.hgsubstate * (glob) | |
1137 | +++ cloned.*/.hgsubstate * (glob) |
|
1155 | +++ cloned.*/.hgsubstate * (glob) | |
1138 | @@ -1* +1,2 @@ (glob) |
|
1156 | @@ -1* +1,2 @@ (glob) | |
1139 | -fc3b4ce2696f7741438c79207583768f2ce6b0dd sub1 |
|
1157 | -fc3b4ce2696f7741438c79207583768f2ce6b0dd sub1 | |
1140 | +7a36fa02b66e61f27f3d4a822809f159479b8ab2 sub1 |
|
1158 | +7a36fa02b66e61f27f3d4a822809f159479b8ab2 sub1 | |
1141 | +b1a26de6f2a045a9f079323693614ee322f1ff7e sub3 |
|
1159 | +b1a26de6f2a045a9f079323693614ee322f1ff7e sub3 | |
1142 | diff -Nru cloned.*/foo/bar/def cloned.*/foo/bar/def (glob) |
|
1160 | diff -Nru cloned.*/foo/bar/def cloned.*/foo/bar/def (glob) | |
1143 | --- cloned.*/foo/bar/def * (glob) |
|
1161 | --- cloned.*/foo/bar/def * (glob) | |
1144 | +++ cloned.*/foo/bar/def * (glob) |
|
1162 | +++ cloned.*/foo/bar/def * (glob) | |
1145 | @@ -*,0 +1* @@ (glob) |
|
1163 | @@ -*,0 +1* @@ (glob) | |
1146 | +changed |
|
1164 | +changed | |
1147 | diff -Nru cloned.*/main cloned.*/main (glob) |
|
1165 | diff -Nru cloned.*/main cloned.*/main (glob) | |
1148 | --- cloned.*/main * (glob) |
|
1166 | --- cloned.*/main * (glob) | |
1149 | +++ cloned.*/main * (glob) |
|
1167 | +++ cloned.*/main * (glob) | |
1150 | @@ -1* +1* @@ (glob) |
|
1168 | @@ -1* +1* @@ (glob) | |
1151 | -main |
|
1169 | -main | |
1152 | +foo |
|
1170 | +foo | |
1153 | diff -Nru cloned.*/sub1/.hgsubstate cloned.*/sub1/.hgsubstate (glob) |
|
1171 | diff -Nru cloned.*/sub1/.hgsubstate cloned.*/sub1/.hgsubstate (glob) | |
1154 | --- cloned.*/sub1/.hgsubstate * (glob) |
|
1172 | --- cloned.*/sub1/.hgsubstate * (glob) | |
1155 | +++ cloned.*/sub1/.hgsubstate * (glob) |
|
1173 | +++ cloned.*/sub1/.hgsubstate * (glob) | |
1156 | @@ -1* +1* @@ (glob) |
|
1174 | @@ -1* +1* @@ (glob) | |
1157 | -c57a0840e3badd667ef3c3ef65471609acb2ba3c sub2 |
|
1175 | -c57a0840e3badd667ef3c3ef65471609acb2ba3c sub2 | |
1158 | +c77908c81ccea3794a896c79e98b0e004aee2e9e sub2 |
|
1176 | +c77908c81ccea3794a896c79e98b0e004aee2e9e sub2 | |
1159 | diff -Nru cloned.*/sub1/sub2/folder/test.txt cloned.*/sub1/sub2/folder/test.txt (glob) |
|
1177 | diff -Nru cloned.*/sub1/sub2/folder/test.txt cloned.*/sub1/sub2/folder/test.txt (glob) | |
1160 | --- cloned.*/sub1/sub2/folder/test.txt * (glob) |
|
1178 | --- cloned.*/sub1/sub2/folder/test.txt * (glob) | |
1161 | +++ cloned.*/sub1/sub2/folder/test.txt * (glob) |
|
1179 | +++ cloned.*/sub1/sub2/folder/test.txt * (glob) | |
1162 | @@ -*,0 +1* @@ (glob) |
|
1180 | @@ -*,0 +1* @@ (glob) | |
1163 | +subfolder |
|
1181 | +subfolder | |
1164 | diff -Nru cloned.*/sub1/sub2/sub2 cloned.*/sub1/sub2/sub2 (glob) |
|
1182 | diff -Nru cloned.*/sub1/sub2/sub2 cloned.*/sub1/sub2/sub2 (glob) | |
1165 | --- cloned.*/sub1/sub2/sub2 * (glob) |
|
1183 | --- cloned.*/sub1/sub2/sub2 * (glob) | |
1166 | +++ cloned.*/sub1/sub2/sub2 * (glob) |
|
1184 | +++ cloned.*/sub1/sub2/sub2 * (glob) | |
1167 | @@ -1* +1* @@ (glob) |
|
1185 | @@ -1* +1* @@ (glob) | |
1168 | -sub2 |
|
1186 | -sub2 | |
1169 | +modified |
|
1187 | +modified | |
1170 | diff -Nru cloned.*/sub3/a.txt cloned.*/sub3/a.txt (glob) |
|
1188 | diff -Nru cloned.*/sub3/a.txt cloned.*/sub3/a.txt (glob) | |
1171 | --- cloned.*/sub3/a.txt * (glob) |
|
1189 | --- cloned.*/sub3/a.txt * (glob) | |
1172 | +++ cloned.*/sub3/a.txt * (glob) |
|
1190 | +++ cloned.*/sub3/a.txt * (glob) | |
1173 | @@ -*,0 +1* @@ (glob) |
|
1191 | @@ -*,0 +1* @@ (glob) | |
1174 | +xyz |
|
1192 | +xyz | |
1175 | [1] |
|
1193 | [1] | |
1176 |
|
1194 | |||
1177 | $ echo mod > sub1/sub2/sub2 |
|
1195 | $ echo mod > sub1/sub2/sub2 | |
1178 | $ hg --config extensions.extdiff= pdiff -S |
|
1196 | $ hg --config extensions.extdiff= pdiff -S | |
1179 | \r (no-eol) (esc) |
|
1197 | \r (no-eol) (esc) | |
1180 | archiving (sub1) [ <=> ] 0\r (no-eol) (esc) |
|
1198 | archiving (sub1) [ <=> ] 0\r (no-eol) (esc) | |
1181 | \r (no-eol) (esc) |
|
1199 | \r (no-eol) (esc) | |
1182 | \r (no-eol) (esc) |
|
1200 | \r (no-eol) (esc) | |
1183 | archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc) |
|
1201 | archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc) | |
1184 | archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc) |
|
1202 | archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc) | |
1185 | \r (no-eol) (esc) |
|
1203 | \r (no-eol) (esc) | |
1186 | --- */cloned.*/sub1/sub2/sub2 * (glob) |
|
1204 | --- */cloned.*/sub1/sub2/sub2 * (glob) | |
1187 | +++ */cloned/sub1/sub2/sub2 * (glob) |
|
1205 | +++ */cloned/sub1/sub2/sub2 * (glob) | |
1188 | @@ -1* +1* @@ (glob) |
|
1206 | @@ -1* +1* @@ (glob) | |
1189 | -modified |
|
1207 | -modified | |
1190 | +mod |
|
1208 | +mod | |
1191 | [1] |
|
1209 | [1] | |
1192 |
|
1210 | |||
1193 | $ cd .. |
|
1211 | $ cd .. |
@@ -1,696 +1,711 | |||||
1 | Create test repository: |
|
1 | Create test repository: | |
2 |
|
2 | |||
3 | $ hg init repo |
|
3 | $ hg init repo | |
4 | $ cd repo |
|
4 | $ cd repo | |
5 | $ echo x1 > x.txt |
|
5 | $ echo x1 > x.txt | |
6 |
|
6 | |||
7 | $ hg init foo |
|
7 | $ hg init foo | |
8 | $ cd foo |
|
8 | $ cd foo | |
9 | $ echo y1 > y.txt |
|
9 | $ echo y1 > y.txt | |
10 |
|
10 | |||
11 | $ hg init bar |
|
11 | $ hg init bar | |
12 | $ cd bar |
|
12 | $ cd bar | |
13 | $ echo z1 > z.txt |
|
13 | $ echo z1 > z.txt | |
14 |
|
14 | |||
15 | $ cd .. |
|
15 | $ cd .. | |
16 | $ echo 'bar = bar' > .hgsub |
|
16 | $ echo 'bar = bar' > .hgsub | |
17 |
|
17 | |||
18 | $ cd .. |
|
18 | $ cd .. | |
19 | $ echo 'foo = foo' > .hgsub |
|
19 | $ echo 'foo = foo' > .hgsub | |
20 |
|
20 | |||
21 | Add files --- .hgsub files must go first to trigger subrepos: |
|
21 | Add files --- .hgsub files must go first to trigger subrepos: | |
22 |
|
22 | |||
23 | $ hg add -S .hgsub |
|
23 | $ hg add -S .hgsub | |
24 | $ hg add -S foo/.hgsub |
|
24 | $ hg add -S foo/.hgsub | |
25 | $ hg add -S foo/bar |
|
25 | $ hg add -S foo/bar | |
26 | adding foo/bar/z.txt |
|
26 | adding foo/bar/z.txt | |
27 | $ hg add -S |
|
27 | $ hg add -S | |
28 | adding x.txt |
|
28 | adding x.txt | |
29 | adding foo/y.txt |
|
29 | adding foo/y.txt | |
30 |
|
30 | |||
31 | Test recursive status without committing anything: |
|
31 | Test recursive status without committing anything: | |
32 |
|
32 | |||
33 | $ hg status -S |
|
33 | $ hg status -S | |
34 | A .hgsub |
|
34 | A .hgsub | |
35 | A foo/.hgsub |
|
35 | A foo/.hgsub | |
36 | A foo/bar/z.txt |
|
36 | A foo/bar/z.txt | |
37 | A foo/y.txt |
|
37 | A foo/y.txt | |
38 | A x.txt |
|
38 | A x.txt | |
39 |
|
39 | |||
40 | Test recursive diff without committing anything: |
|
40 | Test recursive diff without committing anything: | |
41 |
|
41 | |||
42 | $ hg diff --nodates -S foo |
|
42 | $ hg diff --nodates -S foo | |
43 | diff -r 000000000000 foo/.hgsub |
|
43 | diff -r 000000000000 foo/.hgsub | |
44 | --- /dev/null |
|
44 | --- /dev/null | |
45 | +++ b/foo/.hgsub |
|
45 | +++ b/foo/.hgsub | |
46 | @@ -0,0 +1,1 @@ |
|
46 | @@ -0,0 +1,1 @@ | |
47 | +bar = bar |
|
47 | +bar = bar | |
48 | diff -r 000000000000 foo/y.txt |
|
48 | diff -r 000000000000 foo/y.txt | |
49 | --- /dev/null |
|
49 | --- /dev/null | |
50 | +++ b/foo/y.txt |
|
50 | +++ b/foo/y.txt | |
51 | @@ -0,0 +1,1 @@ |
|
51 | @@ -0,0 +1,1 @@ | |
52 | +y1 |
|
52 | +y1 | |
53 | diff -r 000000000000 foo/bar/z.txt |
|
53 | diff -r 000000000000 foo/bar/z.txt | |
54 | --- /dev/null |
|
54 | --- /dev/null | |
55 | +++ b/foo/bar/z.txt |
|
55 | +++ b/foo/bar/z.txt | |
56 | @@ -0,0 +1,1 @@ |
|
56 | @@ -0,0 +1,1 @@ | |
57 | +z1 |
|
57 | +z1 | |
58 |
|
58 | |||
59 | Commits: |
|
59 | Commits: | |
60 |
|
60 | |||
61 | $ hg commit -m fails |
|
61 | $ hg commit -m fails | |
62 | abort: uncommitted changes in subrepository "foo" |
|
62 | abort: uncommitted changes in subrepository "foo" | |
63 | (use --subrepos for recursive commit) |
|
63 | (use --subrepos for recursive commit) | |
64 | [255] |
|
64 | [255] | |
65 |
|
65 | |||
66 | The --subrepos flag overwrite the config setting: |
|
66 | The --subrepos flag overwrite the config setting: | |
67 |
|
67 | |||
68 | $ hg commit -m 0-0-0 --config ui.commitsubrepos=No --subrepos |
|
68 | $ hg commit -m 0-0-0 --config ui.commitsubrepos=No --subrepos | |
69 | committing subrepository foo |
|
69 | committing subrepository foo | |
70 | committing subrepository foo/bar |
|
70 | committing subrepository foo/bar | |
71 |
|
71 | |||
72 | $ cd foo |
|
72 | $ cd foo | |
73 | $ echo y2 >> y.txt |
|
73 | $ echo y2 >> y.txt | |
74 | $ hg commit -m 0-1-0 |
|
74 | $ hg commit -m 0-1-0 | |
75 |
|
75 | |||
76 | $ cd bar |
|
76 | $ cd bar | |
77 | $ echo z2 >> z.txt |
|
77 | $ echo z2 >> z.txt | |
78 | $ hg commit -m 0-1-1 |
|
78 | $ hg commit -m 0-1-1 | |
79 |
|
79 | |||
80 | $ cd .. |
|
80 | $ cd .. | |
81 | $ hg commit -m 0-2-1 |
|
81 | $ hg commit -m 0-2-1 | |
82 |
|
82 | |||
83 | $ cd .. |
|
83 | $ cd .. | |
84 | $ hg commit -m 1-2-1 |
|
84 | $ hg commit -m 1-2-1 | |
85 |
|
85 | |||
86 | Change working directory: |
|
86 | Change working directory: | |
87 |
|
87 | |||
88 | $ echo y3 >> foo/y.txt |
|
88 | $ echo y3 >> foo/y.txt | |
89 | $ echo z3 >> foo/bar/z.txt |
|
89 | $ echo z3 >> foo/bar/z.txt | |
90 | $ hg status -S |
|
90 | $ hg status -S | |
91 | M foo/bar/z.txt |
|
91 | M foo/bar/z.txt | |
92 | M foo/y.txt |
|
92 | M foo/y.txt | |
93 | $ hg diff --nodates -S |
|
93 | $ hg diff --nodates -S | |
94 | diff -r d254738c5f5e foo/y.txt |
|
94 | diff -r d254738c5f5e foo/y.txt | |
95 | --- a/foo/y.txt |
|
95 | --- a/foo/y.txt | |
96 | +++ b/foo/y.txt |
|
96 | +++ b/foo/y.txt | |
97 | @@ -1,2 +1,3 @@ |
|
97 | @@ -1,2 +1,3 @@ | |
98 | y1 |
|
98 | y1 | |
99 | y2 |
|
99 | y2 | |
100 | +y3 |
|
100 | +y3 | |
101 | diff -r 9647f22de499 foo/bar/z.txt |
|
101 | diff -r 9647f22de499 foo/bar/z.txt | |
102 | --- a/foo/bar/z.txt |
|
102 | --- a/foo/bar/z.txt | |
103 | +++ b/foo/bar/z.txt |
|
103 | +++ b/foo/bar/z.txt | |
104 | @@ -1,2 +1,3 @@ |
|
104 | @@ -1,2 +1,3 @@ | |
105 | z1 |
|
105 | z1 | |
106 | z2 |
|
106 | z2 | |
107 | +z3 |
|
107 | +z3 | |
108 |
|
108 | |||
109 | Status call crossing repository boundaries: |
|
109 | Status call crossing repository boundaries: | |
110 |
|
110 | |||
111 | $ hg status -S foo/bar/z.txt |
|
111 | $ hg status -S foo/bar/z.txt | |
112 | M foo/bar/z.txt |
|
112 | M foo/bar/z.txt | |
113 | $ hg status -S -I 'foo/?.txt' |
|
113 | $ hg status -S -I 'foo/?.txt' | |
114 | M foo/y.txt |
|
114 | M foo/y.txt | |
115 | $ hg status -S -I '**/?.txt' |
|
115 | $ hg status -S -I '**/?.txt' | |
116 | M foo/bar/z.txt |
|
116 | M foo/bar/z.txt | |
117 | M foo/y.txt |
|
117 | M foo/y.txt | |
118 | $ hg diff --nodates -S -I '**/?.txt' |
|
118 | $ hg diff --nodates -S -I '**/?.txt' | |
119 | diff -r d254738c5f5e foo/y.txt |
|
119 | diff -r d254738c5f5e foo/y.txt | |
120 | --- a/foo/y.txt |
|
120 | --- a/foo/y.txt | |
121 | +++ b/foo/y.txt |
|
121 | +++ b/foo/y.txt | |
122 | @@ -1,2 +1,3 @@ |
|
122 | @@ -1,2 +1,3 @@ | |
123 | y1 |
|
123 | y1 | |
124 | y2 |
|
124 | y2 | |
125 | +y3 |
|
125 | +y3 | |
126 | diff -r 9647f22de499 foo/bar/z.txt |
|
126 | diff -r 9647f22de499 foo/bar/z.txt | |
127 | --- a/foo/bar/z.txt |
|
127 | --- a/foo/bar/z.txt | |
128 | +++ b/foo/bar/z.txt |
|
128 | +++ b/foo/bar/z.txt | |
129 | @@ -1,2 +1,3 @@ |
|
129 | @@ -1,2 +1,3 @@ | |
130 | z1 |
|
130 | z1 | |
131 | z2 |
|
131 | z2 | |
132 | +z3 |
|
132 | +z3 | |
133 |
|
133 | |||
134 | Status from within a subdirectory: |
|
134 | Status from within a subdirectory: | |
135 |
|
135 | |||
136 | $ mkdir dir |
|
136 | $ mkdir dir | |
137 | $ cd dir |
|
137 | $ cd dir | |
138 | $ echo a1 > a.txt |
|
138 | $ echo a1 > a.txt | |
139 | $ hg status -S |
|
139 | $ hg status -S | |
140 | M foo/bar/z.txt |
|
140 | M foo/bar/z.txt | |
141 | M foo/y.txt |
|
141 | M foo/y.txt | |
142 | ? dir/a.txt |
|
142 | ? dir/a.txt | |
143 | $ hg diff --nodates -S |
|
143 | $ hg diff --nodates -S | |
144 | diff -r d254738c5f5e foo/y.txt |
|
144 | diff -r d254738c5f5e foo/y.txt | |
145 | --- a/foo/y.txt |
|
145 | --- a/foo/y.txt | |
146 | +++ b/foo/y.txt |
|
146 | +++ b/foo/y.txt | |
147 | @@ -1,2 +1,3 @@ |
|
147 | @@ -1,2 +1,3 @@ | |
148 | y1 |
|
148 | y1 | |
149 | y2 |
|
149 | y2 | |
150 | +y3 |
|
150 | +y3 | |
151 | diff -r 9647f22de499 foo/bar/z.txt |
|
151 | diff -r 9647f22de499 foo/bar/z.txt | |
152 | --- a/foo/bar/z.txt |
|
152 | --- a/foo/bar/z.txt | |
153 | +++ b/foo/bar/z.txt |
|
153 | +++ b/foo/bar/z.txt | |
154 | @@ -1,2 +1,3 @@ |
|
154 | @@ -1,2 +1,3 @@ | |
155 | z1 |
|
155 | z1 | |
156 | z2 |
|
156 | z2 | |
157 | +z3 |
|
157 | +z3 | |
158 |
|
158 | |||
159 | Status with relative path: |
|
159 | Status with relative path: | |
160 |
|
160 | |||
161 | $ hg status -S .. |
|
161 | $ hg status -S .. | |
162 | M ../foo/bar/z.txt |
|
162 | M ../foo/bar/z.txt | |
163 | M ../foo/y.txt |
|
163 | M ../foo/y.txt | |
164 | ? a.txt |
|
164 | ? a.txt | |
165 |
|
165 | |||
166 | XXX: filtering lfilesrepo.status() in 3.3-rc causes these files to be listed as |
|
166 | XXX: filtering lfilesrepo.status() in 3.3-rc causes these files to be listed as | |
167 | added instead of modified. |
|
167 | added instead of modified. | |
168 | $ hg status -S .. --config extensions.largefiles= |
|
168 | $ hg status -S .. --config extensions.largefiles= | |
169 | M ../foo/bar/z.txt |
|
169 | M ../foo/bar/z.txt | |
170 | M ../foo/y.txt |
|
170 | M ../foo/y.txt | |
171 | ? a.txt |
|
171 | ? a.txt | |
172 |
|
172 | |||
173 | $ hg diff --nodates -S .. |
|
173 | $ hg diff --nodates -S .. | |
174 | diff -r d254738c5f5e foo/y.txt |
|
174 | diff -r d254738c5f5e foo/y.txt | |
175 | --- a/foo/y.txt |
|
175 | --- a/foo/y.txt | |
176 | +++ b/foo/y.txt |
|
176 | +++ b/foo/y.txt | |
177 | @@ -1,2 +1,3 @@ |
|
177 | @@ -1,2 +1,3 @@ | |
178 | y1 |
|
178 | y1 | |
179 | y2 |
|
179 | y2 | |
180 | +y3 |
|
180 | +y3 | |
181 | diff -r 9647f22de499 foo/bar/z.txt |
|
181 | diff -r 9647f22de499 foo/bar/z.txt | |
182 | --- a/foo/bar/z.txt |
|
182 | --- a/foo/bar/z.txt | |
183 | +++ b/foo/bar/z.txt |
|
183 | +++ b/foo/bar/z.txt | |
184 | @@ -1,2 +1,3 @@ |
|
184 | @@ -1,2 +1,3 @@ | |
185 | z1 |
|
185 | z1 | |
186 | z2 |
|
186 | z2 | |
187 | +z3 |
|
187 | +z3 | |
188 | $ cd .. |
|
188 | $ cd .. | |
189 |
|
189 | |||
190 | Cleanup and final commit: |
|
190 | Cleanup and final commit: | |
191 |
|
191 | |||
192 | $ rm -r dir |
|
192 | $ rm -r dir | |
193 | $ hg commit --subrepos -m 2-3-2 |
|
193 | $ hg commit --subrepos -m 2-3-2 | |
194 | committing subrepository foo |
|
194 | committing subrepository foo | |
195 | committing subrepository foo/bar |
|
195 | committing subrepository foo/bar | |
196 |
|
196 | |||
197 | Test explicit path commands within subrepos: add/forget |
|
197 | Test explicit path commands within subrepos: add/forget | |
198 | $ echo z1 > foo/bar/z2.txt |
|
198 | $ echo z1 > foo/bar/z2.txt | |
199 | $ hg status -S |
|
199 | $ hg status -S | |
200 | ? foo/bar/z2.txt |
|
200 | ? foo/bar/z2.txt | |
201 | $ hg add foo/bar/z2.txt |
|
201 | $ hg add foo/bar/z2.txt | |
202 | $ hg status -S |
|
202 | $ hg status -S | |
203 | A foo/bar/z2.txt |
|
203 | A foo/bar/z2.txt | |
204 | $ hg forget foo/bar/z2.txt |
|
204 | $ hg forget foo/bar/z2.txt | |
205 | $ hg status -S |
|
205 | $ hg status -S | |
206 | ? foo/bar/z2.txt |
|
206 | ? foo/bar/z2.txt | |
207 | $ hg forget foo/bar/z2.txt |
|
207 | $ hg forget foo/bar/z2.txt | |
208 | not removing foo/bar/z2.txt: file is already untracked |
|
208 | not removing foo/bar/z2.txt: file is already untracked | |
209 | [1] |
|
209 | [1] | |
210 | $ hg status -S |
|
210 | $ hg status -S | |
211 | ? foo/bar/z2.txt |
|
211 | ? foo/bar/z2.txt | |
212 | $ rm foo/bar/z2.txt |
|
212 | $ rm foo/bar/z2.txt | |
213 |
|
213 | |||
214 | Log with the relationships between repo and its subrepo: |
|
214 | Log with the relationships between repo and its subrepo: | |
215 |
|
215 | |||
216 | $ hg log --template '{rev}:{node|short} {desc}\n' |
|
216 | $ hg log --template '{rev}:{node|short} {desc}\n' | |
217 | 2:1326fa26d0c0 2-3-2 |
|
217 | 2:1326fa26d0c0 2-3-2 | |
218 | 1:4b3c9ff4f66b 1-2-1 |
|
218 | 1:4b3c9ff4f66b 1-2-1 | |
219 | 0:23376cbba0d8 0-0-0 |
|
219 | 0:23376cbba0d8 0-0-0 | |
220 |
|
220 | |||
221 | $ hg -R foo log --template '{rev}:{node|short} {desc}\n' |
|
221 | $ hg -R foo log --template '{rev}:{node|short} {desc}\n' | |
222 | 3:65903cebad86 2-3-2 |
|
222 | 3:65903cebad86 2-3-2 | |
223 | 2:d254738c5f5e 0-2-1 |
|
223 | 2:d254738c5f5e 0-2-1 | |
224 | 1:8629ce7dcc39 0-1-0 |
|
224 | 1:8629ce7dcc39 0-1-0 | |
225 | 0:af048e97ade2 0-0-0 |
|
225 | 0:af048e97ade2 0-0-0 | |
226 |
|
226 | |||
227 | $ hg -R foo/bar log --template '{rev}:{node|short} {desc}\n' |
|
227 | $ hg -R foo/bar log --template '{rev}:{node|short} {desc}\n' | |
228 | 2:31ecbdafd357 2-3-2 |
|
228 | 2:31ecbdafd357 2-3-2 | |
229 | 1:9647f22de499 0-1-1 |
|
229 | 1:9647f22de499 0-1-1 | |
230 | 0:4904098473f9 0-0-0 |
|
230 | 0:4904098473f9 0-0-0 | |
231 |
|
231 | |||
232 | Status between revisions: |
|
232 | Status between revisions: | |
233 |
|
233 | |||
234 | $ hg status -S |
|
234 | $ hg status -S | |
235 | $ hg status -S --rev 0:1 |
|
235 | $ hg status -S --rev 0:1 | |
236 | M .hgsubstate |
|
236 | M .hgsubstate | |
237 | M foo/.hgsubstate |
|
237 | M foo/.hgsubstate | |
238 | M foo/bar/z.txt |
|
238 | M foo/bar/z.txt | |
239 | M foo/y.txt |
|
239 | M foo/y.txt | |
240 | $ hg diff --nodates -S -I '**/?.txt' --rev 0:1 |
|
240 | $ hg diff --nodates -S -I '**/?.txt' --rev 0:1 | |
241 | diff -r af048e97ade2 -r d254738c5f5e foo/y.txt |
|
241 | diff -r af048e97ade2 -r d254738c5f5e foo/y.txt | |
242 | --- a/foo/y.txt |
|
242 | --- a/foo/y.txt | |
243 | +++ b/foo/y.txt |
|
243 | +++ b/foo/y.txt | |
244 | @@ -1,1 +1,2 @@ |
|
244 | @@ -1,1 +1,2 @@ | |
245 | y1 |
|
245 | y1 | |
246 | +y2 |
|
246 | +y2 | |
247 | diff -r 4904098473f9 -r 9647f22de499 foo/bar/z.txt |
|
247 | diff -r 4904098473f9 -r 9647f22de499 foo/bar/z.txt | |
248 | --- a/foo/bar/z.txt |
|
248 | --- a/foo/bar/z.txt | |
249 | +++ b/foo/bar/z.txt |
|
249 | +++ b/foo/bar/z.txt | |
250 | @@ -1,1 +1,2 @@ |
|
250 | @@ -1,1 +1,2 @@ | |
251 | z1 |
|
251 | z1 | |
252 | +z2 |
|
252 | +z2 | |
253 |
|
253 | |||
254 | #if serve |
|
254 | #if serve | |
255 | $ cd .. |
|
255 | $ cd .. | |
256 | $ hg serve -R repo --debug -S -p $HGPORT -d --pid-file=hg1.pid -E error.log -A access.log |
|
256 | $ hg serve -R repo --debug -S -p $HGPORT -d --pid-file=hg1.pid -E error.log -A access.log | |
257 | adding = $TESTTMP/repo |
|
257 | adding = $TESTTMP/repo | |
258 | adding foo = $TESTTMP/repo/foo |
|
258 | adding foo = $TESTTMP/repo/foo | |
259 | adding foo/bar = $TESTTMP/repo/foo/bar |
|
259 | adding foo/bar = $TESTTMP/repo/foo/bar | |
260 | listening at http://*:$HGPORT/ (bound to *:$HGPORT) (glob) (?) |
|
260 | listening at http://*:$HGPORT/ (bound to *:$HGPORT) (glob) (?) | |
261 | adding = $TESTTMP/repo (?) |
|
261 | adding = $TESTTMP/repo (?) | |
262 | adding foo = $TESTTMP/repo/foo (?) |
|
262 | adding foo = $TESTTMP/repo/foo (?) | |
263 | adding foo/bar = $TESTTMP/repo/foo/bar (?) |
|
263 | adding foo/bar = $TESTTMP/repo/foo/bar (?) | |
264 | $ cat hg1.pid >> $DAEMON_PIDS |
|
264 | $ cat hg1.pid >> $DAEMON_PIDS | |
265 |
|
265 | |||
266 | $ hg clone http://localhost:$HGPORT clone --config progress.disable=True |
|
266 | $ hg clone http://localhost:$HGPORT clone --config progress.disable=True | |
267 | requesting all changes |
|
267 | requesting all changes | |
268 | adding changesets |
|
268 | adding changesets | |
269 | adding manifests |
|
269 | adding manifests | |
270 | adding file changes |
|
270 | adding file changes | |
271 | added 3 changesets with 5 changes to 3 files |
|
271 | added 3 changesets with 5 changes to 3 files | |
272 | new changesets 23376cbba0d8:1326fa26d0c0 |
|
272 | new changesets 23376cbba0d8:1326fa26d0c0 | |
273 | updating to branch default |
|
273 | updating to branch default | |
274 | cloning subrepo foo from http://localhost:$HGPORT/foo |
|
274 | cloning subrepo foo from http://localhost:$HGPORT/foo | |
275 | requesting all changes |
|
275 | requesting all changes | |
276 | adding changesets |
|
276 | adding changesets | |
277 | adding manifests |
|
277 | adding manifests | |
278 | adding file changes |
|
278 | adding file changes | |
279 | added 4 changesets with 7 changes to 3 files |
|
279 | added 4 changesets with 7 changes to 3 files | |
280 | new changesets af048e97ade2:65903cebad86 |
|
280 | new changesets af048e97ade2:65903cebad86 | |
281 | cloning subrepo foo/bar from http://localhost:$HGPORT/foo/bar |
|
281 | cloning subrepo foo/bar from http://localhost:$HGPORT/foo/bar | |
282 | requesting all changes |
|
282 | requesting all changes | |
283 | adding changesets |
|
283 | adding changesets | |
284 | adding manifests |
|
284 | adding manifests | |
285 | adding file changes |
|
285 | adding file changes | |
286 | added 3 changesets with 3 changes to 1 files |
|
286 | added 3 changesets with 3 changes to 1 files | |
287 | new changesets 4904098473f9:31ecbdafd357 |
|
287 | new changesets 4904098473f9:31ecbdafd357 | |
288 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
288 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
289 |
|
289 | |||
290 | $ cat clone/foo/bar/z.txt |
|
290 | $ cat clone/foo/bar/z.txt | |
291 | z1 |
|
291 | z1 | |
292 | z2 |
|
292 | z2 | |
293 | z3 |
|
293 | z3 | |
294 |
|
294 | |||
295 | Clone pooling from a remote URL will share the top level repo and the subrepos, |
|
295 | Clone pooling from a remote URL will share the top level repo and the subrepos, | |
296 | even if they are referenced by remote URL. |
|
296 | even if they are referenced by remote URL. | |
297 |
|
297 | |||
298 | $ hg --config extensions.share= --config share.pool=$TESTTMP/pool \ |
|
298 | $ hg --config extensions.share= --config share.pool=$TESTTMP/pool \ | |
299 | > clone http://localhost:$HGPORT shared |
|
299 | > clone http://localhost:$HGPORT shared | |
300 | (sharing from new pooled repository 23376cbba0d87c15906bb3652584927c140907bf) |
|
300 | (sharing from new pooled repository 23376cbba0d87c15906bb3652584927c140907bf) | |
301 | requesting all changes |
|
301 | requesting all changes | |
302 | adding changesets |
|
302 | adding changesets | |
303 | adding manifests |
|
303 | adding manifests | |
304 | adding file changes |
|
304 | adding file changes | |
305 | added 3 changesets with 5 changes to 3 files |
|
305 | added 3 changesets with 5 changes to 3 files | |
306 | new changesets 23376cbba0d8:1326fa26d0c0 |
|
306 | new changesets 23376cbba0d8:1326fa26d0c0 | |
307 | searching for changes |
|
307 | searching for changes | |
308 | no changes found |
|
308 | no changes found | |
309 | updating working directory |
|
309 | updating working directory | |
310 | cloning subrepo foo from http://localhost:$HGPORT/foo |
|
310 | cloning subrepo foo from http://localhost:$HGPORT/foo | |
311 | (sharing from new pooled repository af048e97ade2e236f754f05d07013e586af0f8bf) |
|
311 | (sharing from new pooled repository af048e97ade2e236f754f05d07013e586af0f8bf) | |
312 | requesting all changes |
|
312 | requesting all changes | |
313 | adding changesets |
|
313 | adding changesets | |
314 | adding manifests |
|
314 | adding manifests | |
315 | adding file changes |
|
315 | adding file changes | |
316 | added 4 changesets with 7 changes to 3 files |
|
316 | added 4 changesets with 7 changes to 3 files | |
317 | new changesets af048e97ade2:65903cebad86 |
|
317 | new changesets af048e97ade2:65903cebad86 | |
318 | searching for changes |
|
318 | searching for changes | |
319 | no changes found |
|
319 | no changes found | |
320 | cloning subrepo foo/bar from http://localhost:$HGPORT/foo/bar |
|
320 | cloning subrepo foo/bar from http://localhost:$HGPORT/foo/bar | |
321 | (sharing from new pooled repository 4904098473f96c900fec436dad267edd4da59fad) |
|
321 | (sharing from new pooled repository 4904098473f96c900fec436dad267edd4da59fad) | |
322 | requesting all changes |
|
322 | requesting all changes | |
323 | adding changesets |
|
323 | adding changesets | |
324 | adding manifests |
|
324 | adding manifests | |
325 | adding file changes |
|
325 | adding file changes | |
326 | added 3 changesets with 3 changes to 1 files |
|
326 | added 3 changesets with 3 changes to 1 files | |
327 | new changesets 4904098473f9:31ecbdafd357 |
|
327 | new changesets 4904098473f9:31ecbdafd357 | |
328 | searching for changes |
|
328 | searching for changes | |
329 | no changes found |
|
329 | no changes found | |
330 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
330 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
331 |
|
331 | |||
332 | $ cat access.log |
|
332 | $ cat access.log | |
333 | * "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
333 | * "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
334 | * "GET /?cmd=batch HTTP/1.1" 200 - * (glob) |
|
334 | * "GET /?cmd=batch HTTP/1.1" 200 - * (glob) | |
335 | * "GET /?cmd=getbundle HTTP/1.1" 200 - * (glob) |
|
335 | * "GET /?cmd=getbundle HTTP/1.1" 200 - * (glob) | |
336 | * "GET /foo?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
336 | * "GET /foo?cmd=capabilities HTTP/1.1" 200 - (glob) | |
337 | * "GET /foo?cmd=batch HTTP/1.1" 200 - * (glob) |
|
337 | * "GET /foo?cmd=batch HTTP/1.1" 200 - * (glob) | |
338 | * "GET /foo?cmd=getbundle HTTP/1.1" 200 - * (glob) |
|
338 | * "GET /foo?cmd=getbundle HTTP/1.1" 200 - * (glob) | |
339 | * "GET /foo/bar?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
339 | * "GET /foo/bar?cmd=capabilities HTTP/1.1" 200 - (glob) | |
340 | * "GET /foo/bar?cmd=batch HTTP/1.1" 200 - * (glob) |
|
340 | * "GET /foo/bar?cmd=batch HTTP/1.1" 200 - * (glob) | |
341 | * "GET /foo/bar?cmd=getbundle HTTP/1.1" 200 - * (glob) |
|
341 | * "GET /foo/bar?cmd=getbundle HTTP/1.1" 200 - * (glob) | |
342 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
342 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
343 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=0 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
343 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=0 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
344 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
344 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
345 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
345 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
346 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=1326fa26d0c00d2146c63b56bb6a45149d7325ac&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
346 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=1326fa26d0c00d2146c63b56bb6a45149d7325ac&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
347 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D1326fa26d0c00d2146c63b56bb6a45149d7325ac x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
347 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D1326fa26d0c00d2146c63b56bb6a45149d7325ac x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
348 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=1326fa26d0c00d2146c63b56bb6a45149d7325ac&heads=1326fa26d0c00d2146c63b56bb6a45149d7325ac&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
348 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=1326fa26d0c00d2146c63b56bb6a45149d7325ac&heads=1326fa26d0c00d2146c63b56bb6a45149d7325ac&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
349 | $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
349 | $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=capabilities HTTP/1.1" 200 - (glob) | |
350 | $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=0 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
350 | $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=0 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
351 | $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
351 | $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=capabilities HTTP/1.1" 200 - (glob) | |
352 | $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
352 | $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
353 | $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=65903cebad86f1a84bd4f1134f62fa7dcb7a1c98&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
353 | $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=65903cebad86f1a84bd4f1134f62fa7dcb7a1c98&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
354 | $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D65903cebad86f1a84bd4f1134f62fa7dcb7a1c98 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
354 | $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D65903cebad86f1a84bd4f1134f62fa7dcb7a1c98 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
355 | $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=65903cebad86f1a84bd4f1134f62fa7dcb7a1c98&heads=65903cebad86f1a84bd4f1134f62fa7dcb7a1c98&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
355 | $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=65903cebad86f1a84bd4f1134f62fa7dcb7a1c98&heads=65903cebad86f1a84bd4f1134f62fa7dcb7a1c98&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
356 | $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
356 | $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=capabilities HTTP/1.1" 200 - (glob) | |
357 | $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=0 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
357 | $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=0 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
358 | $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
358 | $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=capabilities HTTP/1.1" 200 - (glob) | |
359 | $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
359 | $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
360 | $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=31ecbdafd357f54b281c9bd1d681bb90de219e22&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
360 | $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=31ecbdafd357f54b281c9bd1d681bb90de219e22&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
361 | $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D31ecbdafd357f54b281c9bd1d681bb90de219e22 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
361 | $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D31ecbdafd357f54b281c9bd1d681bb90de219e22 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
362 | $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=31ecbdafd357f54b281c9bd1d681bb90de219e22&heads=31ecbdafd357f54b281c9bd1d681bb90de219e22&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
362 | $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=31ecbdafd357f54b281c9bd1d681bb90de219e22&heads=31ecbdafd357f54b281c9bd1d681bb90de219e22&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
363 |
|
363 | |||
364 | $ killdaemons.py |
|
364 | $ killdaemons.py | |
365 | $ rm hg1.pid error.log access.log |
|
365 | $ rm hg1.pid error.log access.log | |
366 | $ cd repo |
|
366 | $ cd repo | |
367 | #endif |
|
367 | #endif | |
368 |
|
368 | |||
369 | Enable progress extension for archive tests: |
|
369 | Enable progress extension for archive tests: | |
370 |
|
370 | |||
371 | $ cp $HGRCPATH $HGRCPATH.no-progress |
|
371 | $ cp $HGRCPATH $HGRCPATH.no-progress | |
372 | $ cat >> $HGRCPATH <<EOF |
|
372 | $ cat >> $HGRCPATH <<EOF | |
373 | > [progress] |
|
373 | > [progress] | |
374 | > disable=False |
|
374 | > disable=False | |
375 | > assume-tty = 1 |
|
375 | > assume-tty = 1 | |
376 | > delay = 0 |
|
376 | > delay = 0 | |
377 | > # set changedelay really large so we don't see nested topics |
|
377 | > # set changedelay really large so we don't see nested topics | |
378 | > changedelay = 30000 |
|
378 | > changedelay = 30000 | |
379 | > format = topic bar number |
|
379 | > format = topic bar number | |
380 | > refresh = 0 |
|
380 | > refresh = 0 | |
381 | > width = 60 |
|
381 | > width = 60 | |
382 | > EOF |
|
382 | > EOF | |
383 |
|
383 | |||
384 | Test archiving to a directory tree (the doubled lines in the output |
|
384 | Test archiving to a directory tree (the doubled lines in the output | |
385 | only show up in the test output, not in real usage): |
|
385 | only show up in the test output, not in real usage): | |
386 |
|
386 | |||
387 | $ hg archive --subrepos ../archive |
|
387 | $ hg archive --subrepos ../archive | |
388 | \r (no-eol) (esc) |
|
388 | \r (no-eol) (esc) | |
389 | archiving [ ] 0/3\r (no-eol) (esc) |
|
389 | archiving [ ] 0/3\r (no-eol) (esc) | |
390 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
390 | archiving [=============> ] 1/3\r (no-eol) (esc) | |
391 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
391 | archiving [===========================> ] 2/3\r (no-eol) (esc) | |
392 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
392 | archiving [==========================================>] 3/3\r (no-eol) (esc) | |
393 | \r (no-eol) (esc) |
|
393 | \r (no-eol) (esc) | |
394 | \r (no-eol) (esc) |
|
394 | \r (no-eol) (esc) | |
395 | archiving (foo) [ ] 0/3\r (no-eol) (esc) |
|
395 | archiving (foo) [ ] 0/3\r (no-eol) (esc) | |
396 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) |
|
396 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) | |
397 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) |
|
397 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) | |
398 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) |
|
398 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) | |
399 | \r (no-eol) (esc) |
|
399 | \r (no-eol) (esc) | |
400 | \r (no-eol) (esc) |
|
400 | \r (no-eol) (esc) | |
401 | archiving (foo/bar) [ ] 0/1\r (no-eol) (esc) |
|
401 | archiving (foo/bar) [ ] 0/1\r (no-eol) (esc) | |
402 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc) |
|
402 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc) | |
403 | \r (no-eol) (esc) |
|
403 | \r (no-eol) (esc) | |
404 | $ find ../archive | sort |
|
404 | $ find ../archive | sort | |
405 | ../archive |
|
405 | ../archive | |
406 | ../archive/.hg_archival.txt |
|
406 | ../archive/.hg_archival.txt | |
407 | ../archive/.hgsub |
|
407 | ../archive/.hgsub | |
408 | ../archive/.hgsubstate |
|
408 | ../archive/.hgsubstate | |
409 | ../archive/foo |
|
409 | ../archive/foo | |
410 | ../archive/foo/.hgsub |
|
410 | ../archive/foo/.hgsub | |
411 | ../archive/foo/.hgsubstate |
|
411 | ../archive/foo/.hgsubstate | |
412 | ../archive/foo/bar |
|
412 | ../archive/foo/bar | |
413 | ../archive/foo/bar/z.txt |
|
413 | ../archive/foo/bar/z.txt | |
414 | ../archive/foo/y.txt |
|
414 | ../archive/foo/y.txt | |
415 | ../archive/x.txt |
|
415 | ../archive/x.txt | |
416 |
|
416 | |||
417 | Test archiving to zip file (unzip output is unstable): |
|
417 | Test archiving to zip file (unzip output is unstable): | |
418 |
|
418 | |||
419 | $ hg archive --subrepos --prefix '.' ../archive.zip |
|
419 | $ hg archive --subrepos --prefix '.' ../archive.zip | |
420 | \r (no-eol) (esc) |
|
420 | \r (no-eol) (esc) | |
421 | archiving [ ] 0/3\r (no-eol) (esc) |
|
421 | archiving [ ] 0/3\r (no-eol) (esc) | |
422 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
422 | archiving [=============> ] 1/3\r (no-eol) (esc) | |
423 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
423 | archiving [===========================> ] 2/3\r (no-eol) (esc) | |
424 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
424 | archiving [==========================================>] 3/3\r (no-eol) (esc) | |
425 | \r (no-eol) (esc) |
|
425 | \r (no-eol) (esc) | |
426 | \r (no-eol) (esc) |
|
426 | \r (no-eol) (esc) | |
427 | archiving (foo) [ ] 0/3\r (no-eol) (esc) |
|
427 | archiving (foo) [ ] 0/3\r (no-eol) (esc) | |
428 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) |
|
428 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) | |
429 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) |
|
429 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) | |
430 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) |
|
430 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) | |
431 | \r (no-eol) (esc) |
|
431 | \r (no-eol) (esc) | |
432 | \r (no-eol) (esc) |
|
432 | \r (no-eol) (esc) | |
433 | archiving (foo/bar) [ ] 0/1\r (no-eol) (esc) |
|
433 | archiving (foo/bar) [ ] 0/1\r (no-eol) (esc) | |
434 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc) |
|
434 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc) | |
435 | \r (no-eol) (esc) |
|
435 | \r (no-eol) (esc) | |
436 |
|
436 | |||
437 | (unzip date formating is unstable, we do not care about it and glob it out) |
|
437 | (unzip date formating is unstable, we do not care about it and glob it out) | |
438 |
|
438 | |||
439 | $ unzip -l ../archive.zip | grep -v -- ----- | egrep -v files$ |
|
439 | $ unzip -l ../archive.zip | grep -v -- ----- | egrep -v files$ | |
440 | Archive: ../archive.zip |
|
440 | Archive: ../archive.zip | |
441 | Length [ ]* Date [ ]* Time [ ]* Name (re) |
|
441 | Length [ ]* Date [ ]* Time [ ]* Name (re) | |
442 | 172 [0-9:\- ]* .hg_archival.txt (re) |
|
442 | 172 [0-9:\- ]* .hg_archival.txt (re) | |
443 | 10 [0-9:\- ]* .hgsub (re) |
|
443 | 10 [0-9:\- ]* .hgsub (re) | |
444 | 45 [0-9:\- ]* .hgsubstate (re) |
|
444 | 45 [0-9:\- ]* .hgsubstate (re) | |
445 | 3 [0-9:\- ]* x.txt (re) |
|
445 | 3 [0-9:\- ]* x.txt (re) | |
446 | 10 [0-9:\- ]* foo/.hgsub (re) |
|
446 | 10 [0-9:\- ]* foo/.hgsub (re) | |
447 | 45 [0-9:\- ]* foo/.hgsubstate (re) |
|
447 | 45 [0-9:\- ]* foo/.hgsubstate (re) | |
448 | 9 [0-9:\- ]* foo/y.txt (re) |
|
448 | 9 [0-9:\- ]* foo/y.txt (re) | |
449 | 9 [0-9:\- ]* foo/bar/z.txt (re) |
|
449 | 9 [0-9:\- ]* foo/bar/z.txt (re) | |
450 |
|
450 | |||
451 | Test archiving a revision that references a subrepo that is not yet |
|
451 | Test archiving a revision that references a subrepo that is not yet | |
452 | cloned: |
|
452 | cloned: | |
453 |
|
453 | |||
454 | #if hardlink |
|
454 | #if hardlink | |
455 | $ hg clone -U . ../empty |
|
455 | $ hg clone -U . ../empty | |
456 | \r (no-eol) (esc) |
|
456 | \r (no-eol) (esc) | |
457 | linking [ <=> ] 1\r (no-eol) (esc) |
|
457 | linking [ <=> ] 1\r (no-eol) (esc) | |
458 | linking [ <=> ] 2\r (no-eol) (esc) |
|
458 | linking [ <=> ] 2\r (no-eol) (esc) | |
459 | linking [ <=> ] 3\r (no-eol) (esc) |
|
459 | linking [ <=> ] 3\r (no-eol) (esc) | |
460 | linking [ <=> ] 4\r (no-eol) (esc) |
|
460 | linking [ <=> ] 4\r (no-eol) (esc) | |
461 | linking [ <=> ] 5\r (no-eol) (esc) |
|
461 | linking [ <=> ] 5\r (no-eol) (esc) | |
462 | linking [ <=> ] 6\r (no-eol) (esc) |
|
462 | linking [ <=> ] 6\r (no-eol) (esc) | |
463 | linking [ <=> ] 7\r (no-eol) (esc) |
|
463 | linking [ <=> ] 7\r (no-eol) (esc) | |
464 | linking [ <=> ] 8\r (no-eol) (esc) |
|
464 | linking [ <=> ] 8\r (no-eol) (esc) | |
|
465 | linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !) | |||
|
466 | linking [ <=> ] 10\r (no-eol) (esc) (reposimplestore !) | |||
|
467 | linking [ <=> ] 11\r (no-eol) (esc) (reposimplestore !) | |||
|
468 | linking [ <=> ] 12\r (no-eol) (esc) (reposimplestore !) | |||
|
469 | linking [ <=> ] 13\r (no-eol) (esc) (reposimplestore !) | |||
465 | \r (no-eol) (esc) |
|
470 | \r (no-eol) (esc) | |
466 | #else |
|
471 | #else | |
467 | $ hg clone -U . ../empty |
|
472 | $ hg clone -U . ../empty | |
468 | \r (no-eol) (esc) |
|
473 | \r (no-eol) (esc) | |
469 | linking [ <=> ] 1 (no-eol) |
|
474 | linking [ <=> ] 1 (no-eol) | |
470 | #endif |
|
475 | #endif | |
471 |
|
476 | |||
472 | $ cd ../empty |
|
477 | $ cd ../empty | |
473 | #if hardlink |
|
478 | #if hardlink | |
474 | $ hg archive --subrepos -r tip --prefix './' ../archive.tar.gz |
|
479 | $ hg archive --subrepos -r tip --prefix './' ../archive.tar.gz | |
475 | \r (no-eol) (esc) |
|
480 | \r (no-eol) (esc) | |
476 | archiving [ ] 0/3\r (no-eol) (esc) |
|
481 | archiving [ ] 0/3\r (no-eol) (esc) | |
477 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
482 | archiving [=============> ] 1/3\r (no-eol) (esc) | |
478 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
483 | archiving [===========================> ] 2/3\r (no-eol) (esc) | |
479 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
484 | archiving [==========================================>] 3/3\r (no-eol) (esc) | |
480 | \r (no-eol) (esc) |
|
485 | \r (no-eol) (esc) | |
481 | \r (no-eol) (esc) |
|
486 | \r (no-eol) (esc) | |
482 | linking [ <=> ] 1\r (no-eol) (esc) |
|
487 | linking [ <=> ] 1\r (no-eol) (esc) | |
483 | linking [ <=> ] 2\r (no-eol) (esc) |
|
488 | linking [ <=> ] 2\r (no-eol) (esc) | |
484 | linking [ <=> ] 3\r (no-eol) (esc) |
|
489 | linking [ <=> ] 3\r (no-eol) (esc) | |
485 | linking [ <=> ] 4\r (no-eol) (esc) |
|
490 | linking [ <=> ] 4\r (no-eol) (esc) | |
486 | linking [ <=> ] 5\r (no-eol) (esc) |
|
491 | linking [ <=> ] 5\r (no-eol) (esc) | |
487 | linking [ <=> ] 6\r (no-eol) (esc) |
|
492 | linking [ <=> ] 6\r (no-eol) (esc) | |
488 | linking [ <=> ] 7\r (no-eol) (esc) |
|
493 | linking [ <=> ] 7\r (no-eol) (esc) | |
489 | linking [ <=> ] 8\r (no-eol) (esc) |
|
494 | linking [ <=> ] 8\r (no-eol) (esc) | |
|
495 | linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !) | |||
|
496 | linking [ <=> ] 10\r (no-eol) (esc) (reposimplestore !) | |||
|
497 | linking [ <=> ] 11\r (no-eol) (esc) (reposimplestore !) | |||
|
498 | linking [ <=> ] 12\r (no-eol) (esc) (reposimplestore !) | |||
|
499 | linking [ <=> ] 13\r (no-eol) (esc) (reposimplestore !) | |||
|
500 | linking [ <=> ] 14\r (no-eol) (esc) (reposimplestore !) | |||
|
501 | linking [ <=> ] 15\r (no-eol) (esc) (reposimplestore !) | |||
490 | \r (no-eol) (esc) |
|
502 | \r (no-eol) (esc) | |
491 | \r (no-eol) (esc) |
|
503 | \r (no-eol) (esc) | |
492 | archiving (foo) [ ] 0/3\r (no-eol) (esc) |
|
504 | archiving (foo) [ ] 0/3\r (no-eol) (esc) | |
493 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) |
|
505 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) | |
494 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) |
|
506 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) | |
495 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) |
|
507 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) | |
496 | \r (no-eol) (esc) |
|
508 | \r (no-eol) (esc) | |
497 | \r (no-eol) (esc) |
|
509 | \r (no-eol) (esc) | |
498 | linking [ <=> ] 1\r (no-eol) (esc) |
|
510 | linking [ <=> ] 1\r (no-eol) (esc) | |
499 | linking [ <=> ] 2\r (no-eol) (esc) |
|
511 | linking [ <=> ] 2\r (no-eol) (esc) | |
500 | linking [ <=> ] 3\r (no-eol) (esc) |
|
512 | linking [ <=> ] 3\r (no-eol) (esc) | |
501 | linking [ <=> ] 4\r (no-eol) (esc) |
|
513 | linking [ <=> ] 4\r (no-eol) (esc) | |
502 | linking [ <=> ] 5\r (no-eol) (esc) |
|
514 | linking [ <=> ] 5\r (no-eol) (esc) | |
503 | linking [ <=> ] 6\r (no-eol) (esc) |
|
515 | linking [ <=> ] 6\r (no-eol) (esc) | |
|
516 | linking [ <=> ] 7\r (no-eol) (esc) (reposimplestore !) | |||
|
517 | linking [ <=> ] 8\r (no-eol) (esc) (reposimplestore !) | |||
|
518 | linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !) | |||
504 | \r (no-eol) (esc) |
|
519 | \r (no-eol) (esc) | |
505 | \r (no-eol) (esc) |
|
520 | \r (no-eol) (esc) | |
506 | archiving (foo/bar) [ ] 0/1\r (no-eol) (esc) |
|
521 | archiving (foo/bar) [ ] 0/1\r (no-eol) (esc) | |
507 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc) |
|
522 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc) | |
508 | \r (no-eol) (esc) |
|
523 | \r (no-eol) (esc) | |
509 | cloning subrepo foo from $TESTTMP/repo/foo |
|
524 | cloning subrepo foo from $TESTTMP/repo/foo | |
510 | cloning subrepo foo/bar from $TESTTMP/repo/foo/bar |
|
525 | cloning subrepo foo/bar from $TESTTMP/repo/foo/bar | |
511 | #else |
|
526 | #else | |
512 | Note there's a slight output glitch on non-hardlink systems: the last |
|
527 | Note there's a slight output glitch on non-hardlink systems: the last | |
513 | "linking" progress topic never gets closed, leading to slight output corruption on that platform. |
|
528 | "linking" progress topic never gets closed, leading to slight output corruption on that platform. | |
514 | $ hg archive --subrepos -r tip --prefix './' ../archive.tar.gz |
|
529 | $ hg archive --subrepos -r tip --prefix './' ../archive.tar.gz | |
515 | \r (no-eol) (esc) |
|
530 | \r (no-eol) (esc) | |
516 | archiving [ ] 0/3\r (no-eol) (esc) |
|
531 | archiving [ ] 0/3\r (no-eol) (esc) | |
517 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
532 | archiving [=============> ] 1/3\r (no-eol) (esc) | |
518 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
533 | archiving [===========================> ] 2/3\r (no-eol) (esc) | |
519 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
534 | archiving [==========================================>] 3/3\r (no-eol) (esc) | |
520 | \r (no-eol) (esc) |
|
535 | \r (no-eol) (esc) | |
521 | \r (no-eol) (esc) |
|
536 | \r (no-eol) (esc) | |
522 | linking [ <=> ] 1\r (no-eol) (esc) |
|
537 | linking [ <=> ] 1\r (no-eol) (esc) | |
523 | cloning subrepo foo/bar from $TESTTMP/repo/foo/bar |
|
538 | cloning subrepo foo/bar from $TESTTMP/repo/foo/bar | |
524 | #endif |
|
539 | #endif | |
525 |
|
540 | |||
526 | Archive + subrepos uses '/' for all component separators |
|
541 | Archive + subrepos uses '/' for all component separators | |
527 |
|
542 | |||
528 | $ tar -tzf ../archive.tar.gz | sort |
|
543 | $ tar -tzf ../archive.tar.gz | sort | |
529 | .hg_archival.txt |
|
544 | .hg_archival.txt | |
530 | .hgsub |
|
545 | .hgsub | |
531 | .hgsubstate |
|
546 | .hgsubstate | |
532 | foo/.hgsub |
|
547 | foo/.hgsub | |
533 | foo/.hgsubstate |
|
548 | foo/.hgsubstate | |
534 | foo/bar/z.txt |
|
549 | foo/bar/z.txt | |
535 | foo/y.txt |
|
550 | foo/y.txt | |
536 | x.txt |
|
551 | x.txt | |
537 |
|
552 | |||
538 | The newly cloned subrepos contain no working copy: |
|
553 | The newly cloned subrepos contain no working copy: | |
539 |
|
554 | |||
540 | $ hg -R foo summary |
|
555 | $ hg -R foo summary | |
541 | parent: -1:000000000000 (no revision checked out) |
|
556 | parent: -1:000000000000 (no revision checked out) | |
542 | branch: default |
|
557 | branch: default | |
543 | commit: (clean) |
|
558 | commit: (clean) | |
544 | update: 4 new changesets (update) |
|
559 | update: 4 new changesets (update) | |
545 |
|
560 | |||
546 | Sharing a local repo without the locally referenced subrepo (i.e. it was never |
|
561 | Sharing a local repo without the locally referenced subrepo (i.e. it was never | |
547 | updated from null), fails the same as a clone operation. |
|
562 | updated from null), fails the same as a clone operation. | |
548 |
|
563 | |||
549 | $ hg --config progress.disable=True clone -U ../empty ../empty2 |
|
564 | $ hg --config progress.disable=True clone -U ../empty ../empty2 | |
550 |
|
565 | |||
551 | $ hg --config extensions.share= --config progress.disable=True \ |
|
566 | $ hg --config extensions.share= --config progress.disable=True \ | |
552 | > share ../empty2 ../empty_share |
|
567 | > share ../empty2 ../empty_share | |
553 | updating working directory |
|
568 | updating working directory | |
554 | abort: repository $TESTTMP/empty2/foo not found! |
|
569 | abort: repository $TESTTMP/empty2/foo not found! | |
555 | [255] |
|
570 | [255] | |
556 |
|
571 | |||
557 | $ hg --config progress.disable=True clone ../empty2 ../empty_clone |
|
572 | $ hg --config progress.disable=True clone ../empty2 ../empty_clone | |
558 | updating to branch default |
|
573 | updating to branch default | |
559 | abort: repository $TESTTMP/empty2/foo not found! |
|
574 | abort: repository $TESTTMP/empty2/foo not found! | |
560 | [255] |
|
575 | [255] | |
561 |
|
576 | |||
562 | Disable progress extension and cleanup: |
|
577 | Disable progress extension and cleanup: | |
563 |
|
578 | |||
564 | $ mv $HGRCPATH.no-progress $HGRCPATH |
|
579 | $ mv $HGRCPATH.no-progress $HGRCPATH | |
565 |
|
580 | |||
566 | Test archiving when there is a directory in the way for a subrepo |
|
581 | Test archiving when there is a directory in the way for a subrepo | |
567 | created by archive: |
|
582 | created by archive: | |
568 |
|
583 | |||
569 | $ hg clone -U . ../almost-empty |
|
584 | $ hg clone -U . ../almost-empty | |
570 | $ cd ../almost-empty |
|
585 | $ cd ../almost-empty | |
571 | $ mkdir foo |
|
586 | $ mkdir foo | |
572 | $ echo f > foo/f |
|
587 | $ echo f > foo/f | |
573 | $ hg archive --subrepos -r tip archive |
|
588 | $ hg archive --subrepos -r tip archive | |
574 | cloning subrepo foo from $TESTTMP/empty/foo |
|
589 | cloning subrepo foo from $TESTTMP/empty/foo | |
575 | abort: destination '$TESTTMP/almost-empty/foo' is not empty (in subrepository "foo") |
|
590 | abort: destination '$TESTTMP/almost-empty/foo' is not empty (in subrepository "foo") | |
576 | [255] |
|
591 | [255] | |
577 |
|
592 | |||
578 | Clone and test outgoing: |
|
593 | Clone and test outgoing: | |
579 |
|
594 | |||
580 | $ cd .. |
|
595 | $ cd .. | |
581 | $ hg clone repo repo2 |
|
596 | $ hg clone repo repo2 | |
582 | updating to branch default |
|
597 | updating to branch default | |
583 | cloning subrepo foo from $TESTTMP/repo/foo |
|
598 | cloning subrepo foo from $TESTTMP/repo/foo | |
584 | cloning subrepo foo/bar from $TESTTMP/repo/foo/bar |
|
599 | cloning subrepo foo/bar from $TESTTMP/repo/foo/bar | |
585 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
600 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
586 | $ cd repo2 |
|
601 | $ cd repo2 | |
587 | $ hg outgoing -S |
|
602 | $ hg outgoing -S | |
588 | comparing with $TESTTMP/repo |
|
603 | comparing with $TESTTMP/repo | |
589 | searching for changes |
|
604 | searching for changes | |
590 | no changes found |
|
605 | no changes found | |
591 | comparing with $TESTTMP/repo/foo |
|
606 | comparing with $TESTTMP/repo/foo | |
592 | searching for changes |
|
607 | searching for changes | |
593 | no changes found |
|
608 | no changes found | |
594 | comparing with $TESTTMP/repo/foo/bar |
|
609 | comparing with $TESTTMP/repo/foo/bar | |
595 | searching for changes |
|
610 | searching for changes | |
596 | no changes found |
|
611 | no changes found | |
597 | [1] |
|
612 | [1] | |
598 |
|
613 | |||
599 | Make nested change: |
|
614 | Make nested change: | |
600 |
|
615 | |||
601 | $ echo y4 >> foo/y.txt |
|
616 | $ echo y4 >> foo/y.txt | |
602 | $ hg diff --nodates -S |
|
617 | $ hg diff --nodates -S | |
603 | diff -r 65903cebad86 foo/y.txt |
|
618 | diff -r 65903cebad86 foo/y.txt | |
604 | --- a/foo/y.txt |
|
619 | --- a/foo/y.txt | |
605 | +++ b/foo/y.txt |
|
620 | +++ b/foo/y.txt | |
606 | @@ -1,3 +1,4 @@ |
|
621 | @@ -1,3 +1,4 @@ | |
607 | y1 |
|
622 | y1 | |
608 | y2 |
|
623 | y2 | |
609 | y3 |
|
624 | y3 | |
610 | +y4 |
|
625 | +y4 | |
611 | $ hg commit --subrepos -m 3-4-2 |
|
626 | $ hg commit --subrepos -m 3-4-2 | |
612 | committing subrepository foo |
|
627 | committing subrepository foo | |
613 | $ hg outgoing -S |
|
628 | $ hg outgoing -S | |
614 | comparing with $TESTTMP/repo |
|
629 | comparing with $TESTTMP/repo | |
615 | searching for changes |
|
630 | searching for changes | |
616 | changeset: 3:2655b8ecc4ee |
|
631 | changeset: 3:2655b8ecc4ee | |
617 | tag: tip |
|
632 | tag: tip | |
618 | user: test |
|
633 | user: test | |
619 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
634 | date: Thu Jan 01 00:00:00 1970 +0000 | |
620 | summary: 3-4-2 |
|
635 | summary: 3-4-2 | |
621 |
|
636 | |||
622 | comparing with $TESTTMP/repo/foo |
|
637 | comparing with $TESTTMP/repo/foo | |
623 | searching for changes |
|
638 | searching for changes | |
624 | changeset: 4:e96193d6cb36 |
|
639 | changeset: 4:e96193d6cb36 | |
625 | tag: tip |
|
640 | tag: tip | |
626 | user: test |
|
641 | user: test | |
627 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
642 | date: Thu Jan 01 00:00:00 1970 +0000 | |
628 | summary: 3-4-2 |
|
643 | summary: 3-4-2 | |
629 |
|
644 | |||
630 | comparing with $TESTTMP/repo/foo/bar |
|
645 | comparing with $TESTTMP/repo/foo/bar | |
631 | searching for changes |
|
646 | searching for changes | |
632 | no changes found |
|
647 | no changes found | |
633 |
|
648 | |||
634 |
|
649 | |||
635 | Switch to original repo and setup default path: |
|
650 | Switch to original repo and setup default path: | |
636 |
|
651 | |||
637 | $ cd ../repo |
|
652 | $ cd ../repo | |
638 | $ echo '[paths]' >> .hg/hgrc |
|
653 | $ echo '[paths]' >> .hg/hgrc | |
639 | $ echo 'default = ../repo2' >> .hg/hgrc |
|
654 | $ echo 'default = ../repo2' >> .hg/hgrc | |
640 |
|
655 | |||
641 | Test incoming: |
|
656 | Test incoming: | |
642 |
|
657 | |||
643 | $ hg incoming -S |
|
658 | $ hg incoming -S | |
644 | comparing with $TESTTMP/repo2 |
|
659 | comparing with $TESTTMP/repo2 | |
645 | searching for changes |
|
660 | searching for changes | |
646 | changeset: 3:2655b8ecc4ee |
|
661 | changeset: 3:2655b8ecc4ee | |
647 | tag: tip |
|
662 | tag: tip | |
648 | user: test |
|
663 | user: test | |
649 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
664 | date: Thu Jan 01 00:00:00 1970 +0000 | |
650 | summary: 3-4-2 |
|
665 | summary: 3-4-2 | |
651 |
|
666 | |||
652 | comparing with $TESTTMP/repo2/foo |
|
667 | comparing with $TESTTMP/repo2/foo | |
653 | searching for changes |
|
668 | searching for changes | |
654 | changeset: 4:e96193d6cb36 |
|
669 | changeset: 4:e96193d6cb36 | |
655 | tag: tip |
|
670 | tag: tip | |
656 | user: test |
|
671 | user: test | |
657 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
672 | date: Thu Jan 01 00:00:00 1970 +0000 | |
658 | summary: 3-4-2 |
|
673 | summary: 3-4-2 | |
659 |
|
674 | |||
660 | comparing with $TESTTMP/repo2/foo/bar |
|
675 | comparing with $TESTTMP/repo2/foo/bar | |
661 | searching for changes |
|
676 | searching for changes | |
662 | no changes found |
|
677 | no changes found | |
663 |
|
678 | |||
664 | $ hg incoming -S --bundle incoming.hg |
|
679 | $ hg incoming -S --bundle incoming.hg | |
665 | abort: cannot combine --bundle and --subrepos |
|
680 | abort: cannot combine --bundle and --subrepos | |
666 | [255] |
|
681 | [255] | |
667 |
|
682 | |||
668 | Test missing subrepo: |
|
683 | Test missing subrepo: | |
669 |
|
684 | |||
670 | $ rm -r foo |
|
685 | $ rm -r foo | |
671 | $ hg status -S |
|
686 | $ hg status -S | |
672 | warning: error "unknown revision '65903cebad86f1a84bd4f1134f62fa7dcb7a1c98'" in subrepository "foo" |
|
687 | warning: error "unknown revision '65903cebad86f1a84bd4f1134f62fa7dcb7a1c98'" in subrepository "foo" | |
673 |
|
688 | |||
674 | Issue2619: IndexError: list index out of range on hg add with subrepos |
|
689 | Issue2619: IndexError: list index out of range on hg add with subrepos | |
675 | The subrepo must sorts after the explicit filename. |
|
690 | The subrepo must sorts after the explicit filename. | |
676 |
|
691 | |||
677 | $ cd .. |
|
692 | $ cd .. | |
678 | $ hg init test |
|
693 | $ hg init test | |
679 | $ cd test |
|
694 | $ cd test | |
680 | $ hg init x |
|
695 | $ hg init x | |
681 | $ echo abc > abc.txt |
|
696 | $ echo abc > abc.txt | |
682 | $ hg ci -Am "abc" |
|
697 | $ hg ci -Am "abc" | |
683 | adding abc.txt |
|
698 | adding abc.txt | |
684 | $ echo "x = x" >> .hgsub |
|
699 | $ echo "x = x" >> .hgsub | |
685 | $ hg add .hgsub |
|
700 | $ hg add .hgsub | |
686 | $ touch a x/a |
|
701 | $ touch a x/a | |
687 | $ hg add a x/a |
|
702 | $ hg add a x/a | |
688 |
|
703 | |||
689 | $ hg ci -Sm "added x" |
|
704 | $ hg ci -Sm "added x" | |
690 | committing subrepository x |
|
705 | committing subrepository x | |
691 | $ echo abc > x/a |
|
706 | $ echo abc > x/a | |
692 | $ hg revert --rev '.^' "set:subrepo('glob:x*')" |
|
707 | $ hg revert --rev '.^' "set:subrepo('glob:x*')" | |
693 | abort: subrepository 'x' does not exist in 25ac2c9b3180! |
|
708 | abort: subrepository 'x' does not exist in 25ac2c9b3180! | |
694 | [255] |
|
709 | [255] | |
695 |
|
710 | |||
696 | $ cd .. |
|
711 | $ cd .. |
@@ -1,697 +1,699 | |||||
|
1 | #require no-reposimplestore | |||
|
2 | ||||
1 | $ cat >> $HGRCPATH << EOF |
|
3 | $ cat >> $HGRCPATH << EOF | |
2 | > [extensions] |
|
4 | > [extensions] | |
3 | > share = |
|
5 | > share = | |
4 | > EOF |
|
6 | > EOF | |
5 |
|
7 | |||
6 | store and revlogv1 are required in source |
|
8 | store and revlogv1 are required in source | |
7 |
|
9 | |||
8 | $ hg --config format.usestore=false init no-store |
|
10 | $ hg --config format.usestore=false init no-store | |
9 | $ hg -R no-store debugupgraderepo |
|
11 | $ hg -R no-store debugupgraderepo | |
10 | abort: cannot upgrade repository; requirement missing: store |
|
12 | abort: cannot upgrade repository; requirement missing: store | |
11 | [255] |
|
13 | [255] | |
12 |
|
14 | |||
13 | $ hg init no-revlogv1 |
|
15 | $ hg init no-revlogv1 | |
14 | $ cat > no-revlogv1/.hg/requires << EOF |
|
16 | $ cat > no-revlogv1/.hg/requires << EOF | |
15 | > dotencode |
|
17 | > dotencode | |
16 | > fncache |
|
18 | > fncache | |
17 | > generaldelta |
|
19 | > generaldelta | |
18 | > store |
|
20 | > store | |
19 | > EOF |
|
21 | > EOF | |
20 |
|
22 | |||
21 | $ hg -R no-revlogv1 debugupgraderepo |
|
23 | $ hg -R no-revlogv1 debugupgraderepo | |
22 | abort: cannot upgrade repository; requirement missing: revlogv1 |
|
24 | abort: cannot upgrade repository; requirement missing: revlogv1 | |
23 | [255] |
|
25 | [255] | |
24 |
|
26 | |||
25 | Cannot upgrade shared repositories |
|
27 | Cannot upgrade shared repositories | |
26 |
|
28 | |||
27 | $ hg init share-parent |
|
29 | $ hg init share-parent | |
28 | $ hg -q share share-parent share-child |
|
30 | $ hg -q share share-parent share-child | |
29 |
|
31 | |||
30 | $ hg -R share-child debugupgraderepo |
|
32 | $ hg -R share-child debugupgraderepo | |
31 | abort: cannot upgrade repository; unsupported source requirement: shared |
|
33 | abort: cannot upgrade repository; unsupported source requirement: shared | |
32 | [255] |
|
34 | [255] | |
33 |
|
35 | |||
34 | Do not yet support upgrading treemanifest repos |
|
36 | Do not yet support upgrading treemanifest repos | |
35 |
|
37 | |||
36 | $ hg --config experimental.treemanifest=true init treemanifest |
|
38 | $ hg --config experimental.treemanifest=true init treemanifest | |
37 | $ hg -R treemanifest debugupgraderepo |
|
39 | $ hg -R treemanifest debugupgraderepo | |
38 | abort: cannot upgrade repository; unsupported source requirement: treemanifest |
|
40 | abort: cannot upgrade repository; unsupported source requirement: treemanifest | |
39 | [255] |
|
41 | [255] | |
40 |
|
42 | |||
41 | Cannot add treemanifest requirement during upgrade |
|
43 | Cannot add treemanifest requirement during upgrade | |
42 |
|
44 | |||
43 | $ hg init disallowaddedreq |
|
45 | $ hg init disallowaddedreq | |
44 | $ hg -R disallowaddedreq --config experimental.treemanifest=true debugupgraderepo |
|
46 | $ hg -R disallowaddedreq --config experimental.treemanifest=true debugupgraderepo | |
45 | abort: cannot upgrade repository; do not support adding requirement: treemanifest |
|
47 | abort: cannot upgrade repository; do not support adding requirement: treemanifest | |
46 | [255] |
|
48 | [255] | |
47 |
|
49 | |||
48 | An upgrade of a repository created with recommended settings only suggests optimizations |
|
50 | An upgrade of a repository created with recommended settings only suggests optimizations | |
49 |
|
51 | |||
50 | $ hg init empty |
|
52 | $ hg init empty | |
51 | $ cd empty |
|
53 | $ cd empty | |
52 | $ hg debugformat |
|
54 | $ hg debugformat | |
53 | format-variant repo |
|
55 | format-variant repo | |
54 | fncache: yes |
|
56 | fncache: yes | |
55 | dotencode: yes |
|
57 | dotencode: yes | |
56 | generaldelta: yes |
|
58 | generaldelta: yes | |
57 | plain-cl-delta: yes |
|
59 | plain-cl-delta: yes | |
58 | compression: zlib |
|
60 | compression: zlib | |
59 | $ hg debugformat --verbose |
|
61 | $ hg debugformat --verbose | |
60 | format-variant repo config default |
|
62 | format-variant repo config default | |
61 | fncache: yes yes yes |
|
63 | fncache: yes yes yes | |
62 | dotencode: yes yes yes |
|
64 | dotencode: yes yes yes | |
63 | generaldelta: yes yes yes |
|
65 | generaldelta: yes yes yes | |
64 | plain-cl-delta: yes yes yes |
|
66 | plain-cl-delta: yes yes yes | |
65 | compression: zlib zlib zlib |
|
67 | compression: zlib zlib zlib | |
66 | $ hg debugformat --verbose --config format.usegfncache=no |
|
68 | $ hg debugformat --verbose --config format.usegfncache=no | |
67 | format-variant repo config default |
|
69 | format-variant repo config default | |
68 | fncache: yes yes yes |
|
70 | fncache: yes yes yes | |
69 | dotencode: yes yes yes |
|
71 | dotencode: yes yes yes | |
70 | generaldelta: yes yes yes |
|
72 | generaldelta: yes yes yes | |
71 | plain-cl-delta: yes yes yes |
|
73 | plain-cl-delta: yes yes yes | |
72 | compression: zlib zlib zlib |
|
74 | compression: zlib zlib zlib | |
73 | $ hg debugformat --verbose --config format.usegfncache=no --color=debug |
|
75 | $ hg debugformat --verbose --config format.usegfncache=no --color=debug | |
74 | format-variant repo config default |
|
76 | format-variant repo config default | |
75 | [formatvariant.name.uptodate|fncache: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] |
|
77 | [formatvariant.name.uptodate|fncache: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] | |
76 | [formatvariant.name.uptodate|dotencode: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] |
|
78 | [formatvariant.name.uptodate|dotencode: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] | |
77 | [formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] |
|
79 | [formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] | |
78 | [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] |
|
80 | [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] | |
79 | [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] |
|
81 | [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] | |
80 | $ hg debugformat -Tjson |
|
82 | $ hg debugformat -Tjson | |
81 | [ |
|
83 | [ | |
82 | { |
|
84 | { | |
83 | "config": true, |
|
85 | "config": true, | |
84 | "default": true, |
|
86 | "default": true, | |
85 | "name": "fncache", |
|
87 | "name": "fncache", | |
86 | "repo": true |
|
88 | "repo": true | |
87 | }, |
|
89 | }, | |
88 | { |
|
90 | { | |
89 | "config": true, |
|
91 | "config": true, | |
90 | "default": true, |
|
92 | "default": true, | |
91 | "name": "dotencode", |
|
93 | "name": "dotencode", | |
92 | "repo": true |
|
94 | "repo": true | |
93 | }, |
|
95 | }, | |
94 | { |
|
96 | { | |
95 | "config": true, |
|
97 | "config": true, | |
96 | "default": true, |
|
98 | "default": true, | |
97 | "name": "generaldelta", |
|
99 | "name": "generaldelta", | |
98 | "repo": true |
|
100 | "repo": true | |
99 | }, |
|
101 | }, | |
100 | { |
|
102 | { | |
101 | "config": true, |
|
103 | "config": true, | |
102 | "default": true, |
|
104 | "default": true, | |
103 | "name": "plain-cl-delta", |
|
105 | "name": "plain-cl-delta", | |
104 | "repo": true |
|
106 | "repo": true | |
105 | }, |
|
107 | }, | |
106 | { |
|
108 | { | |
107 | "config": "zlib", |
|
109 | "config": "zlib", | |
108 | "default": "zlib", |
|
110 | "default": "zlib", | |
109 | "name": "compression", |
|
111 | "name": "compression", | |
110 | "repo": "zlib" |
|
112 | "repo": "zlib" | |
111 | } |
|
113 | } | |
112 | ] |
|
114 | ] | |
113 | $ hg debugupgraderepo |
|
115 | $ hg debugupgraderepo | |
114 | (no feature deficiencies found in existing repository) |
|
116 | (no feature deficiencies found in existing repository) | |
115 | performing an upgrade with "--run" will make the following changes: |
|
117 | performing an upgrade with "--run" will make the following changes: | |
116 |
|
118 | |||
117 | requirements |
|
119 | requirements | |
118 | preserved: dotencode, fncache, generaldelta, revlogv1, store |
|
120 | preserved: dotencode, fncache, generaldelta, revlogv1, store | |
119 |
|
121 | |||
120 | additional optimizations are available by specifying "--optimize <name>": |
|
122 | additional optimizations are available by specifying "--optimize <name>": | |
121 |
|
123 | |||
122 | redeltaparent |
|
124 | redeltaparent | |
123 | deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower |
|
125 | deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower | |
124 |
|
126 | |||
125 | redeltamultibase |
|
127 | redeltamultibase | |
126 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges |
|
128 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges | |
127 |
|
129 | |||
128 | redeltaall |
|
130 | redeltaall | |
129 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed |
|
131 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed | |
130 |
|
132 | |||
131 | redeltafulladd |
|
133 | redeltafulladd | |
132 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "redeltaall" but even slower since more logic is involved. |
|
134 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "redeltaall" but even slower since more logic is involved. | |
133 |
|
135 | |||
134 |
|
136 | |||
135 | --optimize can be used to add optimizations |
|
137 | --optimize can be used to add optimizations | |
136 |
|
138 | |||
137 | $ hg debugupgrade --optimize redeltaparent |
|
139 | $ hg debugupgrade --optimize redeltaparent | |
138 | (no feature deficiencies found in existing repository) |
|
140 | (no feature deficiencies found in existing repository) | |
139 | performing an upgrade with "--run" will make the following changes: |
|
141 | performing an upgrade with "--run" will make the following changes: | |
140 |
|
142 | |||
141 | requirements |
|
143 | requirements | |
142 | preserved: dotencode, fncache, generaldelta, revlogv1, store |
|
144 | preserved: dotencode, fncache, generaldelta, revlogv1, store | |
143 |
|
145 | |||
144 | redeltaparent |
|
146 | redeltaparent | |
145 | deltas within internal storage will choose a new base revision if needed |
|
147 | deltas within internal storage will choose a new base revision if needed | |
146 |
|
148 | |||
147 | additional optimizations are available by specifying "--optimize <name>": |
|
149 | additional optimizations are available by specifying "--optimize <name>": | |
148 |
|
150 | |||
149 | redeltamultibase |
|
151 | redeltamultibase | |
150 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges |
|
152 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges | |
151 |
|
153 | |||
152 | redeltaall |
|
154 | redeltaall | |
153 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed |
|
155 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed | |
154 |
|
156 | |||
155 | redeltafulladd |
|
157 | redeltafulladd | |
156 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "redeltaall" but even slower since more logic is involved. |
|
158 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "redeltaall" but even slower since more logic is involved. | |
157 |
|
159 | |||
158 |
|
160 | |||
159 | Various sub-optimal detections work |
|
161 | Various sub-optimal detections work | |
160 |
|
162 | |||
161 | $ cat > .hg/requires << EOF |
|
163 | $ cat > .hg/requires << EOF | |
162 | > revlogv1 |
|
164 | > revlogv1 | |
163 | > store |
|
165 | > store | |
164 | > EOF |
|
166 | > EOF | |
165 |
|
167 | |||
166 | $ hg debugformat |
|
168 | $ hg debugformat | |
167 | format-variant repo |
|
169 | format-variant repo | |
168 | fncache: no |
|
170 | fncache: no | |
169 | dotencode: no |
|
171 | dotencode: no | |
170 | generaldelta: no |
|
172 | generaldelta: no | |
171 | plain-cl-delta: yes |
|
173 | plain-cl-delta: yes | |
172 | compression: zlib |
|
174 | compression: zlib | |
173 | $ hg debugformat --verbose |
|
175 | $ hg debugformat --verbose | |
174 | format-variant repo config default |
|
176 | format-variant repo config default | |
175 | fncache: no yes yes |
|
177 | fncache: no yes yes | |
176 | dotencode: no yes yes |
|
178 | dotencode: no yes yes | |
177 | generaldelta: no yes yes |
|
179 | generaldelta: no yes yes | |
178 | plain-cl-delta: yes yes yes |
|
180 | plain-cl-delta: yes yes yes | |
179 | compression: zlib zlib zlib |
|
181 | compression: zlib zlib zlib | |
180 | $ hg debugformat --verbose --config format.usegeneraldelta=no |
|
182 | $ hg debugformat --verbose --config format.usegeneraldelta=no | |
181 | format-variant repo config default |
|
183 | format-variant repo config default | |
182 | fncache: no yes yes |
|
184 | fncache: no yes yes | |
183 | dotencode: no yes yes |
|
185 | dotencode: no yes yes | |
184 | generaldelta: no no yes |
|
186 | generaldelta: no no yes | |
185 | plain-cl-delta: yes yes yes |
|
187 | plain-cl-delta: yes yes yes | |
186 | compression: zlib zlib zlib |
|
188 | compression: zlib zlib zlib | |
187 | $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug |
|
189 | $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug | |
188 | format-variant repo config default |
|
190 | format-variant repo config default | |
189 | [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] |
|
191 | [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] | |
190 | [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] |
|
192 | [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] | |
191 | [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes] |
|
193 | [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes] | |
192 | [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] |
|
194 | [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] | |
193 | [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] |
|
195 | [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] | |
194 | $ hg debugupgraderepo |
|
196 | $ hg debugupgraderepo | |
195 | repository lacks features recommended by current config options: |
|
197 | repository lacks features recommended by current config options: | |
196 |
|
198 | |||
197 | fncache |
|
199 | fncache | |
198 | long and reserved filenames may not work correctly; repository performance is sub-optimal |
|
200 | long and reserved filenames may not work correctly; repository performance is sub-optimal | |
199 |
|
201 | |||
200 | dotencode |
|
202 | dotencode | |
201 | storage of filenames beginning with a period or space may not work correctly |
|
203 | storage of filenames beginning with a period or space may not work correctly | |
202 |
|
204 | |||
203 | generaldelta |
|
205 | generaldelta | |
204 | deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower |
|
206 | deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower | |
205 |
|
207 | |||
206 |
|
208 | |||
207 | performing an upgrade with "--run" will make the following changes: |
|
209 | performing an upgrade with "--run" will make the following changes: | |
208 |
|
210 | |||
209 | requirements |
|
211 | requirements | |
210 | preserved: revlogv1, store |
|
212 | preserved: revlogv1, store | |
211 | added: dotencode, fncache, generaldelta |
|
213 | added: dotencode, fncache, generaldelta | |
212 |
|
214 | |||
213 | fncache |
|
215 | fncache | |
214 | repository will be more resilient to storing certain paths and performance of certain operations should be improved |
|
216 | repository will be more resilient to storing certain paths and performance of certain operations should be improved | |
215 |
|
217 | |||
216 | dotencode |
|
218 | dotencode | |
217 | repository will be better able to store files beginning with a space or period |
|
219 | repository will be better able to store files beginning with a space or period | |
218 |
|
220 | |||
219 | generaldelta |
|
221 | generaldelta | |
220 | repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster |
|
222 | repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster | |
221 |
|
223 | |||
222 | additional optimizations are available by specifying "--optimize <name>": |
|
224 | additional optimizations are available by specifying "--optimize <name>": | |
223 |
|
225 | |||
224 | redeltaparent |
|
226 | redeltaparent | |
225 | deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower |
|
227 | deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower | |
226 |
|
228 | |||
227 | redeltamultibase |
|
229 | redeltamultibase | |
228 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges |
|
230 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges | |
229 |
|
231 | |||
230 | redeltaall |
|
232 | redeltaall | |
231 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed |
|
233 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed | |
232 |
|
234 | |||
233 | redeltafulladd |
|
235 | redeltafulladd | |
234 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "redeltaall" but even slower since more logic is involved. |
|
236 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "redeltaall" but even slower since more logic is involved. | |
235 |
|
237 | |||
236 |
|
238 | |||
237 | $ hg --config format.dotencode=false debugupgraderepo |
|
239 | $ hg --config format.dotencode=false debugupgraderepo | |
238 | repository lacks features recommended by current config options: |
|
240 | repository lacks features recommended by current config options: | |
239 |
|
241 | |||
240 | fncache |
|
242 | fncache | |
241 | long and reserved filenames may not work correctly; repository performance is sub-optimal |
|
243 | long and reserved filenames may not work correctly; repository performance is sub-optimal | |
242 |
|
244 | |||
243 | generaldelta |
|
245 | generaldelta | |
244 | deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower |
|
246 | deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower | |
245 |
|
247 | |||
246 | repository lacks features used by the default config options: |
|
248 | repository lacks features used by the default config options: | |
247 |
|
249 | |||
248 | dotencode |
|
250 | dotencode | |
249 | storage of filenames beginning with a period or space may not work correctly |
|
251 | storage of filenames beginning with a period or space may not work correctly | |
250 |
|
252 | |||
251 |
|
253 | |||
252 | performing an upgrade with "--run" will make the following changes: |
|
254 | performing an upgrade with "--run" will make the following changes: | |
253 |
|
255 | |||
254 | requirements |
|
256 | requirements | |
255 | preserved: revlogv1, store |
|
257 | preserved: revlogv1, store | |
256 | added: fncache, generaldelta |
|
258 | added: fncache, generaldelta | |
257 |
|
259 | |||
258 | fncache |
|
260 | fncache | |
259 | repository will be more resilient to storing certain paths and performance of certain operations should be improved |
|
261 | repository will be more resilient to storing certain paths and performance of certain operations should be improved | |
260 |
|
262 | |||
261 | generaldelta |
|
263 | generaldelta | |
262 | repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster |
|
264 | repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster | |
263 |
|
265 | |||
264 | additional optimizations are available by specifying "--optimize <name>": |
|
266 | additional optimizations are available by specifying "--optimize <name>": | |
265 |
|
267 | |||
266 | redeltaparent |
|
268 | redeltaparent | |
267 | deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower |
|
269 | deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower | |
268 |
|
270 | |||
269 | redeltamultibase |
|
271 | redeltamultibase | |
270 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges |
|
272 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges | |
271 |
|
273 | |||
272 | redeltaall |
|
274 | redeltaall | |
273 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed |
|
275 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed | |
274 |
|
276 | |||
275 | redeltafulladd |
|
277 | redeltafulladd | |
276 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "redeltaall" but even slower since more logic is involved. |
|
278 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "redeltaall" but even slower since more logic is involved. | |
277 |
|
279 | |||
278 |
|
280 | |||
279 | $ cd .. |
|
281 | $ cd .. | |
280 |
|
282 | |||
281 | Upgrading a repository that is already modern essentially no-ops |
|
283 | Upgrading a repository that is already modern essentially no-ops | |
282 |
|
284 | |||
283 | $ hg init modern |
|
285 | $ hg init modern | |
284 | $ hg -R modern debugupgraderepo --run |
|
286 | $ hg -R modern debugupgraderepo --run | |
285 | upgrade will perform the following actions: |
|
287 | upgrade will perform the following actions: | |
286 |
|
288 | |||
287 | requirements |
|
289 | requirements | |
288 | preserved: dotencode, fncache, generaldelta, revlogv1, store |
|
290 | preserved: dotencode, fncache, generaldelta, revlogv1, store | |
289 |
|
291 | |||
290 | beginning upgrade... |
|
292 | beginning upgrade... | |
291 | repository locked and read-only |
|
293 | repository locked and read-only | |
292 | creating temporary repository to stage migrated data: $TESTTMP/modern/.hg/upgrade.* (glob) |
|
294 | creating temporary repository to stage migrated data: $TESTTMP/modern/.hg/upgrade.* (glob) | |
293 | (it is safe to interrupt this process any time before data migration completes) |
|
295 | (it is safe to interrupt this process any time before data migration completes) | |
294 | data fully migrated to temporary repository |
|
296 | data fully migrated to temporary repository | |
295 | marking source repository as being upgraded; clients will be unable to read from repository |
|
297 | marking source repository as being upgraded; clients will be unable to read from repository | |
296 | starting in-place swap of repository data |
|
298 | starting in-place swap of repository data | |
297 | replaced files will be backed up at $TESTTMP/modern/.hg/upgradebackup.* (glob) |
|
299 | replaced files will be backed up at $TESTTMP/modern/.hg/upgradebackup.* (glob) | |
298 | replacing store... |
|
300 | replacing store... | |
299 | store replacement complete; repository was inconsistent for *s (glob) |
|
301 | store replacement complete; repository was inconsistent for *s (glob) | |
300 | finalizing requirements file and making repository readable again |
|
302 | finalizing requirements file and making repository readable again | |
301 | removing temporary repository $TESTTMP/modern/.hg/upgrade.* (glob) |
|
303 | removing temporary repository $TESTTMP/modern/.hg/upgrade.* (glob) | |
302 | copy of old repository backed up at $TESTTMP/modern/.hg/upgradebackup.* (glob) |
|
304 | copy of old repository backed up at $TESTTMP/modern/.hg/upgradebackup.* (glob) | |
303 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified |
|
305 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | |
304 |
|
306 | |||
305 | Upgrading a repository to generaldelta works |
|
307 | Upgrading a repository to generaldelta works | |
306 |
|
308 | |||
307 | $ hg --config format.usegeneraldelta=false init upgradegd |
|
309 | $ hg --config format.usegeneraldelta=false init upgradegd | |
308 | $ cd upgradegd |
|
310 | $ cd upgradegd | |
309 | $ touch f0 |
|
311 | $ touch f0 | |
310 | $ hg -q commit -A -m initial |
|
312 | $ hg -q commit -A -m initial | |
311 | $ touch f1 |
|
313 | $ touch f1 | |
312 | $ hg -q commit -A -m 'add f1' |
|
314 | $ hg -q commit -A -m 'add f1' | |
313 | $ hg -q up -r 0 |
|
315 | $ hg -q up -r 0 | |
314 | $ touch f2 |
|
316 | $ touch f2 | |
315 | $ hg -q commit -A -m 'add f2' |
|
317 | $ hg -q commit -A -m 'add f2' | |
316 |
|
318 | |||
317 | $ hg debugupgraderepo --run |
|
319 | $ hg debugupgraderepo --run | |
318 | upgrade will perform the following actions: |
|
320 | upgrade will perform the following actions: | |
319 |
|
321 | |||
320 | requirements |
|
322 | requirements | |
321 | preserved: dotencode, fncache, revlogv1, store |
|
323 | preserved: dotencode, fncache, revlogv1, store | |
322 | added: generaldelta |
|
324 | added: generaldelta | |
323 |
|
325 | |||
324 | generaldelta |
|
326 | generaldelta | |
325 | repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster |
|
327 | repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster | |
326 |
|
328 | |||
327 | beginning upgrade... |
|
329 | beginning upgrade... | |
328 | repository locked and read-only |
|
330 | repository locked and read-only | |
329 | creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
331 | creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
330 | (it is safe to interrupt this process any time before data migration completes) |
|
332 | (it is safe to interrupt this process any time before data migration completes) | |
331 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
333 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | |
332 | migrating 341 bytes in store; 401 bytes tracked data |
|
334 | migrating 341 bytes in store; 401 bytes tracked data | |
333 | migrating 3 filelogs containing 3 revisions (0 bytes in store; 0 bytes tracked data) |
|
335 | migrating 3 filelogs containing 3 revisions (0 bytes in store; 0 bytes tracked data) | |
334 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes |
|
336 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes | |
335 | migrating 1 manifests containing 3 revisions (157 bytes in store; 220 bytes tracked data) |
|
337 | migrating 1 manifests containing 3 revisions (157 bytes in store; 220 bytes tracked data) | |
336 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes |
|
338 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes | |
337 | migrating changelog containing 3 revisions (184 bytes in store; 181 bytes tracked data) |
|
339 | migrating changelog containing 3 revisions (184 bytes in store; 181 bytes tracked data) | |
338 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
340 | finished migrating 3 changelog revisions; change in size: 0 bytes | |
339 | finished migrating 9 total revisions; total change in store size: 0 bytes |
|
341 | finished migrating 9 total revisions; total change in store size: 0 bytes | |
340 | copying phaseroots |
|
342 | copying phaseroots | |
341 | data fully migrated to temporary repository |
|
343 | data fully migrated to temporary repository | |
342 | marking source repository as being upgraded; clients will be unable to read from repository |
|
344 | marking source repository as being upgraded; clients will be unable to read from repository | |
343 | starting in-place swap of repository data |
|
345 | starting in-place swap of repository data | |
344 | replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob) |
|
346 | replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob) | |
345 | replacing store... |
|
347 | replacing store... | |
346 | store replacement complete; repository was inconsistent for *s (glob) |
|
348 | store replacement complete; repository was inconsistent for *s (glob) | |
347 | finalizing requirements file and making repository readable again |
|
349 | finalizing requirements file and making repository readable again | |
348 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
350 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
349 | copy of old repository backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob) |
|
351 | copy of old repository backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob) | |
350 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified |
|
352 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | |
351 |
|
353 | |||
352 | Original requirements backed up |
|
354 | Original requirements backed up | |
353 |
|
355 | |||
354 | $ cat .hg/upgradebackup.*/requires |
|
356 | $ cat .hg/upgradebackup.*/requires | |
355 | dotencode |
|
357 | dotencode | |
356 | fncache |
|
358 | fncache | |
357 | revlogv1 |
|
359 | revlogv1 | |
358 | store |
|
360 | store | |
359 |
|
361 | |||
360 | generaldelta added to original requirements files |
|
362 | generaldelta added to original requirements files | |
361 |
|
363 | |||
362 | $ cat .hg/requires |
|
364 | $ cat .hg/requires | |
363 | dotencode |
|
365 | dotencode | |
364 | fncache |
|
366 | fncache | |
365 | generaldelta |
|
367 | generaldelta | |
366 | revlogv1 |
|
368 | revlogv1 | |
367 | store |
|
369 | store | |
368 |
|
370 | |||
369 | store directory has files we expect |
|
371 | store directory has files we expect | |
370 |
|
372 | |||
371 | $ ls .hg/store |
|
373 | $ ls .hg/store | |
372 | 00changelog.i |
|
374 | 00changelog.i | |
373 | 00manifest.i |
|
375 | 00manifest.i | |
374 | data |
|
376 | data | |
375 | fncache |
|
377 | fncache | |
376 | phaseroots |
|
378 | phaseroots | |
377 | undo |
|
379 | undo | |
378 | undo.backupfiles |
|
380 | undo.backupfiles | |
379 | undo.phaseroots |
|
381 | undo.phaseroots | |
380 |
|
382 | |||
381 | manifest should be generaldelta |
|
383 | manifest should be generaldelta | |
382 |
|
384 | |||
383 | $ hg debugrevlog -m | grep flags |
|
385 | $ hg debugrevlog -m | grep flags | |
384 | flags : inline, generaldelta |
|
386 | flags : inline, generaldelta | |
385 |
|
387 | |||
386 | verify should be happy |
|
388 | verify should be happy | |
387 |
|
389 | |||
388 | $ hg verify |
|
390 | $ hg verify | |
389 | checking changesets |
|
391 | checking changesets | |
390 | checking manifests |
|
392 | checking manifests | |
391 | crosschecking files in changesets and manifests |
|
393 | crosschecking files in changesets and manifests | |
392 | checking files |
|
394 | checking files | |
393 | 3 files, 3 changesets, 3 total revisions |
|
395 | 3 files, 3 changesets, 3 total revisions | |
394 |
|
396 | |||
395 | old store should be backed up |
|
397 | old store should be backed up | |
396 |
|
398 | |||
397 | $ ls .hg/upgradebackup.*/store |
|
399 | $ ls .hg/upgradebackup.*/store | |
398 | 00changelog.i |
|
400 | 00changelog.i | |
399 | 00manifest.i |
|
401 | 00manifest.i | |
400 | data |
|
402 | data | |
401 | fncache |
|
403 | fncache | |
402 | phaseroots |
|
404 | phaseroots | |
403 | undo |
|
405 | undo | |
404 | undo.backup.fncache |
|
406 | undo.backup.fncache | |
405 | undo.backupfiles |
|
407 | undo.backupfiles | |
406 | undo.phaseroots |
|
408 | undo.phaseroots | |
407 |
|
409 | |||
408 | $ cd .. |
|
410 | $ cd .. | |
409 |
|
411 | |||
410 | store files with special filenames aren't encoded during copy |
|
412 | store files with special filenames aren't encoded during copy | |
411 |
|
413 | |||
412 | $ hg init store-filenames |
|
414 | $ hg init store-filenames | |
413 | $ cd store-filenames |
|
415 | $ cd store-filenames | |
414 | $ touch foo |
|
416 | $ touch foo | |
415 | $ hg -q commit -A -m initial |
|
417 | $ hg -q commit -A -m initial | |
416 | $ touch .hg/store/.XX_special_filename |
|
418 | $ touch .hg/store/.XX_special_filename | |
417 |
|
419 | |||
418 | $ hg debugupgraderepo --run |
|
420 | $ hg debugupgraderepo --run | |
419 | upgrade will perform the following actions: |
|
421 | upgrade will perform the following actions: | |
420 |
|
422 | |||
421 | requirements |
|
423 | requirements | |
422 | preserved: dotencode, fncache, generaldelta, revlogv1, store |
|
424 | preserved: dotencode, fncache, generaldelta, revlogv1, store | |
423 |
|
425 | |||
424 | beginning upgrade... |
|
426 | beginning upgrade... | |
425 | repository locked and read-only |
|
427 | repository locked and read-only | |
426 | creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob) |
|
428 | creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob) | |
427 | (it is safe to interrupt this process any time before data migration completes) |
|
429 | (it is safe to interrupt this process any time before data migration completes) | |
428 | migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog) |
|
430 | migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog) | |
429 | migrating 109 bytes in store; 107 bytes tracked data |
|
431 | migrating 109 bytes in store; 107 bytes tracked data | |
430 | migrating 1 filelogs containing 1 revisions (0 bytes in store; 0 bytes tracked data) |
|
432 | migrating 1 filelogs containing 1 revisions (0 bytes in store; 0 bytes tracked data) | |
431 | finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes |
|
433 | finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes | |
432 | migrating 1 manifests containing 1 revisions (46 bytes in store; 45 bytes tracked data) |
|
434 | migrating 1 manifests containing 1 revisions (46 bytes in store; 45 bytes tracked data) | |
433 | finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes |
|
435 | finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes | |
434 | migrating changelog containing 1 revisions (63 bytes in store; 62 bytes tracked data) |
|
436 | migrating changelog containing 1 revisions (63 bytes in store; 62 bytes tracked data) | |
435 | finished migrating 1 changelog revisions; change in size: 0 bytes |
|
437 | finished migrating 1 changelog revisions; change in size: 0 bytes | |
436 | finished migrating 3 total revisions; total change in store size: 0 bytes |
|
438 | finished migrating 3 total revisions; total change in store size: 0 bytes | |
437 | copying .XX_special_filename |
|
439 | copying .XX_special_filename | |
438 | copying phaseroots |
|
440 | copying phaseroots | |
439 | data fully migrated to temporary repository |
|
441 | data fully migrated to temporary repository | |
440 | marking source repository as being upgraded; clients will be unable to read from repository |
|
442 | marking source repository as being upgraded; clients will be unable to read from repository | |
441 | starting in-place swap of repository data |
|
443 | starting in-place swap of repository data | |
442 | replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) |
|
444 | replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) | |
443 | replacing store... |
|
445 | replacing store... | |
444 | store replacement complete; repository was inconsistent for *s (glob) |
|
446 | store replacement complete; repository was inconsistent for *s (glob) | |
445 | finalizing requirements file and making repository readable again |
|
447 | finalizing requirements file and making repository readable again | |
446 | removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob) |
|
448 | removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob) | |
447 | copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) |
|
449 | copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) | |
448 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified |
|
450 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | |
449 | $ hg debugupgraderepo --run --optimize redeltafulladd |
|
451 | $ hg debugupgraderepo --run --optimize redeltafulladd | |
450 | upgrade will perform the following actions: |
|
452 | upgrade will perform the following actions: | |
451 |
|
453 | |||
452 | requirements |
|
454 | requirements | |
453 | preserved: dotencode, fncache, generaldelta, revlogv1, store |
|
455 | preserved: dotencode, fncache, generaldelta, revlogv1, store | |
454 |
|
456 | |||
455 | redeltafulladd |
|
457 | redeltafulladd | |
456 | each revision will be added as new content to the internal storage; this will likely drastically slow down execution time, but some extensions might need it |
|
458 | each revision will be added as new content to the internal storage; this will likely drastically slow down execution time, but some extensions might need it | |
457 |
|
459 | |||
458 | beginning upgrade... |
|
460 | beginning upgrade... | |
459 | repository locked and read-only |
|
461 | repository locked and read-only | |
460 | creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob) |
|
462 | creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob) | |
461 | (it is safe to interrupt this process any time before data migration completes) |
|
463 | (it is safe to interrupt this process any time before data migration completes) | |
462 | migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog) |
|
464 | migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog) | |
463 | migrating 109 bytes in store; 107 bytes tracked data |
|
465 | migrating 109 bytes in store; 107 bytes tracked data | |
464 | migrating 1 filelogs containing 1 revisions (0 bytes in store; 0 bytes tracked data) |
|
466 | migrating 1 filelogs containing 1 revisions (0 bytes in store; 0 bytes tracked data) | |
465 | finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes |
|
467 | finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes | |
466 | migrating 1 manifests containing 1 revisions (46 bytes in store; 45 bytes tracked data) |
|
468 | migrating 1 manifests containing 1 revisions (46 bytes in store; 45 bytes tracked data) | |
467 | finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes |
|
469 | finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes | |
468 | migrating changelog containing 1 revisions (63 bytes in store; 62 bytes tracked data) |
|
470 | migrating changelog containing 1 revisions (63 bytes in store; 62 bytes tracked data) | |
469 | finished migrating 1 changelog revisions; change in size: 0 bytes |
|
471 | finished migrating 1 changelog revisions; change in size: 0 bytes | |
470 | finished migrating 3 total revisions; total change in store size: 0 bytes |
|
472 | finished migrating 3 total revisions; total change in store size: 0 bytes | |
471 | copying .XX_special_filename |
|
473 | copying .XX_special_filename | |
472 | copying phaseroots |
|
474 | copying phaseroots | |
473 | data fully migrated to temporary repository |
|
475 | data fully migrated to temporary repository | |
474 | marking source repository as being upgraded; clients will be unable to read from repository |
|
476 | marking source repository as being upgraded; clients will be unable to read from repository | |
475 | starting in-place swap of repository data |
|
477 | starting in-place swap of repository data | |
476 | replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) |
|
478 | replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) | |
477 | replacing store... |
|
479 | replacing store... | |
478 | store replacement complete; repository was inconsistent for *s (glob) |
|
480 | store replacement complete; repository was inconsistent for *s (glob) | |
479 | finalizing requirements file and making repository readable again |
|
481 | finalizing requirements file and making repository readable again | |
480 | removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob) |
|
482 | removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob) | |
481 | copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) |
|
483 | copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) | |
482 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified |
|
484 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | |
483 |
|
485 | |||
484 | $ cd .. |
|
486 | $ cd .. | |
485 |
|
487 | |||
486 | Check upgrading a large file repository |
|
488 | Check upgrading a large file repository | |
487 | --------------------------------------- |
|
489 | --------------------------------------- | |
488 |
|
490 | |||
489 | $ hg init largefilesrepo |
|
491 | $ hg init largefilesrepo | |
490 | $ cat << EOF >> largefilesrepo/.hg/hgrc |
|
492 | $ cat << EOF >> largefilesrepo/.hg/hgrc | |
491 | > [extensions] |
|
493 | > [extensions] | |
492 | > largefiles = |
|
494 | > largefiles = | |
493 | > EOF |
|
495 | > EOF | |
494 |
|
496 | |||
495 | $ cd largefilesrepo |
|
497 | $ cd largefilesrepo | |
496 | $ touch foo |
|
498 | $ touch foo | |
497 | $ hg add --large foo |
|
499 | $ hg add --large foo | |
498 | $ hg -q commit -m initial |
|
500 | $ hg -q commit -m initial | |
499 | $ cat .hg/requires |
|
501 | $ cat .hg/requires | |
500 | dotencode |
|
502 | dotencode | |
501 | fncache |
|
503 | fncache | |
502 | generaldelta |
|
504 | generaldelta | |
503 | largefiles |
|
505 | largefiles | |
504 | revlogv1 |
|
506 | revlogv1 | |
505 | store |
|
507 | store | |
506 |
|
508 | |||
507 | $ hg debugupgraderepo --run |
|
509 | $ hg debugupgraderepo --run | |
508 | upgrade will perform the following actions: |
|
510 | upgrade will perform the following actions: | |
509 |
|
511 | |||
510 | requirements |
|
512 | requirements | |
511 | preserved: dotencode, fncache, generaldelta, largefiles, revlogv1, store |
|
513 | preserved: dotencode, fncache, generaldelta, largefiles, revlogv1, store | |
512 |
|
514 | |||
513 | beginning upgrade... |
|
515 | beginning upgrade... | |
514 | repository locked and read-only |
|
516 | repository locked and read-only | |
515 | creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob) |
|
517 | creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob) | |
516 | (it is safe to interrupt this process any time before data migration completes) |
|
518 | (it is safe to interrupt this process any time before data migration completes) | |
517 | migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog) |
|
519 | migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog) | |
518 | migrating 163 bytes in store; 160 bytes tracked data |
|
520 | migrating 163 bytes in store; 160 bytes tracked data | |
519 | migrating 1 filelogs containing 1 revisions (42 bytes in store; 41 bytes tracked data) |
|
521 | migrating 1 filelogs containing 1 revisions (42 bytes in store; 41 bytes tracked data) | |
520 | finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes |
|
522 | finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes | |
521 | migrating 1 manifests containing 1 revisions (52 bytes in store; 51 bytes tracked data) |
|
523 | migrating 1 manifests containing 1 revisions (52 bytes in store; 51 bytes tracked data) | |
522 | finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes |
|
524 | finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes | |
523 | migrating changelog containing 1 revisions (69 bytes in store; 68 bytes tracked data) |
|
525 | migrating changelog containing 1 revisions (69 bytes in store; 68 bytes tracked data) | |
524 | finished migrating 1 changelog revisions; change in size: 0 bytes |
|
526 | finished migrating 1 changelog revisions; change in size: 0 bytes | |
525 | finished migrating 3 total revisions; total change in store size: 0 bytes |
|
527 | finished migrating 3 total revisions; total change in store size: 0 bytes | |
526 | copying phaseroots |
|
528 | copying phaseroots | |
527 | data fully migrated to temporary repository |
|
529 | data fully migrated to temporary repository | |
528 | marking source repository as being upgraded; clients will be unable to read from repository |
|
530 | marking source repository as being upgraded; clients will be unable to read from repository | |
529 | starting in-place swap of repository data |
|
531 | starting in-place swap of repository data | |
530 | replaced files will be backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob) |
|
532 | replaced files will be backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob) | |
531 | replacing store... |
|
533 | replacing store... | |
532 | store replacement complete; repository was inconsistent for *s (glob) |
|
534 | store replacement complete; repository was inconsistent for *s (glob) | |
533 | finalizing requirements file and making repository readable again |
|
535 | finalizing requirements file and making repository readable again | |
534 | removing temporary repository $TESTTMP/largefilesrepo/.hg/upgrade.* (glob) |
|
536 | removing temporary repository $TESTTMP/largefilesrepo/.hg/upgrade.* (glob) | |
535 | copy of old repository backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob) |
|
537 | copy of old repository backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob) | |
536 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified |
|
538 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | |
537 | $ cat .hg/requires |
|
539 | $ cat .hg/requires | |
538 | dotencode |
|
540 | dotencode | |
539 | fncache |
|
541 | fncache | |
540 | generaldelta |
|
542 | generaldelta | |
541 | largefiles |
|
543 | largefiles | |
542 | revlogv1 |
|
544 | revlogv1 | |
543 | store |
|
545 | store | |
544 |
|
546 | |||
545 | $ cat << EOF >> .hg/hgrc |
|
547 | $ cat << EOF >> .hg/hgrc | |
546 | > [extensions] |
|
548 | > [extensions] | |
547 | > lfs = |
|
549 | > lfs = | |
548 | > [lfs] |
|
550 | > [lfs] | |
549 | > threshold = 10 |
|
551 | > threshold = 10 | |
550 | > EOF |
|
552 | > EOF | |
551 | $ echo '123456789012345' > lfs.bin |
|
553 | $ echo '123456789012345' > lfs.bin | |
552 | $ hg ci -Am 'lfs.bin' |
|
554 | $ hg ci -Am 'lfs.bin' | |
553 | adding lfs.bin |
|
555 | adding lfs.bin | |
554 | $ grep lfs .hg/requires |
|
556 | $ grep lfs .hg/requires | |
555 | lfs |
|
557 | lfs | |
556 | $ find .hg/store/lfs -type f |
|
558 | $ find .hg/store/lfs -type f | |
557 | .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f |
|
559 | .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f | |
558 |
|
560 | |||
559 | $ hg debugupgraderepo --run |
|
561 | $ hg debugupgraderepo --run | |
560 | upgrade will perform the following actions: |
|
562 | upgrade will perform the following actions: | |
561 |
|
563 | |||
562 | requirements |
|
564 | requirements | |
563 | preserved: dotencode, fncache, generaldelta, largefiles, lfs, revlogv1, store |
|
565 | preserved: dotencode, fncache, generaldelta, largefiles, lfs, revlogv1, store | |
564 |
|
566 | |||
565 | beginning upgrade... |
|
567 | beginning upgrade... | |
566 | repository locked and read-only |
|
568 | repository locked and read-only | |
567 | creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob) |
|
569 | creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob) | |
568 | (it is safe to interrupt this process any time before data migration completes) |
|
570 | (it is safe to interrupt this process any time before data migration completes) | |
569 | migrating 6 total revisions (2 in filelogs, 2 in manifests, 2 in changelog) |
|
571 | migrating 6 total revisions (2 in filelogs, 2 in manifests, 2 in changelog) | |
570 | migrating 417 bytes in store; 467 bytes tracked data |
|
572 | migrating 417 bytes in store; 467 bytes tracked data | |
571 | migrating 2 filelogs containing 2 revisions (168 bytes in store; 182 bytes tracked data) |
|
573 | migrating 2 filelogs containing 2 revisions (168 bytes in store; 182 bytes tracked data) | |
572 | finished migrating 2 filelog revisions across 2 filelogs; change in size: 0 bytes |
|
574 | finished migrating 2 filelog revisions across 2 filelogs; change in size: 0 bytes | |
573 | migrating 1 manifests containing 2 revisions (113 bytes in store; 151 bytes tracked data) |
|
575 | migrating 1 manifests containing 2 revisions (113 bytes in store; 151 bytes tracked data) | |
574 | finished migrating 2 manifest revisions across 1 manifests; change in size: 0 bytes |
|
576 | finished migrating 2 manifest revisions across 1 manifests; change in size: 0 bytes | |
575 | migrating changelog containing 2 revisions (136 bytes in store; 134 bytes tracked data) |
|
577 | migrating changelog containing 2 revisions (136 bytes in store; 134 bytes tracked data) | |
576 | finished migrating 2 changelog revisions; change in size: 0 bytes |
|
578 | finished migrating 2 changelog revisions; change in size: 0 bytes | |
577 | finished migrating 6 total revisions; total change in store size: 0 bytes |
|
579 | finished migrating 6 total revisions; total change in store size: 0 bytes | |
578 | copying phaseroots |
|
580 | copying phaseroots | |
579 | copying lfs blob d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f |
|
581 | copying lfs blob d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f | |
580 | data fully migrated to temporary repository |
|
582 | data fully migrated to temporary repository | |
581 | marking source repository as being upgraded; clients will be unable to read from repository |
|
583 | marking source repository as being upgraded; clients will be unable to read from repository | |
582 | starting in-place swap of repository data |
|
584 | starting in-place swap of repository data | |
583 | replaced files will be backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob) |
|
585 | replaced files will be backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob) | |
584 | replacing store... |
|
586 | replacing store... | |
585 | store replacement complete; repository was inconsistent for *s (glob) |
|
587 | store replacement complete; repository was inconsistent for *s (glob) | |
586 | finalizing requirements file and making repository readable again |
|
588 | finalizing requirements file and making repository readable again | |
587 | removing temporary repository $TESTTMP/largefilesrepo/.hg/upgrade.* (glob) |
|
589 | removing temporary repository $TESTTMP/largefilesrepo/.hg/upgrade.* (glob) | |
588 | copy of old repository backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob) |
|
590 | copy of old repository backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob) | |
589 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified |
|
591 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | |
590 |
|
592 | |||
591 | $ grep lfs .hg/requires |
|
593 | $ grep lfs .hg/requires | |
592 | lfs |
|
594 | lfs | |
593 | $ find .hg/store/lfs -type f |
|
595 | $ find .hg/store/lfs -type f | |
594 | .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f |
|
596 | .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f | |
595 | $ hg verify |
|
597 | $ hg verify | |
596 | checking changesets |
|
598 | checking changesets | |
597 | checking manifests |
|
599 | checking manifests | |
598 | crosschecking files in changesets and manifests |
|
600 | crosschecking files in changesets and manifests | |
599 | checking files |
|
601 | checking files | |
600 | 2 files, 2 changesets, 2 total revisions |
|
602 | 2 files, 2 changesets, 2 total revisions | |
601 | $ hg debugdata lfs.bin 0 |
|
603 | $ hg debugdata lfs.bin 0 | |
602 | version https://git-lfs.github.com/spec/v1 |
|
604 | version https://git-lfs.github.com/spec/v1 | |
603 | oid sha256:d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f |
|
605 | oid sha256:d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f | |
604 | size 16 |
|
606 | size 16 | |
605 | x-is-binary 0 |
|
607 | x-is-binary 0 | |
606 |
|
608 | |||
607 | $ cd .. |
|
609 | $ cd .. | |
608 |
|
610 | |||
609 | repository config is taken in account |
|
611 | repository config is taken in account | |
610 | ------------------------------------- |
|
612 | ------------------------------------- | |
611 |
|
613 | |||
612 | $ cat << EOF >> $HGRCPATH |
|
614 | $ cat << EOF >> $HGRCPATH | |
613 | > [format] |
|
615 | > [format] | |
614 | > maxchainlen = 1 |
|
616 | > maxchainlen = 1 | |
615 | > EOF |
|
617 | > EOF | |
616 |
|
618 | |||
617 | $ hg init localconfig |
|
619 | $ hg init localconfig | |
618 | $ cd localconfig |
|
620 | $ cd localconfig | |
619 | $ cat << EOF > file |
|
621 | $ cat << EOF > file | |
620 | > some content |
|
622 | > some content | |
621 | > with some length |
|
623 | > with some length | |
622 | > to make sure we get a delta |
|
624 | > to make sure we get a delta | |
623 | > after changes |
|
625 | > after changes | |
624 | > very long |
|
626 | > very long | |
625 | > very long |
|
627 | > very long | |
626 | > very long |
|
628 | > very long | |
627 | > very long |
|
629 | > very long | |
628 | > very long |
|
630 | > very long | |
629 | > very long |
|
631 | > very long | |
630 | > very long |
|
632 | > very long | |
631 | > very long |
|
633 | > very long | |
632 | > very long |
|
634 | > very long | |
633 | > very long |
|
635 | > very long | |
634 | > very long |
|
636 | > very long | |
635 | > EOF |
|
637 | > EOF | |
636 | $ hg -q commit -A -m A |
|
638 | $ hg -q commit -A -m A | |
637 | $ echo "new line" >> file |
|
639 | $ echo "new line" >> file | |
638 | $ hg -q commit -m B |
|
640 | $ hg -q commit -m B | |
639 | $ echo "new line" >> file |
|
641 | $ echo "new line" >> file | |
640 | $ hg -q commit -m C |
|
642 | $ hg -q commit -m C | |
641 |
|
643 | |||
642 | $ cat << EOF >> .hg/hgrc |
|
644 | $ cat << EOF >> .hg/hgrc | |
643 | > [format] |
|
645 | > [format] | |
644 | > maxchainlen = 9001 |
|
646 | > maxchainlen = 9001 | |
645 | > EOF |
|
647 | > EOF | |
646 | $ hg config format |
|
648 | $ hg config format | |
647 | format.maxchainlen=9001 |
|
649 | format.maxchainlen=9001 | |
648 | $ hg debugdeltachain file |
|
650 | $ hg debugdeltachain file | |
649 | rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio |
|
651 | rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio | |
650 | 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 |
|
652 | 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 | |
651 | 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 |
|
653 | 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 | |
652 | 2 2 1 -1 base 84 200 84 0.42000 84 0 0.00000 |
|
654 | 2 2 1 -1 base 84 200 84 0.42000 84 0 0.00000 | |
653 |
|
655 | |||
654 | $ hg debugupgraderepo --run --optimize redeltaall |
|
656 | $ hg debugupgraderepo --run --optimize redeltaall | |
655 | upgrade will perform the following actions: |
|
657 | upgrade will perform the following actions: | |
656 |
|
658 | |||
657 | requirements |
|
659 | requirements | |
658 | preserved: dotencode, fncache, generaldelta, revlogv1, store |
|
660 | preserved: dotencode, fncache, generaldelta, revlogv1, store | |
659 |
|
661 | |||
660 | redeltaall |
|
662 | redeltaall | |
661 | deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time |
|
663 | deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time | |
662 |
|
664 | |||
663 | beginning upgrade... |
|
665 | beginning upgrade... | |
664 | repository locked and read-only |
|
666 | repository locked and read-only | |
665 | creating temporary repository to stage migrated data: $TESTTMP/localconfig/.hg/upgrade.* (glob) |
|
667 | creating temporary repository to stage migrated data: $TESTTMP/localconfig/.hg/upgrade.* (glob) | |
666 | (it is safe to interrupt this process any time before data migration completes) |
|
668 | (it is safe to interrupt this process any time before data migration completes) | |
667 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
669 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | |
668 | migrating 497 bytes in store; 882 bytes tracked data |
|
670 | migrating 497 bytes in store; 882 bytes tracked data | |
669 | migrating 1 filelogs containing 3 revisions (182 bytes in store; 573 bytes tracked data) |
|
671 | migrating 1 filelogs containing 3 revisions (182 bytes in store; 573 bytes tracked data) | |
670 | finished migrating 3 filelog revisions across 1 filelogs; change in size: -63 bytes |
|
672 | finished migrating 3 filelog revisions across 1 filelogs; change in size: -63 bytes | |
671 | migrating 1 manifests containing 3 revisions (141 bytes in store; 138 bytes tracked data) |
|
673 | migrating 1 manifests containing 3 revisions (141 bytes in store; 138 bytes tracked data) | |
672 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes |
|
674 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes | |
673 | migrating changelog containing 3 revisions (174 bytes in store; 171 bytes tracked data) |
|
675 | migrating changelog containing 3 revisions (174 bytes in store; 171 bytes tracked data) | |
674 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
676 | finished migrating 3 changelog revisions; change in size: 0 bytes | |
675 | finished migrating 9 total revisions; total change in store size: -63 bytes |
|
677 | finished migrating 9 total revisions; total change in store size: -63 bytes | |
676 | copying phaseroots |
|
678 | copying phaseroots | |
677 | data fully migrated to temporary repository |
|
679 | data fully migrated to temporary repository | |
678 | marking source repository as being upgraded; clients will be unable to read from repository |
|
680 | marking source repository as being upgraded; clients will be unable to read from repository | |
679 | starting in-place swap of repository data |
|
681 | starting in-place swap of repository data | |
680 | replaced files will be backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob) |
|
682 | replaced files will be backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob) | |
681 | replacing store... |
|
683 | replacing store... | |
682 | store replacement complete; repository was inconsistent for *s (glob) |
|
684 | store replacement complete; repository was inconsistent for *s (glob) | |
683 | finalizing requirements file and making repository readable again |
|
685 | finalizing requirements file and making repository readable again | |
684 | removing temporary repository $TESTTMP/localconfig/.hg/upgrade.* (glob) |
|
686 | removing temporary repository $TESTTMP/localconfig/.hg/upgrade.* (glob) | |
685 | copy of old repository backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob) |
|
687 | copy of old repository backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob) | |
686 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified |
|
688 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | |
687 | $ hg debugdeltachain file |
|
689 | $ hg debugdeltachain file | |
688 | rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio |
|
690 | rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio | |
689 | 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 |
|
691 | 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 | |
690 | 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 |
|
692 | 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 | |
691 | 2 1 3 1 p1 21 200 119 0.59500 119 0 0.00000 |
|
693 | 2 1 3 1 p1 21 200 119 0.59500 119 0 0.00000 | |
692 | $ cd .. |
|
694 | $ cd .. | |
693 |
|
695 | |||
694 | $ cat << EOF >> $HGRCPATH |
|
696 | $ cat << EOF >> $HGRCPATH | |
695 | > [format] |
|
697 | > [format] | |
696 | > maxchainlen = 9001 |
|
698 | > maxchainlen = 9001 | |
697 | > EOF |
|
699 | > EOF |
General Comments 0
You need to be logged in to leave comments.
Login now