Show More
@@ -1,1203 +1,1220 b'' | |||||
1 | # merge.py - directory-level update/merge handling for Mercurial |
|
1 | # merge.py - directory-level update/merge handling for Mercurial | |
2 | # |
|
2 | # | |
3 | # Copyright 2006, 2007 Matt Mackall <mpm@selenic.com> |
|
3 | # Copyright 2006, 2007 Matt Mackall <mpm@selenic.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 | from __future__ import absolute_import |
|
8 | from __future__ import absolute_import | |
9 |
|
9 | |||
10 | import errno |
|
10 | import errno | |
11 | import os |
|
11 | import os | |
12 | import shutil |
|
12 | import shutil | |
13 | import struct |
|
13 | import struct | |
14 |
|
14 | |||
15 | from .i18n import _ |
|
15 | from .i18n import _ | |
16 | from .node import ( |
|
16 | from .node import ( | |
17 | bin, |
|
17 | bin, | |
18 | hex, |
|
18 | hex, | |
19 | nullid, |
|
19 | nullid, | |
20 | nullrev, |
|
20 | nullrev, | |
21 | ) |
|
21 | ) | |
22 | from . import ( |
|
22 | from . import ( | |
23 | copies, |
|
23 | copies, | |
24 | destutil, |
|
24 | destutil, | |
25 | error, |
|
25 | error, | |
26 | filemerge, |
|
26 | filemerge, | |
27 | obsolete, |
|
27 | obsolete, | |
28 | subrepo, |
|
28 | subrepo, | |
29 | util, |
|
29 | util, | |
30 | worker, |
|
30 | worker, | |
31 | ) |
|
31 | ) | |
32 |
|
32 | |||
33 | _pack = struct.pack |
|
33 | _pack = struct.pack | |
34 | _unpack = struct.unpack |
|
34 | _unpack = struct.unpack | |
35 |
|
35 | |||
36 | def _droponode(data): |
|
36 | def _droponode(data): | |
37 | # used for compatibility for v1 |
|
37 | # used for compatibility for v1 | |
38 | bits = data.split('\0') |
|
38 | bits = data.split('\0') | |
39 | bits = bits[:-2] + bits[-1:] |
|
39 | bits = bits[:-2] + bits[-1:] | |
40 | return '\0'.join(bits) |
|
40 | return '\0'.join(bits) | |
41 |
|
41 | |||
42 | class mergestate(object): |
|
42 | class mergestate(object): | |
43 | '''track 3-way merge state of individual files |
|
43 | '''track 3-way merge state of individual files | |
44 |
|
44 | |||
45 | it is stored on disk when needed. Two file are used, one with an old |
|
45 | it is stored on disk when needed. Two file are used, one with an old | |
46 | format, one with a new format. Both contains similar data, but the new |
|
46 | format, one with a new format. Both contains similar data, but the new | |
47 | format can store new kinds of field. |
|
47 | format can store new kinds of field. | |
48 |
|
48 | |||
49 | Current new format is a list of arbitrary record of the form: |
|
49 | Current new format is a list of arbitrary record of the form: | |
50 |
|
50 | |||
51 | [type][length][content] |
|
51 | [type][length][content] | |
52 |
|
52 | |||
53 | Type is a single character, length is a 4 bytes integer, content is an |
|
53 | Type is a single character, length is a 4 bytes integer, content is an | |
54 | arbitrary suites of bytes of length `length`. |
|
54 | arbitrary suites of bytes of length `length`. | |
55 |
|
55 | |||
56 | Type should be a letter. Capital letter are mandatory record, Mercurial |
|
56 | Type should be a letter. Capital letter are mandatory record, Mercurial | |
57 | should abort if they are unknown. lower case record can be safely ignored. |
|
57 | should abort if they are unknown. lower case record can be safely ignored. | |
58 |
|
58 | |||
59 | Currently known record: |
|
59 | Currently known record: | |
60 |
|
60 | |||
61 | L: the node of the "local" part of the merge (hexified version) |
|
61 | L: the node of the "local" part of the merge (hexified version) | |
62 | O: the node of the "other" part of the merge (hexified version) |
|
62 | O: the node of the "other" part of the merge (hexified version) | |
63 | F: a file to be merged entry |
|
63 | F: a file to be merged entry | |
64 | ''' |
|
64 | ''' | |
65 | statepathv1 = 'merge/state' |
|
65 | statepathv1 = 'merge/state' | |
66 | statepathv2 = 'merge/state2' |
|
66 | statepathv2 = 'merge/state2' | |
67 |
|
67 | |||
68 | def __init__(self, repo): |
|
68 | def __init__(self, repo): | |
69 | self._repo = repo |
|
69 | self._repo = repo | |
70 | self._dirty = False |
|
70 | self._dirty = False | |
71 | self._read() |
|
71 | self._read() | |
72 |
|
72 | |||
73 | def reset(self, node=None, other=None): |
|
73 | def reset(self, node=None, other=None): | |
74 | self._state = {} |
|
74 | self._state = {} | |
75 | self._local = None |
|
75 | self._local = None | |
76 | self._other = None |
|
76 | self._other = None | |
77 | if node: |
|
77 | if node: | |
78 | self._local = node |
|
78 | self._local = node | |
79 | self._other = other |
|
79 | self._other = other | |
80 | shutil.rmtree(self._repo.join('merge'), True) |
|
80 | shutil.rmtree(self._repo.join('merge'), True) | |
81 | self._dirty = False |
|
81 | self._dirty = False | |
82 |
|
82 | |||
83 | def _read(self): |
|
83 | def _read(self): | |
84 | """Analyse each record content to restore a serialized state from disk |
|
84 | """Analyse each record content to restore a serialized state from disk | |
85 |
|
85 | |||
86 | This function process "record" entry produced by the de-serialization |
|
86 | This function process "record" entry produced by the de-serialization | |
87 | of on disk file. |
|
87 | of on disk file. | |
88 | """ |
|
88 | """ | |
89 | self._state = {} |
|
89 | self._state = {} | |
90 | self._local = None |
|
90 | self._local = None | |
91 | self._other = None |
|
91 | self._other = None | |
92 | records = self._readrecords() |
|
92 | records = self._readrecords() | |
93 | for rtype, record in records: |
|
93 | for rtype, record in records: | |
94 | if rtype == 'L': |
|
94 | if rtype == 'L': | |
95 | self._local = bin(record) |
|
95 | self._local = bin(record) | |
96 | elif rtype == 'O': |
|
96 | elif rtype == 'O': | |
97 | self._other = bin(record) |
|
97 | self._other = bin(record) | |
98 | elif rtype == 'F': |
|
98 | elif rtype == 'F': | |
99 | bits = record.split('\0') |
|
99 | bits = record.split('\0') | |
100 | self._state[bits[0]] = bits[1:] |
|
100 | self._state[bits[0]] = bits[1:] | |
101 | elif not rtype.islower(): |
|
101 | elif not rtype.islower(): | |
102 | raise error.Abort(_('unsupported merge state record: %s') |
|
102 | raise error.Abort(_('unsupported merge state record: %s') | |
103 | % rtype) |
|
103 | % rtype) | |
104 | self._dirty = False |
|
104 | self._dirty = False | |
105 |
|
105 | |||
106 | def _readrecords(self): |
|
106 | def _readrecords(self): | |
107 | """Read merge state from disk and return a list of record (TYPE, data) |
|
107 | """Read merge state from disk and return a list of record (TYPE, data) | |
108 |
|
108 | |||
109 | We read data from both v1 and v2 files and decide which one to use. |
|
109 | We read data from both v1 and v2 files and decide which one to use. | |
110 |
|
110 | |||
111 | V1 has been used by version prior to 2.9.1 and contains less data than |
|
111 | V1 has been used by version prior to 2.9.1 and contains less data than | |
112 | v2. We read both versions and check if no data in v2 contradicts |
|
112 | v2. We read both versions and check if no data in v2 contradicts | |
113 | v1. If there is not contradiction we can safely assume that both v1 |
|
113 | v1. If there is not contradiction we can safely assume that both v1 | |
114 | and v2 were written at the same time and use the extract data in v2. If |
|
114 | and v2 were written at the same time and use the extract data in v2. If | |
115 | there is contradiction we ignore v2 content as we assume an old version |
|
115 | there is contradiction we ignore v2 content as we assume an old version | |
116 | of Mercurial has overwritten the mergestate file and left an old v2 |
|
116 | of Mercurial has overwritten the mergestate file and left an old v2 | |
117 | file around. |
|
117 | file around. | |
118 |
|
118 | |||
119 | returns list of record [(TYPE, data), ...]""" |
|
119 | returns list of record [(TYPE, data), ...]""" | |
120 | v1records = self._readrecordsv1() |
|
120 | v1records = self._readrecordsv1() | |
121 | v2records = self._readrecordsv2() |
|
121 | v2records = self._readrecordsv2() | |
122 | if self._v1v2match(v1records, v2records): |
|
122 | if self._v1v2match(v1records, v2records): | |
123 | return v2records |
|
123 | return v2records | |
124 | else: |
|
124 | else: | |
125 | # v1 file is newer than v2 file, use it |
|
125 | # v1 file is newer than v2 file, use it | |
126 | # we have to infer the "other" changeset of the merge |
|
126 | # we have to infer the "other" changeset of the merge | |
127 | # we cannot do better than that with v1 of the format |
|
127 | # we cannot do better than that with v1 of the format | |
128 | mctx = self._repo[None].parents()[-1] |
|
128 | mctx = self._repo[None].parents()[-1] | |
129 | v1records.append(('O', mctx.hex())) |
|
129 | v1records.append(('O', mctx.hex())) | |
130 | # add place holder "other" file node information |
|
130 | # add place holder "other" file node information | |
131 | # nobody is using it yet so we do no need to fetch the data |
|
131 | # nobody is using it yet so we do no need to fetch the data | |
132 | # if mctx was wrong `mctx[bits[-2]]` may fails. |
|
132 | # if mctx was wrong `mctx[bits[-2]]` may fails. | |
133 | for idx, r in enumerate(v1records): |
|
133 | for idx, r in enumerate(v1records): | |
134 | if r[0] == 'F': |
|
134 | if r[0] == 'F': | |
135 | bits = r[1].split('\0') |
|
135 | bits = r[1].split('\0') | |
136 | bits.insert(-2, '') |
|
136 | bits.insert(-2, '') | |
137 | v1records[idx] = (r[0], '\0'.join(bits)) |
|
137 | v1records[idx] = (r[0], '\0'.join(bits)) | |
138 | return v1records |
|
138 | return v1records | |
139 |
|
139 | |||
140 | def _v1v2match(self, v1records, v2records): |
|
140 | def _v1v2match(self, v1records, v2records): | |
141 | oldv2 = set() # old format version of v2 record |
|
141 | oldv2 = set() # old format version of v2 record | |
142 | for rec in v2records: |
|
142 | for rec in v2records: | |
143 | if rec[0] == 'L': |
|
143 | if rec[0] == 'L': | |
144 | oldv2.add(rec) |
|
144 | oldv2.add(rec) | |
145 | elif rec[0] == 'F': |
|
145 | elif rec[0] == 'F': | |
146 | # drop the onode data (not contained in v1) |
|
146 | # drop the onode data (not contained in v1) | |
147 | oldv2.add(('F', _droponode(rec[1]))) |
|
147 | oldv2.add(('F', _droponode(rec[1]))) | |
148 | for rec in v1records: |
|
148 | for rec in v1records: | |
149 | if rec not in oldv2: |
|
149 | if rec not in oldv2: | |
150 | return False |
|
150 | return False | |
151 | else: |
|
151 | else: | |
152 | return True |
|
152 | return True | |
153 |
|
153 | |||
154 | def _readrecordsv1(self): |
|
154 | def _readrecordsv1(self): | |
155 | """read on disk merge state for version 1 file |
|
155 | """read on disk merge state for version 1 file | |
156 |
|
156 | |||
157 | returns list of record [(TYPE, data), ...] |
|
157 | returns list of record [(TYPE, data), ...] | |
158 |
|
158 | |||
159 | Note: the "F" data from this file are one entry short |
|
159 | Note: the "F" data from this file are one entry short | |
160 | (no "other file node" entry) |
|
160 | (no "other file node" entry) | |
161 | """ |
|
161 | """ | |
162 | records = [] |
|
162 | records = [] | |
163 | try: |
|
163 | try: | |
164 | f = self._repo.vfs(self.statepathv1) |
|
164 | f = self._repo.vfs(self.statepathv1) | |
165 | for i, l in enumerate(f): |
|
165 | for i, l in enumerate(f): | |
166 | if i == 0: |
|
166 | if i == 0: | |
167 | records.append(('L', l[:-1])) |
|
167 | records.append(('L', l[:-1])) | |
168 | else: |
|
168 | else: | |
169 | records.append(('F', l[:-1])) |
|
169 | records.append(('F', l[:-1])) | |
170 | f.close() |
|
170 | f.close() | |
171 | except IOError as err: |
|
171 | except IOError as err: | |
172 | if err.errno != errno.ENOENT: |
|
172 | if err.errno != errno.ENOENT: | |
173 | raise |
|
173 | raise | |
174 | return records |
|
174 | return records | |
175 |
|
175 | |||
176 | def _readrecordsv2(self): |
|
176 | def _readrecordsv2(self): | |
177 | """read on disk merge state for version 2 file |
|
177 | """read on disk merge state for version 2 file | |
178 |
|
178 | |||
179 | returns list of record [(TYPE, data), ...] |
|
179 | returns list of record [(TYPE, data), ...] | |
180 | """ |
|
180 | """ | |
181 | records = [] |
|
181 | records = [] | |
182 | try: |
|
182 | try: | |
183 | f = self._repo.vfs(self.statepathv2) |
|
183 | f = self._repo.vfs(self.statepathv2) | |
184 | data = f.read() |
|
184 | data = f.read() | |
185 | off = 0 |
|
185 | off = 0 | |
186 | end = len(data) |
|
186 | end = len(data) | |
187 | while off < end: |
|
187 | while off < end: | |
188 | rtype = data[off] |
|
188 | rtype = data[off] | |
189 | off += 1 |
|
189 | off += 1 | |
190 | length = _unpack('>I', data[off:(off + 4)])[0] |
|
190 | length = _unpack('>I', data[off:(off + 4)])[0] | |
191 | off += 4 |
|
191 | off += 4 | |
192 | record = data[off:(off + length)] |
|
192 | record = data[off:(off + length)] | |
193 | off += length |
|
193 | off += length | |
194 | records.append((rtype, record)) |
|
194 | records.append((rtype, record)) | |
195 | f.close() |
|
195 | f.close() | |
196 | except IOError as err: |
|
196 | except IOError as err: | |
197 | if err.errno != errno.ENOENT: |
|
197 | if err.errno != errno.ENOENT: | |
198 | raise |
|
198 | raise | |
199 | return records |
|
199 | return records | |
200 |
|
200 | |||
201 | def active(self): |
|
201 | def active(self): | |
202 | """Whether mergestate is active. |
|
202 | """Whether mergestate is active. | |
203 |
|
203 | |||
204 | Returns True if there appears to be mergestate. This is a rough proxy |
|
204 | Returns True if there appears to be mergestate. This is a rough proxy | |
205 | for "is a merge in progress." |
|
205 | for "is a merge in progress." | |
206 | """ |
|
206 | """ | |
207 | # Check local variables before looking at filesystem for performance |
|
207 | # Check local variables before looking at filesystem for performance | |
208 | # reasons. |
|
208 | # reasons. | |
209 | return bool(self._local) or bool(self._state) or \ |
|
209 | return bool(self._local) or bool(self._state) or \ | |
210 | self._repo.vfs.exists(self.statepathv1) or \ |
|
210 | self._repo.vfs.exists(self.statepathv1) or \ | |
211 | self._repo.vfs.exists(self.statepathv2) |
|
211 | self._repo.vfs.exists(self.statepathv2) | |
212 |
|
212 | |||
213 | def commit(self): |
|
213 | def commit(self): | |
214 | """Write current state on disk (if necessary)""" |
|
214 | """Write current state on disk (if necessary)""" | |
215 | if self._dirty: |
|
215 | if self._dirty: | |
216 | records = [] |
|
216 | records = [] | |
217 | records.append(('L', hex(self._local))) |
|
217 | records.append(('L', hex(self._local))) | |
218 | records.append(('O', hex(self._other))) |
|
218 | records.append(('O', hex(self._other))) | |
219 | for d, v in self._state.iteritems(): |
|
219 | for d, v in self._state.iteritems(): | |
220 | records.append(('F', '\0'.join([d] + v))) |
|
220 | records.append(('F', '\0'.join([d] + v))) | |
221 | self._writerecords(records) |
|
221 | self._writerecords(records) | |
222 | self._dirty = False |
|
222 | self._dirty = False | |
223 |
|
223 | |||
224 | def _writerecords(self, records): |
|
224 | def _writerecords(self, records): | |
225 | """Write current state on disk (both v1 and v2)""" |
|
225 | """Write current state on disk (both v1 and v2)""" | |
226 | self._writerecordsv1(records) |
|
226 | self._writerecordsv1(records) | |
227 | self._writerecordsv2(records) |
|
227 | self._writerecordsv2(records) | |
228 |
|
228 | |||
229 | def _writerecordsv1(self, records): |
|
229 | def _writerecordsv1(self, records): | |
230 | """Write current state on disk in a version 1 file""" |
|
230 | """Write current state on disk in a version 1 file""" | |
231 | f = self._repo.vfs(self.statepathv1, 'w') |
|
231 | f = self._repo.vfs(self.statepathv1, 'w') | |
232 | irecords = iter(records) |
|
232 | irecords = iter(records) | |
233 | lrecords = irecords.next() |
|
233 | lrecords = irecords.next() | |
234 | assert lrecords[0] == 'L' |
|
234 | assert lrecords[0] == 'L' | |
235 | f.write(hex(self._local) + '\n') |
|
235 | f.write(hex(self._local) + '\n') | |
236 | for rtype, data in irecords: |
|
236 | for rtype, data in irecords: | |
237 | if rtype == 'F': |
|
237 | if rtype == 'F': | |
238 | f.write('%s\n' % _droponode(data)) |
|
238 | f.write('%s\n' % _droponode(data)) | |
239 | f.close() |
|
239 | f.close() | |
240 |
|
240 | |||
241 | def _writerecordsv2(self, records): |
|
241 | def _writerecordsv2(self, records): | |
242 | """Write current state on disk in a version 2 file""" |
|
242 | """Write current state on disk in a version 2 file""" | |
243 | f = self._repo.vfs(self.statepathv2, 'w') |
|
243 | f = self._repo.vfs(self.statepathv2, 'w') | |
244 | for key, data in records: |
|
244 | for key, data in records: | |
245 | assert len(key) == 1 |
|
245 | assert len(key) == 1 | |
246 | format = '>sI%is' % len(data) |
|
246 | format = '>sI%is' % len(data) | |
247 | f.write(_pack(format, key, len(data), data)) |
|
247 | f.write(_pack(format, key, len(data), data)) | |
248 | f.close() |
|
248 | f.close() | |
249 |
|
249 | |||
250 | def add(self, fcl, fco, fca, fd): |
|
250 | def add(self, fcl, fco, fca, fd): | |
251 | """add a new (potentially?) conflicting file the merge state |
|
251 | """add a new (potentially?) conflicting file the merge state | |
252 | fcl: file context for local, |
|
252 | fcl: file context for local, | |
253 | fco: file context for remote, |
|
253 | fco: file context for remote, | |
254 | fca: file context for ancestors, |
|
254 | fca: file context for ancestors, | |
255 | fd: file path of the resulting merge. |
|
255 | fd: file path of the resulting merge. | |
256 |
|
256 | |||
257 | note: also write the local version to the `.hg/merge` directory. |
|
257 | note: also write the local version to the `.hg/merge` directory. | |
258 | """ |
|
258 | """ | |
259 | hash = util.sha1(fcl.path()).hexdigest() |
|
259 | hash = util.sha1(fcl.path()).hexdigest() | |
260 | self._repo.vfs.write('merge/' + hash, fcl.data()) |
|
260 | self._repo.vfs.write('merge/' + hash, fcl.data()) | |
261 | self._state[fd] = ['u', hash, fcl.path(), |
|
261 | self._state[fd] = ['u', hash, fcl.path(), | |
262 | fca.path(), hex(fca.filenode()), |
|
262 | fca.path(), hex(fca.filenode()), | |
263 | fco.path(), hex(fco.filenode()), |
|
263 | fco.path(), hex(fco.filenode()), | |
264 | fcl.flags()] |
|
264 | fcl.flags()] | |
265 | self._dirty = True |
|
265 | self._dirty = True | |
266 |
|
266 | |||
267 | def __contains__(self, dfile): |
|
267 | def __contains__(self, dfile): | |
268 | return dfile in self._state |
|
268 | return dfile in self._state | |
269 |
|
269 | |||
270 | def __getitem__(self, dfile): |
|
270 | def __getitem__(self, dfile): | |
271 | return self._state[dfile][0] |
|
271 | return self._state[dfile][0] | |
272 |
|
272 | |||
273 | def __iter__(self): |
|
273 | def __iter__(self): | |
274 | return iter(sorted(self._state)) |
|
274 | return iter(sorted(self._state)) | |
275 |
|
275 | |||
276 | def files(self): |
|
276 | def files(self): | |
277 | return self._state.keys() |
|
277 | return self._state.keys() | |
278 |
|
278 | |||
279 | def mark(self, dfile, state): |
|
279 | def mark(self, dfile, state): | |
280 | self._state[dfile][0] = state |
|
280 | self._state[dfile][0] = state | |
281 | self._dirty = True |
|
281 | self._dirty = True | |
282 |
|
282 | |||
283 | def unresolved(self): |
|
283 | def unresolved(self): | |
284 | """Obtain the paths of unresolved files.""" |
|
284 | """Obtain the paths of unresolved files.""" | |
285 |
|
285 | |||
286 | for f, entry in self._state.items(): |
|
286 | for f, entry in self._state.items(): | |
287 | if entry[0] == 'u': |
|
287 | if entry[0] == 'u': | |
288 | yield f |
|
288 | yield f | |
289 |
|
289 | |||
290 | def _resolve(self, preresolve, dfile, wctx, labels=None): |
|
290 | def _resolve(self, preresolve, dfile, wctx, labels=None): | |
291 | """rerun merge process for file path `dfile`""" |
|
291 | """rerun merge process for file path `dfile`""" | |
292 | if self[dfile] == 'r': |
|
292 | if self[dfile] == 'r': | |
293 | return True, 0 |
|
293 | return True, 0 | |
294 | stateentry = self._state[dfile] |
|
294 | stateentry = self._state[dfile] | |
295 | state, hash, lfile, afile, anode, ofile, onode, flags = stateentry |
|
295 | state, hash, lfile, afile, anode, ofile, onode, flags = stateentry | |
296 | octx = self._repo[self._other] |
|
296 | octx = self._repo[self._other] | |
297 | fcd = wctx[dfile] |
|
297 | fcd = wctx[dfile] | |
298 | fco = octx[ofile] |
|
298 | fco = octx[ofile] | |
299 | fca = self._repo.filectx(afile, fileid=anode) |
|
299 | fca = self._repo.filectx(afile, fileid=anode) | |
300 | # "premerge" x flags |
|
300 | # "premerge" x flags | |
301 | flo = fco.flags() |
|
301 | flo = fco.flags() | |
302 | fla = fca.flags() |
|
302 | fla = fca.flags() | |
303 | if 'x' in flags + flo + fla and 'l' not in flags + flo + fla: |
|
303 | if 'x' in flags + flo + fla and 'l' not in flags + flo + fla: | |
304 | if fca.node() == nullid: |
|
304 | if fca.node() == nullid: | |
305 | if preresolve: |
|
305 | if preresolve: | |
306 | self._repo.ui.warn( |
|
306 | self._repo.ui.warn( | |
307 | _('warning: cannot merge flags for %s\n') % afile) |
|
307 | _('warning: cannot merge flags for %s\n') % afile) | |
308 | elif flags == fla: |
|
308 | elif flags == fla: | |
309 | flags = flo |
|
309 | flags = flo | |
310 | if preresolve: |
|
310 | if preresolve: | |
311 | # restore local |
|
311 | # restore local | |
312 | f = self._repo.vfs('merge/' + hash) |
|
312 | f = self._repo.vfs('merge/' + hash) | |
313 | self._repo.wwrite(dfile, f.read(), flags) |
|
313 | self._repo.wwrite(dfile, f.read(), flags) | |
314 | f.close() |
|
314 | f.close() | |
315 | complete, r = filemerge.premerge(self._repo, self._local, lfile, |
|
315 | complete, r = filemerge.premerge(self._repo, self._local, lfile, | |
316 | fcd, fco, fca, labels=labels) |
|
316 | fcd, fco, fca, labels=labels) | |
317 | else: |
|
317 | else: | |
318 | complete, r = filemerge.filemerge(self._repo, self._local, lfile, |
|
318 | complete, r = filemerge.filemerge(self._repo, self._local, lfile, | |
319 | fcd, fco, fca, labels=labels) |
|
319 | fcd, fco, fca, labels=labels) | |
320 | if r is None: |
|
320 | if r is None: | |
321 | # no real conflict |
|
321 | # no real conflict | |
322 | del self._state[dfile] |
|
322 | del self._state[dfile] | |
323 | self._dirty = True |
|
323 | self._dirty = True | |
324 | elif not r: |
|
324 | elif not r: | |
325 | self.mark(dfile, 'r') |
|
325 | self.mark(dfile, 'r') | |
326 | return complete, r |
|
326 | return complete, r | |
327 |
|
327 | |||
328 | def preresolve(self, dfile, wctx, labels=None): |
|
328 | def preresolve(self, dfile, wctx, labels=None): | |
329 | return self._resolve(True, dfile, wctx, labels=labels) |
|
329 | return self._resolve(True, dfile, wctx, labels=labels) | |
330 |
|
330 | |||
331 | def resolve(self, dfile, wctx, labels=None): |
|
331 | def resolve(self, dfile, wctx, labels=None): | |
332 | """rerun merge process for file path `dfile`""" |
|
332 | """rerun merge process for file path `dfile`""" | |
333 | return self._resolve(False, dfile, wctx, labels=labels)[1] |
|
333 | return self._resolve(False, dfile, wctx, labels=labels)[1] | |
334 |
|
334 | |||
335 | def _checkunknownfile(repo, wctx, mctx, f, f2=None): |
|
335 | def _checkunknownfile(repo, wctx, mctx, f, f2=None): | |
336 | if f2 is None: |
|
336 | if f2 is None: | |
337 | f2 = f |
|
337 | f2 = f | |
338 | return (os.path.isfile(repo.wjoin(f)) |
|
338 | return (os.path.isfile(repo.wjoin(f)) | |
339 | and repo.wvfs.audit.check(f) |
|
339 | and repo.wvfs.audit.check(f) | |
340 | and repo.dirstate.normalize(f) not in repo.dirstate |
|
340 | and repo.dirstate.normalize(f) not in repo.dirstate | |
341 | and mctx[f2].cmp(wctx[f])) |
|
341 | and mctx[f2].cmp(wctx[f])) | |
342 |
|
342 | |||
343 | def _checkunknownfiles(repo, wctx, mctx, force, actions): |
|
343 | def _checkunknownfiles(repo, wctx, mctx, force, actions): | |
344 | """ |
|
344 | """ | |
345 | Considers any actions that care about the presence of conflicting unknown |
|
345 | Considers any actions that care about the presence of conflicting unknown | |
346 | files. For some actions, the result is to abort; for others, it is to |
|
346 | files. For some actions, the result is to abort; for others, it is to | |
347 | choose a different action. |
|
347 | choose a different action. | |
348 | """ |
|
348 | """ | |
349 | aborts = [] |
|
349 | aborts = [] | |
350 | if not force: |
|
350 | if not force: | |
351 | for f, (m, args, msg) in actions.iteritems(): |
|
351 | for f, (m, args, msg) in actions.iteritems(): | |
352 | if m in ('c', 'dc'): |
|
352 | if m in ('c', 'dc'): | |
353 | if _checkunknownfile(repo, wctx, mctx, f): |
|
353 | if _checkunknownfile(repo, wctx, mctx, f): | |
354 | aborts.append(f) |
|
354 | aborts.append(f) | |
355 | elif m == 'dg': |
|
355 | elif m == 'dg': | |
356 | if _checkunknownfile(repo, wctx, mctx, f, args[0]): |
|
356 | if _checkunknownfile(repo, wctx, mctx, f, args[0]): | |
357 | aborts.append(f) |
|
357 | aborts.append(f) | |
358 |
|
358 | |||
359 | for f in sorted(aborts): |
|
359 | for f in sorted(aborts): | |
360 | repo.ui.warn(_("%s: untracked file differs\n") % f) |
|
360 | repo.ui.warn(_("%s: untracked file differs\n") % f) | |
361 | if aborts: |
|
361 | if aborts: | |
362 | raise error.Abort(_("untracked files in working directory differ " |
|
362 | raise error.Abort(_("untracked files in working directory differ " | |
363 | "from files in requested revision")) |
|
363 | "from files in requested revision")) | |
364 |
|
364 | |||
365 | for f, (m, args, msg) in actions.iteritems(): |
|
365 | for f, (m, args, msg) in actions.iteritems(): | |
366 | if m == 'c': |
|
366 | if m == 'c': | |
367 | actions[f] = ('g', args, msg) |
|
367 | actions[f] = ('g', args, msg) | |
368 | elif m == 'cm': |
|
368 | elif m == 'cm': | |
369 | fl2, anc = args |
|
369 | fl2, anc = args | |
370 | different = _checkunknownfile(repo, wctx, mctx, f) |
|
370 | different = _checkunknownfile(repo, wctx, mctx, f) | |
371 | if different: |
|
371 | if different: | |
372 | actions[f] = ('m', (f, f, None, False, anc), |
|
372 | actions[f] = ('m', (f, f, None, False, anc), | |
373 | "remote differs from untracked local") |
|
373 | "remote differs from untracked local") | |
374 | else: |
|
374 | else: | |
375 | actions[f] = ('g', (fl2,), "remote created") |
|
375 | actions[f] = ('g', (fl2,), "remote created") | |
376 |
|
376 | |||
377 | def _forgetremoved(wctx, mctx, branchmerge): |
|
377 | def _forgetremoved(wctx, mctx, branchmerge): | |
378 | """ |
|
378 | """ | |
379 | Forget removed files |
|
379 | Forget removed files | |
380 |
|
380 | |||
381 | If we're jumping between revisions (as opposed to merging), and if |
|
381 | If we're jumping between revisions (as opposed to merging), and if | |
382 | neither the working directory nor the target rev has the file, |
|
382 | neither the working directory nor the target rev has the file, | |
383 | then we need to remove it from the dirstate, to prevent the |
|
383 | then we need to remove it from the dirstate, to prevent the | |
384 | dirstate from listing the file when it is no longer in the |
|
384 | dirstate from listing the file when it is no longer in the | |
385 | manifest. |
|
385 | manifest. | |
386 |
|
386 | |||
387 | If we're merging, and the other revision has removed a file |
|
387 | If we're merging, and the other revision has removed a file | |
388 | that is not present in the working directory, we need to mark it |
|
388 | that is not present in the working directory, we need to mark it | |
389 | as removed. |
|
389 | as removed. | |
390 | """ |
|
390 | """ | |
391 |
|
391 | |||
392 | actions = {} |
|
392 | actions = {} | |
393 | m = 'f' |
|
393 | m = 'f' | |
394 | if branchmerge: |
|
394 | if branchmerge: | |
395 | m = 'r' |
|
395 | m = 'r' | |
396 | for f in wctx.deleted(): |
|
396 | for f in wctx.deleted(): | |
397 | if f not in mctx: |
|
397 | if f not in mctx: | |
398 | actions[f] = m, None, "forget deleted" |
|
398 | actions[f] = m, None, "forget deleted" | |
399 |
|
399 | |||
400 | if not branchmerge: |
|
400 | if not branchmerge: | |
401 | for f in wctx.removed(): |
|
401 | for f in wctx.removed(): | |
402 | if f not in mctx: |
|
402 | if f not in mctx: | |
403 | actions[f] = 'f', None, "forget removed" |
|
403 | actions[f] = 'f', None, "forget removed" | |
404 |
|
404 | |||
405 | return actions |
|
405 | return actions | |
406 |
|
406 | |||
407 | def _checkcollision(repo, wmf, actions): |
|
407 | def _checkcollision(repo, wmf, actions): | |
408 | # build provisional merged manifest up |
|
408 | # build provisional merged manifest up | |
409 | pmmf = set(wmf) |
|
409 | pmmf = set(wmf) | |
410 |
|
410 | |||
411 | if actions: |
|
411 | if actions: | |
412 | # k, dr, e and rd are no-op |
|
412 | # k, dr, e and rd are no-op | |
413 | for m in 'a', 'f', 'g', 'cd', 'dc': |
|
413 | for m in 'a', 'f', 'g', 'cd', 'dc': | |
414 | for f, args, msg in actions[m]: |
|
414 | for f, args, msg in actions[m]: | |
415 | pmmf.add(f) |
|
415 | pmmf.add(f) | |
416 | for f, args, msg in actions['r']: |
|
416 | for f, args, msg in actions['r']: | |
417 | pmmf.discard(f) |
|
417 | pmmf.discard(f) | |
418 | for f, args, msg in actions['dm']: |
|
418 | for f, args, msg in actions['dm']: | |
419 | f2, flags = args |
|
419 | f2, flags = args | |
420 | pmmf.discard(f2) |
|
420 | pmmf.discard(f2) | |
421 | pmmf.add(f) |
|
421 | pmmf.add(f) | |
422 | for f, args, msg in actions['dg']: |
|
422 | for f, args, msg in actions['dg']: | |
423 | pmmf.add(f) |
|
423 | pmmf.add(f) | |
424 | for f, args, msg in actions['m']: |
|
424 | for f, args, msg in actions['m']: | |
425 | f1, f2, fa, move, anc = args |
|
425 | f1, f2, fa, move, anc = args | |
426 | if move: |
|
426 | if move: | |
427 | pmmf.discard(f1) |
|
427 | pmmf.discard(f1) | |
428 | pmmf.add(f) |
|
428 | pmmf.add(f) | |
429 |
|
429 | |||
430 | # check case-folding collision in provisional merged manifest |
|
430 | # check case-folding collision in provisional merged manifest | |
431 | foldmap = {} |
|
431 | foldmap = {} | |
432 | for f in sorted(pmmf): |
|
432 | for f in sorted(pmmf): | |
433 | fold = util.normcase(f) |
|
433 | fold = util.normcase(f) | |
434 | if fold in foldmap: |
|
434 | if fold in foldmap: | |
435 | raise error.Abort(_("case-folding collision between %s and %s") |
|
435 | raise error.Abort(_("case-folding collision between %s and %s") | |
436 | % (f, foldmap[fold])) |
|
436 | % (f, foldmap[fold])) | |
437 | foldmap[fold] = f |
|
437 | foldmap[fold] = f | |
438 |
|
438 | |||
439 | def manifestmerge(repo, wctx, p2, pa, branchmerge, force, partial, |
|
439 | def manifestmerge(repo, wctx, p2, pa, branchmerge, force, partial, | |
440 | acceptremote, followcopies): |
|
440 | acceptremote, followcopies): | |
441 | """ |
|
441 | """ | |
442 | Merge p1 and p2 with ancestor pa and generate merge action list |
|
442 | Merge p1 and p2 with ancestor pa and generate merge action list | |
443 |
|
443 | |||
444 | branchmerge and force are as passed in to update |
|
444 | branchmerge and force are as passed in to update | |
445 | partial = function to filter file lists |
|
445 | partial = function to filter file lists | |
446 | acceptremote = accept the incoming changes without prompting |
|
446 | acceptremote = accept the incoming changes without prompting | |
447 | """ |
|
447 | """ | |
448 |
|
448 | |||
449 | copy, movewithdir, diverge, renamedelete = {}, {}, {}, {} |
|
449 | copy, movewithdir, diverge, renamedelete = {}, {}, {}, {} | |
450 |
|
450 | |||
451 | # manifests fetched in order are going to be faster, so prime the caches |
|
451 | # manifests fetched in order are going to be faster, so prime the caches | |
452 | [x.manifest() for x in |
|
452 | [x.manifest() for x in | |
453 | sorted(wctx.parents() + [p2, pa], key=lambda x: x.rev())] |
|
453 | sorted(wctx.parents() + [p2, pa], key=lambda x: x.rev())] | |
454 |
|
454 | |||
455 | if followcopies: |
|
455 | if followcopies: | |
456 | ret = copies.mergecopies(repo, wctx, p2, pa) |
|
456 | ret = copies.mergecopies(repo, wctx, p2, pa) | |
457 | copy, movewithdir, diverge, renamedelete = ret |
|
457 | copy, movewithdir, diverge, renamedelete = ret | |
458 |
|
458 | |||
459 | repo.ui.note(_("resolving manifests\n")) |
|
459 | repo.ui.note(_("resolving manifests\n")) | |
460 | repo.ui.debug(" branchmerge: %s, force: %s, partial: %s\n" |
|
460 | repo.ui.debug(" branchmerge: %s, force: %s, partial: %s\n" | |
461 | % (bool(branchmerge), bool(force), bool(partial))) |
|
461 | % (bool(branchmerge), bool(force), bool(partial))) | |
462 | repo.ui.debug(" ancestor: %s, local: %s, remote: %s\n" % (pa, wctx, p2)) |
|
462 | repo.ui.debug(" ancestor: %s, local: %s, remote: %s\n" % (pa, wctx, p2)) | |
463 |
|
463 | |||
464 | m1, m2, ma = wctx.manifest(), p2.manifest(), pa.manifest() |
|
464 | m1, m2, ma = wctx.manifest(), p2.manifest(), pa.manifest() | |
465 | copied = set(copy.values()) |
|
465 | copied = set(copy.values()) | |
466 | copied.update(movewithdir.values()) |
|
466 | copied.update(movewithdir.values()) | |
467 |
|
467 | |||
468 | if '.hgsubstate' in m1: |
|
468 | if '.hgsubstate' in m1: | |
469 | # check whether sub state is modified |
|
469 | # check whether sub state is modified | |
470 | for s in sorted(wctx.substate): |
|
470 | for s in sorted(wctx.substate): | |
471 | if wctx.sub(s).dirty(): |
|
471 | if wctx.sub(s).dirty(): | |
472 | m1['.hgsubstate'] += '+' |
|
472 | m1['.hgsubstate'] += '+' | |
473 | break |
|
473 | break | |
474 |
|
474 | |||
475 | # Compare manifests |
|
475 | # Compare manifests | |
476 | diff = m1.diff(m2) |
|
476 | diff = m1.diff(m2) | |
477 |
|
477 | |||
478 | actions = {} |
|
478 | actions = {} | |
479 | for f, ((n1, fl1), (n2, fl2)) in diff.iteritems(): |
|
479 | for f, ((n1, fl1), (n2, fl2)) in diff.iteritems(): | |
480 | if partial and not partial(f): |
|
480 | if partial and not partial(f): | |
481 | continue |
|
481 | continue | |
482 | if n1 and n2: # file exists on both local and remote side |
|
482 | if n1 and n2: # file exists on both local and remote side | |
483 | if f not in ma: |
|
483 | if f not in ma: | |
484 | fa = copy.get(f, None) |
|
484 | fa = copy.get(f, None) | |
485 | if fa is not None: |
|
485 | if fa is not None: | |
486 | actions[f] = ('m', (f, f, fa, False, pa.node()), |
|
486 | actions[f] = ('m', (f, f, fa, False, pa.node()), | |
487 | "both renamed from " + fa) |
|
487 | "both renamed from " + fa) | |
488 | else: |
|
488 | else: | |
489 | actions[f] = ('m', (f, f, None, False, pa.node()), |
|
489 | actions[f] = ('m', (f, f, None, False, pa.node()), | |
490 | "both created") |
|
490 | "both created") | |
491 | else: |
|
491 | else: | |
492 | a = ma[f] |
|
492 | a = ma[f] | |
493 | fla = ma.flags(f) |
|
493 | fla = ma.flags(f) | |
494 | nol = 'l' not in fl1 + fl2 + fla |
|
494 | nol = 'l' not in fl1 + fl2 + fla | |
495 | if n2 == a and fl2 == fla: |
|
495 | if n2 == a and fl2 == fla: | |
496 | actions[f] = ('k' , (), "remote unchanged") |
|
496 | actions[f] = ('k' , (), "remote unchanged") | |
497 | elif n1 == a and fl1 == fla: # local unchanged - use remote |
|
497 | elif n1 == a and fl1 == fla: # local unchanged - use remote | |
498 | if n1 == n2: # optimization: keep local content |
|
498 | if n1 == n2: # optimization: keep local content | |
499 | actions[f] = ('e', (fl2,), "update permissions") |
|
499 | actions[f] = ('e', (fl2,), "update permissions") | |
500 | else: |
|
500 | else: | |
501 | actions[f] = ('g', (fl2,), "remote is newer") |
|
501 | actions[f] = ('g', (fl2,), "remote is newer") | |
502 | elif nol and n2 == a: # remote only changed 'x' |
|
502 | elif nol and n2 == a: # remote only changed 'x' | |
503 | actions[f] = ('e', (fl2,), "update permissions") |
|
503 | actions[f] = ('e', (fl2,), "update permissions") | |
504 | elif nol and n1 == a: # local only changed 'x' |
|
504 | elif nol and n1 == a: # local only changed 'x' | |
505 | actions[f] = ('g', (fl1,), "remote is newer") |
|
505 | actions[f] = ('g', (fl1,), "remote is newer") | |
506 | else: # both changed something |
|
506 | else: # both changed something | |
507 | actions[f] = ('m', (f, f, f, False, pa.node()), |
|
507 | actions[f] = ('m', (f, f, f, False, pa.node()), | |
508 | "versions differ") |
|
508 | "versions differ") | |
509 | elif n1: # file exists only on local side |
|
509 | elif n1: # file exists only on local side | |
510 | if f in copied: |
|
510 | if f in copied: | |
511 | pass # we'll deal with it on m2 side |
|
511 | pass # we'll deal with it on m2 side | |
512 | elif f in movewithdir: # directory rename, move local |
|
512 | elif f in movewithdir: # directory rename, move local | |
513 | f2 = movewithdir[f] |
|
513 | f2 = movewithdir[f] | |
514 | if f2 in m2: |
|
514 | if f2 in m2: | |
515 | actions[f2] = ('m', (f, f2, None, True, pa.node()), |
|
515 | actions[f2] = ('m', (f, f2, None, True, pa.node()), | |
516 | "remote directory rename, both created") |
|
516 | "remote directory rename, both created") | |
517 | else: |
|
517 | else: | |
518 | actions[f2] = ('dm', (f, fl1), |
|
518 | actions[f2] = ('dm', (f, fl1), | |
519 | "remote directory rename - move from " + f) |
|
519 | "remote directory rename - move from " + f) | |
520 | elif f in copy: |
|
520 | elif f in copy: | |
521 | f2 = copy[f] |
|
521 | f2 = copy[f] | |
522 | actions[f] = ('m', (f, f2, f2, False, pa.node()), |
|
522 | actions[f] = ('m', (f, f2, f2, False, pa.node()), | |
523 | "local copied/moved from " + f2) |
|
523 | "local copied/moved from " + f2) | |
524 | elif f in ma: # clean, a different, no remote |
|
524 | elif f in ma: # clean, a different, no remote | |
525 | if n1 != ma[f]: |
|
525 | if n1 != ma[f]: | |
526 | if acceptremote: |
|
526 | if acceptremote: | |
527 | actions[f] = ('r', None, "remote delete") |
|
527 | actions[f] = ('r', None, "remote delete") | |
528 | else: |
|
528 | else: | |
529 | actions[f] = ('cd', None, "prompt changed/deleted") |
|
529 | actions[f] = ('cd', None, "prompt changed/deleted") | |
530 | elif n1[20:] == 'a': |
|
530 | elif n1[20:] == 'a': | |
531 | # This extra 'a' is added by working copy manifest to mark |
|
531 | # This extra 'a' is added by working copy manifest to mark | |
532 | # the file as locally added. We should forget it instead of |
|
532 | # the file as locally added. We should forget it instead of | |
533 | # deleting it. |
|
533 | # deleting it. | |
534 | actions[f] = ('f', None, "remote deleted") |
|
534 | actions[f] = ('f', None, "remote deleted") | |
535 | else: |
|
535 | else: | |
536 | actions[f] = ('r', None, "other deleted") |
|
536 | actions[f] = ('r', None, "other deleted") | |
537 | elif n2: # file exists only on remote side |
|
537 | elif n2: # file exists only on remote side | |
538 | if f in copied: |
|
538 | if f in copied: | |
539 | pass # we'll deal with it on m1 side |
|
539 | pass # we'll deal with it on m1 side | |
540 | elif f in movewithdir: |
|
540 | elif f in movewithdir: | |
541 | f2 = movewithdir[f] |
|
541 | f2 = movewithdir[f] | |
542 | if f2 in m1: |
|
542 | if f2 in m1: | |
543 | actions[f2] = ('m', (f2, f, None, False, pa.node()), |
|
543 | actions[f2] = ('m', (f2, f, None, False, pa.node()), | |
544 | "local directory rename, both created") |
|
544 | "local directory rename, both created") | |
545 | else: |
|
545 | else: | |
546 | actions[f2] = ('dg', (f, fl2), |
|
546 | actions[f2] = ('dg', (f, fl2), | |
547 | "local directory rename - get from " + f) |
|
547 | "local directory rename - get from " + f) | |
548 | elif f in copy: |
|
548 | elif f in copy: | |
549 | f2 = copy[f] |
|
549 | f2 = copy[f] | |
550 | if f2 in m2: |
|
550 | if f2 in m2: | |
551 | actions[f] = ('m', (f2, f, f2, False, pa.node()), |
|
551 | actions[f] = ('m', (f2, f, f2, False, pa.node()), | |
552 | "remote copied from " + f2) |
|
552 | "remote copied from " + f2) | |
553 | else: |
|
553 | else: | |
554 | actions[f] = ('m', (f2, f, f2, True, pa.node()), |
|
554 | actions[f] = ('m', (f2, f, f2, True, pa.node()), | |
555 | "remote moved from " + f2) |
|
555 | "remote moved from " + f2) | |
556 | elif f not in ma: |
|
556 | elif f not in ma: | |
557 | # local unknown, remote created: the logic is described by the |
|
557 | # local unknown, remote created: the logic is described by the | |
558 | # following table: |
|
558 | # following table: | |
559 | # |
|
559 | # | |
560 | # force branchmerge different | action |
|
560 | # force branchmerge different | action | |
561 | # n * * | create |
|
561 | # n * * | create | |
562 | # y n * | create |
|
562 | # y n * | create | |
563 | # y y n | create |
|
563 | # y y n | create | |
564 | # y y y | merge |
|
564 | # y y y | merge | |
565 | # |
|
565 | # | |
566 | # Checking whether the files are different is expensive, so we |
|
566 | # Checking whether the files are different is expensive, so we | |
567 | # don't do that when we can avoid it. |
|
567 | # don't do that when we can avoid it. | |
568 | if not force: |
|
568 | if not force: | |
569 | actions[f] = ('c', (fl2,), "remote created") |
|
569 | actions[f] = ('c', (fl2,), "remote created") | |
570 | elif not branchmerge: |
|
570 | elif not branchmerge: | |
571 | actions[f] = ('c', (fl2,), "remote created") |
|
571 | actions[f] = ('c', (fl2,), "remote created") | |
572 | else: |
|
572 | else: | |
573 | actions[f] = ('cm', (fl2, pa.node()), |
|
573 | actions[f] = ('cm', (fl2, pa.node()), | |
574 | "remote created, get or merge") |
|
574 | "remote created, get or merge") | |
575 | elif n2 != ma[f]: |
|
575 | elif n2 != ma[f]: | |
576 | if acceptremote: |
|
576 | if acceptremote: | |
577 | actions[f] = ('c', (fl2,), "remote recreating") |
|
577 | actions[f] = ('c', (fl2,), "remote recreating") | |
578 | else: |
|
578 | else: | |
579 | actions[f] = ('dc', (fl2,), "prompt deleted/changed") |
|
579 | actions[f] = ('dc', (fl2,), "prompt deleted/changed") | |
580 |
|
580 | |||
581 | return actions, diverge, renamedelete |
|
581 | return actions, diverge, renamedelete | |
582 |
|
582 | |||
583 | def _resolvetrivial(repo, wctx, mctx, ancestor, actions): |
|
583 | def _resolvetrivial(repo, wctx, mctx, ancestor, actions): | |
584 | """Resolves false conflicts where the nodeid changed but the content |
|
584 | """Resolves false conflicts where the nodeid changed but the content | |
585 | remained the same.""" |
|
585 | remained the same.""" | |
586 |
|
586 | |||
587 | for f, (m, args, msg) in actions.items(): |
|
587 | for f, (m, args, msg) in actions.items(): | |
588 | if m == 'cd' and f in ancestor and not wctx[f].cmp(ancestor[f]): |
|
588 | if m == 'cd' and f in ancestor and not wctx[f].cmp(ancestor[f]): | |
589 | # local did change but ended up with same content |
|
589 | # local did change but ended up with same content | |
590 | actions[f] = 'r', None, "prompt same" |
|
590 | actions[f] = 'r', None, "prompt same" | |
591 | elif m == 'dc' and f in ancestor and not mctx[f].cmp(ancestor[f]): |
|
591 | elif m == 'dc' and f in ancestor and not mctx[f].cmp(ancestor[f]): | |
592 | # remote did change but ended up with same content |
|
592 | # remote did change but ended up with same content | |
593 | del actions[f] # don't get = keep local deleted |
|
593 | del actions[f] # don't get = keep local deleted | |
594 |
|
594 | |||
595 | def calculateupdates(repo, wctx, mctx, ancestors, branchmerge, force, partial, |
|
595 | def calculateupdates(repo, wctx, mctx, ancestors, branchmerge, force, partial, | |
596 | acceptremote, followcopies): |
|
596 | acceptremote, followcopies): | |
597 | "Calculate the actions needed to merge mctx into wctx using ancestors" |
|
597 | "Calculate the actions needed to merge mctx into wctx using ancestors" | |
598 |
|
598 | |||
599 | if len(ancestors) == 1: # default |
|
599 | if len(ancestors) == 1: # default | |
600 | actions, diverge, renamedelete = manifestmerge( |
|
600 | actions, diverge, renamedelete = manifestmerge( | |
601 | repo, wctx, mctx, ancestors[0], branchmerge, force, partial, |
|
601 | repo, wctx, mctx, ancestors[0], branchmerge, force, partial, | |
602 | acceptremote, followcopies) |
|
602 | acceptremote, followcopies) | |
603 | _checkunknownfiles(repo, wctx, mctx, force, actions) |
|
603 | _checkunknownfiles(repo, wctx, mctx, force, actions) | |
604 |
|
604 | |||
605 | else: # only when merge.preferancestor=* - the default |
|
605 | else: # only when merge.preferancestor=* - the default | |
606 | repo.ui.note( |
|
606 | repo.ui.note( | |
607 | _("note: merging %s and %s using bids from ancestors %s\n") % |
|
607 | _("note: merging %s and %s using bids from ancestors %s\n") % | |
608 | (wctx, mctx, _(' and ').join(str(anc) for anc in ancestors))) |
|
608 | (wctx, mctx, _(' and ').join(str(anc) for anc in ancestors))) | |
609 |
|
609 | |||
610 | # Call for bids |
|
610 | # Call for bids | |
611 | fbids = {} # mapping filename to bids (action method to list af actions) |
|
611 | fbids = {} # mapping filename to bids (action method to list af actions) | |
612 | diverge, renamedelete = None, None |
|
612 | diverge, renamedelete = None, None | |
613 | for ancestor in ancestors: |
|
613 | for ancestor in ancestors: | |
614 | repo.ui.note(_('\ncalculating bids for ancestor %s\n') % ancestor) |
|
614 | repo.ui.note(_('\ncalculating bids for ancestor %s\n') % ancestor) | |
615 | actions, diverge1, renamedelete1 = manifestmerge( |
|
615 | actions, diverge1, renamedelete1 = manifestmerge( | |
616 | repo, wctx, mctx, ancestor, branchmerge, force, partial, |
|
616 | repo, wctx, mctx, ancestor, branchmerge, force, partial, | |
617 | acceptremote, followcopies) |
|
617 | acceptremote, followcopies) | |
618 | _checkunknownfiles(repo, wctx, mctx, force, actions) |
|
618 | _checkunknownfiles(repo, wctx, mctx, force, actions) | |
619 |
|
619 | |||
620 | # Track the shortest set of warning on the theory that bid |
|
620 | # Track the shortest set of warning on the theory that bid | |
621 | # merge will correctly incorporate more information |
|
621 | # merge will correctly incorporate more information | |
622 | if diverge is None or len(diverge1) < len(diverge): |
|
622 | if diverge is None or len(diverge1) < len(diverge): | |
623 | diverge = diverge1 |
|
623 | diverge = diverge1 | |
624 | if renamedelete is None or len(renamedelete) < len(renamedelete1): |
|
624 | if renamedelete is None or len(renamedelete) < len(renamedelete1): | |
625 | renamedelete = renamedelete1 |
|
625 | renamedelete = renamedelete1 | |
626 |
|
626 | |||
627 | for f, a in sorted(actions.iteritems()): |
|
627 | for f, a in sorted(actions.iteritems()): | |
628 | m, args, msg = a |
|
628 | m, args, msg = a | |
629 | repo.ui.debug(' %s: %s -> %s\n' % (f, msg, m)) |
|
629 | repo.ui.debug(' %s: %s -> %s\n' % (f, msg, m)) | |
630 | if f in fbids: |
|
630 | if f in fbids: | |
631 | d = fbids[f] |
|
631 | d = fbids[f] | |
632 | if m in d: |
|
632 | if m in d: | |
633 | d[m].append(a) |
|
633 | d[m].append(a) | |
634 | else: |
|
634 | else: | |
635 | d[m] = [a] |
|
635 | d[m] = [a] | |
636 | else: |
|
636 | else: | |
637 | fbids[f] = {m: [a]} |
|
637 | fbids[f] = {m: [a]} | |
638 |
|
638 | |||
639 | # Pick the best bid for each file |
|
639 | # Pick the best bid for each file | |
640 | repo.ui.note(_('\nauction for merging merge bids\n')) |
|
640 | repo.ui.note(_('\nauction for merging merge bids\n')) | |
641 | actions = {} |
|
641 | actions = {} | |
642 | for f, bids in sorted(fbids.items()): |
|
642 | for f, bids in sorted(fbids.items()): | |
643 | # bids is a mapping from action method to list af actions |
|
643 | # bids is a mapping from action method to list af actions | |
644 | # Consensus? |
|
644 | # Consensus? | |
645 | if len(bids) == 1: # all bids are the same kind of method |
|
645 | if len(bids) == 1: # all bids are the same kind of method | |
646 | m, l = bids.items()[0] |
|
646 | m, l = bids.items()[0] | |
647 | if all(a == l[0] for a in l[1:]): # len(bids) is > 1 |
|
647 | if all(a == l[0] for a in l[1:]): # len(bids) is > 1 | |
648 | repo.ui.note(" %s: consensus for %s\n" % (f, m)) |
|
648 | repo.ui.note(" %s: consensus for %s\n" % (f, m)) | |
649 | actions[f] = l[0] |
|
649 | actions[f] = l[0] | |
650 | continue |
|
650 | continue | |
651 | # If keep is an option, just do it. |
|
651 | # If keep is an option, just do it. | |
652 | if 'k' in bids: |
|
652 | if 'k' in bids: | |
653 | repo.ui.note(" %s: picking 'keep' action\n" % f) |
|
653 | repo.ui.note(" %s: picking 'keep' action\n" % f) | |
654 | actions[f] = bids['k'][0] |
|
654 | actions[f] = bids['k'][0] | |
655 | continue |
|
655 | continue | |
656 | # If there are gets and they all agree [how could they not?], do it. |
|
656 | # If there are gets and they all agree [how could they not?], do it. | |
657 | if 'g' in bids: |
|
657 | if 'g' in bids: | |
658 | ga0 = bids['g'][0] |
|
658 | ga0 = bids['g'][0] | |
659 | if all(a == ga0 for a in bids['g'][1:]): |
|
659 | if all(a == ga0 for a in bids['g'][1:]): | |
660 | repo.ui.note(" %s: picking 'get' action\n" % f) |
|
660 | repo.ui.note(" %s: picking 'get' action\n" % f) | |
661 | actions[f] = ga0 |
|
661 | actions[f] = ga0 | |
662 | continue |
|
662 | continue | |
663 | # TODO: Consider other simple actions such as mode changes |
|
663 | # TODO: Consider other simple actions such as mode changes | |
664 | # Handle inefficient democrazy. |
|
664 | # Handle inefficient democrazy. | |
665 | repo.ui.note(_(' %s: multiple bids for merge action:\n') % f) |
|
665 | repo.ui.note(_(' %s: multiple bids for merge action:\n') % f) | |
666 | for m, l in sorted(bids.items()): |
|
666 | for m, l in sorted(bids.items()): | |
667 | for _f, args, msg in l: |
|
667 | for _f, args, msg in l: | |
668 | repo.ui.note(' %s -> %s\n' % (msg, m)) |
|
668 | repo.ui.note(' %s -> %s\n' % (msg, m)) | |
669 | # Pick random action. TODO: Instead, prompt user when resolving |
|
669 | # Pick random action. TODO: Instead, prompt user when resolving | |
670 | m, l = bids.items()[0] |
|
670 | m, l = bids.items()[0] | |
671 | repo.ui.warn(_(' %s: ambiguous merge - picked %s action\n') % |
|
671 | repo.ui.warn(_(' %s: ambiguous merge - picked %s action\n') % | |
672 | (f, m)) |
|
672 | (f, m)) | |
673 | actions[f] = l[0] |
|
673 | actions[f] = l[0] | |
674 | continue |
|
674 | continue | |
675 | repo.ui.note(_('end of auction\n\n')) |
|
675 | repo.ui.note(_('end of auction\n\n')) | |
676 |
|
676 | |||
677 | _resolvetrivial(repo, wctx, mctx, ancestors[0], actions) |
|
677 | _resolvetrivial(repo, wctx, mctx, ancestors[0], actions) | |
678 |
|
678 | |||
679 | if wctx.rev() is None: |
|
679 | if wctx.rev() is None: | |
680 | fractions = _forgetremoved(wctx, mctx, branchmerge) |
|
680 | fractions = _forgetremoved(wctx, mctx, branchmerge) | |
681 | actions.update(fractions) |
|
681 | actions.update(fractions) | |
682 |
|
682 | |||
683 | return actions, diverge, renamedelete |
|
683 | return actions, diverge, renamedelete | |
684 |
|
684 | |||
685 | def batchremove(repo, actions): |
|
685 | def batchremove(repo, actions): | |
686 | """apply removes to the working directory |
|
686 | """apply removes to the working directory | |
687 |
|
687 | |||
688 | yields tuples for progress updates |
|
688 | yields tuples for progress updates | |
689 | """ |
|
689 | """ | |
690 | verbose = repo.ui.verbose |
|
690 | verbose = repo.ui.verbose | |
691 | unlink = util.unlinkpath |
|
691 | unlink = util.unlinkpath | |
692 | wjoin = repo.wjoin |
|
692 | wjoin = repo.wjoin | |
693 | audit = repo.wvfs.audit |
|
693 | audit = repo.wvfs.audit | |
694 | i = 0 |
|
694 | i = 0 | |
695 | for f, args, msg in actions: |
|
695 | for f, args, msg in actions: | |
696 | repo.ui.debug(" %s: %s -> r\n" % (f, msg)) |
|
696 | repo.ui.debug(" %s: %s -> r\n" % (f, msg)) | |
697 | if verbose: |
|
697 | if verbose: | |
698 | repo.ui.note(_("removing %s\n") % f) |
|
698 | repo.ui.note(_("removing %s\n") % f) | |
699 | audit(f) |
|
699 | audit(f) | |
700 | try: |
|
700 | try: | |
701 | unlink(wjoin(f), ignoremissing=True) |
|
701 | unlink(wjoin(f), ignoremissing=True) | |
702 | except OSError as inst: |
|
702 | except OSError as inst: | |
703 | repo.ui.warn(_("update failed to remove %s: %s!\n") % |
|
703 | repo.ui.warn(_("update failed to remove %s: %s!\n") % | |
704 | (f, inst.strerror)) |
|
704 | (f, inst.strerror)) | |
705 | if i == 100: |
|
705 | if i == 100: | |
706 | yield i, f |
|
706 | yield i, f | |
707 | i = 0 |
|
707 | i = 0 | |
708 | i += 1 |
|
708 | i += 1 | |
709 | if i > 0: |
|
709 | if i > 0: | |
710 | yield i, f |
|
710 | yield i, f | |
711 |
|
711 | |||
712 | def batchget(repo, mctx, actions): |
|
712 | def batchget(repo, mctx, actions): | |
713 | """apply gets to the working directory |
|
713 | """apply gets to the working directory | |
714 |
|
714 | |||
715 | mctx is the context to get from |
|
715 | mctx is the context to get from | |
716 |
|
716 | |||
717 | yields tuples for progress updates |
|
717 | yields tuples for progress updates | |
718 | """ |
|
718 | """ | |
719 | verbose = repo.ui.verbose |
|
719 | verbose = repo.ui.verbose | |
720 | fctx = mctx.filectx |
|
720 | fctx = mctx.filectx | |
721 | wwrite = repo.wwrite |
|
721 | wwrite = repo.wwrite | |
722 | i = 0 |
|
722 | i = 0 | |
723 | for f, args, msg in actions: |
|
723 | for f, args, msg in actions: | |
724 | repo.ui.debug(" %s: %s -> g\n" % (f, msg)) |
|
724 | repo.ui.debug(" %s: %s -> g\n" % (f, msg)) | |
725 | if verbose: |
|
725 | if verbose: | |
726 | repo.ui.note(_("getting %s\n") % f) |
|
726 | repo.ui.note(_("getting %s\n") % f) | |
727 | wwrite(f, fctx(f).data(), args[0]) |
|
727 | wwrite(f, fctx(f).data(), args[0]) | |
728 | if i == 100: |
|
728 | if i == 100: | |
729 | yield i, f |
|
729 | yield i, f | |
730 | i = 0 |
|
730 | i = 0 | |
731 | i += 1 |
|
731 | i += 1 | |
732 | if i > 0: |
|
732 | if i > 0: | |
733 | yield i, f |
|
733 | yield i, f | |
734 |
|
734 | |||
735 | def applyupdates(repo, actions, wctx, mctx, overwrite, labels=None): |
|
735 | def applyupdates(repo, actions, wctx, mctx, overwrite, labels=None): | |
736 | """apply the merge action list to the working directory |
|
736 | """apply the merge action list to the working directory | |
737 |
|
737 | |||
738 | wctx is the working copy context |
|
738 | wctx is the working copy context | |
739 | mctx is the context to be merged into the working copy |
|
739 | mctx is the context to be merged into the working copy | |
740 |
|
740 | |||
741 | Return a tuple of counts (updated, merged, removed, unresolved) that |
|
741 | Return a tuple of counts (updated, merged, removed, unresolved) that | |
742 | describes how many files were affected by the update. |
|
742 | describes how many files were affected by the update. | |
743 | """ |
|
743 | """ | |
744 |
|
744 | |||
745 | updated, merged, removed, unresolved = 0, 0, 0, 0 |
|
745 | updated, merged, removed, unresolved = 0, 0, 0, 0 | |
746 | ms = mergestate(repo) |
|
746 | ms = mergestate(repo) | |
747 | ms.reset(wctx.p1().node(), mctx.node()) |
|
747 | ms.reset(wctx.p1().node(), mctx.node()) | |
748 | moves = [] |
|
748 | moves = [] | |
749 | for m, l in actions.items(): |
|
749 | for m, l in actions.items(): | |
750 | l.sort() |
|
750 | l.sort() | |
751 |
|
751 | |||
752 | # prescan for merges |
|
752 | # prescan for merges | |
753 | for f, args, msg in actions['m']: |
|
753 | for f, args, msg in actions['m']: | |
754 | f1, f2, fa, move, anc = args |
|
754 | f1, f2, fa, move, anc = args | |
755 | if f == '.hgsubstate': # merged internally |
|
755 | if f == '.hgsubstate': # merged internally | |
756 | continue |
|
756 | continue | |
757 | repo.ui.debug(" preserving %s for resolve of %s\n" % (f1, f)) |
|
757 | repo.ui.debug(" preserving %s for resolve of %s\n" % (f1, f)) | |
758 | fcl = wctx[f1] |
|
758 | fcl = wctx[f1] | |
759 | fco = mctx[f2] |
|
759 | fco = mctx[f2] | |
760 | actx = repo[anc] |
|
760 | actx = repo[anc] | |
761 | if fa in actx: |
|
761 | if fa in actx: | |
762 | fca = actx[fa] |
|
762 | fca = actx[fa] | |
763 | else: |
|
763 | else: | |
764 | fca = repo.filectx(f1, fileid=nullrev) |
|
764 | fca = repo.filectx(f1, fileid=nullrev) | |
765 | ms.add(fcl, fco, fca, f) |
|
765 | ms.add(fcl, fco, fca, f) | |
766 | if f1 != f and move: |
|
766 | if f1 != f and move: | |
767 | moves.append(f1) |
|
767 | moves.append(f1) | |
768 |
|
768 | |||
769 | audit = repo.wvfs.audit |
|
769 | audit = repo.wvfs.audit | |
770 | _updating = _('updating') |
|
770 | _updating = _('updating') | |
771 | _files = _('files') |
|
771 | _files = _('files') | |
772 | progress = repo.ui.progress |
|
772 | progress = repo.ui.progress | |
773 |
|
773 | |||
774 | # remove renamed files after safely stored |
|
774 | # remove renamed files after safely stored | |
775 | for f in moves: |
|
775 | for f in moves: | |
776 | if os.path.lexists(repo.wjoin(f)): |
|
776 | if os.path.lexists(repo.wjoin(f)): | |
777 | repo.ui.debug("removing %s\n" % f) |
|
777 | repo.ui.debug("removing %s\n" % f) | |
778 | audit(f) |
|
778 | audit(f) | |
779 | util.unlinkpath(repo.wjoin(f)) |
|
779 | util.unlinkpath(repo.wjoin(f)) | |
780 |
|
780 | |||
781 | numupdates = sum(len(l) for m, l in actions.items() if m != 'k') |
|
781 | numupdates = sum(len(l) for m, l in actions.items() if m != 'k') | |
782 |
|
782 | |||
783 | if [a for a in actions['r'] if a[0] == '.hgsubstate']: |
|
783 | if [a for a in actions['r'] if a[0] == '.hgsubstate']: | |
784 | subrepo.submerge(repo, wctx, mctx, wctx, overwrite) |
|
784 | subrepo.submerge(repo, wctx, mctx, wctx, overwrite) | |
785 |
|
785 | |||
786 | # remove in parallel (must come first) |
|
786 | # remove in parallel (must come first) | |
787 | z = 0 |
|
787 | z = 0 | |
788 | prog = worker.worker(repo.ui, 0.001, batchremove, (repo,), actions['r']) |
|
788 | prog = worker.worker(repo.ui, 0.001, batchremove, (repo,), actions['r']) | |
789 | for i, item in prog: |
|
789 | for i, item in prog: | |
790 | z += i |
|
790 | z += i | |
791 | progress(_updating, z, item=item, total=numupdates, unit=_files) |
|
791 | progress(_updating, z, item=item, total=numupdates, unit=_files) | |
792 | removed = len(actions['r']) |
|
792 | removed = len(actions['r']) | |
793 |
|
793 | |||
794 | # get in parallel |
|
794 | # get in parallel | |
795 | prog = worker.worker(repo.ui, 0.001, batchget, (repo, mctx), actions['g']) |
|
795 | prog = worker.worker(repo.ui, 0.001, batchget, (repo, mctx), actions['g']) | |
796 | for i, item in prog: |
|
796 | for i, item in prog: | |
797 | z += i |
|
797 | z += i | |
798 | progress(_updating, z, item=item, total=numupdates, unit=_files) |
|
798 | progress(_updating, z, item=item, total=numupdates, unit=_files) | |
799 | updated = len(actions['g']) |
|
799 | updated = len(actions['g']) | |
800 |
|
800 | |||
801 | if [a for a in actions['g'] if a[0] == '.hgsubstate']: |
|
801 | if [a for a in actions['g'] if a[0] == '.hgsubstate']: | |
802 | subrepo.submerge(repo, wctx, mctx, wctx, overwrite) |
|
802 | subrepo.submerge(repo, wctx, mctx, wctx, overwrite) | |
803 |
|
803 | |||
804 | # forget (manifest only, just log it) (must come first) |
|
804 | # forget (manifest only, just log it) (must come first) | |
805 | for f, args, msg in actions['f']: |
|
805 | for f, args, msg in actions['f']: | |
806 | repo.ui.debug(" %s: %s -> f\n" % (f, msg)) |
|
806 | repo.ui.debug(" %s: %s -> f\n" % (f, msg)) | |
807 | z += 1 |
|
807 | z += 1 | |
808 | progress(_updating, z, item=f, total=numupdates, unit=_files) |
|
808 | progress(_updating, z, item=f, total=numupdates, unit=_files) | |
809 |
|
809 | |||
810 | # re-add (manifest only, just log it) |
|
810 | # re-add (manifest only, just log it) | |
811 | for f, args, msg in actions['a']: |
|
811 | for f, args, msg in actions['a']: | |
812 | repo.ui.debug(" %s: %s -> a\n" % (f, msg)) |
|
812 | repo.ui.debug(" %s: %s -> a\n" % (f, msg)) | |
813 | z += 1 |
|
813 | z += 1 | |
814 | progress(_updating, z, item=f, total=numupdates, unit=_files) |
|
814 | progress(_updating, z, item=f, total=numupdates, unit=_files) | |
815 |
|
815 | |||
816 | # keep (noop, just log it) |
|
816 | # keep (noop, just log it) | |
817 | for f, args, msg in actions['k']: |
|
817 | for f, args, msg in actions['k']: | |
818 | repo.ui.debug(" %s: %s -> k\n" % (f, msg)) |
|
818 | repo.ui.debug(" %s: %s -> k\n" % (f, msg)) | |
819 | # no progress |
|
819 | # no progress | |
820 |
|
820 | |||
821 | # directory rename, move local |
|
821 | # directory rename, move local | |
822 | for f, args, msg in actions['dm']: |
|
822 | for f, args, msg in actions['dm']: | |
823 | repo.ui.debug(" %s: %s -> dm\n" % (f, msg)) |
|
823 | repo.ui.debug(" %s: %s -> dm\n" % (f, msg)) | |
824 | z += 1 |
|
824 | z += 1 | |
825 | progress(_updating, z, item=f, total=numupdates, unit=_files) |
|
825 | progress(_updating, z, item=f, total=numupdates, unit=_files) | |
826 | f0, flags = args |
|
826 | f0, flags = args | |
827 | repo.ui.note(_("moving %s to %s\n") % (f0, f)) |
|
827 | repo.ui.note(_("moving %s to %s\n") % (f0, f)) | |
828 | audit(f) |
|
828 | audit(f) | |
829 | repo.wwrite(f, wctx.filectx(f0).data(), flags) |
|
829 | repo.wwrite(f, wctx.filectx(f0).data(), flags) | |
830 | util.unlinkpath(repo.wjoin(f0)) |
|
830 | util.unlinkpath(repo.wjoin(f0)) | |
831 | updated += 1 |
|
831 | updated += 1 | |
832 |
|
832 | |||
833 | # local directory rename, get |
|
833 | # local directory rename, get | |
834 | for f, args, msg in actions['dg']: |
|
834 | for f, args, msg in actions['dg']: | |
835 | repo.ui.debug(" %s: %s -> dg\n" % (f, msg)) |
|
835 | repo.ui.debug(" %s: %s -> dg\n" % (f, msg)) | |
836 | z += 1 |
|
836 | z += 1 | |
837 | progress(_updating, z, item=f, total=numupdates, unit=_files) |
|
837 | progress(_updating, z, item=f, total=numupdates, unit=_files) | |
838 | f0, flags = args |
|
838 | f0, flags = args | |
839 | repo.ui.note(_("getting %s to %s\n") % (f0, f)) |
|
839 | repo.ui.note(_("getting %s to %s\n") % (f0, f)) | |
840 | repo.wwrite(f, mctx.filectx(f0).data(), flags) |
|
840 | repo.wwrite(f, mctx.filectx(f0).data(), flags) | |
841 | updated += 1 |
|
841 | updated += 1 | |
842 |
|
842 | |||
843 | # exec |
|
843 | # exec | |
844 | for f, args, msg in actions['e']: |
|
844 | for f, args, msg in actions['e']: | |
845 | repo.ui.debug(" %s: %s -> e\n" % (f, msg)) |
|
845 | repo.ui.debug(" %s: %s -> e\n" % (f, msg)) | |
846 | z += 1 |
|
846 | z += 1 | |
847 | progress(_updating, z, item=f, total=numupdates, unit=_files) |
|
847 | progress(_updating, z, item=f, total=numupdates, unit=_files) | |
848 | flags, = args |
|
848 | flags, = args | |
849 | audit(f) |
|
849 | audit(f) | |
850 | util.setflags(repo.wjoin(f), 'l' in flags, 'x' in flags) |
|
850 | util.setflags(repo.wjoin(f), 'l' in flags, 'x' in flags) | |
851 | updated += 1 |
|
851 | updated += 1 | |
852 |
|
852 | |||
853 | # merge |
|
853 | # premerge | |
|
854 | tocomplete = [] | |||
854 | for f, args, msg in actions['m']: |
|
855 | for f, args, msg in actions['m']: | |
855 | repo.ui.debug(" %s: %s -> m\n" % (f, msg)) |
|
856 | repo.ui.debug(" %s: %s -> m (premerge)\n" % (f, msg)) | |
856 | z += 1 |
|
857 | z += 1 | |
857 | progress(_updating, z, item=f, total=numupdates, unit=_files) |
|
858 | progress(_updating, z, item=f, total=numupdates, unit=_files) | |
858 | if f == '.hgsubstate': # subrepo states need updating |
|
859 | if f == '.hgsubstate': # subrepo states need updating | |
859 | subrepo.submerge(repo, wctx, mctx, wctx.ancestor(mctx), |
|
860 | subrepo.submerge(repo, wctx, mctx, wctx.ancestor(mctx), | |
860 | overwrite) |
|
861 | overwrite) | |
861 | continue |
|
862 | continue | |
862 | audit(f) |
|
863 | audit(f) | |
863 | complete, r = ms.preresolve(f, wctx, labels=labels) |
|
864 | complete, r = ms.preresolve(f, wctx, labels=labels) | |
864 |
if |
|
865 | if complete: | |
|
866 | if r is not None and r > 0: | |||
|
867 | unresolved += 1 | |||
|
868 | else: | |||
|
869 | if r is None: | |||
|
870 | updated += 1 | |||
|
871 | else: | |||
|
872 | merged += 1 | |||
|
873 | else: | |||
|
874 | numupdates += 1 | |||
|
875 | tocomplete.append((f, args, msg)) | |||
|
876 | ||||
|
877 | # merge | |||
|
878 | for f, args, msg in tocomplete: | |||
|
879 | repo.ui.debug(" %s: %s -> m (merge)\n" % (f, msg)) | |||
|
880 | z += 1 | |||
|
881 | progress(_updating, z, item=f, total=numupdates, unit=_files) | |||
865 |
|
|
882 | r = ms.resolve(f, wctx, labels=labels) | |
866 | if r is not None and r > 0: |
|
883 | if r is not None and r > 0: | |
867 | unresolved += 1 |
|
884 | unresolved += 1 | |
868 | else: |
|
885 | else: | |
869 | if r is None: |
|
886 | if r is None: | |
870 | updated += 1 |
|
887 | updated += 1 | |
871 | else: |
|
888 | else: | |
872 | merged += 1 |
|
889 | merged += 1 | |
873 |
|
890 | |||
874 | ms.commit() |
|
891 | ms.commit() | |
875 | progress(_updating, None, total=numupdates, unit=_files) |
|
892 | progress(_updating, None, total=numupdates, unit=_files) | |
876 |
|
893 | |||
877 | return updated, merged, removed, unresolved |
|
894 | return updated, merged, removed, unresolved | |
878 |
|
895 | |||
879 | def recordupdates(repo, actions, branchmerge): |
|
896 | def recordupdates(repo, actions, branchmerge): | |
880 | "record merge actions to the dirstate" |
|
897 | "record merge actions to the dirstate" | |
881 | # remove (must come first) |
|
898 | # remove (must come first) | |
882 | for f, args, msg in actions['r']: |
|
899 | for f, args, msg in actions['r']: | |
883 | if branchmerge: |
|
900 | if branchmerge: | |
884 | repo.dirstate.remove(f) |
|
901 | repo.dirstate.remove(f) | |
885 | else: |
|
902 | else: | |
886 | repo.dirstate.drop(f) |
|
903 | repo.dirstate.drop(f) | |
887 |
|
904 | |||
888 | # forget (must come first) |
|
905 | # forget (must come first) | |
889 | for f, args, msg in actions['f']: |
|
906 | for f, args, msg in actions['f']: | |
890 | repo.dirstate.drop(f) |
|
907 | repo.dirstate.drop(f) | |
891 |
|
908 | |||
892 | # re-add |
|
909 | # re-add | |
893 | for f, args, msg in actions['a']: |
|
910 | for f, args, msg in actions['a']: | |
894 | if not branchmerge: |
|
911 | if not branchmerge: | |
895 | repo.dirstate.add(f) |
|
912 | repo.dirstate.add(f) | |
896 |
|
913 | |||
897 | # exec change |
|
914 | # exec change | |
898 | for f, args, msg in actions['e']: |
|
915 | for f, args, msg in actions['e']: | |
899 | repo.dirstate.normallookup(f) |
|
916 | repo.dirstate.normallookup(f) | |
900 |
|
917 | |||
901 | # keep |
|
918 | # keep | |
902 | for f, args, msg in actions['k']: |
|
919 | for f, args, msg in actions['k']: | |
903 | pass |
|
920 | pass | |
904 |
|
921 | |||
905 | # get |
|
922 | # get | |
906 | for f, args, msg in actions['g']: |
|
923 | for f, args, msg in actions['g']: | |
907 | if branchmerge: |
|
924 | if branchmerge: | |
908 | repo.dirstate.otherparent(f) |
|
925 | repo.dirstate.otherparent(f) | |
909 | else: |
|
926 | else: | |
910 | repo.dirstate.normal(f) |
|
927 | repo.dirstate.normal(f) | |
911 |
|
928 | |||
912 | # merge |
|
929 | # merge | |
913 | for f, args, msg in actions['m']: |
|
930 | for f, args, msg in actions['m']: | |
914 | f1, f2, fa, move, anc = args |
|
931 | f1, f2, fa, move, anc = args | |
915 | if branchmerge: |
|
932 | if branchmerge: | |
916 | # We've done a branch merge, mark this file as merged |
|
933 | # We've done a branch merge, mark this file as merged | |
917 | # so that we properly record the merger later |
|
934 | # so that we properly record the merger later | |
918 | repo.dirstate.merge(f) |
|
935 | repo.dirstate.merge(f) | |
919 | if f1 != f2: # copy/rename |
|
936 | if f1 != f2: # copy/rename | |
920 | if move: |
|
937 | if move: | |
921 | repo.dirstate.remove(f1) |
|
938 | repo.dirstate.remove(f1) | |
922 | if f1 != f: |
|
939 | if f1 != f: | |
923 | repo.dirstate.copy(f1, f) |
|
940 | repo.dirstate.copy(f1, f) | |
924 | else: |
|
941 | else: | |
925 | repo.dirstate.copy(f2, f) |
|
942 | repo.dirstate.copy(f2, f) | |
926 | else: |
|
943 | else: | |
927 | # We've update-merged a locally modified file, so |
|
944 | # We've update-merged a locally modified file, so | |
928 | # we set the dirstate to emulate a normal checkout |
|
945 | # we set the dirstate to emulate a normal checkout | |
929 | # of that file some time in the past. Thus our |
|
946 | # of that file some time in the past. Thus our | |
930 | # merge will appear as a normal local file |
|
947 | # merge will appear as a normal local file | |
931 | # modification. |
|
948 | # modification. | |
932 | if f2 == f: # file not locally copied/moved |
|
949 | if f2 == f: # file not locally copied/moved | |
933 | repo.dirstate.normallookup(f) |
|
950 | repo.dirstate.normallookup(f) | |
934 | if move: |
|
951 | if move: | |
935 | repo.dirstate.drop(f1) |
|
952 | repo.dirstate.drop(f1) | |
936 |
|
953 | |||
937 | # directory rename, move local |
|
954 | # directory rename, move local | |
938 | for f, args, msg in actions['dm']: |
|
955 | for f, args, msg in actions['dm']: | |
939 | f0, flag = args |
|
956 | f0, flag = args | |
940 | if branchmerge: |
|
957 | if branchmerge: | |
941 | repo.dirstate.add(f) |
|
958 | repo.dirstate.add(f) | |
942 | repo.dirstate.remove(f0) |
|
959 | repo.dirstate.remove(f0) | |
943 | repo.dirstate.copy(f0, f) |
|
960 | repo.dirstate.copy(f0, f) | |
944 | else: |
|
961 | else: | |
945 | repo.dirstate.normal(f) |
|
962 | repo.dirstate.normal(f) | |
946 | repo.dirstate.drop(f0) |
|
963 | repo.dirstate.drop(f0) | |
947 |
|
964 | |||
948 | # directory rename, get |
|
965 | # directory rename, get | |
949 | for f, args, msg in actions['dg']: |
|
966 | for f, args, msg in actions['dg']: | |
950 | f0, flag = args |
|
967 | f0, flag = args | |
951 | if branchmerge: |
|
968 | if branchmerge: | |
952 | repo.dirstate.add(f) |
|
969 | repo.dirstate.add(f) | |
953 | repo.dirstate.copy(f0, f) |
|
970 | repo.dirstate.copy(f0, f) | |
954 | else: |
|
971 | else: | |
955 | repo.dirstate.normal(f) |
|
972 | repo.dirstate.normal(f) | |
956 |
|
973 | |||
957 | def update(repo, node, branchmerge, force, partial, ancestor=None, |
|
974 | def update(repo, node, branchmerge, force, partial, ancestor=None, | |
958 | mergeancestor=False, labels=None): |
|
975 | mergeancestor=False, labels=None): | |
959 | """ |
|
976 | """ | |
960 | Perform a merge between the working directory and the given node |
|
977 | Perform a merge between the working directory and the given node | |
961 |
|
978 | |||
962 | node = the node to update to, or None if unspecified |
|
979 | node = the node to update to, or None if unspecified | |
963 | branchmerge = whether to merge between branches |
|
980 | branchmerge = whether to merge between branches | |
964 | force = whether to force branch merging or file overwriting |
|
981 | force = whether to force branch merging or file overwriting | |
965 | partial = a function to filter file lists (dirstate not updated) |
|
982 | partial = a function to filter file lists (dirstate not updated) | |
966 | mergeancestor = whether it is merging with an ancestor. If true, |
|
983 | mergeancestor = whether it is merging with an ancestor. If true, | |
967 | we should accept the incoming changes for any prompts that occur. |
|
984 | we should accept the incoming changes for any prompts that occur. | |
968 | If false, merging with an ancestor (fast-forward) is only allowed |
|
985 | If false, merging with an ancestor (fast-forward) is only allowed | |
969 | between different named branches. This flag is used by rebase extension |
|
986 | between different named branches. This flag is used by rebase extension | |
970 | as a temporary fix and should be avoided in general. |
|
987 | as a temporary fix and should be avoided in general. | |
971 |
|
988 | |||
972 | The table below shows all the behaviors of the update command |
|
989 | The table below shows all the behaviors of the update command | |
973 | given the -c and -C or no options, whether the working directory |
|
990 | given the -c and -C or no options, whether the working directory | |
974 | is dirty, whether a revision is specified, and the relationship of |
|
991 | is dirty, whether a revision is specified, and the relationship of | |
975 | the parent rev to the target rev (linear, on the same named |
|
992 | the parent rev to the target rev (linear, on the same named | |
976 | branch, or on another named branch). |
|
993 | branch, or on another named branch). | |
977 |
|
994 | |||
978 | This logic is tested by test-update-branches.t. |
|
995 | This logic is tested by test-update-branches.t. | |
979 |
|
996 | |||
980 | -c -C dirty rev | linear same cross |
|
997 | -c -C dirty rev | linear same cross | |
981 | n n n n | ok (1) x |
|
998 | n n n n | ok (1) x | |
982 | n n n y | ok ok ok |
|
999 | n n n y | ok ok ok | |
983 | n n y n | merge (2) (2) |
|
1000 | n n y n | merge (2) (2) | |
984 | n n y y | merge (3) (3) |
|
1001 | n n y y | merge (3) (3) | |
985 | n y * * | --- discard --- |
|
1002 | n y * * | --- discard --- | |
986 | y n y * | --- (4) --- |
|
1003 | y n y * | --- (4) --- | |
987 | y n n * | --- ok --- |
|
1004 | y n n * | --- ok --- | |
988 | y y * * | --- (5) --- |
|
1005 | y y * * | --- (5) --- | |
989 |
|
1006 | |||
990 | x = can't happen |
|
1007 | x = can't happen | |
991 | * = don't-care |
|
1008 | * = don't-care | |
992 | 1 = abort: not a linear update (merge or update --check to force update) |
|
1009 | 1 = abort: not a linear update (merge or update --check to force update) | |
993 | 2 = abort: uncommitted changes (commit and merge, or update --clean to |
|
1010 | 2 = abort: uncommitted changes (commit and merge, or update --clean to | |
994 | discard changes) |
|
1011 | discard changes) | |
995 | 3 = abort: uncommitted changes (commit or update --clean to discard changes) |
|
1012 | 3 = abort: uncommitted changes (commit or update --clean to discard changes) | |
996 | 4 = abort: uncommitted changes (checked in commands.py) |
|
1013 | 4 = abort: uncommitted changes (checked in commands.py) | |
997 | 5 = incompatible options (checked in commands.py) |
|
1014 | 5 = incompatible options (checked in commands.py) | |
998 |
|
1015 | |||
999 | Return the same tuple as applyupdates(). |
|
1016 | Return the same tuple as applyupdates(). | |
1000 | """ |
|
1017 | """ | |
1001 |
|
1018 | |||
1002 | onode = node |
|
1019 | onode = node | |
1003 | wlock = repo.wlock() |
|
1020 | wlock = repo.wlock() | |
1004 | try: |
|
1021 | try: | |
1005 | wc = repo[None] |
|
1022 | wc = repo[None] | |
1006 | pl = wc.parents() |
|
1023 | pl = wc.parents() | |
1007 | p1 = pl[0] |
|
1024 | p1 = pl[0] | |
1008 | pas = [None] |
|
1025 | pas = [None] | |
1009 | if ancestor is not None: |
|
1026 | if ancestor is not None: | |
1010 | pas = [repo[ancestor]] |
|
1027 | pas = [repo[ancestor]] | |
1011 |
|
1028 | |||
1012 | if node is None: |
|
1029 | if node is None: | |
1013 | node = repo[destutil.destupdate(repo)].node() |
|
1030 | node = repo[destutil.destupdate(repo)].node() | |
1014 |
|
1031 | |||
1015 | overwrite = force and not branchmerge |
|
1032 | overwrite = force and not branchmerge | |
1016 |
|
1033 | |||
1017 | p2 = repo[node] |
|
1034 | p2 = repo[node] | |
1018 | if pas[0] is None: |
|
1035 | if pas[0] is None: | |
1019 | if repo.ui.configlist('merge', 'preferancestor', ['*']) == ['*']: |
|
1036 | if repo.ui.configlist('merge', 'preferancestor', ['*']) == ['*']: | |
1020 | cahs = repo.changelog.commonancestorsheads(p1.node(), p2.node()) |
|
1037 | cahs = repo.changelog.commonancestorsheads(p1.node(), p2.node()) | |
1021 | pas = [repo[anc] for anc in (sorted(cahs) or [nullid])] |
|
1038 | pas = [repo[anc] for anc in (sorted(cahs) or [nullid])] | |
1022 | else: |
|
1039 | else: | |
1023 | pas = [p1.ancestor(p2, warn=branchmerge)] |
|
1040 | pas = [p1.ancestor(p2, warn=branchmerge)] | |
1024 |
|
1041 | |||
1025 | fp1, fp2, xp1, xp2 = p1.node(), p2.node(), str(p1), str(p2) |
|
1042 | fp1, fp2, xp1, xp2 = p1.node(), p2.node(), str(p1), str(p2) | |
1026 |
|
1043 | |||
1027 | ### check phase |
|
1044 | ### check phase | |
1028 | if not overwrite and len(pl) > 1: |
|
1045 | if not overwrite and len(pl) > 1: | |
1029 | raise error.Abort(_("outstanding uncommitted merge")) |
|
1046 | raise error.Abort(_("outstanding uncommitted merge")) | |
1030 | if branchmerge: |
|
1047 | if branchmerge: | |
1031 | if pas == [p2]: |
|
1048 | if pas == [p2]: | |
1032 | raise error.Abort(_("merging with a working directory ancestor" |
|
1049 | raise error.Abort(_("merging with a working directory ancestor" | |
1033 | " has no effect")) |
|
1050 | " has no effect")) | |
1034 | elif pas == [p1]: |
|
1051 | elif pas == [p1]: | |
1035 | if not mergeancestor and p1.branch() == p2.branch(): |
|
1052 | if not mergeancestor and p1.branch() == p2.branch(): | |
1036 | raise error.Abort(_("nothing to merge"), |
|
1053 | raise error.Abort(_("nothing to merge"), | |
1037 | hint=_("use 'hg update' " |
|
1054 | hint=_("use 'hg update' " | |
1038 | "or check 'hg heads'")) |
|
1055 | "or check 'hg heads'")) | |
1039 | if not force and (wc.files() or wc.deleted()): |
|
1056 | if not force and (wc.files() or wc.deleted()): | |
1040 | raise error.Abort(_("uncommitted changes"), |
|
1057 | raise error.Abort(_("uncommitted changes"), | |
1041 | hint=_("use 'hg status' to list changes")) |
|
1058 | hint=_("use 'hg status' to list changes")) | |
1042 | for s in sorted(wc.substate): |
|
1059 | for s in sorted(wc.substate): | |
1043 | wc.sub(s).bailifchanged() |
|
1060 | wc.sub(s).bailifchanged() | |
1044 |
|
1061 | |||
1045 | elif not overwrite: |
|
1062 | elif not overwrite: | |
1046 | if p1 == p2: # no-op update |
|
1063 | if p1 == p2: # no-op update | |
1047 | # call the hooks and exit early |
|
1064 | # call the hooks and exit early | |
1048 | repo.hook('preupdate', throw=True, parent1=xp2, parent2='') |
|
1065 | repo.hook('preupdate', throw=True, parent1=xp2, parent2='') | |
1049 | repo.hook('update', parent1=xp2, parent2='', error=0) |
|
1066 | repo.hook('update', parent1=xp2, parent2='', error=0) | |
1050 | return 0, 0, 0, 0 |
|
1067 | return 0, 0, 0, 0 | |
1051 |
|
1068 | |||
1052 | if pas not in ([p1], [p2]): # nonlinear |
|
1069 | if pas not in ([p1], [p2]): # nonlinear | |
1053 | dirty = wc.dirty(missing=True) |
|
1070 | dirty = wc.dirty(missing=True) | |
1054 | if dirty or onode is None: |
|
1071 | if dirty or onode is None: | |
1055 | # Branching is a bit strange to ensure we do the minimal |
|
1072 | # Branching is a bit strange to ensure we do the minimal | |
1056 | # amount of call to obsolete.background. |
|
1073 | # amount of call to obsolete.background. | |
1057 | foreground = obsolete.foreground(repo, [p1.node()]) |
|
1074 | foreground = obsolete.foreground(repo, [p1.node()]) | |
1058 | # note: the <node> variable contains a random identifier |
|
1075 | # note: the <node> variable contains a random identifier | |
1059 | if repo[node].node() in foreground: |
|
1076 | if repo[node].node() in foreground: | |
1060 | pas = [p1] # allow updating to successors |
|
1077 | pas = [p1] # allow updating to successors | |
1061 | elif dirty: |
|
1078 | elif dirty: | |
1062 | msg = _("uncommitted changes") |
|
1079 | msg = _("uncommitted changes") | |
1063 | if onode is None: |
|
1080 | if onode is None: | |
1064 | hint = _("commit and merge, or update --clean to" |
|
1081 | hint = _("commit and merge, or update --clean to" | |
1065 | " discard changes") |
|
1082 | " discard changes") | |
1066 | else: |
|
1083 | else: | |
1067 | hint = _("commit or update --clean to discard" |
|
1084 | hint = _("commit or update --clean to discard" | |
1068 | " changes") |
|
1085 | " changes") | |
1069 | raise error.Abort(msg, hint=hint) |
|
1086 | raise error.Abort(msg, hint=hint) | |
1070 | else: # node is none |
|
1087 | else: # node is none | |
1071 | msg = _("not a linear update") |
|
1088 | msg = _("not a linear update") | |
1072 | hint = _("merge or update --check to force update") |
|
1089 | hint = _("merge or update --check to force update") | |
1073 | raise error.Abort(msg, hint=hint) |
|
1090 | raise error.Abort(msg, hint=hint) | |
1074 | else: |
|
1091 | else: | |
1075 | # Allow jumping branches if clean and specific rev given |
|
1092 | # Allow jumping branches if clean and specific rev given | |
1076 | pas = [p1] |
|
1093 | pas = [p1] | |
1077 |
|
1094 | |||
1078 | # deprecated config: merge.followcopies |
|
1095 | # deprecated config: merge.followcopies | |
1079 | followcopies = False |
|
1096 | followcopies = False | |
1080 | if overwrite: |
|
1097 | if overwrite: | |
1081 | pas = [wc] |
|
1098 | pas = [wc] | |
1082 | elif pas == [p2]: # backwards |
|
1099 | elif pas == [p2]: # backwards | |
1083 | pas = [wc.p1()] |
|
1100 | pas = [wc.p1()] | |
1084 | elif not branchmerge and not wc.dirty(missing=True): |
|
1101 | elif not branchmerge and not wc.dirty(missing=True): | |
1085 | pass |
|
1102 | pass | |
1086 | elif pas[0] and repo.ui.configbool('merge', 'followcopies', True): |
|
1103 | elif pas[0] and repo.ui.configbool('merge', 'followcopies', True): | |
1087 | followcopies = True |
|
1104 | followcopies = True | |
1088 |
|
1105 | |||
1089 | ### calculate phase |
|
1106 | ### calculate phase | |
1090 | actionbyfile, diverge, renamedelete = calculateupdates( |
|
1107 | actionbyfile, diverge, renamedelete = calculateupdates( | |
1091 | repo, wc, p2, pas, branchmerge, force, partial, mergeancestor, |
|
1108 | repo, wc, p2, pas, branchmerge, force, partial, mergeancestor, | |
1092 | followcopies) |
|
1109 | followcopies) | |
1093 | # Convert to dictionary-of-lists format |
|
1110 | # Convert to dictionary-of-lists format | |
1094 | actions = dict((m, []) for m in 'a f g cd dc r dm dg m e k'.split()) |
|
1111 | actions = dict((m, []) for m in 'a f g cd dc r dm dg m e k'.split()) | |
1095 | for f, (m, args, msg) in actionbyfile.iteritems(): |
|
1112 | for f, (m, args, msg) in actionbyfile.iteritems(): | |
1096 | if m not in actions: |
|
1113 | if m not in actions: | |
1097 | actions[m] = [] |
|
1114 | actions[m] = [] | |
1098 | actions[m].append((f, args, msg)) |
|
1115 | actions[m].append((f, args, msg)) | |
1099 |
|
1116 | |||
1100 | if not util.checkcase(repo.path): |
|
1117 | if not util.checkcase(repo.path): | |
1101 | # check collision between files only in p2 for clean update |
|
1118 | # check collision between files only in p2 for clean update | |
1102 | if (not branchmerge and |
|
1119 | if (not branchmerge and | |
1103 | (force or not wc.dirty(missing=True, branch=False))): |
|
1120 | (force or not wc.dirty(missing=True, branch=False))): | |
1104 | _checkcollision(repo, p2.manifest(), None) |
|
1121 | _checkcollision(repo, p2.manifest(), None) | |
1105 | else: |
|
1122 | else: | |
1106 | _checkcollision(repo, wc.manifest(), actions) |
|
1123 | _checkcollision(repo, wc.manifest(), actions) | |
1107 |
|
1124 | |||
1108 | # Prompt and create actions. TODO: Move this towards resolve phase. |
|
1125 | # Prompt and create actions. TODO: Move this towards resolve phase. | |
1109 | for f, args, msg in sorted(actions['cd']): |
|
1126 | for f, args, msg in sorted(actions['cd']): | |
1110 | if repo.ui.promptchoice( |
|
1127 | if repo.ui.promptchoice( | |
1111 | _("local changed %s which remote deleted\n" |
|
1128 | _("local changed %s which remote deleted\n" | |
1112 | "use (c)hanged version or (d)elete?" |
|
1129 | "use (c)hanged version or (d)elete?" | |
1113 | "$$ &Changed $$ &Delete") % f, 0): |
|
1130 | "$$ &Changed $$ &Delete") % f, 0): | |
1114 | actions['r'].append((f, None, "prompt delete")) |
|
1131 | actions['r'].append((f, None, "prompt delete")) | |
1115 | else: |
|
1132 | else: | |
1116 | actions['a'].append((f, None, "prompt keep")) |
|
1133 | actions['a'].append((f, None, "prompt keep")) | |
1117 | del actions['cd'][:] |
|
1134 | del actions['cd'][:] | |
1118 |
|
1135 | |||
1119 | for f, args, msg in sorted(actions['dc']): |
|
1136 | for f, args, msg in sorted(actions['dc']): | |
1120 | flags, = args |
|
1137 | flags, = args | |
1121 | if repo.ui.promptchoice( |
|
1138 | if repo.ui.promptchoice( | |
1122 | _("remote changed %s which local deleted\n" |
|
1139 | _("remote changed %s which local deleted\n" | |
1123 | "use (c)hanged version or leave (d)eleted?" |
|
1140 | "use (c)hanged version or leave (d)eleted?" | |
1124 | "$$ &Changed $$ &Deleted") % f, 0) == 0: |
|
1141 | "$$ &Changed $$ &Deleted") % f, 0) == 0: | |
1125 | actions['g'].append((f, (flags,), "prompt recreating")) |
|
1142 | actions['g'].append((f, (flags,), "prompt recreating")) | |
1126 | del actions['dc'][:] |
|
1143 | del actions['dc'][:] | |
1127 |
|
1144 | |||
1128 | ### apply phase |
|
1145 | ### apply phase | |
1129 | if not branchmerge: # just jump to the new rev |
|
1146 | if not branchmerge: # just jump to the new rev | |
1130 | fp1, fp2, xp1, xp2 = fp2, nullid, xp2, '' |
|
1147 | fp1, fp2, xp1, xp2 = fp2, nullid, xp2, '' | |
1131 | if not partial: |
|
1148 | if not partial: | |
1132 | repo.hook('preupdate', throw=True, parent1=xp1, parent2=xp2) |
|
1149 | repo.hook('preupdate', throw=True, parent1=xp1, parent2=xp2) | |
1133 | # note that we're in the middle of an update |
|
1150 | # note that we're in the middle of an update | |
1134 | repo.vfs.write('updatestate', p2.hex()) |
|
1151 | repo.vfs.write('updatestate', p2.hex()) | |
1135 |
|
1152 | |||
1136 | stats = applyupdates(repo, actions, wc, p2, overwrite, labels=labels) |
|
1153 | stats = applyupdates(repo, actions, wc, p2, overwrite, labels=labels) | |
1137 |
|
1154 | |||
1138 | # divergent renames |
|
1155 | # divergent renames | |
1139 | for f, fl in sorted(diverge.iteritems()): |
|
1156 | for f, fl in sorted(diverge.iteritems()): | |
1140 | repo.ui.warn(_("note: possible conflict - %s was renamed " |
|
1157 | repo.ui.warn(_("note: possible conflict - %s was renamed " | |
1141 | "multiple times to:\n") % f) |
|
1158 | "multiple times to:\n") % f) | |
1142 | for nf in fl: |
|
1159 | for nf in fl: | |
1143 | repo.ui.warn(" %s\n" % nf) |
|
1160 | repo.ui.warn(" %s\n" % nf) | |
1144 |
|
1161 | |||
1145 | # rename and delete |
|
1162 | # rename and delete | |
1146 | for f, fl in sorted(renamedelete.iteritems()): |
|
1163 | for f, fl in sorted(renamedelete.iteritems()): | |
1147 | repo.ui.warn(_("note: possible conflict - %s was deleted " |
|
1164 | repo.ui.warn(_("note: possible conflict - %s was deleted " | |
1148 | "and renamed to:\n") % f) |
|
1165 | "and renamed to:\n") % f) | |
1149 | for nf in fl: |
|
1166 | for nf in fl: | |
1150 | repo.ui.warn(" %s\n" % nf) |
|
1167 | repo.ui.warn(" %s\n" % nf) | |
1151 |
|
1168 | |||
1152 | if not partial: |
|
1169 | if not partial: | |
1153 | repo.dirstate.beginparentchange() |
|
1170 | repo.dirstate.beginparentchange() | |
1154 | repo.setparents(fp1, fp2) |
|
1171 | repo.setparents(fp1, fp2) | |
1155 | recordupdates(repo, actions, branchmerge) |
|
1172 | recordupdates(repo, actions, branchmerge) | |
1156 | # update completed, clear state |
|
1173 | # update completed, clear state | |
1157 | util.unlink(repo.join('updatestate')) |
|
1174 | util.unlink(repo.join('updatestate')) | |
1158 |
|
1175 | |||
1159 | if not branchmerge: |
|
1176 | if not branchmerge: | |
1160 | repo.dirstate.setbranch(p2.branch()) |
|
1177 | repo.dirstate.setbranch(p2.branch()) | |
1161 | repo.dirstate.endparentchange() |
|
1178 | repo.dirstate.endparentchange() | |
1162 | finally: |
|
1179 | finally: | |
1163 | wlock.release() |
|
1180 | wlock.release() | |
1164 |
|
1181 | |||
1165 | if not partial: |
|
1182 | if not partial: | |
1166 | def updatehook(parent1=xp1, parent2=xp2, error=stats[3]): |
|
1183 | def updatehook(parent1=xp1, parent2=xp2, error=stats[3]): | |
1167 | repo.hook('update', parent1=parent1, parent2=parent2, error=error) |
|
1184 | repo.hook('update', parent1=parent1, parent2=parent2, error=error) | |
1168 | repo._afterlock(updatehook) |
|
1185 | repo._afterlock(updatehook) | |
1169 | return stats |
|
1186 | return stats | |
1170 |
|
1187 | |||
1171 | def graft(repo, ctx, pctx, labels): |
|
1188 | def graft(repo, ctx, pctx, labels): | |
1172 | """Do a graft-like merge. |
|
1189 | """Do a graft-like merge. | |
1173 |
|
1190 | |||
1174 | This is a merge where the merge ancestor is chosen such that one |
|
1191 | This is a merge where the merge ancestor is chosen such that one | |
1175 | or more changesets are grafted onto the current changeset. In |
|
1192 | or more changesets are grafted onto the current changeset. In | |
1176 | addition to the merge, this fixes up the dirstate to include only |
|
1193 | addition to the merge, this fixes up the dirstate to include only | |
1177 | a single parent and tries to duplicate any renames/copies |
|
1194 | a single parent and tries to duplicate any renames/copies | |
1178 | appropriately. |
|
1195 | appropriately. | |
1179 |
|
1196 | |||
1180 | ctx - changeset to rebase |
|
1197 | ctx - changeset to rebase | |
1181 | pctx - merge base, usually ctx.p1() |
|
1198 | pctx - merge base, usually ctx.p1() | |
1182 | labels - merge labels eg ['local', 'graft'] |
|
1199 | labels - merge labels eg ['local', 'graft'] | |
1183 |
|
1200 | |||
1184 | """ |
|
1201 | """ | |
1185 | # If we're grafting a descendant onto an ancestor, be sure to pass |
|
1202 | # If we're grafting a descendant onto an ancestor, be sure to pass | |
1186 | # mergeancestor=True to update. This does two things: 1) allows the merge if |
|
1203 | # mergeancestor=True to update. This does two things: 1) allows the merge if | |
1187 | # the destination is the same as the parent of the ctx (so we can use graft |
|
1204 | # the destination is the same as the parent of the ctx (so we can use graft | |
1188 | # to copy commits), and 2) informs update that the incoming changes are |
|
1205 | # to copy commits), and 2) informs update that the incoming changes are | |
1189 | # newer than the destination so it doesn't prompt about "remote changed foo |
|
1206 | # newer than the destination so it doesn't prompt about "remote changed foo | |
1190 | # which local deleted". |
|
1207 | # which local deleted". | |
1191 | mergeancestor = repo.changelog.isancestor(repo['.'].node(), ctx.node()) |
|
1208 | mergeancestor = repo.changelog.isancestor(repo['.'].node(), ctx.node()) | |
1192 |
|
1209 | |||
1193 | stats = update(repo, ctx.node(), True, True, False, pctx.node(), |
|
1210 | stats = update(repo, ctx.node(), True, True, False, pctx.node(), | |
1194 | mergeancestor=mergeancestor, labels=labels) |
|
1211 | mergeancestor=mergeancestor, labels=labels) | |
1195 |
|
1212 | |||
1196 | # drop the second merge parent |
|
1213 | # drop the second merge parent | |
1197 | repo.dirstate.beginparentchange() |
|
1214 | repo.dirstate.beginparentchange() | |
1198 | repo.setparents(repo['.'].node(), nullid) |
|
1215 | repo.setparents(repo['.'].node(), nullid) | |
1199 | repo.dirstate.write() |
|
1216 | repo.dirstate.write() | |
1200 | # fix up dirstate for copies and renames |
|
1217 | # fix up dirstate for copies and renames | |
1201 | copies.duplicatecopies(repo, ctx.rev(), pctx.rev()) |
|
1218 | copies.duplicatecopies(repo, ctx.rev(), pctx.rev()) | |
1202 | repo.dirstate.endparentchange() |
|
1219 | repo.dirstate.endparentchange() | |
1203 | return stats |
|
1220 | return stats |
@@ -1,165 +1,165 b'' | |||||
1 | $ hg init t |
|
1 | $ hg init t | |
2 | $ cd t |
|
2 | $ cd t | |
3 |
|
3 | |||
4 | $ echo 1 > a |
|
4 | $ echo 1 > a | |
5 | $ hg ci -qAm "first" |
|
5 | $ hg ci -qAm "first" | |
6 |
|
6 | |||
7 | $ hg cp a b |
|
7 | $ hg cp a b | |
8 | $ hg mv a c |
|
8 | $ hg mv a c | |
9 | $ echo 2 >> b |
|
9 | $ echo 2 >> b | |
10 | $ echo 2 >> c |
|
10 | $ echo 2 >> c | |
11 |
|
11 | |||
12 | $ hg ci -qAm "second" |
|
12 | $ hg ci -qAm "second" | |
13 |
|
13 | |||
14 | $ hg co -C 0 |
|
14 | $ hg co -C 0 | |
15 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
15 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
16 |
|
16 | |||
17 | $ echo 0 > a |
|
17 | $ echo 0 > a | |
18 | $ echo 1 >> a |
|
18 | $ echo 1 >> a | |
19 |
|
19 | |||
20 | $ hg ci -qAm "other" |
|
20 | $ hg ci -qAm "other" | |
21 |
|
21 | |||
22 | $ hg merge --debug |
|
22 | $ hg merge --debug | |
23 | searching for copies back to rev 1 |
|
23 | searching for copies back to rev 1 | |
24 | unmatched files in other: |
|
24 | unmatched files in other: | |
25 | b |
|
25 | b | |
26 | c |
|
26 | c | |
27 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
27 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
28 | src: 'a' -> dst: 'b' * |
|
28 | src: 'a' -> dst: 'b' * | |
29 | src: 'a' -> dst: 'c' * |
|
29 | src: 'a' -> dst: 'c' * | |
30 | checking for directory renames |
|
30 | checking for directory renames | |
31 | resolving manifests |
|
31 | resolving manifests | |
32 | branchmerge: True, force: False, partial: False |
|
32 | branchmerge: True, force: False, partial: False | |
33 | ancestor: b8bf91eeebbc, local: add3f11052fa+, remote: 17c05bb7fcb6 |
|
33 | ancestor: b8bf91eeebbc, local: add3f11052fa+, remote: 17c05bb7fcb6 | |
34 | preserving a for resolve of b |
|
34 | preserving a for resolve of b | |
35 | preserving a for resolve of c |
|
35 | preserving a for resolve of c | |
36 | removing a |
|
36 | removing a | |
37 | b: remote moved from a -> m |
|
37 | b: remote moved from a -> m (premerge) | |
38 | picked tool ':merge' for b (binary False symlink False) |
|
38 | picked tool ':merge' for b (binary False symlink False) | |
39 | merging a and b to b |
|
39 | merging a and b to b | |
40 | my b@add3f11052fa+ other b@17c05bb7fcb6 ancestor a@b8bf91eeebbc |
|
40 | my b@add3f11052fa+ other b@17c05bb7fcb6 ancestor a@b8bf91eeebbc | |
41 | premerge successful |
|
41 | premerge successful | |
42 | c: remote moved from a -> m |
|
42 | c: remote moved from a -> m (premerge) | |
43 | picked tool ':merge' for c (binary False symlink False) |
|
43 | picked tool ':merge' for c (binary False symlink False) | |
44 | merging a and c to c |
|
44 | merging a and c to c | |
45 | my c@add3f11052fa+ other c@17c05bb7fcb6 ancestor a@b8bf91eeebbc |
|
45 | my c@add3f11052fa+ other c@17c05bb7fcb6 ancestor a@b8bf91eeebbc | |
46 | premerge successful |
|
46 | premerge successful | |
47 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
47 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
48 | (branch merge, don't forget to commit) |
|
48 | (branch merge, don't forget to commit) | |
49 |
|
49 | |||
50 | file b |
|
50 | file b | |
51 | $ cat b |
|
51 | $ cat b | |
52 | 0 |
|
52 | 0 | |
53 | 1 |
|
53 | 1 | |
54 | 2 |
|
54 | 2 | |
55 |
|
55 | |||
56 | file c |
|
56 | file c | |
57 | $ cat c |
|
57 | $ cat c | |
58 | 0 |
|
58 | 0 | |
59 | 1 |
|
59 | 1 | |
60 | 2 |
|
60 | 2 | |
61 |
|
61 | |||
62 | Test disabling copy tracing |
|
62 | Test disabling copy tracing | |
63 |
|
63 | |||
64 | - first verify copy metadata was kept |
|
64 | - first verify copy metadata was kept | |
65 |
|
65 | |||
66 | $ hg up -qC 2 |
|
66 | $ hg up -qC 2 | |
67 | $ hg rebase --keep -d 1 -b 2 --config extensions.rebase= |
|
67 | $ hg rebase --keep -d 1 -b 2 --config extensions.rebase= | |
68 | rebasing 2:add3f11052fa "other" (tip) |
|
68 | rebasing 2:add3f11052fa "other" (tip) | |
69 | merging b and a to b |
|
69 | merging b and a to b | |
70 | merging c and a to c |
|
70 | merging c and a to c | |
71 |
|
71 | |||
72 | $ cat b |
|
72 | $ cat b | |
73 | 0 |
|
73 | 0 | |
74 | 1 |
|
74 | 1 | |
75 | 2 |
|
75 | 2 | |
76 |
|
76 | |||
77 | - next verify copy metadata is lost when disabled |
|
77 | - next verify copy metadata is lost when disabled | |
78 |
|
78 | |||
79 | $ hg strip -r . --config extensions.strip= |
|
79 | $ hg strip -r . --config extensions.strip= | |
80 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
80 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
81 | saved backup bundle to $TESTTMP/t/.hg/strip-backup/550bd84c0cd3-fc575957-backup.hg (glob) |
|
81 | saved backup bundle to $TESTTMP/t/.hg/strip-backup/550bd84c0cd3-fc575957-backup.hg (glob) | |
82 | $ hg up -qC 2 |
|
82 | $ hg up -qC 2 | |
83 | $ hg rebase --keep -d 1 -b 2 --config extensions.rebase= --config experimental.disablecopytrace=True |
|
83 | $ hg rebase --keep -d 1 -b 2 --config extensions.rebase= --config experimental.disablecopytrace=True | |
84 | rebasing 2:add3f11052fa "other" (tip) |
|
84 | rebasing 2:add3f11052fa "other" (tip) | |
85 | remote changed a which local deleted |
|
85 | remote changed a which local deleted | |
86 | use (c)hanged version or leave (d)eleted? c |
|
86 | use (c)hanged version or leave (d)eleted? c | |
87 |
|
87 | |||
88 | $ cat b |
|
88 | $ cat b | |
89 | 1 |
|
89 | 1 | |
90 | 2 |
|
90 | 2 | |
91 |
|
91 | |||
92 | $ cd .. |
|
92 | $ cd .. | |
93 |
|
93 | |||
94 | Verify disabling copy tracing still keeps copies from rebase source |
|
94 | Verify disabling copy tracing still keeps copies from rebase source | |
95 |
|
95 | |||
96 | $ hg init copydisable |
|
96 | $ hg init copydisable | |
97 | $ cd copydisable |
|
97 | $ cd copydisable | |
98 | $ touch a |
|
98 | $ touch a | |
99 | $ hg ci -Aqm 'add a' |
|
99 | $ hg ci -Aqm 'add a' | |
100 | $ touch b |
|
100 | $ touch b | |
101 | $ hg ci -Aqm 'add b, c' |
|
101 | $ hg ci -Aqm 'add b, c' | |
102 | $ hg cp b x |
|
102 | $ hg cp b x | |
103 | $ echo x >> x |
|
103 | $ echo x >> x | |
104 | $ hg ci -qm 'copy b->x' |
|
104 | $ hg ci -qm 'copy b->x' | |
105 | $ hg up -q 1 |
|
105 | $ hg up -q 1 | |
106 | $ touch z |
|
106 | $ touch z | |
107 | $ hg ci -Aqm 'add z' |
|
107 | $ hg ci -Aqm 'add z' | |
108 | $ hg log -G -T '{rev} {desc}\n' |
|
108 | $ hg log -G -T '{rev} {desc}\n' | |
109 | @ 3 add z |
|
109 | @ 3 add z | |
110 | | |
|
110 | | | |
111 | | o 2 copy b->x |
|
111 | | o 2 copy b->x | |
112 | |/ |
|
112 | |/ | |
113 | o 1 add b, c |
|
113 | o 1 add b, c | |
114 | | |
|
114 | | | |
115 | o 0 add a |
|
115 | o 0 add a | |
116 |
|
116 | |||
117 | $ hg rebase -d . -b 2 --config extensions.rebase= --config experimental.disablecopytrace=True |
|
117 | $ hg rebase -d . -b 2 --config extensions.rebase= --config experimental.disablecopytrace=True | |
118 | rebasing 2:6adcf8c12e7d "copy b->x" |
|
118 | rebasing 2:6adcf8c12e7d "copy b->x" | |
119 | saved backup bundle to $TESTTMP/copydisable/.hg/strip-backup/6adcf8c12e7d-ce4b3e75-backup.hg (glob) |
|
119 | saved backup bundle to $TESTTMP/copydisable/.hg/strip-backup/6adcf8c12e7d-ce4b3e75-backup.hg (glob) | |
120 | $ hg up -q 3 |
|
120 | $ hg up -q 3 | |
121 | $ hg log -f x -T '{rev} {desc}\n' |
|
121 | $ hg log -f x -T '{rev} {desc}\n' | |
122 | 3 copy b->x |
|
122 | 3 copy b->x | |
123 | 1 add b, c |
|
123 | 1 add b, c | |
124 |
|
124 | |||
125 | $ cd ../ |
|
125 | $ cd ../ | |
126 |
|
126 | |||
127 | Verify we duplicate existing copies, instead of detecting them |
|
127 | Verify we duplicate existing copies, instead of detecting them | |
128 |
|
128 | |||
129 | $ hg init copydisable3 |
|
129 | $ hg init copydisable3 | |
130 | $ cd copydisable3 |
|
130 | $ cd copydisable3 | |
131 | $ touch a |
|
131 | $ touch a | |
132 | $ hg ci -Aqm 'add a' |
|
132 | $ hg ci -Aqm 'add a' | |
133 | $ hg cp a b |
|
133 | $ hg cp a b | |
134 | $ hg ci -Aqm 'copy a->b' |
|
134 | $ hg ci -Aqm 'copy a->b' | |
135 | $ hg mv b c |
|
135 | $ hg mv b c | |
136 | $ hg ci -Aqm 'move b->c' |
|
136 | $ hg ci -Aqm 'move b->c' | |
137 | $ hg up -q 0 |
|
137 | $ hg up -q 0 | |
138 | $ hg cp a b |
|
138 | $ hg cp a b | |
139 | $ echo b >> b |
|
139 | $ echo b >> b | |
140 | $ hg ci -Aqm 'copy a->b (2)' |
|
140 | $ hg ci -Aqm 'copy a->b (2)' | |
141 | $ hg log -G -T '{rev} {desc}\n' |
|
141 | $ hg log -G -T '{rev} {desc}\n' | |
142 | @ 3 copy a->b (2) |
|
142 | @ 3 copy a->b (2) | |
143 | | |
|
143 | | | |
144 | | o 2 move b->c |
|
144 | | o 2 move b->c | |
145 | | | |
|
145 | | | | |
146 | | o 1 copy a->b |
|
146 | | o 1 copy a->b | |
147 | |/ |
|
147 | |/ | |
148 | o 0 add a |
|
148 | o 0 add a | |
149 |
|
149 | |||
150 | $ hg rebase -d 2 -s 3 --config extensions.rebase= --config experimental.disablecopytrace=True |
|
150 | $ hg rebase -d 2 -s 3 --config extensions.rebase= --config experimental.disablecopytrace=True | |
151 | rebasing 3:47e1a9e6273b "copy a->b (2)" (tip) |
|
151 | rebasing 3:47e1a9e6273b "copy a->b (2)" (tip) | |
152 | saved backup bundle to $TESTTMP/copydisable3/.hg/strip-backup/47e1a9e6273b-2d099c59-backup.hg (glob) |
|
152 | saved backup bundle to $TESTTMP/copydisable3/.hg/strip-backup/47e1a9e6273b-2d099c59-backup.hg (glob) | |
153 |
|
153 | |||
154 | $ hg log -G -f b |
|
154 | $ hg log -G -f b | |
155 | @ changeset: 3:76024fb4b05b |
|
155 | @ changeset: 3:76024fb4b05b | |
156 | | tag: tip |
|
156 | | tag: tip | |
157 | | user: test |
|
157 | | user: test | |
158 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
158 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
159 | | summary: copy a->b (2) |
|
159 | | summary: copy a->b (2) | |
160 | | |
|
160 | | | |
161 | o changeset: 0:ac82d8b1f7c4 |
|
161 | o changeset: 0:ac82d8b1f7c4 | |
162 | user: test |
|
162 | user: test | |
163 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
163 | date: Thu Jan 01 00:00:00 1970 +0000 | |
164 | summary: add a |
|
164 | summary: add a | |
165 |
|
165 |
@@ -1,65 +1,65 b'' | |||||
1 | $ hg init repo |
|
1 | $ hg init repo | |
2 | $ cd repo |
|
2 | $ cd repo | |
3 |
|
3 | |||
4 | $ echo line 1 > foo |
|
4 | $ echo line 1 > foo | |
5 | $ hg ci -qAm 'add foo' |
|
5 | $ hg ci -qAm 'add foo' | |
6 |
|
6 | |||
7 | copy foo to bar and change both files |
|
7 | copy foo to bar and change both files | |
8 | $ hg cp foo bar |
|
8 | $ hg cp foo bar | |
9 | $ echo line 2-1 >> foo |
|
9 | $ echo line 2-1 >> foo | |
10 | $ echo line 2-2 >> bar |
|
10 | $ echo line 2-2 >> bar | |
11 | $ hg ci -m 'cp foo bar; change both' |
|
11 | $ hg ci -m 'cp foo bar; change both' | |
12 |
|
12 | |||
13 | in another branch, change foo in a way that doesn't conflict with |
|
13 | in another branch, change foo in a way that doesn't conflict with | |
14 | the other changes |
|
14 | the other changes | |
15 | $ hg up -qC 0 |
|
15 | $ hg up -qC 0 | |
16 | $ echo line 0 > foo |
|
16 | $ echo line 0 > foo | |
17 | $ hg cat foo >> foo |
|
17 | $ hg cat foo >> foo | |
18 | $ hg ci -m 'change foo' |
|
18 | $ hg ci -m 'change foo' | |
19 | created new head |
|
19 | created new head | |
20 |
|
20 | |||
21 | we get conflicts that shouldn't be there |
|
21 | we get conflicts that shouldn't be there | |
22 | $ hg merge -P |
|
22 | $ hg merge -P | |
23 | changeset: 1:484bf6903104 |
|
23 | changeset: 1:484bf6903104 | |
24 | user: test |
|
24 | user: test | |
25 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
25 | date: Thu Jan 01 00:00:00 1970 +0000 | |
26 | summary: cp foo bar; change both |
|
26 | summary: cp foo bar; change both | |
27 |
|
27 | |||
28 | $ hg merge --debug |
|
28 | $ hg merge --debug | |
29 | searching for copies back to rev 1 |
|
29 | searching for copies back to rev 1 | |
30 | unmatched files in other: |
|
30 | unmatched files in other: | |
31 | bar |
|
31 | bar | |
32 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
32 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
33 | src: 'foo' -> dst: 'bar' * |
|
33 | src: 'foo' -> dst: 'bar' * | |
34 | checking for directory renames |
|
34 | checking for directory renames | |
35 | resolving manifests |
|
35 | resolving manifests | |
36 | branchmerge: True, force: False, partial: False |
|
36 | branchmerge: True, force: False, partial: False | |
37 | ancestor: e6dc8efe11cc, local: 6a0df1dad128+, remote: 484bf6903104 |
|
37 | ancestor: e6dc8efe11cc, local: 6a0df1dad128+, remote: 484bf6903104 | |
38 | preserving foo for resolve of bar |
|
38 | preserving foo for resolve of bar | |
39 | preserving foo for resolve of foo |
|
39 | preserving foo for resolve of foo | |
40 | bar: remote copied from foo -> m |
|
40 | bar: remote copied from foo -> m (premerge) | |
41 | picked tool ':merge' for bar (binary False symlink False) |
|
41 | picked tool ':merge' for bar (binary False symlink False) | |
42 | merging foo and bar to bar |
|
42 | merging foo and bar to bar | |
43 | my bar@6a0df1dad128+ other bar@484bf6903104 ancestor foo@e6dc8efe11cc |
|
43 | my bar@6a0df1dad128+ other bar@484bf6903104 ancestor foo@e6dc8efe11cc | |
44 | premerge successful |
|
44 | premerge successful | |
45 | foo: versions differ -> m |
|
45 | foo: versions differ -> m (premerge) | |
46 | picked tool ':merge' for foo (binary False symlink False) |
|
46 | picked tool ':merge' for foo (binary False symlink False) | |
47 | merging foo |
|
47 | merging foo | |
48 | my foo@6a0df1dad128+ other foo@484bf6903104 ancestor foo@e6dc8efe11cc |
|
48 | my foo@6a0df1dad128+ other foo@484bf6903104 ancestor foo@e6dc8efe11cc | |
49 | premerge successful |
|
49 | premerge successful | |
50 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
50 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
51 | (branch merge, don't forget to commit) |
|
51 | (branch merge, don't forget to commit) | |
52 |
|
52 | |||
53 | contents of foo |
|
53 | contents of foo | |
54 | $ cat foo |
|
54 | $ cat foo | |
55 | line 0 |
|
55 | line 0 | |
56 | line 1 |
|
56 | line 1 | |
57 | line 2-1 |
|
57 | line 2-1 | |
58 |
|
58 | |||
59 | contents of bar |
|
59 | contents of bar | |
60 | $ cat bar |
|
60 | $ cat bar | |
61 | line 0 |
|
61 | line 0 | |
62 | line 1 |
|
62 | line 1 | |
63 | line 2-2 |
|
63 | line 2-2 | |
64 |
|
64 | |||
65 | $ cd .. |
|
65 | $ cd .. |
@@ -1,817 +1,818 b'' | |||||
1 | Create a repo with some stuff in it: |
|
1 | Create a repo with some stuff in it: | |
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 | $ echo a > d |
|
6 | $ echo a > d | |
7 | $ echo a > e |
|
7 | $ echo a > e | |
8 | $ hg ci -qAm0 |
|
8 | $ hg ci -qAm0 | |
9 | $ echo b > a |
|
9 | $ echo b > a | |
10 | $ hg ci -m1 -u bar |
|
10 | $ hg ci -m1 -u bar | |
11 | $ hg mv a b |
|
11 | $ hg mv a b | |
12 | $ hg ci -m2 |
|
12 | $ hg ci -m2 | |
13 | $ hg cp b c |
|
13 | $ hg cp b c | |
14 | $ hg ci -m3 -u baz |
|
14 | $ hg ci -m3 -u baz | |
15 | $ echo b > d |
|
15 | $ echo b > d | |
16 | $ echo f > e |
|
16 | $ echo f > e | |
17 | $ hg ci -m4 |
|
17 | $ hg ci -m4 | |
18 | $ hg up -q 3 |
|
18 | $ hg up -q 3 | |
19 | $ echo b > e |
|
19 | $ echo b > e | |
20 | $ hg branch -q stable |
|
20 | $ hg branch -q stable | |
21 | $ hg ci -m5 |
|
21 | $ hg ci -m5 | |
22 | $ hg merge -q default --tool internal:local |
|
22 | $ hg merge -q default --tool internal:local | |
23 | $ hg branch -q default |
|
23 | $ hg branch -q default | |
24 | $ hg ci -m6 |
|
24 | $ hg ci -m6 | |
25 | $ hg phase --public 3 |
|
25 | $ hg phase --public 3 | |
26 | $ hg phase --force --secret 6 |
|
26 | $ hg phase --force --secret 6 | |
27 |
|
27 | |||
28 | $ hg log -G --template '{author}@{rev}.{phase}: {desc}\n' |
|
28 | $ hg log -G --template '{author}@{rev}.{phase}: {desc}\n' | |
29 | @ test@6.secret: 6 |
|
29 | @ test@6.secret: 6 | |
30 | |\ |
|
30 | |\ | |
31 | | o test@5.draft: 5 |
|
31 | | o test@5.draft: 5 | |
32 | | | |
|
32 | | | | |
33 | o | test@4.draft: 4 |
|
33 | o | test@4.draft: 4 | |
34 | |/ |
|
34 | |/ | |
35 | o baz@3.public: 3 |
|
35 | o baz@3.public: 3 | |
36 | | |
|
36 | | | |
37 | o test@2.public: 2 |
|
37 | o test@2.public: 2 | |
38 | | |
|
38 | | | |
39 | o bar@1.public: 1 |
|
39 | o bar@1.public: 1 | |
40 | | |
|
40 | | | |
41 | o test@0.public: 0 |
|
41 | o test@0.public: 0 | |
42 |
|
42 | |||
43 |
|
43 | |||
44 | Need to specify a rev: |
|
44 | Need to specify a rev: | |
45 |
|
45 | |||
46 | $ hg graft |
|
46 | $ hg graft | |
47 | abort: no revisions specified |
|
47 | abort: no revisions specified | |
48 | [255] |
|
48 | [255] | |
49 |
|
49 | |||
50 | Can't graft ancestor: |
|
50 | Can't graft ancestor: | |
51 |
|
51 | |||
52 | $ hg graft 1 2 |
|
52 | $ hg graft 1 2 | |
53 | skipping ancestor revision 1:5d205f8b35b6 |
|
53 | skipping ancestor revision 1:5d205f8b35b6 | |
54 | skipping ancestor revision 2:5c095ad7e90f |
|
54 | skipping ancestor revision 2:5c095ad7e90f | |
55 | [255] |
|
55 | [255] | |
56 |
|
56 | |||
57 | Specify revisions with -r: |
|
57 | Specify revisions with -r: | |
58 |
|
58 | |||
59 | $ hg graft -r 1 -r 2 |
|
59 | $ hg graft -r 1 -r 2 | |
60 | skipping ancestor revision 1:5d205f8b35b6 |
|
60 | skipping ancestor revision 1:5d205f8b35b6 | |
61 | skipping ancestor revision 2:5c095ad7e90f |
|
61 | skipping ancestor revision 2:5c095ad7e90f | |
62 | [255] |
|
62 | [255] | |
63 |
|
63 | |||
64 | $ hg graft -r 1 2 |
|
64 | $ hg graft -r 1 2 | |
65 | skipping ancestor revision 2:5c095ad7e90f |
|
65 | skipping ancestor revision 2:5c095ad7e90f | |
66 | skipping ancestor revision 1:5d205f8b35b6 |
|
66 | skipping ancestor revision 1:5d205f8b35b6 | |
67 | [255] |
|
67 | [255] | |
68 |
|
68 | |||
69 | Can't graft with dirty wd: |
|
69 | Can't graft with dirty wd: | |
70 |
|
70 | |||
71 | $ hg up -q 0 |
|
71 | $ hg up -q 0 | |
72 | $ echo foo > a |
|
72 | $ echo foo > a | |
73 | $ hg graft 1 |
|
73 | $ hg graft 1 | |
74 | abort: uncommitted changes |
|
74 | abort: uncommitted changes | |
75 | [255] |
|
75 | [255] | |
76 | $ hg revert a |
|
76 | $ hg revert a | |
77 |
|
77 | |||
78 | Graft a rename: |
|
78 | Graft a rename: | |
79 | (this also tests that editor is invoked if '--edit' is specified) |
|
79 | (this also tests that editor is invoked if '--edit' is specified) | |
80 |
|
80 | |||
81 | $ hg status --rev "2^1" --rev 2 |
|
81 | $ hg status --rev "2^1" --rev 2 | |
82 | A b |
|
82 | A b | |
83 | R a |
|
83 | R a | |
84 | $ HGEDITOR=cat hg graft 2 -u foo --edit |
|
84 | $ HGEDITOR=cat hg graft 2 -u foo --edit | |
85 | grafting 2:5c095ad7e90f "2" |
|
85 | grafting 2:5c095ad7e90f "2" | |
86 | merging a and b to b |
|
86 | merging a and b to b | |
87 | 2 |
|
87 | 2 | |
88 |
|
88 | |||
89 |
|
89 | |||
90 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
90 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
91 | HG: Leave message empty to abort commit. |
|
91 | HG: Leave message empty to abort commit. | |
92 | HG: -- |
|
92 | HG: -- | |
93 | HG: user: foo |
|
93 | HG: user: foo | |
94 | HG: branch 'default' |
|
94 | HG: branch 'default' | |
95 | HG: added b |
|
95 | HG: added b | |
96 | HG: removed a |
|
96 | HG: removed a | |
97 | $ hg export tip --git |
|
97 | $ hg export tip --git | |
98 | # HG changeset patch |
|
98 | # HG changeset patch | |
99 | # User foo |
|
99 | # User foo | |
100 | # Date 0 0 |
|
100 | # Date 0 0 | |
101 | # Thu Jan 01 00:00:00 1970 +0000 |
|
101 | # Thu Jan 01 00:00:00 1970 +0000 | |
102 | # Node ID ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
102 | # Node ID ef0ef43d49e79e81ddafdc7997401ba0041efc82 | |
103 | # Parent 68795b066622ca79a25816a662041d8f78f3cd9e |
|
103 | # Parent 68795b066622ca79a25816a662041d8f78f3cd9e | |
104 | 2 |
|
104 | 2 | |
105 |
|
105 | |||
106 | diff --git a/a b/b |
|
106 | diff --git a/a b/b | |
107 | rename from a |
|
107 | rename from a | |
108 | rename to b |
|
108 | rename to b | |
109 |
|
109 | |||
110 | Look for extra:source |
|
110 | Look for extra:source | |
111 |
|
111 | |||
112 | $ hg log --debug -r tip |
|
112 | $ hg log --debug -r tip | |
113 | changeset: 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
113 | changeset: 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82 | |
114 | tag: tip |
|
114 | tag: tip | |
115 | phase: draft |
|
115 | phase: draft | |
116 | parent: 0:68795b066622ca79a25816a662041d8f78f3cd9e |
|
116 | parent: 0:68795b066622ca79a25816a662041d8f78f3cd9e | |
117 | parent: -1:0000000000000000000000000000000000000000 |
|
117 | parent: -1:0000000000000000000000000000000000000000 | |
118 | manifest: 7:e59b6b228f9cbf9903d5e9abf996e083a1f533eb |
|
118 | manifest: 7:e59b6b228f9cbf9903d5e9abf996e083a1f533eb | |
119 | user: foo |
|
119 | user: foo | |
120 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
120 | date: Thu Jan 01 00:00:00 1970 +0000 | |
121 | files+: b |
|
121 | files+: b | |
122 | files-: a |
|
122 | files-: a | |
123 | extra: branch=default |
|
123 | extra: branch=default | |
124 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
124 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 | |
125 | description: |
|
125 | description: | |
126 | 2 |
|
126 | 2 | |
127 |
|
127 | |||
128 |
|
128 | |||
129 |
|
129 | |||
130 | Graft out of order, skipping a merge and a duplicate |
|
130 | Graft out of order, skipping a merge and a duplicate | |
131 | (this also tests that editor is not invoked if '--edit' is not specified) |
|
131 | (this also tests that editor is not invoked if '--edit' is not specified) | |
132 |
|
132 | |||
133 | $ hg graft 1 5 4 3 'merge()' 2 -n |
|
133 | $ hg graft 1 5 4 3 'merge()' 2 -n | |
134 | skipping ungraftable merge revision 6 |
|
134 | skipping ungraftable merge revision 6 | |
135 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) |
|
135 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) | |
136 | grafting 1:5d205f8b35b6 "1" |
|
136 | grafting 1:5d205f8b35b6 "1" | |
137 | grafting 5:97f8bfe72746 "5" |
|
137 | grafting 5:97f8bfe72746 "5" | |
138 | grafting 4:9c233e8e184d "4" |
|
138 | grafting 4:9c233e8e184d "4" | |
139 | grafting 3:4c60f11aa304 "3" |
|
139 | grafting 3:4c60f11aa304 "3" | |
140 |
|
140 | |||
141 | $ HGEDITOR=cat hg graft 1 5 4 3 'merge()' 2 --debug |
|
141 | $ HGEDITOR=cat hg graft 1 5 4 3 'merge()' 2 --debug | |
142 | skipping ungraftable merge revision 6 |
|
142 | skipping ungraftable merge revision 6 | |
143 | scanning for duplicate grafts |
|
143 | scanning for duplicate grafts | |
144 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) |
|
144 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) | |
145 | grafting 1:5d205f8b35b6 "1" |
|
145 | grafting 1:5d205f8b35b6 "1" | |
146 | searching for copies back to rev 1 |
|
146 | searching for copies back to rev 1 | |
147 | unmatched files in local: |
|
147 | unmatched files in local: | |
148 | b |
|
148 | b | |
149 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
149 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
150 | src: 'a' -> dst: 'b' * |
|
150 | src: 'a' -> dst: 'b' * | |
151 | checking for directory renames |
|
151 | checking for directory renames | |
152 | resolving manifests |
|
152 | resolving manifests | |
153 | branchmerge: True, force: True, partial: False |
|
153 | branchmerge: True, force: True, partial: False | |
154 | ancestor: 68795b066622, local: ef0ef43d49e7+, remote: 5d205f8b35b6 |
|
154 | ancestor: 68795b066622, local: ef0ef43d49e7+, remote: 5d205f8b35b6 | |
155 | preserving b for resolve of b |
|
155 | preserving b for resolve of b | |
156 | b: local copied/moved from a -> m |
|
156 | b: local copied/moved from a -> m (premerge) | |
157 | picked tool ':merge' for b (binary False symlink False) |
|
157 | picked tool ':merge' for b (binary False symlink False) | |
158 | merging b and a to b |
|
158 | merging b and a to b | |
159 | my b@ef0ef43d49e7+ other a@5d205f8b35b6 ancestor a@68795b066622 |
|
159 | my b@ef0ef43d49e7+ other a@5d205f8b35b6 ancestor a@68795b066622 | |
160 | premerge successful |
|
160 | premerge successful | |
161 | committing files: |
|
161 | committing files: | |
162 | b |
|
162 | b | |
163 | committing manifest |
|
163 | committing manifest | |
164 | committing changelog |
|
164 | committing changelog | |
165 | grafting 5:97f8bfe72746 "5" |
|
165 | grafting 5:97f8bfe72746 "5" | |
166 | searching for copies back to rev 1 |
|
166 | searching for copies back to rev 1 | |
167 | resolving manifests |
|
167 | resolving manifests | |
168 | branchmerge: True, force: True, partial: False |
|
168 | branchmerge: True, force: True, partial: False | |
169 | ancestor: 4c60f11aa304, local: 6b9e5368ca4e+, remote: 97f8bfe72746 |
|
169 | ancestor: 4c60f11aa304, local: 6b9e5368ca4e+, remote: 97f8bfe72746 | |
170 | e: remote is newer -> g |
|
170 | e: remote is newer -> g | |
171 | getting e |
|
171 | getting e | |
172 | b: remote unchanged -> k |
|
172 | b: remote unchanged -> k | |
173 | committing files: |
|
173 | committing files: | |
174 | e |
|
174 | e | |
175 | committing manifest |
|
175 | committing manifest | |
176 | committing changelog |
|
176 | committing changelog | |
177 | grafting 4:9c233e8e184d "4" |
|
177 | grafting 4:9c233e8e184d "4" | |
178 | searching for copies back to rev 1 |
|
178 | searching for copies back to rev 1 | |
179 | resolving manifests |
|
179 | resolving manifests | |
180 | branchmerge: True, force: True, partial: False |
|
180 | branchmerge: True, force: True, partial: False | |
181 | ancestor: 4c60f11aa304, local: 1905859650ec+, remote: 9c233e8e184d |
|
181 | ancestor: 4c60f11aa304, local: 1905859650ec+, remote: 9c233e8e184d | |
182 | preserving e for resolve of e |
|
182 | preserving e for resolve of e | |
183 | d: remote is newer -> g |
|
183 | d: remote is newer -> g | |
184 | getting d |
|
184 | getting d | |
185 | b: remote unchanged -> k |
|
185 | b: remote unchanged -> k | |
186 | e: versions differ -> m |
|
186 | e: versions differ -> m (premerge) | |
187 | picked tool ':merge' for e (binary False symlink False) |
|
187 | picked tool ':merge' for e (binary False symlink False) | |
188 | merging e |
|
188 | merging e | |
189 | my e@1905859650ec+ other e@9c233e8e184d ancestor e@68795b066622 |
|
189 | my e@1905859650ec+ other e@9c233e8e184d ancestor e@68795b066622 | |
|
190 | e: versions differ -> m (merge) | |||
190 | picked tool ':merge' for e (binary False symlink False) |
|
191 | picked tool ':merge' for e (binary False symlink False) | |
191 | my e@1905859650ec+ other e@9c233e8e184d ancestor e@68795b066622 |
|
192 | my e@1905859650ec+ other e@9c233e8e184d ancestor e@68795b066622 | |
192 | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') |
|
193 | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') | |
193 | abort: unresolved conflicts, can't continue |
|
194 | abort: unresolved conflicts, can't continue | |
194 | (use hg resolve and hg graft --continue) |
|
195 | (use hg resolve and hg graft --continue) | |
195 | [255] |
|
196 | [255] | |
196 |
|
197 | |||
197 | Commit while interrupted should fail: |
|
198 | Commit while interrupted should fail: | |
198 |
|
199 | |||
199 | $ hg ci -m 'commit interrupted graft' |
|
200 | $ hg ci -m 'commit interrupted graft' | |
200 | abort: graft in progress |
|
201 | abort: graft in progress | |
201 | (use 'hg graft --continue' or 'hg update' to abort) |
|
202 | (use 'hg graft --continue' or 'hg update' to abort) | |
202 | [255] |
|
203 | [255] | |
203 |
|
204 | |||
204 | Abort the graft and try committing: |
|
205 | Abort the graft and try committing: | |
205 |
|
206 | |||
206 | $ hg up -C . |
|
207 | $ hg up -C . | |
207 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
208 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
208 | $ echo c >> e |
|
209 | $ echo c >> e | |
209 | $ hg ci -mtest |
|
210 | $ hg ci -mtest | |
210 |
|
211 | |||
211 | $ hg strip . --config extensions.strip= |
|
212 | $ hg strip . --config extensions.strip= | |
212 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
213 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
213 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/*-backup.hg (glob) |
|
214 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/*-backup.hg (glob) | |
214 |
|
215 | |||
215 | Graft again: |
|
216 | Graft again: | |
216 |
|
217 | |||
217 | $ hg graft 1 5 4 3 'merge()' 2 |
|
218 | $ hg graft 1 5 4 3 'merge()' 2 | |
218 | skipping ungraftable merge revision 6 |
|
219 | skipping ungraftable merge revision 6 | |
219 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) |
|
220 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) | |
220 | skipping revision 1:5d205f8b35b6 (already grafted to 8:6b9e5368ca4e) |
|
221 | skipping revision 1:5d205f8b35b6 (already grafted to 8:6b9e5368ca4e) | |
221 | skipping revision 5:97f8bfe72746 (already grafted to 9:1905859650ec) |
|
222 | skipping revision 5:97f8bfe72746 (already grafted to 9:1905859650ec) | |
222 | grafting 4:9c233e8e184d "4" |
|
223 | grafting 4:9c233e8e184d "4" | |
223 | merging e |
|
224 | merging e | |
224 | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') |
|
225 | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') | |
225 | abort: unresolved conflicts, can't continue |
|
226 | abort: unresolved conflicts, can't continue | |
226 | (use hg resolve and hg graft --continue) |
|
227 | (use hg resolve and hg graft --continue) | |
227 | [255] |
|
228 | [255] | |
228 |
|
229 | |||
229 | Continue without resolve should fail: |
|
230 | Continue without resolve should fail: | |
230 |
|
231 | |||
231 | $ hg graft -c |
|
232 | $ hg graft -c | |
232 | grafting 4:9c233e8e184d "4" |
|
233 | grafting 4:9c233e8e184d "4" | |
233 | abort: unresolved merge conflicts (see "hg help resolve") |
|
234 | abort: unresolved merge conflicts (see "hg help resolve") | |
234 | [255] |
|
235 | [255] | |
235 |
|
236 | |||
236 | Fix up: |
|
237 | Fix up: | |
237 |
|
238 | |||
238 | $ echo b > e |
|
239 | $ echo b > e | |
239 | $ hg resolve -m e |
|
240 | $ hg resolve -m e | |
240 | (no more unresolved files) |
|
241 | (no more unresolved files) | |
241 |
|
242 | |||
242 | Continue with a revision should fail: |
|
243 | Continue with a revision should fail: | |
243 |
|
244 | |||
244 | $ hg graft -c 6 |
|
245 | $ hg graft -c 6 | |
245 | abort: can't specify --continue and revisions |
|
246 | abort: can't specify --continue and revisions | |
246 | [255] |
|
247 | [255] | |
247 |
|
248 | |||
248 | $ hg graft -c -r 6 |
|
249 | $ hg graft -c -r 6 | |
249 | abort: can't specify --continue and revisions |
|
250 | abort: can't specify --continue and revisions | |
250 | [255] |
|
251 | [255] | |
251 |
|
252 | |||
252 | Continue for real, clobber usernames |
|
253 | Continue for real, clobber usernames | |
253 |
|
254 | |||
254 | $ hg graft -c -U |
|
255 | $ hg graft -c -U | |
255 | grafting 4:9c233e8e184d "4" |
|
256 | grafting 4:9c233e8e184d "4" | |
256 | grafting 3:4c60f11aa304 "3" |
|
257 | grafting 3:4c60f11aa304 "3" | |
257 |
|
258 | |||
258 | Compare with original: |
|
259 | Compare with original: | |
259 |
|
260 | |||
260 | $ hg diff -r 6 |
|
261 | $ hg diff -r 6 | |
261 | $ hg status --rev 0:. -C |
|
262 | $ hg status --rev 0:. -C | |
262 | M d |
|
263 | M d | |
263 | M e |
|
264 | M e | |
264 | A b |
|
265 | A b | |
265 | a |
|
266 | a | |
266 | A c |
|
267 | A c | |
267 | a |
|
268 | a | |
268 | R a |
|
269 | R a | |
269 |
|
270 | |||
270 | View graph: |
|
271 | View graph: | |
271 |
|
272 | |||
272 | $ hg log -G --template '{author}@{rev}.{phase}: {desc}\n' |
|
273 | $ hg log -G --template '{author}@{rev}.{phase}: {desc}\n' | |
273 | @ test@11.draft: 3 |
|
274 | @ test@11.draft: 3 | |
274 | | |
|
275 | | | |
275 | o test@10.draft: 4 |
|
276 | o test@10.draft: 4 | |
276 | | |
|
277 | | | |
277 | o test@9.draft: 5 |
|
278 | o test@9.draft: 5 | |
278 | | |
|
279 | | | |
279 | o bar@8.draft: 1 |
|
280 | o bar@8.draft: 1 | |
280 | | |
|
281 | | | |
281 | o foo@7.draft: 2 |
|
282 | o foo@7.draft: 2 | |
282 | | |
|
283 | | | |
283 | | o test@6.secret: 6 |
|
284 | | o test@6.secret: 6 | |
284 | | |\ |
|
285 | | |\ | |
285 | | | o test@5.draft: 5 |
|
286 | | | o test@5.draft: 5 | |
286 | | | | |
|
287 | | | | | |
287 | | o | test@4.draft: 4 |
|
288 | | o | test@4.draft: 4 | |
288 | | |/ |
|
289 | | |/ | |
289 | | o baz@3.public: 3 |
|
290 | | o baz@3.public: 3 | |
290 | | | |
|
291 | | | | |
291 | | o test@2.public: 2 |
|
292 | | o test@2.public: 2 | |
292 | | | |
|
293 | | | | |
293 | | o bar@1.public: 1 |
|
294 | | o bar@1.public: 1 | |
294 | |/ |
|
295 | |/ | |
295 | o test@0.public: 0 |
|
296 | o test@0.public: 0 | |
296 |
|
297 | |||
297 | Graft again onto another branch should preserve the original source |
|
298 | Graft again onto another branch should preserve the original source | |
298 | $ hg up -q 0 |
|
299 | $ hg up -q 0 | |
299 | $ echo 'g'>g |
|
300 | $ echo 'g'>g | |
300 | $ hg add g |
|
301 | $ hg add g | |
301 | $ hg ci -m 7 |
|
302 | $ hg ci -m 7 | |
302 | created new head |
|
303 | created new head | |
303 | $ hg graft 7 |
|
304 | $ hg graft 7 | |
304 | grafting 7:ef0ef43d49e7 "2" |
|
305 | grafting 7:ef0ef43d49e7 "2" | |
305 |
|
306 | |||
306 | $ hg log -r 7 --template '{rev}:{node}\n' |
|
307 | $ hg log -r 7 --template '{rev}:{node}\n' | |
307 | 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
308 | 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82 | |
308 | $ hg log -r 2 --template '{rev}:{node}\n' |
|
309 | $ hg log -r 2 --template '{rev}:{node}\n' | |
309 | 2:5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
310 | 2:5c095ad7e90f871700f02dd1fa5012cb4498a2d4 | |
310 |
|
311 | |||
311 | $ hg log --debug -r tip |
|
312 | $ hg log --debug -r tip | |
312 | changeset: 13:7a4785234d87ec1aa420ed6b11afe40fa73e12a9 |
|
313 | changeset: 13:7a4785234d87ec1aa420ed6b11afe40fa73e12a9 | |
313 | tag: tip |
|
314 | tag: tip | |
314 | phase: draft |
|
315 | phase: draft | |
315 | parent: 12:b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f |
|
316 | parent: 12:b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f | |
316 | parent: -1:0000000000000000000000000000000000000000 |
|
317 | parent: -1:0000000000000000000000000000000000000000 | |
317 | manifest: 13:dc313617b8c32457c0d589e0dbbedfe71f3cd637 |
|
318 | manifest: 13:dc313617b8c32457c0d589e0dbbedfe71f3cd637 | |
318 | user: foo |
|
319 | user: foo | |
319 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
320 | date: Thu Jan 01 00:00:00 1970 +0000 | |
320 | files+: b |
|
321 | files+: b | |
321 | files-: a |
|
322 | files-: a | |
322 | extra: branch=default |
|
323 | extra: branch=default | |
323 | extra: intermediate-source=ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
324 | extra: intermediate-source=ef0ef43d49e79e81ddafdc7997401ba0041efc82 | |
324 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
325 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 | |
325 | description: |
|
326 | description: | |
326 | 2 |
|
327 | 2 | |
327 |
|
328 | |||
328 |
|
329 | |||
329 | Disallow grafting an already grafted cset onto its original branch |
|
330 | Disallow grafting an already grafted cset onto its original branch | |
330 | $ hg up -q 6 |
|
331 | $ hg up -q 6 | |
331 | $ hg graft 7 |
|
332 | $ hg graft 7 | |
332 | skipping already grafted revision 7:ef0ef43d49e7 (was grafted from 2:5c095ad7e90f) |
|
333 | skipping already grafted revision 7:ef0ef43d49e7 (was grafted from 2:5c095ad7e90f) | |
333 | [255] |
|
334 | [255] | |
334 |
|
335 | |||
335 | $ hg extdiff --config extensions.extdiff= --patch -r 2 -r 13 |
|
336 | $ hg extdiff --config extensions.extdiff= --patch -r 2 -r 13 | |
336 | --- */hg-5c095ad7e90f.patch * +0000 (glob) |
|
337 | --- */hg-5c095ad7e90f.patch * +0000 (glob) | |
337 | +++ */hg-7a4785234d87.patch * +0000 (glob) |
|
338 | +++ */hg-7a4785234d87.patch * +0000 (glob) | |
338 | @@ -1,18 +1,18 @@ |
|
339 | @@ -1,18 +1,18 @@ | |
339 | # HG changeset patch |
|
340 | # HG changeset patch | |
340 | -# User test |
|
341 | -# User test | |
341 | +# User foo |
|
342 | +# User foo | |
342 | # Date 0 0 |
|
343 | # Date 0 0 | |
343 | # Thu Jan 01 00:00:00 1970 +0000 |
|
344 | # Thu Jan 01 00:00:00 1970 +0000 | |
344 | -# Node ID 5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
345 | -# Node ID 5c095ad7e90f871700f02dd1fa5012cb4498a2d4 | |
345 | -# Parent 5d205f8b35b66bc36375c9534ffd3237730e8f04 |
|
346 | -# Parent 5d205f8b35b66bc36375c9534ffd3237730e8f04 | |
346 | +# Node ID 7a4785234d87ec1aa420ed6b11afe40fa73e12a9 |
|
347 | +# Node ID 7a4785234d87ec1aa420ed6b11afe40fa73e12a9 | |
347 | +# Parent b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f |
|
348 | +# Parent b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f | |
348 | 2 |
|
349 | 2 | |
349 |
|
350 | |||
350 | -diff -r 5d205f8b35b6 -r 5c095ad7e90f a |
|
351 | -diff -r 5d205f8b35b6 -r 5c095ad7e90f a | |
351 | +diff -r b592ea63bb0c -r 7a4785234d87 a |
|
352 | +diff -r b592ea63bb0c -r 7a4785234d87 a | |
352 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
353 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
353 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
354 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
354 | @@ -1,1 +0,0 @@ |
|
355 | @@ -1,1 +0,0 @@ | |
355 | --b |
|
356 | --b | |
356 | -diff -r 5d205f8b35b6 -r 5c095ad7e90f b |
|
357 | -diff -r 5d205f8b35b6 -r 5c095ad7e90f b | |
357 | +-a |
|
358 | +-a | |
358 | +diff -r b592ea63bb0c -r 7a4785234d87 b |
|
359 | +diff -r b592ea63bb0c -r 7a4785234d87 b | |
359 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
360 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
360 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
361 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 | |
361 | @@ -0,0 +1,1 @@ |
|
362 | @@ -0,0 +1,1 @@ | |
362 | -+b |
|
363 | -+b | |
363 | ++a |
|
364 | ++a | |
364 | [1] |
|
365 | [1] | |
365 |
|
366 | |||
366 | $ hg extdiff --config extensions.extdiff= --patch -r 2 -r 13 -X . |
|
367 | $ hg extdiff --config extensions.extdiff= --patch -r 2 -r 13 -X . | |
367 | --- */hg-5c095ad7e90f.patch * +0000 (glob) |
|
368 | --- */hg-5c095ad7e90f.patch * +0000 (glob) | |
368 | +++ */hg-7a4785234d87.patch * +0000 (glob) |
|
369 | +++ */hg-7a4785234d87.patch * +0000 (glob) | |
369 | @@ -1,8 +1,8 @@ |
|
370 | @@ -1,8 +1,8 @@ | |
370 | # HG changeset patch |
|
371 | # HG changeset patch | |
371 | -# User test |
|
372 | -# User test | |
372 | +# User foo |
|
373 | +# User foo | |
373 | # Date 0 0 |
|
374 | # Date 0 0 | |
374 | # Thu Jan 01 00:00:00 1970 +0000 |
|
375 | # Thu Jan 01 00:00:00 1970 +0000 | |
375 | -# Node ID 5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
376 | -# Node ID 5c095ad7e90f871700f02dd1fa5012cb4498a2d4 | |
376 | -# Parent 5d205f8b35b66bc36375c9534ffd3237730e8f04 |
|
377 | -# Parent 5d205f8b35b66bc36375c9534ffd3237730e8f04 | |
377 | +# Node ID 7a4785234d87ec1aa420ed6b11afe40fa73e12a9 |
|
378 | +# Node ID 7a4785234d87ec1aa420ed6b11afe40fa73e12a9 | |
378 | +# Parent b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f |
|
379 | +# Parent b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f | |
379 | 2 |
|
380 | 2 | |
380 |
|
381 | |||
381 | [1] |
|
382 | [1] | |
382 |
|
383 | |||
383 | Disallow grafting already grafted csets with the same origin onto each other |
|
384 | Disallow grafting already grafted csets with the same origin onto each other | |
384 | $ hg up -q 13 |
|
385 | $ hg up -q 13 | |
385 | $ hg graft 2 |
|
386 | $ hg graft 2 | |
386 | skipping revision 2:5c095ad7e90f (already grafted to 13:7a4785234d87) |
|
387 | skipping revision 2:5c095ad7e90f (already grafted to 13:7a4785234d87) | |
387 | [255] |
|
388 | [255] | |
388 | $ hg graft 7 |
|
389 | $ hg graft 7 | |
389 | skipping already grafted revision 7:ef0ef43d49e7 (13:7a4785234d87 also has origin 2:5c095ad7e90f) |
|
390 | skipping already grafted revision 7:ef0ef43d49e7 (13:7a4785234d87 also has origin 2:5c095ad7e90f) | |
390 | [255] |
|
391 | [255] | |
391 |
|
392 | |||
392 | $ hg up -q 7 |
|
393 | $ hg up -q 7 | |
393 | $ hg graft 2 |
|
394 | $ hg graft 2 | |
394 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) |
|
395 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) | |
395 | [255] |
|
396 | [255] | |
396 | $ hg graft tip |
|
397 | $ hg graft tip | |
397 | skipping already grafted revision 13:7a4785234d87 (7:ef0ef43d49e7 also has origin 2:5c095ad7e90f) |
|
398 | skipping already grafted revision 13:7a4785234d87 (7:ef0ef43d49e7 also has origin 2:5c095ad7e90f) | |
398 | [255] |
|
399 | [255] | |
399 |
|
400 | |||
400 | Graft with --log |
|
401 | Graft with --log | |
401 |
|
402 | |||
402 | $ hg up -Cq 1 |
|
403 | $ hg up -Cq 1 | |
403 | $ hg graft 3 --log -u foo |
|
404 | $ hg graft 3 --log -u foo | |
404 | grafting 3:4c60f11aa304 "3" |
|
405 | grafting 3:4c60f11aa304 "3" | |
405 | warning: can't find ancestor for 'c' copied from 'b'! |
|
406 | warning: can't find ancestor for 'c' copied from 'b'! | |
406 | $ hg log --template '{rev} {parents} {desc}\n' -r tip |
|
407 | $ hg log --template '{rev} {parents} {desc}\n' -r tip | |
407 | 14 1:5d205f8b35b6 3 |
|
408 | 14 1:5d205f8b35b6 3 | |
408 | (grafted from 4c60f11aa304a54ae1c199feb94e7fc771e51ed8) |
|
409 | (grafted from 4c60f11aa304a54ae1c199feb94e7fc771e51ed8) | |
409 |
|
410 | |||
410 | Resolve conflicted graft |
|
411 | Resolve conflicted graft | |
411 | $ hg up -q 0 |
|
412 | $ hg up -q 0 | |
412 | $ echo b > a |
|
413 | $ echo b > a | |
413 | $ hg ci -m 8 |
|
414 | $ hg ci -m 8 | |
414 | created new head |
|
415 | created new head | |
415 | $ echo c > a |
|
416 | $ echo c > a | |
416 | $ hg ci -m 9 |
|
417 | $ hg ci -m 9 | |
417 | $ hg graft 1 --tool internal:fail |
|
418 | $ hg graft 1 --tool internal:fail | |
418 | grafting 1:5d205f8b35b6 "1" |
|
419 | grafting 1:5d205f8b35b6 "1" | |
419 | abort: unresolved conflicts, can't continue |
|
420 | abort: unresolved conflicts, can't continue | |
420 | (use hg resolve and hg graft --continue) |
|
421 | (use hg resolve and hg graft --continue) | |
421 | [255] |
|
422 | [255] | |
422 | $ hg resolve --all |
|
423 | $ hg resolve --all | |
423 | merging a |
|
424 | merging a | |
424 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
425 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
425 | [1] |
|
426 | [1] | |
426 | $ cat a |
|
427 | $ cat a | |
427 | <<<<<<< local: aaa4406d4f0a - test: 9 |
|
428 | <<<<<<< local: aaa4406d4f0a - test: 9 | |
428 | c |
|
429 | c | |
429 | ======= |
|
430 | ======= | |
430 | b |
|
431 | b | |
431 | >>>>>>> other: 5d205f8b35b6 - bar: 1 |
|
432 | >>>>>>> other: 5d205f8b35b6 - bar: 1 | |
432 | $ echo b > a |
|
433 | $ echo b > a | |
433 | $ hg resolve -m a |
|
434 | $ hg resolve -m a | |
434 | (no more unresolved files) |
|
435 | (no more unresolved files) | |
435 | $ hg graft -c |
|
436 | $ hg graft -c | |
436 | grafting 1:5d205f8b35b6 "1" |
|
437 | grafting 1:5d205f8b35b6 "1" | |
437 | $ hg export tip --git |
|
438 | $ hg export tip --git | |
438 | # HG changeset patch |
|
439 | # HG changeset patch | |
439 | # User bar |
|
440 | # User bar | |
440 | # Date 0 0 |
|
441 | # Date 0 0 | |
441 | # Thu Jan 01 00:00:00 1970 +0000 |
|
442 | # Thu Jan 01 00:00:00 1970 +0000 | |
442 | # Node ID f67661df0c4804d301f064f332b57e7d5ddaf2be |
|
443 | # Node ID f67661df0c4804d301f064f332b57e7d5ddaf2be | |
443 | # Parent aaa4406d4f0ae9befd6e58c82ec63706460cbca6 |
|
444 | # Parent aaa4406d4f0ae9befd6e58c82ec63706460cbca6 | |
444 | 1 |
|
445 | 1 | |
445 |
|
446 | |||
446 | diff --git a/a b/a |
|
447 | diff --git a/a b/a | |
447 | --- a/a |
|
448 | --- a/a | |
448 | +++ b/a |
|
449 | +++ b/a | |
449 | @@ -1,1 +1,1 @@ |
|
450 | @@ -1,1 +1,1 @@ | |
450 | -c |
|
451 | -c | |
451 | +b |
|
452 | +b | |
452 |
|
453 | |||
453 | Resolve conflicted graft with rename |
|
454 | Resolve conflicted graft with rename | |
454 | $ echo c > a |
|
455 | $ echo c > a | |
455 | $ hg ci -m 10 |
|
456 | $ hg ci -m 10 | |
456 | $ hg graft 2 --tool internal:fail |
|
457 | $ hg graft 2 --tool internal:fail | |
457 | grafting 2:5c095ad7e90f "2" |
|
458 | grafting 2:5c095ad7e90f "2" | |
458 | abort: unresolved conflicts, can't continue |
|
459 | abort: unresolved conflicts, can't continue | |
459 | (use hg resolve and hg graft --continue) |
|
460 | (use hg resolve and hg graft --continue) | |
460 | [255] |
|
461 | [255] | |
461 | $ hg resolve --all |
|
462 | $ hg resolve --all | |
462 | merging a and b to b |
|
463 | merging a and b to b | |
463 | (no more unresolved files) |
|
464 | (no more unresolved files) | |
464 | $ hg graft -c |
|
465 | $ hg graft -c | |
465 | grafting 2:5c095ad7e90f "2" |
|
466 | grafting 2:5c095ad7e90f "2" | |
466 | $ hg export tip --git |
|
467 | $ hg export tip --git | |
467 | # HG changeset patch |
|
468 | # HG changeset patch | |
468 | # User test |
|
469 | # User test | |
469 | # Date 0 0 |
|
470 | # Date 0 0 | |
470 | # Thu Jan 01 00:00:00 1970 +0000 |
|
471 | # Thu Jan 01 00:00:00 1970 +0000 | |
471 | # Node ID 9627f653b421c61fc1ea4c4e366745070fa3d2bc |
|
472 | # Node ID 9627f653b421c61fc1ea4c4e366745070fa3d2bc | |
472 | # Parent ee295f490a40b97f3d18dd4c4f1c8936c233b612 |
|
473 | # Parent ee295f490a40b97f3d18dd4c4f1c8936c233b612 | |
473 | 2 |
|
474 | 2 | |
474 |
|
475 | |||
475 | diff --git a/a b/b |
|
476 | diff --git a/a b/b | |
476 | rename from a |
|
477 | rename from a | |
477 | rename to b |
|
478 | rename to b | |
478 |
|
479 | |||
479 | Test simple origin(), with and without args |
|
480 | Test simple origin(), with and without args | |
480 | $ hg log -r 'origin()' |
|
481 | $ hg log -r 'origin()' | |
481 | changeset: 1:5d205f8b35b6 |
|
482 | changeset: 1:5d205f8b35b6 | |
482 | user: bar |
|
483 | user: bar | |
483 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
484 | date: Thu Jan 01 00:00:00 1970 +0000 | |
484 | summary: 1 |
|
485 | summary: 1 | |
485 |
|
486 | |||
486 | changeset: 2:5c095ad7e90f |
|
487 | changeset: 2:5c095ad7e90f | |
487 | user: test |
|
488 | user: test | |
488 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
489 | date: Thu Jan 01 00:00:00 1970 +0000 | |
489 | summary: 2 |
|
490 | summary: 2 | |
490 |
|
491 | |||
491 | changeset: 3:4c60f11aa304 |
|
492 | changeset: 3:4c60f11aa304 | |
492 | user: baz |
|
493 | user: baz | |
493 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
494 | date: Thu Jan 01 00:00:00 1970 +0000 | |
494 | summary: 3 |
|
495 | summary: 3 | |
495 |
|
496 | |||
496 | changeset: 4:9c233e8e184d |
|
497 | changeset: 4:9c233e8e184d | |
497 | user: test |
|
498 | user: test | |
498 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
499 | date: Thu Jan 01 00:00:00 1970 +0000 | |
499 | summary: 4 |
|
500 | summary: 4 | |
500 |
|
501 | |||
501 | changeset: 5:97f8bfe72746 |
|
502 | changeset: 5:97f8bfe72746 | |
502 | branch: stable |
|
503 | branch: stable | |
503 | parent: 3:4c60f11aa304 |
|
504 | parent: 3:4c60f11aa304 | |
504 | user: test |
|
505 | user: test | |
505 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
506 | date: Thu Jan 01 00:00:00 1970 +0000 | |
506 | summary: 5 |
|
507 | summary: 5 | |
507 |
|
508 | |||
508 | $ hg log -r 'origin(7)' |
|
509 | $ hg log -r 'origin(7)' | |
509 | changeset: 2:5c095ad7e90f |
|
510 | changeset: 2:5c095ad7e90f | |
510 | user: test |
|
511 | user: test | |
511 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
512 | date: Thu Jan 01 00:00:00 1970 +0000 | |
512 | summary: 2 |
|
513 | summary: 2 | |
513 |
|
514 | |||
514 | Now transplant a graft to test following through copies |
|
515 | Now transplant a graft to test following through copies | |
515 | $ hg up -q 0 |
|
516 | $ hg up -q 0 | |
516 | $ hg branch -q dev |
|
517 | $ hg branch -q dev | |
517 | $ hg ci -qm "dev branch" |
|
518 | $ hg ci -qm "dev branch" | |
518 | $ hg --config extensions.transplant= transplant -q 7 |
|
519 | $ hg --config extensions.transplant= transplant -q 7 | |
519 | $ hg log -r 'origin(.)' |
|
520 | $ hg log -r 'origin(.)' | |
520 | changeset: 2:5c095ad7e90f |
|
521 | changeset: 2:5c095ad7e90f | |
521 | user: test |
|
522 | user: test | |
522 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
523 | date: Thu Jan 01 00:00:00 1970 +0000 | |
523 | summary: 2 |
|
524 | summary: 2 | |
524 |
|
525 | |||
525 | Test that the graft and transplant markers in extra are converted, allowing |
|
526 | Test that the graft and transplant markers in extra are converted, allowing | |
526 | origin() to still work. Note that these recheck the immediately preceeding two |
|
527 | origin() to still work. Note that these recheck the immediately preceeding two | |
527 | tests. |
|
528 | tests. | |
528 | $ hg --quiet --config extensions.convert= --config convert.hg.saverev=True convert . ../converted |
|
529 | $ hg --quiet --config extensions.convert= --config convert.hg.saverev=True convert . ../converted | |
529 |
|
530 | |||
530 | The graft case |
|
531 | The graft case | |
531 | $ hg -R ../converted log -r 7 --template "{rev}: {node}\n{join(extras, '\n')}\n" |
|
532 | $ hg -R ../converted log -r 7 --template "{rev}: {node}\n{join(extras, '\n')}\n" | |
532 | 7: 7ae846e9111fc8f57745634250c7b9ac0a60689b |
|
533 | 7: 7ae846e9111fc8f57745634250c7b9ac0a60689b | |
533 | branch=default |
|
534 | branch=default | |
534 | convert_revision=ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
535 | convert_revision=ef0ef43d49e79e81ddafdc7997401ba0041efc82 | |
535 | source=e0213322b2c1a5d5d236c74e79666441bee67a7d |
|
536 | source=e0213322b2c1a5d5d236c74e79666441bee67a7d | |
536 | $ hg -R ../converted log -r 'origin(7)' |
|
537 | $ hg -R ../converted log -r 'origin(7)' | |
537 | changeset: 2:e0213322b2c1 |
|
538 | changeset: 2:e0213322b2c1 | |
538 | user: test |
|
539 | user: test | |
539 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
540 | date: Thu Jan 01 00:00:00 1970 +0000 | |
540 | summary: 2 |
|
541 | summary: 2 | |
541 |
|
542 | |||
542 | Test that template correctly expands more than one 'extra' (issue4362), and that |
|
543 | Test that template correctly expands more than one 'extra' (issue4362), and that | |
543 | 'intermediate-source' is converted. |
|
544 | 'intermediate-source' is converted. | |
544 | $ hg -R ../converted log -r 13 --template "{extras % ' Extra: {extra}\n'}" |
|
545 | $ hg -R ../converted log -r 13 --template "{extras % ' Extra: {extra}\n'}" | |
545 | Extra: branch=default |
|
546 | Extra: branch=default | |
546 | Extra: convert_revision=7a4785234d87ec1aa420ed6b11afe40fa73e12a9 |
|
547 | Extra: convert_revision=7a4785234d87ec1aa420ed6b11afe40fa73e12a9 | |
547 | Extra: intermediate-source=7ae846e9111fc8f57745634250c7b9ac0a60689b |
|
548 | Extra: intermediate-source=7ae846e9111fc8f57745634250c7b9ac0a60689b | |
548 | Extra: source=e0213322b2c1a5d5d236c74e79666441bee67a7d |
|
549 | Extra: source=e0213322b2c1a5d5d236c74e79666441bee67a7d | |
549 |
|
550 | |||
550 | The transplant case |
|
551 | The transplant case | |
551 | $ hg -R ../converted log -r tip --template "{rev}: {node}\n{join(extras, '\n')}\n" |
|
552 | $ hg -R ../converted log -r tip --template "{rev}: {node}\n{join(extras, '\n')}\n" | |
552 | 21: fbb6c5cc81002f2b4b49c9d731404688bcae5ade |
|
553 | 21: fbb6c5cc81002f2b4b49c9d731404688bcae5ade | |
553 | branch=dev |
|
554 | branch=dev | |
554 | convert_revision=7e61b508e709a11d28194a5359bc3532d910af21 |
|
555 | convert_revision=7e61b508e709a11d28194a5359bc3532d910af21 | |
555 | transplant_source=z\xe8F\xe9\x11\x1f\xc8\xf5wEcBP\xc7\xb9\xac (esc) |
|
556 | transplant_source=z\xe8F\xe9\x11\x1f\xc8\xf5wEcBP\xc7\xb9\xac (esc) | |
556 | `h\x9b (esc) |
|
557 | `h\x9b (esc) | |
557 | $ hg -R ../converted log -r 'origin(tip)' |
|
558 | $ hg -R ../converted log -r 'origin(tip)' | |
558 | changeset: 2:e0213322b2c1 |
|
559 | changeset: 2:e0213322b2c1 | |
559 | user: test |
|
560 | user: test | |
560 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
561 | date: Thu Jan 01 00:00:00 1970 +0000 | |
561 | summary: 2 |
|
562 | summary: 2 | |
562 |
|
563 | |||
563 |
|
564 | |||
564 | Test simple destination |
|
565 | Test simple destination | |
565 | $ hg log -r 'destination()' |
|
566 | $ hg log -r 'destination()' | |
566 | changeset: 7:ef0ef43d49e7 |
|
567 | changeset: 7:ef0ef43d49e7 | |
567 | parent: 0:68795b066622 |
|
568 | parent: 0:68795b066622 | |
568 | user: foo |
|
569 | user: foo | |
569 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
570 | date: Thu Jan 01 00:00:00 1970 +0000 | |
570 | summary: 2 |
|
571 | summary: 2 | |
571 |
|
572 | |||
572 | changeset: 8:6b9e5368ca4e |
|
573 | changeset: 8:6b9e5368ca4e | |
573 | user: bar |
|
574 | user: bar | |
574 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
575 | date: Thu Jan 01 00:00:00 1970 +0000 | |
575 | summary: 1 |
|
576 | summary: 1 | |
576 |
|
577 | |||
577 | changeset: 9:1905859650ec |
|
578 | changeset: 9:1905859650ec | |
578 | user: test |
|
579 | user: test | |
579 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
580 | date: Thu Jan 01 00:00:00 1970 +0000 | |
580 | summary: 5 |
|
581 | summary: 5 | |
581 |
|
582 | |||
582 | changeset: 10:52dc0b4c6907 |
|
583 | changeset: 10:52dc0b4c6907 | |
583 | user: test |
|
584 | user: test | |
584 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
585 | date: Thu Jan 01 00:00:00 1970 +0000 | |
585 | summary: 4 |
|
586 | summary: 4 | |
586 |
|
587 | |||
587 | changeset: 11:882b35362a6b |
|
588 | changeset: 11:882b35362a6b | |
588 | user: test |
|
589 | user: test | |
589 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
590 | date: Thu Jan 01 00:00:00 1970 +0000 | |
590 | summary: 3 |
|
591 | summary: 3 | |
591 |
|
592 | |||
592 | changeset: 13:7a4785234d87 |
|
593 | changeset: 13:7a4785234d87 | |
593 | user: foo |
|
594 | user: foo | |
594 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
595 | date: Thu Jan 01 00:00:00 1970 +0000 | |
595 | summary: 2 |
|
596 | summary: 2 | |
596 |
|
597 | |||
597 | changeset: 14:f64defefacee |
|
598 | changeset: 14:f64defefacee | |
598 | parent: 1:5d205f8b35b6 |
|
599 | parent: 1:5d205f8b35b6 | |
599 | user: foo |
|
600 | user: foo | |
600 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
601 | date: Thu Jan 01 00:00:00 1970 +0000 | |
601 | summary: 3 |
|
602 | summary: 3 | |
602 |
|
603 | |||
603 | changeset: 17:f67661df0c48 |
|
604 | changeset: 17:f67661df0c48 | |
604 | user: bar |
|
605 | user: bar | |
605 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
606 | date: Thu Jan 01 00:00:00 1970 +0000 | |
606 | summary: 1 |
|
607 | summary: 1 | |
607 |
|
608 | |||
608 | changeset: 19:9627f653b421 |
|
609 | changeset: 19:9627f653b421 | |
609 | user: test |
|
610 | user: test | |
610 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
611 | date: Thu Jan 01 00:00:00 1970 +0000 | |
611 | summary: 2 |
|
612 | summary: 2 | |
612 |
|
613 | |||
613 | changeset: 21:7e61b508e709 |
|
614 | changeset: 21:7e61b508e709 | |
614 | branch: dev |
|
615 | branch: dev | |
615 | tag: tip |
|
616 | tag: tip | |
616 | user: foo |
|
617 | user: foo | |
617 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
618 | date: Thu Jan 01 00:00:00 1970 +0000 | |
618 | summary: 2 |
|
619 | summary: 2 | |
619 |
|
620 | |||
620 | $ hg log -r 'destination(2)' |
|
621 | $ hg log -r 'destination(2)' | |
621 | changeset: 7:ef0ef43d49e7 |
|
622 | changeset: 7:ef0ef43d49e7 | |
622 | parent: 0:68795b066622 |
|
623 | parent: 0:68795b066622 | |
623 | user: foo |
|
624 | user: foo | |
624 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
625 | date: Thu Jan 01 00:00:00 1970 +0000 | |
625 | summary: 2 |
|
626 | summary: 2 | |
626 |
|
627 | |||
627 | changeset: 13:7a4785234d87 |
|
628 | changeset: 13:7a4785234d87 | |
628 | user: foo |
|
629 | user: foo | |
629 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
630 | date: Thu Jan 01 00:00:00 1970 +0000 | |
630 | summary: 2 |
|
631 | summary: 2 | |
631 |
|
632 | |||
632 | changeset: 19:9627f653b421 |
|
633 | changeset: 19:9627f653b421 | |
633 | user: test |
|
634 | user: test | |
634 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
635 | date: Thu Jan 01 00:00:00 1970 +0000 | |
635 | summary: 2 |
|
636 | summary: 2 | |
636 |
|
637 | |||
637 | changeset: 21:7e61b508e709 |
|
638 | changeset: 21:7e61b508e709 | |
638 | branch: dev |
|
639 | branch: dev | |
639 | tag: tip |
|
640 | tag: tip | |
640 | user: foo |
|
641 | user: foo | |
641 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
642 | date: Thu Jan 01 00:00:00 1970 +0000 | |
642 | summary: 2 |
|
643 | summary: 2 | |
643 |
|
644 | |||
644 | Transplants of grafts can find a destination... |
|
645 | Transplants of grafts can find a destination... | |
645 | $ hg log -r 'destination(7)' |
|
646 | $ hg log -r 'destination(7)' | |
646 | changeset: 21:7e61b508e709 |
|
647 | changeset: 21:7e61b508e709 | |
647 | branch: dev |
|
648 | branch: dev | |
648 | tag: tip |
|
649 | tag: tip | |
649 | user: foo |
|
650 | user: foo | |
650 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
651 | date: Thu Jan 01 00:00:00 1970 +0000 | |
651 | summary: 2 |
|
652 | summary: 2 | |
652 |
|
653 | |||
653 | ... grafts of grafts unfortunately can't |
|
654 | ... grafts of grafts unfortunately can't | |
654 | $ hg graft -q 13 |
|
655 | $ hg graft -q 13 | |
655 | warning: can't find ancestor for 'b' copied from 'a'! |
|
656 | warning: can't find ancestor for 'b' copied from 'a'! | |
656 | $ hg log -r 'destination(13)' |
|
657 | $ hg log -r 'destination(13)' | |
657 | All copies of a cset |
|
658 | All copies of a cset | |
658 | $ hg log -r 'origin(13) or destination(origin(13))' |
|
659 | $ hg log -r 'origin(13) or destination(origin(13))' | |
659 | changeset: 2:5c095ad7e90f |
|
660 | changeset: 2:5c095ad7e90f | |
660 | user: test |
|
661 | user: test | |
661 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
662 | date: Thu Jan 01 00:00:00 1970 +0000 | |
662 | summary: 2 |
|
663 | summary: 2 | |
663 |
|
664 | |||
664 | changeset: 7:ef0ef43d49e7 |
|
665 | changeset: 7:ef0ef43d49e7 | |
665 | parent: 0:68795b066622 |
|
666 | parent: 0:68795b066622 | |
666 | user: foo |
|
667 | user: foo | |
667 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
668 | date: Thu Jan 01 00:00:00 1970 +0000 | |
668 | summary: 2 |
|
669 | summary: 2 | |
669 |
|
670 | |||
670 | changeset: 13:7a4785234d87 |
|
671 | changeset: 13:7a4785234d87 | |
671 | user: foo |
|
672 | user: foo | |
672 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
673 | date: Thu Jan 01 00:00:00 1970 +0000 | |
673 | summary: 2 |
|
674 | summary: 2 | |
674 |
|
675 | |||
675 | changeset: 19:9627f653b421 |
|
676 | changeset: 19:9627f653b421 | |
676 | user: test |
|
677 | user: test | |
677 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
678 | date: Thu Jan 01 00:00:00 1970 +0000 | |
678 | summary: 2 |
|
679 | summary: 2 | |
679 |
|
680 | |||
680 | changeset: 21:7e61b508e709 |
|
681 | changeset: 21:7e61b508e709 | |
681 | branch: dev |
|
682 | branch: dev | |
682 | user: foo |
|
683 | user: foo | |
683 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
684 | date: Thu Jan 01 00:00:00 1970 +0000 | |
684 | summary: 2 |
|
685 | summary: 2 | |
685 |
|
686 | |||
686 | changeset: 22:d1cb6591fa4b |
|
687 | changeset: 22:d1cb6591fa4b | |
687 | branch: dev |
|
688 | branch: dev | |
688 | tag: tip |
|
689 | tag: tip | |
689 | user: foo |
|
690 | user: foo | |
690 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
691 | date: Thu Jan 01 00:00:00 1970 +0000 | |
691 | summary: 2 |
|
692 | summary: 2 | |
692 |
|
693 | |||
693 |
|
694 | |||
694 | graft works on complex revset |
|
695 | graft works on complex revset | |
695 |
|
696 | |||
696 | $ hg graft 'origin(13) or destination(origin(13))' |
|
697 | $ hg graft 'origin(13) or destination(origin(13))' | |
697 | skipping ancestor revision 21:7e61b508e709 |
|
698 | skipping ancestor revision 21:7e61b508e709 | |
698 | skipping ancestor revision 22:d1cb6591fa4b |
|
699 | skipping ancestor revision 22:d1cb6591fa4b | |
699 | skipping revision 2:5c095ad7e90f (already grafted to 22:d1cb6591fa4b) |
|
700 | skipping revision 2:5c095ad7e90f (already grafted to 22:d1cb6591fa4b) | |
700 | grafting 7:ef0ef43d49e7 "2" |
|
701 | grafting 7:ef0ef43d49e7 "2" | |
701 | warning: can't find ancestor for 'b' copied from 'a'! |
|
702 | warning: can't find ancestor for 'b' copied from 'a'! | |
702 | grafting 13:7a4785234d87 "2" |
|
703 | grafting 13:7a4785234d87 "2" | |
703 | warning: can't find ancestor for 'b' copied from 'a'! |
|
704 | warning: can't find ancestor for 'b' copied from 'a'! | |
704 | grafting 19:9627f653b421 "2" |
|
705 | grafting 19:9627f653b421 "2" | |
705 | merging b |
|
706 | merging b | |
706 | warning: can't find ancestor for 'b' copied from 'a'! |
|
707 | warning: can't find ancestor for 'b' copied from 'a'! | |
707 |
|
708 | |||
708 | graft with --force (still doesn't graft merges) |
|
709 | graft with --force (still doesn't graft merges) | |
709 |
|
710 | |||
710 | $ hg graft 19 0 6 |
|
711 | $ hg graft 19 0 6 | |
711 | skipping ungraftable merge revision 6 |
|
712 | skipping ungraftable merge revision 6 | |
712 | skipping ancestor revision 0:68795b066622 |
|
713 | skipping ancestor revision 0:68795b066622 | |
713 | skipping already grafted revision 19:9627f653b421 (22:d1cb6591fa4b also has origin 2:5c095ad7e90f) |
|
714 | skipping already grafted revision 19:9627f653b421 (22:d1cb6591fa4b also has origin 2:5c095ad7e90f) | |
714 | [255] |
|
715 | [255] | |
715 | $ hg graft 19 0 6 --force |
|
716 | $ hg graft 19 0 6 --force | |
716 | skipping ungraftable merge revision 6 |
|
717 | skipping ungraftable merge revision 6 | |
717 | grafting 19:9627f653b421 "2" |
|
718 | grafting 19:9627f653b421 "2" | |
718 | merging b |
|
719 | merging b | |
719 | warning: can't find ancestor for 'b' copied from 'a'! |
|
720 | warning: can't find ancestor for 'b' copied from 'a'! | |
720 | grafting 0:68795b066622 "0" |
|
721 | grafting 0:68795b066622 "0" | |
721 |
|
722 | |||
722 | graft --force after backout |
|
723 | graft --force after backout | |
723 |
|
724 | |||
724 | $ echo abc > a |
|
725 | $ echo abc > a | |
725 | $ hg ci -m 28 |
|
726 | $ hg ci -m 28 | |
726 | $ hg backout 28 |
|
727 | $ hg backout 28 | |
727 | reverting a |
|
728 | reverting a | |
728 | changeset 29:53177ba928f6 backs out changeset 28:50a516bb8b57 |
|
729 | changeset 29:53177ba928f6 backs out changeset 28:50a516bb8b57 | |
729 | $ hg graft 28 |
|
730 | $ hg graft 28 | |
730 | skipping ancestor revision 28:50a516bb8b57 |
|
731 | skipping ancestor revision 28:50a516bb8b57 | |
731 | [255] |
|
732 | [255] | |
732 | $ hg graft 28 --force |
|
733 | $ hg graft 28 --force | |
733 | grafting 28:50a516bb8b57 "28" |
|
734 | grafting 28:50a516bb8b57 "28" | |
734 | merging a |
|
735 | merging a | |
735 | $ cat a |
|
736 | $ cat a | |
736 | abc |
|
737 | abc | |
737 |
|
738 | |||
738 | graft --continue after --force |
|
739 | graft --continue after --force | |
739 |
|
740 | |||
740 | $ echo def > a |
|
741 | $ echo def > a | |
741 | $ hg ci -m 31 |
|
742 | $ hg ci -m 31 | |
742 | $ hg graft 28 --force --tool internal:fail |
|
743 | $ hg graft 28 --force --tool internal:fail | |
743 | grafting 28:50a516bb8b57 "28" |
|
744 | grafting 28:50a516bb8b57 "28" | |
744 | abort: unresolved conflicts, can't continue |
|
745 | abort: unresolved conflicts, can't continue | |
745 | (use hg resolve and hg graft --continue) |
|
746 | (use hg resolve and hg graft --continue) | |
746 | [255] |
|
747 | [255] | |
747 | $ hg resolve --all |
|
748 | $ hg resolve --all | |
748 | merging a |
|
749 | merging a | |
749 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
750 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
750 | [1] |
|
751 | [1] | |
751 | $ echo abc > a |
|
752 | $ echo abc > a | |
752 | $ hg resolve -m a |
|
753 | $ hg resolve -m a | |
753 | (no more unresolved files) |
|
754 | (no more unresolved files) | |
754 | $ hg graft -c |
|
755 | $ hg graft -c | |
755 | grafting 28:50a516bb8b57 "28" |
|
756 | grafting 28:50a516bb8b57 "28" | |
756 | $ cat a |
|
757 | $ cat a | |
757 | abc |
|
758 | abc | |
758 |
|
759 | |||
759 | Continue testing same origin policy, using revision numbers from test above |
|
760 | Continue testing same origin policy, using revision numbers from test above | |
760 | but do some destructive editing of the repo: |
|
761 | but do some destructive editing of the repo: | |
761 |
|
762 | |||
762 | $ hg up -qC 7 |
|
763 | $ hg up -qC 7 | |
763 | $ hg tag -l -r 13 tmp |
|
764 | $ hg tag -l -r 13 tmp | |
764 | $ hg --config extensions.strip= strip 2 |
|
765 | $ hg --config extensions.strip= strip 2 | |
765 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/5c095ad7e90f-d323a1e4-backup.hg (glob) |
|
766 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/5c095ad7e90f-d323a1e4-backup.hg (glob) | |
766 | $ hg graft tmp |
|
767 | $ hg graft tmp | |
767 | skipping already grafted revision 8:7a4785234d87 (2:ef0ef43d49e7 also has unknown origin 5c095ad7e90f) |
|
768 | skipping already grafted revision 8:7a4785234d87 (2:ef0ef43d49e7 also has unknown origin 5c095ad7e90f) | |
768 | [255] |
|
769 | [255] | |
769 |
|
770 | |||
770 | Empty graft |
|
771 | Empty graft | |
771 |
|
772 | |||
772 | $ hg up -qr 26 |
|
773 | $ hg up -qr 26 | |
773 | $ hg tag -f something |
|
774 | $ hg tag -f something | |
774 | $ hg graft -qr 27 |
|
775 | $ hg graft -qr 27 | |
775 | $ hg graft -f 27 |
|
776 | $ hg graft -f 27 | |
776 | grafting 27:ed6c7e54e319 "28" |
|
777 | grafting 27:ed6c7e54e319 "28" | |
777 | note: graft of 27:ed6c7e54e319 created no changes to commit |
|
778 | note: graft of 27:ed6c7e54e319 created no changes to commit | |
778 |
|
779 | |||
779 | $ cd .. |
|
780 | $ cd .. | |
780 |
|
781 | |||
781 | Graft to duplicate a commit |
|
782 | Graft to duplicate a commit | |
782 |
|
783 | |||
783 | $ hg init graftsibling |
|
784 | $ hg init graftsibling | |
784 | $ cd graftsibling |
|
785 | $ cd graftsibling | |
785 | $ touch a |
|
786 | $ touch a | |
786 | $ hg commit -qAm a |
|
787 | $ hg commit -qAm a | |
787 | $ touch b |
|
788 | $ touch b | |
788 | $ hg commit -qAm b |
|
789 | $ hg commit -qAm b | |
789 | $ hg log -G -T '{rev}\n' |
|
790 | $ hg log -G -T '{rev}\n' | |
790 | @ 1 |
|
791 | @ 1 | |
791 | | |
|
792 | | | |
792 | o 0 |
|
793 | o 0 | |
793 |
|
794 | |||
794 | $ hg up -q 0 |
|
795 | $ hg up -q 0 | |
795 | $ hg graft -r 1 |
|
796 | $ hg graft -r 1 | |
796 | grafting 1:0e067c57feba "b" (tip) |
|
797 | grafting 1:0e067c57feba "b" (tip) | |
797 | $ hg log -G -T '{rev}\n' |
|
798 | $ hg log -G -T '{rev}\n' | |
798 | @ 2 |
|
799 | @ 2 | |
799 | | |
|
800 | | | |
800 | | o 1 |
|
801 | | o 1 | |
801 | |/ |
|
802 | |/ | |
802 | o 0 |
|
803 | o 0 | |
803 |
|
804 | |||
804 | Graft to duplicate a commit twice |
|
805 | Graft to duplicate a commit twice | |
805 |
|
806 | |||
806 | $ hg up -q 0 |
|
807 | $ hg up -q 0 | |
807 | $ hg graft -r 2 |
|
808 | $ hg graft -r 2 | |
808 | grafting 2:044ec77f6389 "b" (tip) |
|
809 | grafting 2:044ec77f6389 "b" (tip) | |
809 | $ hg log -G -T '{rev}\n' |
|
810 | $ hg log -G -T '{rev}\n' | |
810 | @ 3 |
|
811 | @ 3 | |
811 | | |
|
812 | | | |
812 | | o 2 |
|
813 | | o 2 | |
813 | |/ |
|
814 | |/ | |
814 | | o 1 |
|
815 | | o 1 | |
815 | |/ |
|
816 | |/ | |
816 | o 0 |
|
817 | o 0 | |
817 |
|
818 |
@@ -1,98 +1,98 b'' | |||||
1 | https://bz.mercurial-scm.org/672 |
|
1 | https://bz.mercurial-scm.org/672 | |
2 |
|
2 | |||
3 | # 0-2-4 |
|
3 | # 0-2-4 | |
4 | # \ \ \ |
|
4 | # \ \ \ | |
5 | # 1-3-5 |
|
5 | # 1-3-5 | |
6 | # |
|
6 | # | |
7 | # rename in #1, content change in #4. |
|
7 | # rename in #1, content change in #4. | |
8 |
|
8 | |||
9 | $ hg init |
|
9 | $ hg init | |
10 |
|
10 | |||
11 | $ touch 1 |
|
11 | $ touch 1 | |
12 | $ touch 2 |
|
12 | $ touch 2 | |
13 | $ hg commit -Am init # 0 |
|
13 | $ hg commit -Am init # 0 | |
14 | adding 1 |
|
14 | adding 1 | |
15 | adding 2 |
|
15 | adding 2 | |
16 |
|
16 | |||
17 | $ hg rename 1 1a |
|
17 | $ hg rename 1 1a | |
18 | $ hg commit -m rename # 1 |
|
18 | $ hg commit -m rename # 1 | |
19 |
|
19 | |||
20 | $ hg co -C 0 |
|
20 | $ hg co -C 0 | |
21 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
21 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
22 |
|
22 | |||
23 | $ echo unrelated >> 2 |
|
23 | $ echo unrelated >> 2 | |
24 | $ hg ci -m unrelated1 # 2 |
|
24 | $ hg ci -m unrelated1 # 2 | |
25 | created new head |
|
25 | created new head | |
26 |
|
26 | |||
27 | $ hg merge --debug 1 |
|
27 | $ hg merge --debug 1 | |
28 | searching for copies back to rev 1 |
|
28 | searching for copies back to rev 1 | |
29 | unmatched files in other: |
|
29 | unmatched files in other: | |
30 | 1a |
|
30 | 1a | |
31 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
31 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
32 | src: '1' -> dst: '1a' |
|
32 | src: '1' -> dst: '1a' | |
33 | checking for directory renames |
|
33 | checking for directory renames | |
34 | resolving manifests |
|
34 | resolving manifests | |
35 | branchmerge: True, force: False, partial: False |
|
35 | branchmerge: True, force: False, partial: False | |
36 | ancestor: 81f4b099af3d, local: c64f439569a9+, remote: c12dcd37c90a |
|
36 | ancestor: 81f4b099af3d, local: c64f439569a9+, remote: c12dcd37c90a | |
37 | 1: other deleted -> r |
|
37 | 1: other deleted -> r | |
38 | removing 1 |
|
38 | removing 1 | |
39 | 1a: remote created -> g |
|
39 | 1a: remote created -> g | |
40 | getting 1a |
|
40 | getting 1a | |
41 | 2: remote unchanged -> k |
|
41 | 2: remote unchanged -> k | |
42 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
42 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
43 | (branch merge, don't forget to commit) |
|
43 | (branch merge, don't forget to commit) | |
44 |
|
44 | |||
45 | $ hg ci -m merge1 # 3 |
|
45 | $ hg ci -m merge1 # 3 | |
46 |
|
46 | |||
47 | $ hg co -C 2 |
|
47 | $ hg co -C 2 | |
48 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
48 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
49 |
|
49 | |||
50 | $ echo hello >> 1 |
|
50 | $ echo hello >> 1 | |
51 | $ hg ci -m unrelated2 # 4 |
|
51 | $ hg ci -m unrelated2 # 4 | |
52 | created new head |
|
52 | created new head | |
53 |
|
53 | |||
54 | $ hg co -C 3 |
|
54 | $ hg co -C 3 | |
55 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
55 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
56 |
|
56 | |||
57 | $ hg merge -y --debug 4 |
|
57 | $ hg merge -y --debug 4 | |
58 | searching for copies back to rev 1 |
|
58 | searching for copies back to rev 1 | |
59 | unmatched files in local: |
|
59 | unmatched files in local: | |
60 | 1a |
|
60 | 1a | |
61 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
61 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
62 | src: '1' -> dst: '1a' * |
|
62 | src: '1' -> dst: '1a' * | |
63 | checking for directory renames |
|
63 | checking for directory renames | |
64 | resolving manifests |
|
64 | resolving manifests | |
65 | branchmerge: True, force: False, partial: False |
|
65 | branchmerge: True, force: False, partial: False | |
66 | ancestor: c64f439569a9, local: e327dca35ac8+, remote: 746e9549ea96 |
|
66 | ancestor: c64f439569a9, local: e327dca35ac8+, remote: 746e9549ea96 | |
67 | preserving 1a for resolve of 1a |
|
67 | preserving 1a for resolve of 1a | |
68 | 1a: local copied/moved from 1 -> m |
|
68 | 1a: local copied/moved from 1 -> m (premerge) | |
69 | picked tool ':merge' for 1a (binary False symlink False) |
|
69 | picked tool ':merge' for 1a (binary False symlink False) | |
70 | merging 1a and 1 to 1a |
|
70 | merging 1a and 1 to 1a | |
71 | my 1a@e327dca35ac8+ other 1@746e9549ea96 ancestor 1@81f4b099af3d |
|
71 | my 1a@e327dca35ac8+ other 1@746e9549ea96 ancestor 1@81f4b099af3d | |
72 | premerge successful |
|
72 | premerge successful | |
73 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
73 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
74 | (branch merge, don't forget to commit) |
|
74 | (branch merge, don't forget to commit) | |
75 |
|
75 | |||
76 | $ hg co -C 4 |
|
76 | $ hg co -C 4 | |
77 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
77 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
78 |
|
78 | |||
79 | $ hg merge -y --debug 3 |
|
79 | $ hg merge -y --debug 3 | |
80 | searching for copies back to rev 1 |
|
80 | searching for copies back to rev 1 | |
81 | unmatched files in other: |
|
81 | unmatched files in other: | |
82 | 1a |
|
82 | 1a | |
83 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
83 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
84 | src: '1' -> dst: '1a' * |
|
84 | src: '1' -> dst: '1a' * | |
85 | checking for directory renames |
|
85 | checking for directory renames | |
86 | resolving manifests |
|
86 | resolving manifests | |
87 | branchmerge: True, force: False, partial: False |
|
87 | branchmerge: True, force: False, partial: False | |
88 | ancestor: c64f439569a9, local: 746e9549ea96+, remote: e327dca35ac8 |
|
88 | ancestor: c64f439569a9, local: 746e9549ea96+, remote: e327dca35ac8 | |
89 | preserving 1 for resolve of 1a |
|
89 | preserving 1 for resolve of 1a | |
90 | removing 1 |
|
90 | removing 1 | |
91 | 1a: remote moved from 1 -> m |
|
91 | 1a: remote moved from 1 -> m (premerge) | |
92 | picked tool ':merge' for 1a (binary False symlink False) |
|
92 | picked tool ':merge' for 1a (binary False symlink False) | |
93 | merging 1 and 1a to 1a |
|
93 | merging 1 and 1a to 1a | |
94 | my 1a@746e9549ea96+ other 1a@e327dca35ac8 ancestor 1@81f4b099af3d |
|
94 | my 1a@746e9549ea96+ other 1a@e327dca35ac8 ancestor 1@81f4b099af3d | |
95 | premerge successful |
|
95 | premerge successful | |
96 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
96 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
97 | (branch merge, don't forget to commit) |
|
97 | (branch merge, don't forget to commit) | |
98 |
|
98 |
@@ -1,393 +1,393 b'' | |||||
1 | $ USERCACHE="$TESTTMP/cache"; export USERCACHE |
|
1 | $ USERCACHE="$TESTTMP/cache"; export USERCACHE | |
2 | $ mkdir "${USERCACHE}" |
|
2 | $ mkdir "${USERCACHE}" | |
3 | $ cat >> $HGRCPATH <<EOF |
|
3 | $ cat >> $HGRCPATH <<EOF | |
4 | > [extensions] |
|
4 | > [extensions] | |
5 | > largefiles = |
|
5 | > largefiles = | |
6 | > share = |
|
6 | > share = | |
7 | > strip = |
|
7 | > strip = | |
8 | > convert = |
|
8 | > convert = | |
9 | > [largefiles] |
|
9 | > [largefiles] | |
10 | > minsize = 0.5 |
|
10 | > minsize = 0.5 | |
11 | > patterns = **.other |
|
11 | > patterns = **.other | |
12 | > **.dat |
|
12 | > **.dat | |
13 | > usercache=${USERCACHE} |
|
13 | > usercache=${USERCACHE} | |
14 | > EOF |
|
14 | > EOF | |
15 |
|
15 | |||
16 | "lfconvert" works |
|
16 | "lfconvert" works | |
17 | $ hg init bigfile-repo |
|
17 | $ hg init bigfile-repo | |
18 | $ cd bigfile-repo |
|
18 | $ cd bigfile-repo | |
19 | $ cat >> .hg/hgrc <<EOF |
|
19 | $ cat >> .hg/hgrc <<EOF | |
20 | > [extensions] |
|
20 | > [extensions] | |
21 | > largefiles = ! |
|
21 | > largefiles = ! | |
22 | > EOF |
|
22 | > EOF | |
23 | $ mkdir sub |
|
23 | $ mkdir sub | |
24 | $ dd if=/dev/zero bs=1k count=256 > large 2> /dev/null |
|
24 | $ dd if=/dev/zero bs=1k count=256 > large 2> /dev/null | |
25 | $ dd if=/dev/zero bs=1k count=256 > large2 2> /dev/null |
|
25 | $ dd if=/dev/zero bs=1k count=256 > large2 2> /dev/null | |
26 | $ echo normal > normal1 |
|
26 | $ echo normal > normal1 | |
27 | $ echo alsonormal > sub/normal2 |
|
27 | $ echo alsonormal > sub/normal2 | |
28 | $ dd if=/dev/zero bs=1k count=10 > sub/maybelarge.dat 2> /dev/null |
|
28 | $ dd if=/dev/zero bs=1k count=10 > sub/maybelarge.dat 2> /dev/null | |
29 | $ hg addremove |
|
29 | $ hg addremove | |
30 | adding large |
|
30 | adding large | |
31 | adding large2 |
|
31 | adding large2 | |
32 | adding normal1 |
|
32 | adding normal1 | |
33 | adding sub/maybelarge.dat |
|
33 | adding sub/maybelarge.dat | |
34 | adding sub/normal2 |
|
34 | adding sub/normal2 | |
35 | $ hg commit -m"add large, normal1" large normal1 |
|
35 | $ hg commit -m"add large, normal1" large normal1 | |
36 | $ hg commit -m"add sub/*" sub |
|
36 | $ hg commit -m"add sub/*" sub | |
37 |
|
37 | |||
38 | Test tag parsing |
|
38 | Test tag parsing | |
39 | $ cat >> .hgtags <<EOF |
|
39 | $ cat >> .hgtags <<EOF | |
40 | > IncorrectlyFormattedTag! |
|
40 | > IncorrectlyFormattedTag! | |
41 | > invalidhash sometag |
|
41 | > invalidhash sometag | |
42 | > 0123456789abcdef anothertag |
|
42 | > 0123456789abcdef anothertag | |
43 | > EOF |
|
43 | > EOF | |
44 | $ hg add .hgtags |
|
44 | $ hg add .hgtags | |
45 | $ hg commit -m"add large2" large2 .hgtags |
|
45 | $ hg commit -m"add large2" large2 .hgtags | |
46 |
|
46 | |||
47 | Test link+rename largefile codepath |
|
47 | Test link+rename largefile codepath | |
48 | $ [ -d .hg/largefiles ] && echo fail || echo pass |
|
48 | $ [ -d .hg/largefiles ] && echo fail || echo pass | |
49 | pass |
|
49 | pass | |
50 | $ cd .. |
|
50 | $ cd .. | |
51 | $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo |
|
51 | $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo | |
52 | initializing destination largefiles-repo |
|
52 | initializing destination largefiles-repo | |
53 | skipping incorrectly formatted tag IncorrectlyFormattedTag! |
|
53 | skipping incorrectly formatted tag IncorrectlyFormattedTag! | |
54 | skipping incorrectly formatted id invalidhash |
|
54 | skipping incorrectly formatted id invalidhash | |
55 | no mapping for id 0123456789abcdef |
|
55 | no mapping for id 0123456789abcdef | |
56 | #if symlink |
|
56 | #if symlink | |
57 | $ hg --cwd bigfile-repo rename large2 large3 |
|
57 | $ hg --cwd bigfile-repo rename large2 large3 | |
58 | $ ln -sf large bigfile-repo/large3 |
|
58 | $ ln -sf large bigfile-repo/large3 | |
59 | $ hg --cwd bigfile-repo commit -m"make large2 a symlink" large2 large3 |
|
59 | $ hg --cwd bigfile-repo commit -m"make large2 a symlink" large2 large3 | |
60 | $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo-symlink |
|
60 | $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo-symlink | |
61 | initializing destination largefiles-repo-symlink |
|
61 | initializing destination largefiles-repo-symlink | |
62 | skipping incorrectly formatted tag IncorrectlyFormattedTag! |
|
62 | skipping incorrectly formatted tag IncorrectlyFormattedTag! | |
63 | skipping incorrectly formatted id invalidhash |
|
63 | skipping incorrectly formatted id invalidhash | |
64 | no mapping for id 0123456789abcdef |
|
64 | no mapping for id 0123456789abcdef | |
65 | abort: renamed/copied largefile large3 becomes symlink |
|
65 | abort: renamed/copied largefile large3 becomes symlink | |
66 | [255] |
|
66 | [255] | |
67 | #endif |
|
67 | #endif | |
68 | $ cd bigfile-repo |
|
68 | $ cd bigfile-repo | |
69 | $ hg strip --no-backup 2 |
|
69 | $ hg strip --no-backup 2 | |
70 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
70 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
71 | $ cd .. |
|
71 | $ cd .. | |
72 | $ rm -rf largefiles-repo largefiles-repo-symlink |
|
72 | $ rm -rf largefiles-repo largefiles-repo-symlink | |
73 |
|
73 | |||
74 | $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo |
|
74 | $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo | |
75 | initializing destination largefiles-repo |
|
75 | initializing destination largefiles-repo | |
76 |
|
76 | |||
77 | "lfconvert" converts content correctly |
|
77 | "lfconvert" converts content correctly | |
78 | $ cd largefiles-repo |
|
78 | $ cd largefiles-repo | |
79 | $ hg up |
|
79 | $ hg up | |
80 | getting changed largefiles |
|
80 | getting changed largefiles | |
81 | 2 largefiles updated, 0 removed |
|
81 | 2 largefiles updated, 0 removed | |
82 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
82 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
83 | $ hg locate |
|
83 | $ hg locate | |
84 | .hglf/large |
|
84 | .hglf/large | |
85 | .hglf/sub/maybelarge.dat |
|
85 | .hglf/sub/maybelarge.dat | |
86 | normal1 |
|
86 | normal1 | |
87 | sub/normal2 |
|
87 | sub/normal2 | |
88 | $ cat normal1 |
|
88 | $ cat normal1 | |
89 | normal |
|
89 | normal | |
90 | $ cat sub/normal2 |
|
90 | $ cat sub/normal2 | |
91 | alsonormal |
|
91 | alsonormal | |
92 | $ md5sum.py large sub/maybelarge.dat |
|
92 | $ md5sum.py large sub/maybelarge.dat | |
93 | ec87a838931d4d5d2e94a04644788a55 large |
|
93 | ec87a838931d4d5d2e94a04644788a55 large | |
94 | 1276481102f218c981e0324180bafd9f sub/maybelarge.dat |
|
94 | 1276481102f218c981e0324180bafd9f sub/maybelarge.dat | |
95 |
|
95 | |||
96 | "lfconvert" adds 'largefiles' to .hg/requires. |
|
96 | "lfconvert" adds 'largefiles' to .hg/requires. | |
97 | $ cat .hg/requires |
|
97 | $ cat .hg/requires | |
98 | dotencode |
|
98 | dotencode | |
99 | fncache |
|
99 | fncache | |
100 | largefiles |
|
100 | largefiles | |
101 | revlogv1 |
|
101 | revlogv1 | |
102 | store |
|
102 | store | |
103 |
|
103 | |||
104 | "lfconvert" includes a newline at the end of the standin files. |
|
104 | "lfconvert" includes a newline at the end of the standin files. | |
105 | $ cat .hglf/large .hglf/sub/maybelarge.dat |
|
105 | $ cat .hglf/large .hglf/sub/maybelarge.dat | |
106 | 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 |
|
106 | 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 | |
107 | 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c |
|
107 | 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c | |
108 | $ cd .. |
|
108 | $ cd .. | |
109 |
|
109 | |||
110 | add some changesets to rename/remove/merge |
|
110 | add some changesets to rename/remove/merge | |
111 | $ cd bigfile-repo |
|
111 | $ cd bigfile-repo | |
112 | $ hg mv -q sub stuff |
|
112 | $ hg mv -q sub stuff | |
113 | $ hg commit -m"rename sub/ to stuff/" |
|
113 | $ hg commit -m"rename sub/ to stuff/" | |
114 | $ hg update -q 1 |
|
114 | $ hg update -q 1 | |
115 | $ echo blah >> normal3 |
|
115 | $ echo blah >> normal3 | |
116 | $ echo blah >> sub/normal2 |
|
116 | $ echo blah >> sub/normal2 | |
117 | $ echo blah >> sub/maybelarge.dat |
|
117 | $ echo blah >> sub/maybelarge.dat | |
118 | $ md5sum.py sub/maybelarge.dat |
|
118 | $ md5sum.py sub/maybelarge.dat | |
119 | 1dd0b99ff80e19cff409702a1d3f5e15 sub/maybelarge.dat |
|
119 | 1dd0b99ff80e19cff409702a1d3f5e15 sub/maybelarge.dat | |
120 | $ hg commit -A -m"add normal3, modify sub/*" |
|
120 | $ hg commit -A -m"add normal3, modify sub/*" | |
121 | adding normal3 |
|
121 | adding normal3 | |
122 | created new head |
|
122 | created new head | |
123 | $ hg rm large normal3 |
|
123 | $ hg rm large normal3 | |
124 | $ hg commit -q -m"remove large, normal3" |
|
124 | $ hg commit -q -m"remove large, normal3" | |
125 | $ hg merge |
|
125 | $ hg merge | |
126 | merging sub/maybelarge.dat and stuff/maybelarge.dat to stuff/maybelarge.dat |
|
126 | merging sub/maybelarge.dat and stuff/maybelarge.dat to stuff/maybelarge.dat | |
|
127 | merging sub/normal2 and stuff/normal2 to stuff/normal2 | |||
127 | warning: $TESTTMP/bigfile-repo/stuff/maybelarge.dat looks like a binary file. (glob) |
|
128 | warning: $TESTTMP/bigfile-repo/stuff/maybelarge.dat looks like a binary file. (glob) | |
128 | warning: conflicts while merging stuff/maybelarge.dat! (edit, then use 'hg resolve --mark') |
|
129 | warning: conflicts while merging stuff/maybelarge.dat! (edit, then use 'hg resolve --mark') | |
129 | merging sub/normal2 and stuff/normal2 to stuff/normal2 |
|
|||
130 | 0 files updated, 1 files merged, 0 files removed, 1 files unresolved |
|
130 | 0 files updated, 1 files merged, 0 files removed, 1 files unresolved | |
131 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
131 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
132 | [1] |
|
132 | [1] | |
133 | $ hg cat -r . sub/maybelarge.dat > stuff/maybelarge.dat |
|
133 | $ hg cat -r . sub/maybelarge.dat > stuff/maybelarge.dat | |
134 | $ hg resolve -m stuff/maybelarge.dat |
|
134 | $ hg resolve -m stuff/maybelarge.dat | |
135 | (no more unresolved files) |
|
135 | (no more unresolved files) | |
136 | $ hg commit -m"merge" |
|
136 | $ hg commit -m"merge" | |
137 | $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n" |
|
137 | $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n" | |
138 | @ 5:4884f215abda merge |
|
138 | @ 5:4884f215abda merge | |
139 | |\ |
|
139 | |\ | |
140 | | o 4:7285f817b77e remove large, normal3 |
|
140 | | o 4:7285f817b77e remove large, normal3 | |
141 | | | |
|
141 | | | | |
142 | | o 3:67e3892e3534 add normal3, modify sub/* |
|
142 | | o 3:67e3892e3534 add normal3, modify sub/* | |
143 | | | |
|
143 | | | | |
144 | o | 2:c96c8beb5d56 rename sub/ to stuff/ |
|
144 | o | 2:c96c8beb5d56 rename sub/ to stuff/ | |
145 | |/ |
|
145 | |/ | |
146 | o 1:020c65d24e11 add sub/* |
|
146 | o 1:020c65d24e11 add sub/* | |
147 | | |
|
147 | | | |
148 | o 0:117b8328f97a add large, normal1 |
|
148 | o 0:117b8328f97a add large, normal1 | |
149 |
|
149 | |||
150 | $ cd .. |
|
150 | $ cd .. | |
151 |
|
151 | |||
152 | lfconvert with rename, merge, and remove |
|
152 | lfconvert with rename, merge, and remove | |
153 | $ rm -rf largefiles-repo |
|
153 | $ rm -rf largefiles-repo | |
154 | $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo |
|
154 | $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo | |
155 | initializing destination largefiles-repo |
|
155 | initializing destination largefiles-repo | |
156 | $ cd largefiles-repo |
|
156 | $ cd largefiles-repo | |
157 | $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n" |
|
157 | $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n" | |
158 | o 5:8e05f5f2b77e merge |
|
158 | o 5:8e05f5f2b77e merge | |
159 | |\ |
|
159 | |\ | |
160 | | o 4:a5a02de7a8e4 remove large, normal3 |
|
160 | | o 4:a5a02de7a8e4 remove large, normal3 | |
161 | | | |
|
161 | | | | |
162 | | o 3:55759520c76f add normal3, modify sub/* |
|
162 | | o 3:55759520c76f add normal3, modify sub/* | |
163 | | | |
|
163 | | | | |
164 | o | 2:261ad3f3f037 rename sub/ to stuff/ |
|
164 | o | 2:261ad3f3f037 rename sub/ to stuff/ | |
165 | |/ |
|
165 | |/ | |
166 | o 1:334e5237836d add sub/* |
|
166 | o 1:334e5237836d add sub/* | |
167 | | |
|
167 | | | |
168 | o 0:d4892ec57ce2 add large, normal1 |
|
168 | o 0:d4892ec57ce2 add large, normal1 | |
169 |
|
169 | |||
170 | $ hg locate -r 2 |
|
170 | $ hg locate -r 2 | |
171 | .hglf/large |
|
171 | .hglf/large | |
172 | .hglf/stuff/maybelarge.dat |
|
172 | .hglf/stuff/maybelarge.dat | |
173 | normal1 |
|
173 | normal1 | |
174 | stuff/normal2 |
|
174 | stuff/normal2 | |
175 | $ hg locate -r 3 |
|
175 | $ hg locate -r 3 | |
176 | .hglf/large |
|
176 | .hglf/large | |
177 | .hglf/sub/maybelarge.dat |
|
177 | .hglf/sub/maybelarge.dat | |
178 | normal1 |
|
178 | normal1 | |
179 | normal3 |
|
179 | normal3 | |
180 | sub/normal2 |
|
180 | sub/normal2 | |
181 | $ hg locate -r 4 |
|
181 | $ hg locate -r 4 | |
182 | .hglf/sub/maybelarge.dat |
|
182 | .hglf/sub/maybelarge.dat | |
183 | normal1 |
|
183 | normal1 | |
184 | sub/normal2 |
|
184 | sub/normal2 | |
185 | $ hg locate -r 5 |
|
185 | $ hg locate -r 5 | |
186 | .hglf/stuff/maybelarge.dat |
|
186 | .hglf/stuff/maybelarge.dat | |
187 | normal1 |
|
187 | normal1 | |
188 | stuff/normal2 |
|
188 | stuff/normal2 | |
189 | $ hg update |
|
189 | $ hg update | |
190 | getting changed largefiles |
|
190 | getting changed largefiles | |
191 | 1 largefiles updated, 0 removed |
|
191 | 1 largefiles updated, 0 removed | |
192 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
192 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
193 | $ cat stuff/normal2 |
|
193 | $ cat stuff/normal2 | |
194 | alsonormal |
|
194 | alsonormal | |
195 | blah |
|
195 | blah | |
196 | $ md5sum.py stuff/maybelarge.dat |
|
196 | $ md5sum.py stuff/maybelarge.dat | |
197 | 1dd0b99ff80e19cff409702a1d3f5e15 stuff/maybelarge.dat |
|
197 | 1dd0b99ff80e19cff409702a1d3f5e15 stuff/maybelarge.dat | |
198 | $ cat .hglf/stuff/maybelarge.dat |
|
198 | $ cat .hglf/stuff/maybelarge.dat | |
199 | 76236b6a2c6102826c61af4297dd738fb3b1de38 |
|
199 | 76236b6a2c6102826c61af4297dd738fb3b1de38 | |
200 | $ cd .. |
|
200 | $ cd .. | |
201 |
|
201 | |||
202 | "lfconvert" error cases |
|
202 | "lfconvert" error cases | |
203 | $ hg lfconvert http://localhost/foo foo |
|
203 | $ hg lfconvert http://localhost/foo foo | |
204 | abort: http://localhost/foo is not a local Mercurial repo |
|
204 | abort: http://localhost/foo is not a local Mercurial repo | |
205 | [255] |
|
205 | [255] | |
206 | $ hg lfconvert foo ssh://localhost/foo |
|
206 | $ hg lfconvert foo ssh://localhost/foo | |
207 | abort: ssh://localhost/foo is not a local Mercurial repo |
|
207 | abort: ssh://localhost/foo is not a local Mercurial repo | |
208 | [255] |
|
208 | [255] | |
209 | $ hg lfconvert nosuchrepo foo |
|
209 | $ hg lfconvert nosuchrepo foo | |
210 | abort: repository nosuchrepo not found! |
|
210 | abort: repository nosuchrepo not found! | |
211 | [255] |
|
211 | [255] | |
212 | $ hg share -q -U bigfile-repo shared |
|
212 | $ hg share -q -U bigfile-repo shared | |
213 | $ printf 'bogus' > shared/.hg/sharedpath |
|
213 | $ printf 'bogus' > shared/.hg/sharedpath | |
214 | $ hg lfconvert shared foo |
|
214 | $ hg lfconvert shared foo | |
215 | abort: .hg/sharedpath points to nonexistent directory $TESTTMP/bogus! (glob) |
|
215 | abort: .hg/sharedpath points to nonexistent directory $TESTTMP/bogus! (glob) | |
216 | [255] |
|
216 | [255] | |
217 | $ hg lfconvert bigfile-repo largefiles-repo |
|
217 | $ hg lfconvert bigfile-repo largefiles-repo | |
218 | initializing destination largefiles-repo |
|
218 | initializing destination largefiles-repo | |
219 | abort: repository largefiles-repo already exists! |
|
219 | abort: repository largefiles-repo already exists! | |
220 | [255] |
|
220 | [255] | |
221 |
|
221 | |||
222 | add another largefile to the new largefiles repo |
|
222 | add another largefile to the new largefiles repo | |
223 | $ cd largefiles-repo |
|
223 | $ cd largefiles-repo | |
224 | $ dd if=/dev/zero bs=1k count=1k > anotherlarge 2> /dev/null |
|
224 | $ dd if=/dev/zero bs=1k count=1k > anotherlarge 2> /dev/null | |
225 | $ hg add --lfsize=1 anotherlarge |
|
225 | $ hg add --lfsize=1 anotherlarge | |
226 | $ hg commit -m "add anotherlarge (should be a largefile)" |
|
226 | $ hg commit -m "add anotherlarge (should be a largefile)" | |
227 | $ cat .hglf/anotherlarge |
|
227 | $ cat .hglf/anotherlarge | |
228 | 3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 |
|
228 | 3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 | |
229 | $ hg tag mytag |
|
229 | $ hg tag mytag | |
230 | $ cd .. |
|
230 | $ cd .. | |
231 |
|
231 | |||
232 | round-trip: converting back to a normal (non-largefiles) repo with |
|
232 | round-trip: converting back to a normal (non-largefiles) repo with | |
233 | "lfconvert --to-normal" should give the same as ../bigfile-repo |
|
233 | "lfconvert --to-normal" should give the same as ../bigfile-repo | |
234 | $ cd largefiles-repo |
|
234 | $ cd largefiles-repo | |
235 | $ hg lfconvert --to-normal . ../normal-repo |
|
235 | $ hg lfconvert --to-normal . ../normal-repo | |
236 | initializing destination ../normal-repo |
|
236 | initializing destination ../normal-repo | |
237 | 0 additional largefiles cached |
|
237 | 0 additional largefiles cached | |
238 | scanning source... |
|
238 | scanning source... | |
239 | sorting... |
|
239 | sorting... | |
240 | converting... |
|
240 | converting... | |
241 | 7 add large, normal1 |
|
241 | 7 add large, normal1 | |
242 | 6 add sub/* |
|
242 | 6 add sub/* | |
243 | 5 rename sub/ to stuff/ |
|
243 | 5 rename sub/ to stuff/ | |
244 | 4 add normal3, modify sub/* |
|
244 | 4 add normal3, modify sub/* | |
245 | 3 remove large, normal3 |
|
245 | 3 remove large, normal3 | |
246 | 2 merge |
|
246 | 2 merge | |
247 | 1 add anotherlarge (should be a largefile) |
|
247 | 1 add anotherlarge (should be a largefile) | |
248 | 0 Added tag mytag for changeset abacddda7028 |
|
248 | 0 Added tag mytag for changeset abacddda7028 | |
249 | $ cd ../normal-repo |
|
249 | $ cd ../normal-repo | |
250 | $ cat >> .hg/hgrc <<EOF |
|
250 | $ cat >> .hg/hgrc <<EOF | |
251 | > [extensions] |
|
251 | > [extensions] | |
252 | > largefiles = ! |
|
252 | > largefiles = ! | |
253 | > EOF |
|
253 | > EOF | |
254 |
|
254 | |||
255 | $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n" |
|
255 | $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n" | |
256 | o 7:b5fedc110b9d Added tag mytag for changeset 867ab992ecf4 |
|
256 | o 7:b5fedc110b9d Added tag mytag for changeset 867ab992ecf4 | |
257 | | |
|
257 | | | |
258 | o 6:867ab992ecf4 add anotherlarge (should be a largefile) |
|
258 | o 6:867ab992ecf4 add anotherlarge (should be a largefile) | |
259 | | |
|
259 | | | |
260 | o 5:4884f215abda merge |
|
260 | o 5:4884f215abda merge | |
261 | |\ |
|
261 | |\ | |
262 | | o 4:7285f817b77e remove large, normal3 |
|
262 | | o 4:7285f817b77e remove large, normal3 | |
263 | | | |
|
263 | | | | |
264 | | o 3:67e3892e3534 add normal3, modify sub/* |
|
264 | | o 3:67e3892e3534 add normal3, modify sub/* | |
265 | | | |
|
265 | | | | |
266 | o | 2:c96c8beb5d56 rename sub/ to stuff/ |
|
266 | o | 2:c96c8beb5d56 rename sub/ to stuff/ | |
267 | |/ |
|
267 | |/ | |
268 | o 1:020c65d24e11 add sub/* |
|
268 | o 1:020c65d24e11 add sub/* | |
269 | | |
|
269 | | | |
270 | o 0:117b8328f97a add large, normal1 |
|
270 | o 0:117b8328f97a add large, normal1 | |
271 |
|
271 | |||
272 | $ hg update |
|
272 | $ hg update | |
273 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
273 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
274 | $ hg locate |
|
274 | $ hg locate | |
275 | .hgtags |
|
275 | .hgtags | |
276 | anotherlarge |
|
276 | anotherlarge | |
277 | normal1 |
|
277 | normal1 | |
278 | stuff/maybelarge.dat |
|
278 | stuff/maybelarge.dat | |
279 | stuff/normal2 |
|
279 | stuff/normal2 | |
280 | $ [ -d .hg/largefiles ] && echo fail || echo pass |
|
280 | $ [ -d .hg/largefiles ] && echo fail || echo pass | |
281 | pass |
|
281 | pass | |
282 |
|
282 | |||
283 | $ cd .. |
|
283 | $ cd .. | |
284 |
|
284 | |||
285 | Clearing the usercache ensures that commitctx doesn't try to cache largefiles |
|
285 | Clearing the usercache ensures that commitctx doesn't try to cache largefiles | |
286 | from the working dir on a convert. |
|
286 | from the working dir on a convert. | |
287 | $ rm "${USERCACHE}"/* |
|
287 | $ rm "${USERCACHE}"/* | |
288 | $ hg convert largefiles-repo |
|
288 | $ hg convert largefiles-repo | |
289 | assuming destination largefiles-repo-hg |
|
289 | assuming destination largefiles-repo-hg | |
290 | initializing destination largefiles-repo-hg repository |
|
290 | initializing destination largefiles-repo-hg repository | |
291 | scanning source... |
|
291 | scanning source... | |
292 | sorting... |
|
292 | sorting... | |
293 | converting... |
|
293 | converting... | |
294 | 7 add large, normal1 |
|
294 | 7 add large, normal1 | |
295 | 6 add sub/* |
|
295 | 6 add sub/* | |
296 | 5 rename sub/ to stuff/ |
|
296 | 5 rename sub/ to stuff/ | |
297 | 4 add normal3, modify sub/* |
|
297 | 4 add normal3, modify sub/* | |
298 | 3 remove large, normal3 |
|
298 | 3 remove large, normal3 | |
299 | 2 merge |
|
299 | 2 merge | |
300 | 1 add anotherlarge (should be a largefile) |
|
300 | 1 add anotherlarge (should be a largefile) | |
301 | 0 Added tag mytag for changeset abacddda7028 |
|
301 | 0 Added tag mytag for changeset abacddda7028 | |
302 |
|
302 | |||
303 | $ hg -R largefiles-repo-hg log -G --template "{rev}:{node|short} {desc|firstline}\n" |
|
303 | $ hg -R largefiles-repo-hg log -G --template "{rev}:{node|short} {desc|firstline}\n" | |
304 | o 7:2f08f66459b7 Added tag mytag for changeset 17126745edfd |
|
304 | o 7:2f08f66459b7 Added tag mytag for changeset 17126745edfd | |
305 | | |
|
305 | | | |
306 | o 6:17126745edfd add anotherlarge (should be a largefile) |
|
306 | o 6:17126745edfd add anotherlarge (should be a largefile) | |
307 | | |
|
307 | | | |
308 | o 5:9cc5aa7204f0 merge |
|
308 | o 5:9cc5aa7204f0 merge | |
309 | |\ |
|
309 | |\ | |
310 | | o 4:a5a02de7a8e4 remove large, normal3 |
|
310 | | o 4:a5a02de7a8e4 remove large, normal3 | |
311 | | | |
|
311 | | | | |
312 | | o 3:55759520c76f add normal3, modify sub/* |
|
312 | | o 3:55759520c76f add normal3, modify sub/* | |
313 | | | |
|
313 | | | | |
314 | o | 2:261ad3f3f037 rename sub/ to stuff/ |
|
314 | o | 2:261ad3f3f037 rename sub/ to stuff/ | |
315 | |/ |
|
315 | |/ | |
316 | o 1:334e5237836d add sub/* |
|
316 | o 1:334e5237836d add sub/* | |
317 | | |
|
317 | | | |
318 | o 0:d4892ec57ce2 add large, normal1 |
|
318 | o 0:d4892ec57ce2 add large, normal1 | |
319 |
|
319 | |||
320 | Verify will fail (for now) if the usercache is purged before converting, since |
|
320 | Verify will fail (for now) if the usercache is purged before converting, since | |
321 | largefiles are not cached in the converted repo's local store by the conversion |
|
321 | largefiles are not cached in the converted repo's local store by the conversion | |
322 | process. |
|
322 | process. | |
323 | $ cd largefiles-repo-hg |
|
323 | $ cd largefiles-repo-hg | |
324 | $ cat >> .hg/hgrc <<EOF |
|
324 | $ cat >> .hg/hgrc <<EOF | |
325 | > [experimental] |
|
325 | > [experimental] | |
326 | > evolution=createmarkers |
|
326 | > evolution=createmarkers | |
327 | > EOF |
|
327 | > EOF | |
328 | $ hg debugobsolete `hg log -r tip -T "{node}"` |
|
328 | $ hg debugobsolete `hg log -r tip -T "{node}"` | |
329 | $ cd .. |
|
329 | $ cd .. | |
330 |
|
330 | |||
331 | $ hg -R largefiles-repo-hg verify --large --lfa |
|
331 | $ hg -R largefiles-repo-hg verify --large --lfa | |
332 | checking changesets |
|
332 | checking changesets | |
333 | checking manifests |
|
333 | checking manifests | |
334 | crosschecking files in changesets and manifests |
|
334 | crosschecking files in changesets and manifests | |
335 | checking files |
|
335 | checking files | |
336 | 9 files, 8 changesets, 13 total revisions |
|
336 | 9 files, 8 changesets, 13 total revisions | |
337 | searching 7 changesets for largefiles |
|
337 | searching 7 changesets for largefiles | |
338 | changeset 0:d4892ec57ce2: large references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/2e000fa7e85759c7f4c254d4d9c33ef481e459a7 (glob) |
|
338 | changeset 0:d4892ec57ce2: large references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/2e000fa7e85759c7f4c254d4d9c33ef481e459a7 (glob) | |
339 | changeset 1:334e5237836d: sub/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c (glob) |
|
339 | changeset 1:334e5237836d: sub/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c (glob) | |
340 | changeset 2:261ad3f3f037: stuff/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c (glob) |
|
340 | changeset 2:261ad3f3f037: stuff/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c (glob) | |
341 | changeset 3:55759520c76f: sub/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/76236b6a2c6102826c61af4297dd738fb3b1de38 (glob) |
|
341 | changeset 3:55759520c76f: sub/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/76236b6a2c6102826c61af4297dd738fb3b1de38 (glob) | |
342 | changeset 5:9cc5aa7204f0: stuff/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/76236b6a2c6102826c61af4297dd738fb3b1de38 (glob) |
|
342 | changeset 5:9cc5aa7204f0: stuff/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/76236b6a2c6102826c61af4297dd738fb3b1de38 (glob) | |
343 | changeset 6:17126745edfd: anotherlarge references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 (glob) |
|
343 | changeset 6:17126745edfd: anotherlarge references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 (glob) | |
344 | verified existence of 6 revisions of 4 largefiles |
|
344 | verified existence of 6 revisions of 4 largefiles | |
345 | [1] |
|
345 | [1] | |
346 | $ hg -R largefiles-repo-hg showconfig paths |
|
346 | $ hg -R largefiles-repo-hg showconfig paths | |
347 | [1] |
|
347 | [1] | |
348 |
|
348 | |||
349 |
|
349 | |||
350 | Avoid a traceback if a largefile isn't available (issue3519) |
|
350 | Avoid a traceback if a largefile isn't available (issue3519) | |
351 |
|
351 | |||
352 | Ensure the largefile can be cached in the source if necessary |
|
352 | Ensure the largefile can be cached in the source if necessary | |
353 | $ hg clone -U largefiles-repo issue3519 |
|
353 | $ hg clone -U largefiles-repo issue3519 | |
354 | $ rm -f "${USERCACHE}"/* |
|
354 | $ rm -f "${USERCACHE}"/* | |
355 | $ hg lfconvert --to-normal issue3519 normalized3519 |
|
355 | $ hg lfconvert --to-normal issue3519 normalized3519 | |
356 | initializing destination normalized3519 |
|
356 | initializing destination normalized3519 | |
357 | 4 additional largefiles cached |
|
357 | 4 additional largefiles cached | |
358 | scanning source... |
|
358 | scanning source... | |
359 | sorting... |
|
359 | sorting... | |
360 | converting... |
|
360 | converting... | |
361 | 7 add large, normal1 |
|
361 | 7 add large, normal1 | |
362 | 6 add sub/* |
|
362 | 6 add sub/* | |
363 | 5 rename sub/ to stuff/ |
|
363 | 5 rename sub/ to stuff/ | |
364 | 4 add normal3, modify sub/* |
|
364 | 4 add normal3, modify sub/* | |
365 | 3 remove large, normal3 |
|
365 | 3 remove large, normal3 | |
366 | 2 merge |
|
366 | 2 merge | |
367 | 1 add anotherlarge (should be a largefile) |
|
367 | 1 add anotherlarge (should be a largefile) | |
368 | 0 Added tag mytag for changeset abacddda7028 |
|
368 | 0 Added tag mytag for changeset abacddda7028 | |
369 |
|
369 | |||
370 | Ensure the abort message is useful if a largefile is entirely unavailable |
|
370 | Ensure the abort message is useful if a largefile is entirely unavailable | |
371 | $ rm -rf normalized3519 |
|
371 | $ rm -rf normalized3519 | |
372 | $ rm "${USERCACHE}"/* |
|
372 | $ rm "${USERCACHE}"/* | |
373 | $ rm issue3519/.hg/largefiles/* |
|
373 | $ rm issue3519/.hg/largefiles/* | |
374 | $ rm largefiles-repo/.hg/largefiles/* |
|
374 | $ rm largefiles-repo/.hg/largefiles/* | |
375 | $ hg lfconvert --to-normal issue3519 normalized3519 |
|
375 | $ hg lfconvert --to-normal issue3519 normalized3519 | |
376 | initializing destination normalized3519 |
|
376 | initializing destination normalized3519 | |
377 | anotherlarge: largefile 3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
377 | anotherlarge: largefile 3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 not available from file:/*/$TESTTMP/largefiles-repo (glob) | |
378 | stuff/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
378 | stuff/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob) | |
379 | stuff/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
379 | stuff/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob) | |
380 | sub/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
380 | sub/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob) | |
381 | large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
381 | large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) | |
382 | sub/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
382 | sub/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob) | |
383 | large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
383 | large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) | |
384 | stuff/maybelarge.dat: largefile 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
384 | stuff/maybelarge.dat: largefile 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c not available from file:/*/$TESTTMP/largefiles-repo (glob) | |
385 | large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
385 | large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) | |
386 | sub/maybelarge.dat: largefile 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
386 | sub/maybelarge.dat: largefile 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c not available from file:/*/$TESTTMP/largefiles-repo (glob) | |
387 | large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
387 | large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) | |
388 | 0 additional largefiles cached |
|
388 | 0 additional largefiles cached | |
389 | 11 largefiles failed to download |
|
389 | 11 largefiles failed to download | |
390 | abort: all largefiles must be present locally |
|
390 | abort: all largefiles must be present locally | |
391 | [255] |
|
391 | [255] | |
392 |
|
392 | |||
393 |
|
393 |
@@ -1,182 +1,182 b'' | |||||
1 | Check that renames are correctly saved by a commit after a merge |
|
1 | Check that renames are correctly saved by a commit after a merge | |
2 |
|
2 | |||
3 | Test with the merge on 3 having the rename on the local parent |
|
3 | Test with the merge on 3 having the rename on the local parent | |
4 |
|
4 | |||
5 | $ hg init a |
|
5 | $ hg init a | |
6 | $ cd a |
|
6 | $ cd a | |
7 |
|
7 | |||
8 | $ echo line1 > foo |
|
8 | $ echo line1 > foo | |
9 | $ hg add foo |
|
9 | $ hg add foo | |
10 | $ hg ci -m '0: add foo' |
|
10 | $ hg ci -m '0: add foo' | |
11 |
|
11 | |||
12 | $ echo line2 >> foo |
|
12 | $ echo line2 >> foo | |
13 | $ hg ci -m '1: change foo' |
|
13 | $ hg ci -m '1: change foo' | |
14 |
|
14 | |||
15 | $ hg up -C 0 |
|
15 | $ hg up -C 0 | |
16 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
16 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
17 |
|
17 | |||
18 | $ hg mv foo bar |
|
18 | $ hg mv foo bar | |
19 | $ rm bar |
|
19 | $ rm bar | |
20 | $ echo line0 > bar |
|
20 | $ echo line0 > bar | |
21 | $ echo line1 >> bar |
|
21 | $ echo line1 >> bar | |
22 | $ hg ci -m '2: mv foo bar; change bar' |
|
22 | $ hg ci -m '2: mv foo bar; change bar' | |
23 | created new head |
|
23 | created new head | |
24 |
|
24 | |||
25 | $ hg merge 1 |
|
25 | $ hg merge 1 | |
26 | merging bar and foo to bar |
|
26 | merging bar and foo to bar | |
27 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
27 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
28 | (branch merge, don't forget to commit) |
|
28 | (branch merge, don't forget to commit) | |
29 |
|
29 | |||
30 | $ cat bar |
|
30 | $ cat bar | |
31 | line0 |
|
31 | line0 | |
32 | line1 |
|
32 | line1 | |
33 | line2 |
|
33 | line2 | |
34 |
|
34 | |||
35 | $ hg ci -m '3: merge with local rename' |
|
35 | $ hg ci -m '3: merge with local rename' | |
36 |
|
36 | |||
37 | $ hg debugindex bar |
|
37 | $ hg debugindex bar | |
38 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
38 | rev offset length ..... linkrev nodeid p1 p2 (re) | |
39 | 0 0 77 ..... 2 d35118874825 000000000000 000000000000 (re) |
|
39 | 0 0 77 ..... 2 d35118874825 000000000000 000000000000 (re) | |
40 | 1 77 76 ..... 3 5345f5ab8abd 000000000000 d35118874825 (re) |
|
40 | 1 77 76 ..... 3 5345f5ab8abd 000000000000 d35118874825 (re) | |
41 |
|
41 | |||
42 | $ hg debugrename bar |
|
42 | $ hg debugrename bar | |
43 | bar renamed from foo:9e25c27b87571a1edee5ae4dddee5687746cc8e2 |
|
43 | bar renamed from foo:9e25c27b87571a1edee5ae4dddee5687746cc8e2 | |
44 |
|
44 | |||
45 | $ hg debugindex foo |
|
45 | $ hg debugindex foo | |
46 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
46 | rev offset length ..... linkrev nodeid p1 p2 (re) | |
47 | 0 0 7 ..... 0 690b295714ae 000000000000 000000000000 (re) |
|
47 | 0 0 7 ..... 0 690b295714ae 000000000000 000000000000 (re) | |
48 | 1 7 13 ..... 1 9e25c27b8757 690b295714ae 000000000000 (re) |
|
48 | 1 7 13 ..... 1 9e25c27b8757 690b295714ae 000000000000 (re) | |
49 |
|
49 | |||
50 |
|
50 | |||
51 | Revert the content change from rev 2: |
|
51 | Revert the content change from rev 2: | |
52 |
|
52 | |||
53 | $ hg up -C 2 |
|
53 | $ hg up -C 2 | |
54 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
54 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
55 | $ rm bar |
|
55 | $ rm bar | |
56 | $ echo line1 > bar |
|
56 | $ echo line1 > bar | |
57 | $ hg ci -m '4: revert content change from rev 2' |
|
57 | $ hg ci -m '4: revert content change from rev 2' | |
58 | created new head |
|
58 | created new head | |
59 |
|
59 | |||
60 | $ hg log --template '{rev}:{node|short} {parents}\n' |
|
60 | $ hg log --template '{rev}:{node|short} {parents}\n' | |
61 | 4:2263c1be0967 2:0f2ff26688b9 |
|
61 | 4:2263c1be0967 2:0f2ff26688b9 | |
62 | 3:0555950ead28 2:0f2ff26688b9 1:5cd961e4045d |
|
62 | 3:0555950ead28 2:0f2ff26688b9 1:5cd961e4045d | |
63 | 2:0f2ff26688b9 0:2665aaee66e9 |
|
63 | 2:0f2ff26688b9 0:2665aaee66e9 | |
64 | 1:5cd961e4045d |
|
64 | 1:5cd961e4045d | |
65 | 0:2665aaee66e9 |
|
65 | 0:2665aaee66e9 | |
66 |
|
66 | |||
67 | This should use bar@rev2 as the ancestor: |
|
67 | This should use bar@rev2 as the ancestor: | |
68 |
|
68 | |||
69 | $ hg --debug merge 3 |
|
69 | $ hg --debug merge 3 | |
70 | searching for copies back to rev 1 |
|
70 | searching for copies back to rev 1 | |
71 | resolving manifests |
|
71 | resolving manifests | |
72 | branchmerge: True, force: False, partial: False |
|
72 | branchmerge: True, force: False, partial: False | |
73 | ancestor: 0f2ff26688b9, local: 2263c1be0967+, remote: 0555950ead28 |
|
73 | ancestor: 0f2ff26688b9, local: 2263c1be0967+, remote: 0555950ead28 | |
74 | preserving bar for resolve of bar |
|
74 | preserving bar for resolve of bar | |
75 | bar: versions differ -> m |
|
75 | bar: versions differ -> m (premerge) | |
76 | picked tool ':merge' for bar (binary False symlink False) |
|
76 | picked tool ':merge' for bar (binary False symlink False) | |
77 | merging bar |
|
77 | merging bar | |
78 | my bar@2263c1be0967+ other bar@0555950ead28 ancestor bar@0f2ff26688b9 |
|
78 | my bar@2263c1be0967+ other bar@0555950ead28 ancestor bar@0f2ff26688b9 | |
79 | premerge successful |
|
79 | premerge successful | |
80 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
80 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
81 | (branch merge, don't forget to commit) |
|
81 | (branch merge, don't forget to commit) | |
82 |
|
82 | |||
83 | $ cat bar |
|
83 | $ cat bar | |
84 | line1 |
|
84 | line1 | |
85 | line2 |
|
85 | line2 | |
86 |
|
86 | |||
87 | $ hg ci -m '5: merge' |
|
87 | $ hg ci -m '5: merge' | |
88 |
|
88 | |||
89 | $ hg debugindex bar |
|
89 | $ hg debugindex bar | |
90 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
90 | rev offset length ..... linkrev nodeid p1 p2 (re) | |
91 | 0 0 77 ..... 2 d35118874825 000000000000 000000000000 (re) |
|
91 | 0 0 77 ..... 2 d35118874825 000000000000 000000000000 (re) | |
92 | 1 77 76 ..... 3 5345f5ab8abd 000000000000 d35118874825 (re) |
|
92 | 1 77 76 ..... 3 5345f5ab8abd 000000000000 d35118874825 (re) | |
93 | 2 153 7 ..... 4 ff4b45017382 d35118874825 000000000000 (re) |
|
93 | 2 153 7 ..... 4 ff4b45017382 d35118874825 000000000000 (re) | |
94 | 3 160 13 ..... 5 3701b4893544 ff4b45017382 5345f5ab8abd (re) |
|
94 | 3 160 13 ..... 5 3701b4893544 ff4b45017382 5345f5ab8abd (re) | |
95 |
|
95 | |||
96 |
|
96 | |||
97 | Same thing, but with the merge on 3 having the rename |
|
97 | Same thing, but with the merge on 3 having the rename | |
98 | on the remote parent: |
|
98 | on the remote parent: | |
99 |
|
99 | |||
100 | $ cd .. |
|
100 | $ cd .. | |
101 | $ hg clone -U -r 1 -r 2 a b |
|
101 | $ hg clone -U -r 1 -r 2 a b | |
102 | adding changesets |
|
102 | adding changesets | |
103 | adding manifests |
|
103 | adding manifests | |
104 | adding file changes |
|
104 | adding file changes | |
105 | added 3 changesets with 3 changes to 2 files (+1 heads) |
|
105 | added 3 changesets with 3 changes to 2 files (+1 heads) | |
106 | $ cd b |
|
106 | $ cd b | |
107 |
|
107 | |||
108 | $ hg up -C 1 |
|
108 | $ hg up -C 1 | |
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 |
|
110 | |||
111 | $ hg merge 2 |
|
111 | $ hg merge 2 | |
112 | merging foo and bar to bar |
|
112 | merging foo and bar to bar | |
113 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
113 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
114 | (branch merge, don't forget to commit) |
|
114 | (branch merge, don't forget to commit) | |
115 |
|
115 | |||
116 | $ cat bar |
|
116 | $ cat bar | |
117 | line0 |
|
117 | line0 | |
118 | line1 |
|
118 | line1 | |
119 | line2 |
|
119 | line2 | |
120 |
|
120 | |||
121 | $ hg ci -m '3: merge with remote rename' |
|
121 | $ hg ci -m '3: merge with remote rename' | |
122 |
|
122 | |||
123 | $ hg debugindex bar |
|
123 | $ hg debugindex bar | |
124 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
124 | rev offset length ..... linkrev nodeid p1 p2 (re) | |
125 | 0 0 77 ..... 2 d35118874825 000000000000 000000000000 (re) |
|
125 | 0 0 77 ..... 2 d35118874825 000000000000 000000000000 (re) | |
126 | 1 77 76 ..... 3 5345f5ab8abd 000000000000 d35118874825 (re) |
|
126 | 1 77 76 ..... 3 5345f5ab8abd 000000000000 d35118874825 (re) | |
127 |
|
127 | |||
128 | $ hg debugrename bar |
|
128 | $ hg debugrename bar | |
129 | bar renamed from foo:9e25c27b87571a1edee5ae4dddee5687746cc8e2 |
|
129 | bar renamed from foo:9e25c27b87571a1edee5ae4dddee5687746cc8e2 | |
130 |
|
130 | |||
131 | $ hg debugindex foo |
|
131 | $ hg debugindex foo | |
132 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
132 | rev offset length ..... linkrev nodeid p1 p2 (re) | |
133 | 0 0 7 ..... 0 690b295714ae 000000000000 000000000000 (re) |
|
133 | 0 0 7 ..... 0 690b295714ae 000000000000 000000000000 (re) | |
134 | 1 7 13 ..... 1 9e25c27b8757 690b295714ae 000000000000 (re) |
|
134 | 1 7 13 ..... 1 9e25c27b8757 690b295714ae 000000000000 (re) | |
135 |
|
135 | |||
136 |
|
136 | |||
137 | Revert the content change from rev 2: |
|
137 | Revert the content change from rev 2: | |
138 |
|
138 | |||
139 | $ hg up -C 2 |
|
139 | $ hg up -C 2 | |
140 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
140 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
141 | $ rm bar |
|
141 | $ rm bar | |
142 | $ echo line1 > bar |
|
142 | $ echo line1 > bar | |
143 | $ hg ci -m '4: revert content change from rev 2' |
|
143 | $ hg ci -m '4: revert content change from rev 2' | |
144 | created new head |
|
144 | created new head | |
145 |
|
145 | |||
146 | $ hg log --template '{rev}:{node|short} {parents}\n' |
|
146 | $ hg log --template '{rev}:{node|short} {parents}\n' | |
147 | 4:2263c1be0967 2:0f2ff26688b9 |
|
147 | 4:2263c1be0967 2:0f2ff26688b9 | |
148 | 3:3ffa6b9e35f0 1:5cd961e4045d 2:0f2ff26688b9 |
|
148 | 3:3ffa6b9e35f0 1:5cd961e4045d 2:0f2ff26688b9 | |
149 | 2:0f2ff26688b9 0:2665aaee66e9 |
|
149 | 2:0f2ff26688b9 0:2665aaee66e9 | |
150 | 1:5cd961e4045d |
|
150 | 1:5cd961e4045d | |
151 | 0:2665aaee66e9 |
|
151 | 0:2665aaee66e9 | |
152 |
|
152 | |||
153 | This should use bar@rev2 as the ancestor: |
|
153 | This should use bar@rev2 as the ancestor: | |
154 |
|
154 | |||
155 | $ hg --debug merge 3 |
|
155 | $ hg --debug merge 3 | |
156 | searching for copies back to rev 1 |
|
156 | searching for copies back to rev 1 | |
157 | resolving manifests |
|
157 | resolving manifests | |
158 | branchmerge: True, force: False, partial: False |
|
158 | branchmerge: True, force: False, partial: False | |
159 | ancestor: 0f2ff26688b9, local: 2263c1be0967+, remote: 3ffa6b9e35f0 |
|
159 | ancestor: 0f2ff26688b9, local: 2263c1be0967+, remote: 3ffa6b9e35f0 | |
160 | preserving bar for resolve of bar |
|
160 | preserving bar for resolve of bar | |
161 | bar: versions differ -> m |
|
161 | bar: versions differ -> m (premerge) | |
162 | picked tool ':merge' for bar (binary False symlink False) |
|
162 | picked tool ':merge' for bar (binary False symlink False) | |
163 | merging bar |
|
163 | merging bar | |
164 | my bar@2263c1be0967+ other bar@3ffa6b9e35f0 ancestor bar@0f2ff26688b9 |
|
164 | my bar@2263c1be0967+ other bar@3ffa6b9e35f0 ancestor bar@0f2ff26688b9 | |
165 | premerge successful |
|
165 | premerge successful | |
166 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
166 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
167 | (branch merge, don't forget to commit) |
|
167 | (branch merge, don't forget to commit) | |
168 |
|
168 | |||
169 | $ cat bar |
|
169 | $ cat bar | |
170 | line1 |
|
170 | line1 | |
171 | line2 |
|
171 | line2 | |
172 |
|
172 | |||
173 | $ hg ci -m '5: merge' |
|
173 | $ hg ci -m '5: merge' | |
174 |
|
174 | |||
175 | $ hg debugindex bar |
|
175 | $ hg debugindex bar | |
176 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
176 | rev offset length ..... linkrev nodeid p1 p2 (re) | |
177 | 0 0 77 ..... 2 d35118874825 000000000000 000000000000 (re) |
|
177 | 0 0 77 ..... 2 d35118874825 000000000000 000000000000 (re) | |
178 | 1 77 76 ..... 3 5345f5ab8abd 000000000000 d35118874825 (re) |
|
178 | 1 77 76 ..... 3 5345f5ab8abd 000000000000 d35118874825 (re) | |
179 | 2 153 7 ..... 4 ff4b45017382 d35118874825 000000000000 (re) |
|
179 | 2 153 7 ..... 4 ff4b45017382 d35118874825 000000000000 (re) | |
180 | 3 160 13 ..... 5 3701b4893544 ff4b45017382 5345f5ab8abd (re) |
|
180 | 3 160 13 ..... 5 3701b4893544 ff4b45017382 5345f5ab8abd (re) | |
181 |
|
181 | |||
182 | $ cd .. |
|
182 | $ cd .. |
@@ -1,351 +1,352 b'' | |||||
1 | Criss cross merging |
|
1 | Criss cross merging | |
2 |
|
2 | |||
3 | $ hg init criss-cross |
|
3 | $ hg init criss-cross | |
4 | $ cd criss-cross |
|
4 | $ cd criss-cross | |
5 | $ echo '0 base' > f1 |
|
5 | $ echo '0 base' > f1 | |
6 | $ echo '0 base' > f2 |
|
6 | $ echo '0 base' > f2 | |
7 | $ hg ci -Aqm '0 base' |
|
7 | $ hg ci -Aqm '0 base' | |
8 |
|
8 | |||
9 | $ echo '1 first change' > f1 |
|
9 | $ echo '1 first change' > f1 | |
10 | $ hg ci -m '1 first change f1' |
|
10 | $ hg ci -m '1 first change f1' | |
11 |
|
11 | |||
12 | $ hg up -qr0 |
|
12 | $ hg up -qr0 | |
13 | $ echo '2 first change' > f2 |
|
13 | $ echo '2 first change' > f2 | |
14 | $ hg ci -qm '2 first change f2' |
|
14 | $ hg ci -qm '2 first change f2' | |
15 |
|
15 | |||
16 | $ hg merge -qr 1 |
|
16 | $ hg merge -qr 1 | |
17 | $ hg ci -m '3 merge' |
|
17 | $ hg ci -m '3 merge' | |
18 |
|
18 | |||
19 | $ hg up -qr2 |
|
19 | $ hg up -qr2 | |
20 | $ hg merge -qr1 |
|
20 | $ hg merge -qr1 | |
21 | $ hg ci -qm '4 merge' |
|
21 | $ hg ci -qm '4 merge' | |
22 |
|
22 | |||
23 | $ echo '5 second change' > f1 |
|
23 | $ echo '5 second change' > f1 | |
24 | $ hg ci -m '5 second change f1' |
|
24 | $ hg ci -m '5 second change f1' | |
25 |
|
25 | |||
26 | $ hg up -r3 |
|
26 | $ hg up -r3 | |
27 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
27 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
28 | $ echo '6 second change' > f2 |
|
28 | $ echo '6 second change' > f2 | |
29 | $ hg ci -m '6 second change f2' |
|
29 | $ hg ci -m '6 second change f2' | |
30 |
|
30 | |||
31 | $ hg log -G |
|
31 | $ hg log -G | |
32 | @ changeset: 6:3b08d01b0ab5 |
|
32 | @ changeset: 6:3b08d01b0ab5 | |
33 | | tag: tip |
|
33 | | tag: tip | |
34 | | parent: 3:cf89f02107e5 |
|
34 | | parent: 3:cf89f02107e5 | |
35 | | user: test |
|
35 | | user: test | |
36 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
36 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
37 | | summary: 6 second change f2 |
|
37 | | summary: 6 second change f2 | |
38 | | |
|
38 | | | |
39 | | o changeset: 5:adfe50279922 |
|
39 | | o changeset: 5:adfe50279922 | |
40 | | | user: test |
|
40 | | | user: test | |
41 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
41 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
42 | | | summary: 5 second change f1 |
|
42 | | | summary: 5 second change f1 | |
43 | | | |
|
43 | | | | |
44 | | o changeset: 4:7d3e55501ae6 |
|
44 | | o changeset: 4:7d3e55501ae6 | |
45 | | |\ parent: 2:40663881a6dd |
|
45 | | |\ parent: 2:40663881a6dd | |
46 | | | | parent: 1:0f6b37dbe527 |
|
46 | | | | parent: 1:0f6b37dbe527 | |
47 | | | | user: test |
|
47 | | | | user: test | |
48 | | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
48 | | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
49 | | | | summary: 4 merge |
|
49 | | | | summary: 4 merge | |
50 | | | | |
|
50 | | | | | |
51 | o---+ changeset: 3:cf89f02107e5 |
|
51 | o---+ changeset: 3:cf89f02107e5 | |
52 | | | | parent: 2:40663881a6dd |
|
52 | | | | parent: 2:40663881a6dd | |
53 | |/ / parent: 1:0f6b37dbe527 |
|
53 | |/ / parent: 1:0f6b37dbe527 | |
54 | | | user: test |
|
54 | | | user: test | |
55 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
55 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
56 | | | summary: 3 merge |
|
56 | | | summary: 3 merge | |
57 | | | |
|
57 | | | | |
58 | | o changeset: 2:40663881a6dd |
|
58 | | o changeset: 2:40663881a6dd | |
59 | | | parent: 0:40494bf2444c |
|
59 | | | parent: 0:40494bf2444c | |
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: 2 first change f2 |
|
62 | | | summary: 2 first change f2 | |
63 | | | |
|
63 | | | | |
64 | o | changeset: 1:0f6b37dbe527 |
|
64 | o | changeset: 1:0f6b37dbe527 | |
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: 1 first change f1 |
|
67 | | summary: 1 first change f1 | |
68 | | |
|
68 | | | |
69 | o changeset: 0:40494bf2444c |
|
69 | o changeset: 0:40494bf2444c | |
70 | user: test |
|
70 | user: test | |
71 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
71 | date: Thu Jan 01 00:00:00 1970 +0000 | |
72 | summary: 0 base |
|
72 | summary: 0 base | |
73 |
|
73 | |||
74 |
|
74 | |||
75 | $ hg merge -v --debug --tool internal:dump 5 --config merge.preferancestor='!' |
|
75 | $ hg merge -v --debug --tool internal:dump 5 --config merge.preferancestor='!' | |
76 | note: using 0f6b37dbe527 as ancestor of 3b08d01b0ab5 and adfe50279922 |
|
76 | note: using 0f6b37dbe527 as ancestor of 3b08d01b0ab5 and adfe50279922 | |
77 | alternatively, use --config merge.preferancestor=40663881a6dd |
|
77 | alternatively, use --config merge.preferancestor=40663881a6dd | |
78 | searching for copies back to rev 3 |
|
78 | searching for copies back to rev 3 | |
79 | resolving manifests |
|
79 | resolving manifests | |
80 | branchmerge: True, force: False, partial: False |
|
80 | branchmerge: True, force: False, partial: False | |
81 | ancestor: 0f6b37dbe527, local: 3b08d01b0ab5+, remote: adfe50279922 |
|
81 | ancestor: 0f6b37dbe527, local: 3b08d01b0ab5+, remote: adfe50279922 | |
82 | preserving f2 for resolve of f2 |
|
82 | preserving f2 for resolve of f2 | |
83 | f1: remote is newer -> g |
|
83 | f1: remote is newer -> g | |
84 | getting f1 |
|
84 | getting f1 | |
85 | f2: versions differ -> m |
|
85 | f2: versions differ -> m (premerge) | |
86 | picked tool ':dump' for f2 (binary False symlink False) |
|
86 | picked tool ':dump' for f2 (binary False symlink False) | |
87 | merging f2 |
|
87 | merging f2 | |
88 | my f2@3b08d01b0ab5+ other f2@adfe50279922 ancestor f2@40494bf2444c |
|
88 | my f2@3b08d01b0ab5+ other f2@adfe50279922 ancestor f2@40494bf2444c | |
|
89 | f2: versions differ -> m (merge) | |||
89 | picked tool ':dump' for f2 (binary False symlink False) |
|
90 | picked tool ':dump' for f2 (binary False symlink False) | |
90 | my f2@3b08d01b0ab5+ other f2@adfe50279922 ancestor f2@40494bf2444c |
|
91 | my f2@3b08d01b0ab5+ other f2@adfe50279922 ancestor f2@40494bf2444c | |
91 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
92 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
92 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
93 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
93 | [1] |
|
94 | [1] | |
94 |
|
95 | |||
95 | $ head * |
|
96 | $ head * | |
96 | ==> f1 <== |
|
97 | ==> f1 <== | |
97 | 5 second change |
|
98 | 5 second change | |
98 |
|
99 | |||
99 | ==> f2 <== |
|
100 | ==> f2 <== | |
100 | 6 second change |
|
101 | 6 second change | |
101 |
|
102 | |||
102 | ==> f2.base <== |
|
103 | ==> f2.base <== | |
103 | 0 base |
|
104 | 0 base | |
104 |
|
105 | |||
105 | ==> f2.local <== |
|
106 | ==> f2.local <== | |
106 | 6 second change |
|
107 | 6 second change | |
107 |
|
108 | |||
108 | ==> f2.orig <== |
|
109 | ==> f2.orig <== | |
109 | 6 second change |
|
110 | 6 second change | |
110 |
|
111 | |||
111 | ==> f2.other <== |
|
112 | ==> f2.other <== | |
112 | 2 first change |
|
113 | 2 first change | |
113 |
|
114 | |||
114 | $ hg up -qC . |
|
115 | $ hg up -qC . | |
115 | $ hg merge -v --tool internal:dump 5 --config merge.preferancestor="null 40663881 3b08d" |
|
116 | $ hg merge -v --tool internal:dump 5 --config merge.preferancestor="null 40663881 3b08d" | |
116 | note: using 40663881a6dd as ancestor of 3b08d01b0ab5 and adfe50279922 |
|
117 | note: using 40663881a6dd as ancestor of 3b08d01b0ab5 and adfe50279922 | |
117 | alternatively, use --config merge.preferancestor=0f6b37dbe527 |
|
118 | alternatively, use --config merge.preferancestor=0f6b37dbe527 | |
118 | resolving manifests |
|
119 | resolving manifests | |
119 | merging f1 |
|
120 | merging f1 | |
120 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
121 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
121 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
122 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
122 | [1] |
|
123 | [1] | |
123 |
|
124 | |||
124 | Redo merge with merge.preferancestor="*" to enable bid merge |
|
125 | Redo merge with merge.preferancestor="*" to enable bid merge | |
125 |
|
126 | |||
126 | $ rm f* |
|
127 | $ rm f* | |
127 | $ hg up -qC . |
|
128 | $ hg up -qC . | |
128 | $ hg merge -v --debug --tool internal:dump 5 --config merge.preferancestor="*" |
|
129 | $ hg merge -v --debug --tool internal:dump 5 --config merge.preferancestor="*" | |
129 | note: merging 3b08d01b0ab5+ and adfe50279922 using bids from ancestors 0f6b37dbe527 and 40663881a6dd |
|
130 | note: merging 3b08d01b0ab5+ and adfe50279922 using bids from ancestors 0f6b37dbe527 and 40663881a6dd | |
130 |
|
131 | |||
131 | calculating bids for ancestor 0f6b37dbe527 |
|
132 | calculating bids for ancestor 0f6b37dbe527 | |
132 | searching for copies back to rev 3 |
|
133 | searching for copies back to rev 3 | |
133 | resolving manifests |
|
134 | resolving manifests | |
134 | branchmerge: True, force: False, partial: False |
|
135 | branchmerge: True, force: False, partial: False | |
135 | ancestor: 0f6b37dbe527, local: 3b08d01b0ab5+, remote: adfe50279922 |
|
136 | ancestor: 0f6b37dbe527, local: 3b08d01b0ab5+, remote: adfe50279922 | |
136 | f1: remote is newer -> g |
|
137 | f1: remote is newer -> g | |
137 | f2: versions differ -> m |
|
138 | f2: versions differ -> m | |
138 |
|
139 | |||
139 | calculating bids for ancestor 40663881a6dd |
|
140 | calculating bids for ancestor 40663881a6dd | |
140 | searching for copies back to rev 3 |
|
141 | searching for copies back to rev 3 | |
141 | resolving manifests |
|
142 | resolving manifests | |
142 | branchmerge: True, force: False, partial: False |
|
143 | branchmerge: True, force: False, partial: False | |
143 | ancestor: 40663881a6dd, local: 3b08d01b0ab5+, remote: adfe50279922 |
|
144 | ancestor: 40663881a6dd, local: 3b08d01b0ab5+, remote: adfe50279922 | |
144 | f1: versions differ -> m |
|
145 | f1: versions differ -> m | |
145 | f2: remote unchanged -> k |
|
146 | f2: remote unchanged -> k | |
146 |
|
147 | |||
147 | auction for merging merge bids |
|
148 | auction for merging merge bids | |
148 | f1: picking 'get' action |
|
149 | f1: picking 'get' action | |
149 | f2: picking 'keep' action |
|
150 | f2: picking 'keep' action | |
150 | end of auction |
|
151 | end of auction | |
151 |
|
152 | |||
152 | f1: remote is newer -> g |
|
153 | f1: remote is newer -> g | |
153 | getting f1 |
|
154 | getting f1 | |
154 | f2: remote unchanged -> k |
|
155 | f2: remote unchanged -> k | |
155 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
156 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
156 | (branch merge, don't forget to commit) |
|
157 | (branch merge, don't forget to commit) | |
157 |
|
158 | |||
158 | $ head * |
|
159 | $ head * | |
159 | ==> f1 <== |
|
160 | ==> f1 <== | |
160 | 5 second change |
|
161 | 5 second change | |
161 |
|
162 | |||
162 | ==> f2 <== |
|
163 | ==> f2 <== | |
163 | 6 second change |
|
164 | 6 second change | |
164 |
|
165 | |||
165 |
|
166 | |||
166 | The other way around: |
|
167 | The other way around: | |
167 |
|
168 | |||
168 | $ hg up -C -r5 |
|
169 | $ hg up -C -r5 | |
169 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
170 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
170 | $ hg merge -v --debug --config merge.preferancestor="*" |
|
171 | $ hg merge -v --debug --config merge.preferancestor="*" | |
171 | note: merging adfe50279922+ and 3b08d01b0ab5 using bids from ancestors 0f6b37dbe527 and 40663881a6dd |
|
172 | note: merging adfe50279922+ and 3b08d01b0ab5 using bids from ancestors 0f6b37dbe527 and 40663881a6dd | |
172 |
|
173 | |||
173 | calculating bids for ancestor 0f6b37dbe527 |
|
174 | calculating bids for ancestor 0f6b37dbe527 | |
174 | searching for copies back to rev 3 |
|
175 | searching for copies back to rev 3 | |
175 | resolving manifests |
|
176 | resolving manifests | |
176 | branchmerge: True, force: False, partial: False |
|
177 | branchmerge: True, force: False, partial: False | |
177 | ancestor: 0f6b37dbe527, local: adfe50279922+, remote: 3b08d01b0ab5 |
|
178 | ancestor: 0f6b37dbe527, local: adfe50279922+, remote: 3b08d01b0ab5 | |
178 | f1: remote unchanged -> k |
|
179 | f1: remote unchanged -> k | |
179 | f2: versions differ -> m |
|
180 | f2: versions differ -> m | |
180 |
|
181 | |||
181 | calculating bids for ancestor 40663881a6dd |
|
182 | calculating bids for ancestor 40663881a6dd | |
182 | searching for copies back to rev 3 |
|
183 | searching for copies back to rev 3 | |
183 | resolving manifests |
|
184 | resolving manifests | |
184 | branchmerge: True, force: False, partial: False |
|
185 | branchmerge: True, force: False, partial: False | |
185 | ancestor: 40663881a6dd, local: adfe50279922+, remote: 3b08d01b0ab5 |
|
186 | ancestor: 40663881a6dd, local: adfe50279922+, remote: 3b08d01b0ab5 | |
186 | f1: versions differ -> m |
|
187 | f1: versions differ -> m | |
187 | f2: remote is newer -> g |
|
188 | f2: remote is newer -> g | |
188 |
|
189 | |||
189 | auction for merging merge bids |
|
190 | auction for merging merge bids | |
190 | f1: picking 'keep' action |
|
191 | f1: picking 'keep' action | |
191 | f2: picking 'get' action |
|
192 | f2: picking 'get' action | |
192 | end of auction |
|
193 | end of auction | |
193 |
|
194 | |||
194 | f2: remote is newer -> g |
|
195 | f2: remote is newer -> g | |
195 | getting f2 |
|
196 | getting f2 | |
196 | f1: remote unchanged -> k |
|
197 | f1: remote unchanged -> k | |
197 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
198 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
198 | (branch merge, don't forget to commit) |
|
199 | (branch merge, don't forget to commit) | |
199 |
|
200 | |||
200 | $ head * |
|
201 | $ head * | |
201 | ==> f1 <== |
|
202 | ==> f1 <== | |
202 | 5 second change |
|
203 | 5 second change | |
203 |
|
204 | |||
204 | ==> f2 <== |
|
205 | ==> f2 <== | |
205 | 6 second change |
|
206 | 6 second change | |
206 |
|
207 | |||
207 | Verify how the output looks and and how verbose it is: |
|
208 | Verify how the output looks and and how verbose it is: | |
208 |
|
209 | |||
209 | $ hg up -qC |
|
210 | $ hg up -qC | |
210 | $ hg merge |
|
211 | $ hg merge | |
211 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
212 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
212 | (branch merge, don't forget to commit) |
|
213 | (branch merge, don't forget to commit) | |
213 |
|
214 | |||
214 | $ hg up -qC |
|
215 | $ hg up -qC | |
215 | $ hg merge -v |
|
216 | $ hg merge -v | |
216 | note: merging 3b08d01b0ab5+ and adfe50279922 using bids from ancestors 0f6b37dbe527 and 40663881a6dd |
|
217 | note: merging 3b08d01b0ab5+ and adfe50279922 using bids from ancestors 0f6b37dbe527 and 40663881a6dd | |
217 |
|
218 | |||
218 | calculating bids for ancestor 0f6b37dbe527 |
|
219 | calculating bids for ancestor 0f6b37dbe527 | |
219 | resolving manifests |
|
220 | resolving manifests | |
220 |
|
221 | |||
221 | calculating bids for ancestor 40663881a6dd |
|
222 | calculating bids for ancestor 40663881a6dd | |
222 | resolving manifests |
|
223 | resolving manifests | |
223 |
|
224 | |||
224 | auction for merging merge bids |
|
225 | auction for merging merge bids | |
225 | f1: picking 'get' action |
|
226 | f1: picking 'get' action | |
226 | f2: picking 'keep' action |
|
227 | f2: picking 'keep' action | |
227 | end of auction |
|
228 | end of auction | |
228 |
|
229 | |||
229 | getting f1 |
|
230 | getting f1 | |
230 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
231 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
231 | (branch merge, don't forget to commit) |
|
232 | (branch merge, don't forget to commit) | |
232 |
|
233 | |||
233 | $ hg up -qC |
|
234 | $ hg up -qC | |
234 | $ hg merge -v --debug --config merge.preferancestor="*" |
|
235 | $ hg merge -v --debug --config merge.preferancestor="*" | |
235 | note: merging 3b08d01b0ab5+ and adfe50279922 using bids from ancestors 0f6b37dbe527 and 40663881a6dd |
|
236 | note: merging 3b08d01b0ab5+ and adfe50279922 using bids from ancestors 0f6b37dbe527 and 40663881a6dd | |
236 |
|
237 | |||
237 | calculating bids for ancestor 0f6b37dbe527 |
|
238 | calculating bids for ancestor 0f6b37dbe527 | |
238 | searching for copies back to rev 3 |
|
239 | searching for copies back to rev 3 | |
239 | resolving manifests |
|
240 | resolving manifests | |
240 | branchmerge: True, force: False, partial: False |
|
241 | branchmerge: True, force: False, partial: False | |
241 | ancestor: 0f6b37dbe527, local: 3b08d01b0ab5+, remote: adfe50279922 |
|
242 | ancestor: 0f6b37dbe527, local: 3b08d01b0ab5+, remote: adfe50279922 | |
242 | f1: remote is newer -> g |
|
243 | f1: remote is newer -> g | |
243 | f2: versions differ -> m |
|
244 | f2: versions differ -> m | |
244 |
|
245 | |||
245 | calculating bids for ancestor 40663881a6dd |
|
246 | calculating bids for ancestor 40663881a6dd | |
246 | searching for copies back to rev 3 |
|
247 | searching for copies back to rev 3 | |
247 | resolving manifests |
|
248 | resolving manifests | |
248 | branchmerge: True, force: False, partial: False |
|
249 | branchmerge: True, force: False, partial: False | |
249 | ancestor: 40663881a6dd, local: 3b08d01b0ab5+, remote: adfe50279922 |
|
250 | ancestor: 40663881a6dd, local: 3b08d01b0ab5+, remote: adfe50279922 | |
250 | f1: versions differ -> m |
|
251 | f1: versions differ -> m | |
251 | f2: remote unchanged -> k |
|
252 | f2: remote unchanged -> k | |
252 |
|
253 | |||
253 | auction for merging merge bids |
|
254 | auction for merging merge bids | |
254 | f1: picking 'get' action |
|
255 | f1: picking 'get' action | |
255 | f2: picking 'keep' action |
|
256 | f2: picking 'keep' action | |
256 | end of auction |
|
257 | end of auction | |
257 |
|
258 | |||
258 | f1: remote is newer -> g |
|
259 | f1: remote is newer -> g | |
259 | getting f1 |
|
260 | getting f1 | |
260 | f2: remote unchanged -> k |
|
261 | f2: remote unchanged -> k | |
261 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
262 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
262 | (branch merge, don't forget to commit) |
|
263 | (branch merge, don't forget to commit) | |
263 |
|
264 | |||
264 | $ cd .. |
|
265 | $ cd .. | |
265 |
|
266 | |||
266 | http://stackoverflow.com/questions/9350005/how-do-i-specify-a-merge-base-to-use-in-a-hg-merge/9430810 |
|
267 | http://stackoverflow.com/questions/9350005/how-do-i-specify-a-merge-base-to-use-in-a-hg-merge/9430810 | |
267 |
|
268 | |||
268 | $ hg init ancestor-merging |
|
269 | $ hg init ancestor-merging | |
269 | $ cd ancestor-merging |
|
270 | $ cd ancestor-merging | |
270 | $ echo a > x |
|
271 | $ echo a > x | |
271 | $ hg commit -A -m a x |
|
272 | $ hg commit -A -m a x | |
272 | $ hg update -q 0 |
|
273 | $ hg update -q 0 | |
273 | $ echo b >> x |
|
274 | $ echo b >> x | |
274 | $ hg commit -m b |
|
275 | $ hg commit -m b | |
275 | $ hg update -q 0 |
|
276 | $ hg update -q 0 | |
276 | $ echo c >> x |
|
277 | $ echo c >> x | |
277 | $ hg commit -qm c |
|
278 | $ hg commit -qm c | |
278 | $ hg update -q 1 |
|
279 | $ hg update -q 1 | |
279 | $ hg merge -q --tool internal:local 2 |
|
280 | $ hg merge -q --tool internal:local 2 | |
280 | $ echo c >> x |
|
281 | $ echo c >> x | |
281 | $ hg commit -m bc |
|
282 | $ hg commit -m bc | |
282 | $ hg update -q 2 |
|
283 | $ hg update -q 2 | |
283 | $ hg merge -q --tool internal:local 1 |
|
284 | $ hg merge -q --tool internal:local 1 | |
284 | $ echo b >> x |
|
285 | $ echo b >> x | |
285 | $ hg commit -qm cb |
|
286 | $ hg commit -qm cb | |
286 |
|
287 | |||
287 | $ hg merge --config merge.preferancestor='!' |
|
288 | $ hg merge --config merge.preferancestor='!' | |
288 | note: using 70008a2163f6 as ancestor of 0d355fdef312 and 4b8b546a3eef |
|
289 | note: using 70008a2163f6 as ancestor of 0d355fdef312 and 4b8b546a3eef | |
289 | alternatively, use --config merge.preferancestor=b211bbc6eb3c |
|
290 | alternatively, use --config merge.preferancestor=b211bbc6eb3c | |
290 | merging x |
|
291 | merging x | |
291 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
292 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
292 | (branch merge, don't forget to commit) |
|
293 | (branch merge, don't forget to commit) | |
293 | $ cat x |
|
294 | $ cat x | |
294 | a |
|
295 | a | |
295 | c |
|
296 | c | |
296 | b |
|
297 | b | |
297 | c |
|
298 | c | |
298 |
|
299 | |||
299 | $ hg up -qC . |
|
300 | $ hg up -qC . | |
300 |
|
301 | |||
301 | $ hg merge --config merge.preferancestor=b211bbc6eb3c |
|
302 | $ hg merge --config merge.preferancestor=b211bbc6eb3c | |
302 | note: using b211bbc6eb3c as ancestor of 0d355fdef312 and 4b8b546a3eef |
|
303 | note: using b211bbc6eb3c as ancestor of 0d355fdef312 and 4b8b546a3eef | |
303 | alternatively, use --config merge.preferancestor=70008a2163f6 |
|
304 | alternatively, use --config merge.preferancestor=70008a2163f6 | |
304 | merging x |
|
305 | merging x | |
305 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
306 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
306 | (branch merge, don't forget to commit) |
|
307 | (branch merge, don't forget to commit) | |
307 | $ cat x |
|
308 | $ cat x | |
308 | a |
|
309 | a | |
309 | b |
|
310 | b | |
310 | c |
|
311 | c | |
311 | b |
|
312 | b | |
312 |
|
313 | |||
313 | $ hg up -qC . |
|
314 | $ hg up -qC . | |
314 |
|
315 | |||
315 | $ hg merge -v --config merge.preferancestor="*" |
|
316 | $ hg merge -v --config merge.preferancestor="*" | |
316 | note: merging 0d355fdef312+ and 4b8b546a3eef using bids from ancestors 70008a2163f6 and b211bbc6eb3c |
|
317 | note: merging 0d355fdef312+ and 4b8b546a3eef using bids from ancestors 70008a2163f6 and b211bbc6eb3c | |
317 |
|
318 | |||
318 | calculating bids for ancestor 70008a2163f6 |
|
319 | calculating bids for ancestor 70008a2163f6 | |
319 | resolving manifests |
|
320 | resolving manifests | |
320 |
|
321 | |||
321 | calculating bids for ancestor b211bbc6eb3c |
|
322 | calculating bids for ancestor b211bbc6eb3c | |
322 | resolving manifests |
|
323 | resolving manifests | |
323 |
|
324 | |||
324 | auction for merging merge bids |
|
325 | auction for merging merge bids | |
325 | x: multiple bids for merge action: |
|
326 | x: multiple bids for merge action: | |
326 | versions differ -> m |
|
327 | versions differ -> m | |
327 | versions differ -> m |
|
328 | versions differ -> m | |
328 | x: ambiguous merge - picked m action |
|
329 | x: ambiguous merge - picked m action | |
329 | end of auction |
|
330 | end of auction | |
330 |
|
331 | |||
331 | merging x |
|
332 | merging x | |
332 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
333 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
333 | (branch merge, don't forget to commit) |
|
334 | (branch merge, don't forget to commit) | |
334 | $ cat x |
|
335 | $ cat x | |
335 | a |
|
336 | a | |
336 | c |
|
337 | c | |
337 | b |
|
338 | b | |
338 | c |
|
339 | c | |
339 |
|
340 | |||
340 | Verify that the old context ancestor works with / despite preferancestor: |
|
341 | Verify that the old context ancestor works with / despite preferancestor: | |
341 |
|
342 | |||
342 | $ hg log -r 'ancestor(head())' --config merge.preferancestor=1 -T '{rev}\n' |
|
343 | $ hg log -r 'ancestor(head())' --config merge.preferancestor=1 -T '{rev}\n' | |
343 | 1 |
|
344 | 1 | |
344 | $ hg log -r 'ancestor(head())' --config merge.preferancestor=2 -T '{rev}\n' |
|
345 | $ hg log -r 'ancestor(head())' --config merge.preferancestor=2 -T '{rev}\n' | |
345 | 2 |
|
346 | 2 | |
346 | $ hg log -r 'ancestor(head())' --config merge.preferancestor=3 -T '{rev}\n' |
|
347 | $ hg log -r 'ancestor(head())' --config merge.preferancestor=3 -T '{rev}\n' | |
347 | 1 |
|
348 | 1 | |
348 | $ hg log -r 'ancestor(head())' --config merge.preferancestor='1337 * - 2' -T '{rev}\n' |
|
349 | $ hg log -r 'ancestor(head())' --config merge.preferancestor='1337 * - 2' -T '{rev}\n' | |
349 | 2 |
|
350 | 2 | |
350 |
|
351 | |||
351 | $ cd .. |
|
352 | $ cd .. |
@@ -1,665 +1,665 b'' | |||||
1 | Set up a base, local, and remote changeset, as well as the working copy state. |
|
1 | Set up a base, local, and remote changeset, as well as the working copy state. | |
2 | Files names are of the form base_remote_local_working-copy. For example, |
|
2 | Files names are of the form base_remote_local_working-copy. For example, | |
3 | content1_content2_content1_content2-untracked represents a |
|
3 | content1_content2_content1_content2-untracked represents a | |
4 | file that was modified in the remote changeset, left untouched in the |
|
4 | file that was modified in the remote changeset, left untouched in the | |
5 | local changeset, and then modified in the working copy to match the |
|
5 | local changeset, and then modified in the working copy to match the | |
6 | remote content, then finally forgotten. |
|
6 | remote content, then finally forgotten. | |
7 |
|
7 | |||
8 | $ hg init |
|
8 | $ hg init | |
9 |
|
9 | |||
10 | Create base changeset |
|
10 | Create base changeset | |
11 |
|
11 | |||
12 | $ python $TESTDIR/generate-working-copy-states.py state 3 1 |
|
12 | $ python $TESTDIR/generate-working-copy-states.py state 3 1 | |
13 | $ hg addremove -q --similarity 0 |
|
13 | $ hg addremove -q --similarity 0 | |
14 | $ hg commit -qm 'base' |
|
14 | $ hg commit -qm 'base' | |
15 |
|
15 | |||
16 | Create remote changeset |
|
16 | Create remote changeset | |
17 |
|
17 | |||
18 | $ python $TESTDIR/generate-working-copy-states.py state 3 2 |
|
18 | $ python $TESTDIR/generate-working-copy-states.py state 3 2 | |
19 | $ hg addremove -q --similarity 0 |
|
19 | $ hg addremove -q --similarity 0 | |
20 | $ hg commit -qm 'remote' |
|
20 | $ hg commit -qm 'remote' | |
21 |
|
21 | |||
22 | Create local changeset |
|
22 | Create local changeset | |
23 |
|
23 | |||
24 | $ hg update -q 0 |
|
24 | $ hg update -q 0 | |
25 | $ python $TESTDIR/generate-working-copy-states.py state 3 3 |
|
25 | $ python $TESTDIR/generate-working-copy-states.py state 3 3 | |
26 | $ hg addremove -q --similarity 0 |
|
26 | $ hg addremove -q --similarity 0 | |
27 | $ hg commit -qm 'local' |
|
27 | $ hg commit -qm 'local' | |
28 |
|
28 | |||
29 | Set up working directory |
|
29 | Set up working directory | |
30 |
|
30 | |||
31 | $ python $TESTDIR/generate-working-copy-states.py state 3 wc |
|
31 | $ python $TESTDIR/generate-working-copy-states.py state 3 wc | |
32 | $ hg addremove -q --similarity 0 |
|
32 | $ hg addremove -q --similarity 0 | |
33 | $ hg forget *_*_*_*-untracked |
|
33 | $ hg forget *_*_*_*-untracked | |
34 | $ rm *_*_*_missing-* |
|
34 | $ rm *_*_*_missing-* | |
35 |
|
35 | |||
36 | $ hg status -A |
|
36 | $ hg status -A | |
37 | M content1_content1_content1_content4-tracked |
|
37 | M content1_content1_content1_content4-tracked | |
38 | M content1_content1_content3_content1-tracked |
|
38 | M content1_content1_content3_content1-tracked | |
39 | M content1_content1_content3_content4-tracked |
|
39 | M content1_content1_content3_content4-tracked | |
40 | M content1_content2_content1_content2-tracked |
|
40 | M content1_content2_content1_content2-tracked | |
41 | M content1_content2_content1_content4-tracked |
|
41 | M content1_content2_content1_content4-tracked | |
42 | M content1_content2_content2_content1-tracked |
|
42 | M content1_content2_content2_content1-tracked | |
43 | M content1_content2_content2_content4-tracked |
|
43 | M content1_content2_content2_content4-tracked | |
44 | M content1_content2_content3_content1-tracked |
|
44 | M content1_content2_content3_content1-tracked | |
45 | M content1_content2_content3_content2-tracked |
|
45 | M content1_content2_content3_content2-tracked | |
46 | M content1_content2_content3_content4-tracked |
|
46 | M content1_content2_content3_content4-tracked | |
47 | M content1_missing_content1_content4-tracked |
|
47 | M content1_missing_content1_content4-tracked | |
48 | M content1_missing_content3_content1-tracked |
|
48 | M content1_missing_content3_content1-tracked | |
49 | M content1_missing_content3_content4-tracked |
|
49 | M content1_missing_content3_content4-tracked | |
50 | M missing_content2_content2_content4-tracked |
|
50 | M missing_content2_content2_content4-tracked | |
51 | M missing_content2_content3_content2-tracked |
|
51 | M missing_content2_content3_content2-tracked | |
52 | M missing_content2_content3_content4-tracked |
|
52 | M missing_content2_content3_content4-tracked | |
53 | M missing_missing_content3_content4-tracked |
|
53 | M missing_missing_content3_content4-tracked | |
54 | A content1_content1_missing_content1-tracked |
|
54 | A content1_content1_missing_content1-tracked | |
55 | A content1_content1_missing_content4-tracked |
|
55 | A content1_content1_missing_content4-tracked | |
56 | A content1_content2_missing_content1-tracked |
|
56 | A content1_content2_missing_content1-tracked | |
57 | A content1_content2_missing_content2-tracked |
|
57 | A content1_content2_missing_content2-tracked | |
58 | A content1_content2_missing_content4-tracked |
|
58 | A content1_content2_missing_content4-tracked | |
59 | A content1_missing_missing_content1-tracked |
|
59 | A content1_missing_missing_content1-tracked | |
60 | A content1_missing_missing_content4-tracked |
|
60 | A content1_missing_missing_content4-tracked | |
61 | A missing_content2_missing_content2-tracked |
|
61 | A missing_content2_missing_content2-tracked | |
62 | A missing_content2_missing_content4-tracked |
|
62 | A missing_content2_missing_content4-tracked | |
63 | A missing_missing_missing_content4-tracked |
|
63 | A missing_missing_missing_content4-tracked | |
64 | R content1_content1_content1_content1-untracked |
|
64 | R content1_content1_content1_content1-untracked | |
65 | R content1_content1_content1_content4-untracked |
|
65 | R content1_content1_content1_content4-untracked | |
66 | R content1_content1_content1_missing-untracked |
|
66 | R content1_content1_content1_missing-untracked | |
67 | R content1_content1_content3_content1-untracked |
|
67 | R content1_content1_content3_content1-untracked | |
68 | R content1_content1_content3_content3-untracked |
|
68 | R content1_content1_content3_content3-untracked | |
69 | R content1_content1_content3_content4-untracked |
|
69 | R content1_content1_content3_content4-untracked | |
70 | R content1_content1_content3_missing-untracked |
|
70 | R content1_content1_content3_missing-untracked | |
71 | R content1_content2_content1_content1-untracked |
|
71 | R content1_content2_content1_content1-untracked | |
72 | R content1_content2_content1_content2-untracked |
|
72 | R content1_content2_content1_content2-untracked | |
73 | R content1_content2_content1_content4-untracked |
|
73 | R content1_content2_content1_content4-untracked | |
74 | R content1_content2_content1_missing-untracked |
|
74 | R content1_content2_content1_missing-untracked | |
75 | R content1_content2_content2_content1-untracked |
|
75 | R content1_content2_content2_content1-untracked | |
76 | R content1_content2_content2_content2-untracked |
|
76 | R content1_content2_content2_content2-untracked | |
77 | R content1_content2_content2_content4-untracked |
|
77 | R content1_content2_content2_content4-untracked | |
78 | R content1_content2_content2_missing-untracked |
|
78 | R content1_content2_content2_missing-untracked | |
79 | R content1_content2_content3_content1-untracked |
|
79 | R content1_content2_content3_content1-untracked | |
80 | R content1_content2_content3_content2-untracked |
|
80 | R content1_content2_content3_content2-untracked | |
81 | R content1_content2_content3_content3-untracked |
|
81 | R content1_content2_content3_content3-untracked | |
82 | R content1_content2_content3_content4-untracked |
|
82 | R content1_content2_content3_content4-untracked | |
83 | R content1_content2_content3_missing-untracked |
|
83 | R content1_content2_content3_missing-untracked | |
84 | R content1_missing_content1_content1-untracked |
|
84 | R content1_missing_content1_content1-untracked | |
85 | R content1_missing_content1_content4-untracked |
|
85 | R content1_missing_content1_content4-untracked | |
86 | R content1_missing_content1_missing-untracked |
|
86 | R content1_missing_content1_missing-untracked | |
87 | R content1_missing_content3_content1-untracked |
|
87 | R content1_missing_content3_content1-untracked | |
88 | R content1_missing_content3_content3-untracked |
|
88 | R content1_missing_content3_content3-untracked | |
89 | R content1_missing_content3_content4-untracked |
|
89 | R content1_missing_content3_content4-untracked | |
90 | R content1_missing_content3_missing-untracked |
|
90 | R content1_missing_content3_missing-untracked | |
91 | R missing_content2_content2_content2-untracked |
|
91 | R missing_content2_content2_content2-untracked | |
92 | R missing_content2_content2_content4-untracked |
|
92 | R missing_content2_content2_content4-untracked | |
93 | R missing_content2_content2_missing-untracked |
|
93 | R missing_content2_content2_missing-untracked | |
94 | R missing_content2_content3_content2-untracked |
|
94 | R missing_content2_content3_content2-untracked | |
95 | R missing_content2_content3_content3-untracked |
|
95 | R missing_content2_content3_content3-untracked | |
96 | R missing_content2_content3_content4-untracked |
|
96 | R missing_content2_content3_content4-untracked | |
97 | R missing_content2_content3_missing-untracked |
|
97 | R missing_content2_content3_missing-untracked | |
98 | R missing_missing_content3_content3-untracked |
|
98 | R missing_missing_content3_content3-untracked | |
99 | R missing_missing_content3_content4-untracked |
|
99 | R missing_missing_content3_content4-untracked | |
100 | R missing_missing_content3_missing-untracked |
|
100 | R missing_missing_content3_missing-untracked | |
101 | ! content1_content1_content1_missing-tracked |
|
101 | ! content1_content1_content1_missing-tracked | |
102 | ! content1_content1_content3_missing-tracked |
|
102 | ! content1_content1_content3_missing-tracked | |
103 | ! content1_content1_missing_missing-tracked |
|
103 | ! content1_content1_missing_missing-tracked | |
104 | ! content1_content2_content1_missing-tracked |
|
104 | ! content1_content2_content1_missing-tracked | |
105 | ! content1_content2_content2_missing-tracked |
|
105 | ! content1_content2_content2_missing-tracked | |
106 | ! content1_content2_content3_missing-tracked |
|
106 | ! content1_content2_content3_missing-tracked | |
107 | ! content1_content2_missing_missing-tracked |
|
107 | ! content1_content2_missing_missing-tracked | |
108 | ! content1_missing_content1_missing-tracked |
|
108 | ! content1_missing_content1_missing-tracked | |
109 | ! content1_missing_content3_missing-tracked |
|
109 | ! content1_missing_content3_missing-tracked | |
110 | ! content1_missing_missing_missing-tracked |
|
110 | ! content1_missing_missing_missing-tracked | |
111 | ! missing_content2_content2_missing-tracked |
|
111 | ! missing_content2_content2_missing-tracked | |
112 | ! missing_content2_content3_missing-tracked |
|
112 | ! missing_content2_content3_missing-tracked | |
113 | ! missing_content2_missing_missing-tracked |
|
113 | ! missing_content2_missing_missing-tracked | |
114 | ! missing_missing_content3_missing-tracked |
|
114 | ! missing_missing_content3_missing-tracked | |
115 | ! missing_missing_missing_missing-tracked |
|
115 | ! missing_missing_missing_missing-tracked | |
116 | ? content1_content1_missing_content1-untracked |
|
116 | ? content1_content1_missing_content1-untracked | |
117 | ? content1_content1_missing_content4-untracked |
|
117 | ? content1_content1_missing_content4-untracked | |
118 | ? content1_content2_missing_content1-untracked |
|
118 | ? content1_content2_missing_content1-untracked | |
119 | ? content1_content2_missing_content2-untracked |
|
119 | ? content1_content2_missing_content2-untracked | |
120 | ? content1_content2_missing_content4-untracked |
|
120 | ? content1_content2_missing_content4-untracked | |
121 | ? content1_missing_missing_content1-untracked |
|
121 | ? content1_missing_missing_content1-untracked | |
122 | ? content1_missing_missing_content4-untracked |
|
122 | ? content1_missing_missing_content4-untracked | |
123 | ? missing_content2_missing_content2-untracked |
|
123 | ? missing_content2_missing_content2-untracked | |
124 | ? missing_content2_missing_content4-untracked |
|
124 | ? missing_content2_missing_content4-untracked | |
125 | ? missing_missing_missing_content4-untracked |
|
125 | ? missing_missing_missing_content4-untracked | |
126 | C content1_content1_content1_content1-tracked |
|
126 | C content1_content1_content1_content1-tracked | |
127 | C content1_content1_content3_content3-tracked |
|
127 | C content1_content1_content3_content3-tracked | |
128 | C content1_content2_content1_content1-tracked |
|
128 | C content1_content2_content1_content1-tracked | |
129 | C content1_content2_content2_content2-tracked |
|
129 | C content1_content2_content2_content2-tracked | |
130 | C content1_content2_content3_content3-tracked |
|
130 | C content1_content2_content3_content3-tracked | |
131 | C content1_missing_content1_content1-tracked |
|
131 | C content1_missing_content1_content1-tracked | |
132 | C content1_missing_content3_content3-tracked |
|
132 | C content1_missing_content3_content3-tracked | |
133 | C missing_content2_content2_content2-tracked |
|
133 | C missing_content2_content2_content2-tracked | |
134 | C missing_content2_content3_content3-tracked |
|
134 | C missing_content2_content3_content3-tracked | |
135 | C missing_missing_content3_content3-tracked |
|
135 | C missing_missing_content3_content3-tracked | |
136 |
|
136 | |||
137 | Merge with remote |
|
137 | Merge with remote | |
138 |
|
138 | |||
139 | # Notes: |
|
139 | # Notes: | |
140 | # - local and remote changed content1_content2_*_content2-untracked |
|
140 | # - local and remote changed content1_content2_*_content2-untracked | |
141 | # in the same way, so it could potentially be left alone |
|
141 | # in the same way, so it could potentially be left alone | |
142 |
|
142 | |||
143 | $ hg merge -f --tool internal:merge3 'desc("remote")' |
|
143 | $ hg merge -f --tool internal:merge3 'desc("remote")' | |
144 | local changed content1_missing_content1_content4-tracked which remote deleted |
|
144 | local changed content1_missing_content1_content4-tracked which remote deleted | |
145 | use (c)hanged version or (d)elete? c |
|
145 | use (c)hanged version or (d)elete? c | |
146 | local changed content1_missing_content3_content3-tracked which remote deleted |
|
146 | local changed content1_missing_content3_content3-tracked which remote deleted | |
147 | use (c)hanged version or (d)elete? c |
|
147 | use (c)hanged version or (d)elete? c | |
148 | local changed content1_missing_content3_content4-tracked which remote deleted |
|
148 | local changed content1_missing_content3_content4-tracked which remote deleted | |
149 | use (c)hanged version or (d)elete? c |
|
149 | use (c)hanged version or (d)elete? c | |
150 | local changed content1_missing_missing_content4-tracked which remote deleted |
|
150 | local changed content1_missing_missing_content4-tracked which remote deleted | |
151 | use (c)hanged version or (d)elete? c |
|
151 | use (c)hanged version or (d)elete? c | |
152 | remote changed content1_content2_content1_content1-untracked which local deleted |
|
152 | remote changed content1_content2_content1_content1-untracked which local deleted | |
153 | use (c)hanged version or leave (d)eleted? c |
|
153 | use (c)hanged version or leave (d)eleted? c | |
154 | remote changed content1_content2_content1_content2-untracked which local deleted |
|
154 | remote changed content1_content2_content1_content2-untracked which local deleted | |
155 | use (c)hanged version or leave (d)eleted? c |
|
155 | use (c)hanged version or leave (d)eleted? c | |
156 | remote changed content1_content2_content1_content4-untracked which local deleted |
|
156 | remote changed content1_content2_content1_content4-untracked which local deleted | |
157 | use (c)hanged version or leave (d)eleted? c |
|
157 | use (c)hanged version or leave (d)eleted? c | |
158 | remote changed content1_content2_content1_missing-tracked which local deleted |
|
158 | remote changed content1_content2_content1_missing-tracked which local deleted | |
159 | use (c)hanged version or leave (d)eleted? c |
|
159 | use (c)hanged version or leave (d)eleted? c | |
160 | remote changed content1_content2_content1_missing-untracked which local deleted |
|
160 | remote changed content1_content2_content1_missing-untracked which local deleted | |
161 | use (c)hanged version or leave (d)eleted? c |
|
161 | use (c)hanged version or leave (d)eleted? c | |
162 | remote changed content1_content2_content2_content1-untracked which local deleted |
|
162 | remote changed content1_content2_content2_content1-untracked which local deleted | |
163 | use (c)hanged version or leave (d)eleted? c |
|
163 | use (c)hanged version or leave (d)eleted? c | |
164 | remote changed content1_content2_content2_content2-untracked which local deleted |
|
164 | remote changed content1_content2_content2_content2-untracked which local deleted | |
165 | use (c)hanged version or leave (d)eleted? c |
|
165 | use (c)hanged version or leave (d)eleted? c | |
166 | remote changed content1_content2_content2_content4-untracked which local deleted |
|
166 | remote changed content1_content2_content2_content4-untracked which local deleted | |
167 | use (c)hanged version or leave (d)eleted? c |
|
167 | use (c)hanged version or leave (d)eleted? c | |
168 | remote changed content1_content2_content2_missing-tracked which local deleted |
|
168 | remote changed content1_content2_content2_missing-tracked which local deleted | |
169 | use (c)hanged version or leave (d)eleted? c |
|
169 | use (c)hanged version or leave (d)eleted? c | |
170 | remote changed content1_content2_content2_missing-untracked which local deleted |
|
170 | remote changed content1_content2_content2_missing-untracked which local deleted | |
171 | use (c)hanged version or leave (d)eleted? c |
|
171 | use (c)hanged version or leave (d)eleted? c | |
172 | remote changed content1_content2_content3_content1-untracked which local deleted |
|
172 | remote changed content1_content2_content3_content1-untracked which local deleted | |
173 | use (c)hanged version or leave (d)eleted? c |
|
173 | use (c)hanged version or leave (d)eleted? c | |
174 | remote changed content1_content2_content3_content2-untracked which local deleted |
|
174 | remote changed content1_content2_content3_content2-untracked which local deleted | |
175 | use (c)hanged version or leave (d)eleted? c |
|
175 | use (c)hanged version or leave (d)eleted? c | |
176 | remote changed content1_content2_content3_content3-untracked which local deleted |
|
176 | remote changed content1_content2_content3_content3-untracked which local deleted | |
177 | use (c)hanged version or leave (d)eleted? c |
|
177 | use (c)hanged version or leave (d)eleted? c | |
178 | remote changed content1_content2_content3_content4-untracked which local deleted |
|
178 | remote changed content1_content2_content3_content4-untracked which local deleted | |
179 | use (c)hanged version or leave (d)eleted? c |
|
179 | use (c)hanged version or leave (d)eleted? c | |
180 | remote changed content1_content2_content3_missing-tracked which local deleted |
|
180 | remote changed content1_content2_content3_missing-tracked which local deleted | |
181 | use (c)hanged version or leave (d)eleted? c |
|
181 | use (c)hanged version or leave (d)eleted? c | |
182 | remote changed content1_content2_content3_missing-untracked which local deleted |
|
182 | remote changed content1_content2_content3_missing-untracked which local deleted | |
183 | use (c)hanged version or leave (d)eleted? c |
|
183 | use (c)hanged version or leave (d)eleted? c | |
184 | remote changed content1_content2_missing_content1-untracked which local deleted |
|
184 | remote changed content1_content2_missing_content1-untracked which local deleted | |
185 | use (c)hanged version or leave (d)eleted? c |
|
185 | use (c)hanged version or leave (d)eleted? c | |
186 | remote changed content1_content2_missing_content2-untracked which local deleted |
|
186 | remote changed content1_content2_missing_content2-untracked which local deleted | |
187 | use (c)hanged version or leave (d)eleted? c |
|
187 | use (c)hanged version or leave (d)eleted? c | |
188 | remote changed content1_content2_missing_content4-untracked which local deleted |
|
188 | remote changed content1_content2_missing_content4-untracked which local deleted | |
189 | use (c)hanged version or leave (d)eleted? c |
|
189 | use (c)hanged version or leave (d)eleted? c | |
190 | remote changed content1_content2_missing_missing-tracked which local deleted |
|
190 | remote changed content1_content2_missing_missing-tracked which local deleted | |
191 | use (c)hanged version or leave (d)eleted? c |
|
191 | use (c)hanged version or leave (d)eleted? c | |
192 | remote changed content1_content2_missing_missing-untracked which local deleted |
|
192 | remote changed content1_content2_missing_missing-untracked which local deleted | |
193 | use (c)hanged version or leave (d)eleted? c |
|
193 | use (c)hanged version or leave (d)eleted? c | |
194 | merging content1_content2_content1_content4-tracked |
|
194 | merging content1_content2_content1_content4-tracked | |
195 | warning: conflicts while merging content1_content2_content1_content4-tracked! (edit, then use 'hg resolve --mark') |
|
|||
196 | merging content1_content2_content2_content1-tracked |
|
195 | merging content1_content2_content2_content1-tracked | |
197 | merging content1_content2_content2_content4-tracked |
|
196 | merging content1_content2_content2_content4-tracked | |
198 | warning: conflicts while merging content1_content2_content2_content4-tracked! (edit, then use 'hg resolve --mark') |
|
|||
199 | merging content1_content2_content3_content1-tracked |
|
197 | merging content1_content2_content3_content1-tracked | |
200 | merging content1_content2_content3_content3-tracked |
|
198 | merging content1_content2_content3_content3-tracked | |
201 | warning: conflicts while merging content1_content2_content3_content3-tracked! (edit, then use 'hg resolve --mark') |
|
|||
202 | merging content1_content2_content3_content4-tracked |
|
199 | merging content1_content2_content3_content4-tracked | |
203 | warning: conflicts while merging content1_content2_content3_content4-tracked! (edit, then use 'hg resolve --mark') |
|
|||
204 | merging content1_content2_missing_content1-tracked |
|
200 | merging content1_content2_missing_content1-tracked | |
205 | merging content1_content2_missing_content4-tracked |
|
201 | merging content1_content2_missing_content4-tracked | |
|
202 | merging missing_content2_content2_content4-tracked | |||
|
203 | merging missing_content2_content3_content3-tracked | |||
|
204 | merging missing_content2_content3_content4-tracked | |||
|
205 | merging missing_content2_missing_content4-tracked | |||
|
206 | merging missing_content2_missing_content4-untracked | |||
|
207 | warning: conflicts while merging content1_content2_content1_content4-tracked! (edit, then use 'hg resolve --mark') | |||
|
208 | warning: conflicts while merging content1_content2_content2_content4-tracked! (edit, then use 'hg resolve --mark') | |||
|
209 | warning: conflicts while merging content1_content2_content3_content3-tracked! (edit, then use 'hg resolve --mark') | |||
|
210 | warning: conflicts while merging content1_content2_content3_content4-tracked! (edit, then use 'hg resolve --mark') | |||
206 | warning: conflicts while merging content1_content2_missing_content4-tracked! (edit, then use 'hg resolve --mark') |
|
211 | warning: conflicts while merging content1_content2_missing_content4-tracked! (edit, then use 'hg resolve --mark') | |
207 | merging missing_content2_content2_content4-tracked |
|
|||
208 | warning: conflicts while merging missing_content2_content2_content4-tracked! (edit, then use 'hg resolve --mark') |
|
212 | warning: conflicts while merging missing_content2_content2_content4-tracked! (edit, then use 'hg resolve --mark') | |
209 | merging missing_content2_content3_content3-tracked |
|
|||
210 | warning: conflicts while merging missing_content2_content3_content3-tracked! (edit, then use 'hg resolve --mark') |
|
213 | warning: conflicts while merging missing_content2_content3_content3-tracked! (edit, then use 'hg resolve --mark') | |
211 | merging missing_content2_content3_content4-tracked |
|
|||
212 | warning: conflicts while merging missing_content2_content3_content4-tracked! (edit, then use 'hg resolve --mark') |
|
214 | warning: conflicts while merging missing_content2_content3_content4-tracked! (edit, then use 'hg resolve --mark') | |
213 | merging missing_content2_missing_content4-tracked |
|
|||
214 | warning: conflicts while merging missing_content2_missing_content4-tracked! (edit, then use 'hg resolve --mark') |
|
215 | warning: conflicts while merging missing_content2_missing_content4-tracked! (edit, then use 'hg resolve --mark') | |
215 | merging missing_content2_missing_content4-untracked |
|
|||
216 | warning: conflicts while merging missing_content2_missing_content4-untracked! (edit, then use 'hg resolve --mark') |
|
216 | warning: conflicts while merging missing_content2_missing_content4-untracked! (edit, then use 'hg resolve --mark') | |
217 | 39 files updated, 3 files merged, 8 files removed, 10 files unresolved |
|
217 | 39 files updated, 3 files merged, 8 files removed, 10 files unresolved | |
218 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
218 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
219 | [1] |
|
219 | [1] | |
220 |
|
220 | |||
221 | Check which files need to be resolved (should correspond to the output above). |
|
221 | Check which files need to be resolved (should correspond to the output above). | |
222 | This should be the files for which the base (1st filename segment), the remote |
|
222 | This should be the files for which the base (1st filename segment), the remote | |
223 | (2nd segment) and the working copy (4th segment) are all different. |
|
223 | (2nd segment) and the working copy (4th segment) are all different. | |
224 |
|
224 | |||
225 | Interestingly, one untracked file got merged and added, which corresponds to the |
|
225 | Interestingly, one untracked file got merged and added, which corresponds to the | |
226 | odd 'if force and branchmerge and different' case in manifestmerge(). |
|
226 | odd 'if force and branchmerge and different' case in manifestmerge(). | |
227 |
|
227 | |||
228 | $ hg resolve -l |
|
228 | $ hg resolve -l | |
229 | U content1_content2_content1_content4-tracked |
|
229 | U content1_content2_content1_content4-tracked | |
230 | R content1_content2_content2_content1-tracked |
|
230 | R content1_content2_content2_content1-tracked | |
231 | U content1_content2_content2_content4-tracked |
|
231 | U content1_content2_content2_content4-tracked | |
232 | R content1_content2_content3_content1-tracked |
|
232 | R content1_content2_content3_content1-tracked | |
233 | U content1_content2_content3_content3-tracked |
|
233 | U content1_content2_content3_content3-tracked | |
234 | U content1_content2_content3_content4-tracked |
|
234 | U content1_content2_content3_content4-tracked | |
235 | R content1_content2_missing_content1-tracked |
|
235 | R content1_content2_missing_content1-tracked | |
236 | U content1_content2_missing_content4-tracked |
|
236 | U content1_content2_missing_content4-tracked | |
237 | U missing_content2_content2_content4-tracked |
|
237 | U missing_content2_content2_content4-tracked | |
238 | U missing_content2_content3_content3-tracked |
|
238 | U missing_content2_content3_content3-tracked | |
239 | U missing_content2_content3_content4-tracked |
|
239 | U missing_content2_content3_content4-tracked | |
240 | U missing_content2_missing_content4-tracked |
|
240 | U missing_content2_missing_content4-tracked | |
241 | U missing_content2_missing_content4-untracked |
|
241 | U missing_content2_missing_content4-untracked | |
242 |
|
242 | |||
243 | Check status and file content |
|
243 | Check status and file content | |
244 |
|
244 | |||
245 | Some files get added (e.g. content1_content2_content1_content1-untracked) |
|
245 | Some files get added (e.g. content1_content2_content1_content1-untracked) | |
246 |
|
246 | |||
247 | It is not intuitive that content1_content2_content1_content4-tracked gets |
|
247 | It is not intuitive that content1_content2_content1_content4-tracked gets | |
248 | merged while content1_content2_content1_content4-untracked gets overwritten. |
|
248 | merged while content1_content2_content1_content4-untracked gets overwritten. | |
249 | Any *_content2_*-untracked triggers the modified/deleted prompt and then gets |
|
249 | Any *_content2_*-untracked triggers the modified/deleted prompt and then gets | |
250 | overwritten. |
|
250 | overwritten. | |
251 |
|
251 | |||
252 | A lot of untracked files become tracked, for example |
|
252 | A lot of untracked files become tracked, for example | |
253 | content1_content2_content2_content2-untracked. |
|
253 | content1_content2_content2_content2-untracked. | |
254 |
|
254 | |||
255 | *_missing_missing_missing-tracked is reported as removed ('R'), which |
|
255 | *_missing_missing_missing-tracked is reported as removed ('R'), which | |
256 | doesn't make sense since the file did not exist in the parent, but on the |
|
256 | doesn't make sense since the file did not exist in the parent, but on the | |
257 | other hand, merged-in additions are reported as modifications, which is |
|
257 | other hand, merged-in additions are reported as modifications, which is | |
258 | almost as strange. |
|
258 | almost as strange. | |
259 |
|
259 | |||
260 | missing_missing_content3_missing-tracked becomes removed ('R'), even though |
|
260 | missing_missing_content3_missing-tracked becomes removed ('R'), even though | |
261 | the remote side did not touch the file |
|
261 | the remote side did not touch the file | |
262 |
|
262 | |||
263 | $ for f in `python $TESTDIR/generate-working-copy-states.py filelist 3` |
|
263 | $ for f in `python $TESTDIR/generate-working-copy-states.py filelist 3` | |
264 | > do |
|
264 | > do | |
265 | > echo |
|
265 | > echo | |
266 | > hg status -A $f |
|
266 | > hg status -A $f | |
267 | > if test -f $f |
|
267 | > if test -f $f | |
268 | > then |
|
268 | > then | |
269 | > cat $f |
|
269 | > cat $f | |
270 | > else |
|
270 | > else | |
271 | > echo '<missing>' |
|
271 | > echo '<missing>' | |
272 | > fi |
|
272 | > fi | |
273 | > if test -f ${f}.orig |
|
273 | > if test -f ${f}.orig | |
274 | > then |
|
274 | > then | |
275 | > echo ${f}.orig: |
|
275 | > echo ${f}.orig: | |
276 | > cat ${f}.orig |
|
276 | > cat ${f}.orig | |
277 | > fi |
|
277 | > fi | |
278 | > done |
|
278 | > done | |
279 |
|
279 | |||
280 | C content1_content1_content1_content1-tracked |
|
280 | C content1_content1_content1_content1-tracked | |
281 | content1 |
|
281 | content1 | |
282 |
|
282 | |||
283 | R content1_content1_content1_content1-untracked |
|
283 | R content1_content1_content1_content1-untracked | |
284 | content1 |
|
284 | content1 | |
285 |
|
285 | |||
286 | M content1_content1_content1_content4-tracked |
|
286 | M content1_content1_content1_content4-tracked | |
287 | content4 |
|
287 | content4 | |
288 |
|
288 | |||
289 | R content1_content1_content1_content4-untracked |
|
289 | R content1_content1_content1_content4-untracked | |
290 | content4 |
|
290 | content4 | |
291 |
|
291 | |||
292 | ! content1_content1_content1_missing-tracked |
|
292 | ! content1_content1_content1_missing-tracked | |
293 | <missing> |
|
293 | <missing> | |
294 |
|
294 | |||
295 | R content1_content1_content1_missing-untracked |
|
295 | R content1_content1_content1_missing-untracked | |
296 | <missing> |
|
296 | <missing> | |
297 |
|
297 | |||
298 | M content1_content1_content3_content1-tracked |
|
298 | M content1_content1_content3_content1-tracked | |
299 | content1 |
|
299 | content1 | |
300 |
|
300 | |||
301 | R content1_content1_content3_content1-untracked |
|
301 | R content1_content1_content3_content1-untracked | |
302 | content1 |
|
302 | content1 | |
303 |
|
303 | |||
304 | C content1_content1_content3_content3-tracked |
|
304 | C content1_content1_content3_content3-tracked | |
305 | content3 |
|
305 | content3 | |
306 |
|
306 | |||
307 | R content1_content1_content3_content3-untracked |
|
307 | R content1_content1_content3_content3-untracked | |
308 | content3 |
|
308 | content3 | |
309 |
|
309 | |||
310 | M content1_content1_content3_content4-tracked |
|
310 | M content1_content1_content3_content4-tracked | |
311 | content4 |
|
311 | content4 | |
312 |
|
312 | |||
313 | R content1_content1_content3_content4-untracked |
|
313 | R content1_content1_content3_content4-untracked | |
314 | content4 |
|
314 | content4 | |
315 |
|
315 | |||
316 | ! content1_content1_content3_missing-tracked |
|
316 | ! content1_content1_content3_missing-tracked | |
317 | <missing> |
|
317 | <missing> | |
318 |
|
318 | |||
319 | R content1_content1_content3_missing-untracked |
|
319 | R content1_content1_content3_missing-untracked | |
320 | <missing> |
|
320 | <missing> | |
321 |
|
321 | |||
322 | A content1_content1_missing_content1-tracked |
|
322 | A content1_content1_missing_content1-tracked | |
323 | content1 |
|
323 | content1 | |
324 |
|
324 | |||
325 | ? content1_content1_missing_content1-untracked |
|
325 | ? content1_content1_missing_content1-untracked | |
326 | content1 |
|
326 | content1 | |
327 |
|
327 | |||
328 | A content1_content1_missing_content4-tracked |
|
328 | A content1_content1_missing_content4-tracked | |
329 | content4 |
|
329 | content4 | |
330 |
|
330 | |||
331 | ? content1_content1_missing_content4-untracked |
|
331 | ? content1_content1_missing_content4-untracked | |
332 | content4 |
|
332 | content4 | |
333 |
|
333 | |||
334 | ! content1_content1_missing_missing-tracked |
|
334 | ! content1_content1_missing_missing-tracked | |
335 | <missing> |
|
335 | <missing> | |
336 |
|
336 | |||
337 | content1_content1_missing_missing-untracked: * (glob) |
|
337 | content1_content1_missing_missing-untracked: * (glob) | |
338 | <missing> |
|
338 | <missing> | |
339 |
|
339 | |||
340 | M content1_content2_content1_content1-tracked |
|
340 | M content1_content2_content1_content1-tracked | |
341 | content2 |
|
341 | content2 | |
342 |
|
342 | |||
343 | M content1_content2_content1_content1-untracked |
|
343 | M content1_content2_content1_content1-untracked | |
344 | content2 |
|
344 | content2 | |
345 |
|
345 | |||
346 | M content1_content2_content1_content2-tracked |
|
346 | M content1_content2_content1_content2-tracked | |
347 | content2 |
|
347 | content2 | |
348 |
|
348 | |||
349 | M content1_content2_content1_content2-untracked |
|
349 | M content1_content2_content1_content2-untracked | |
350 | content2 |
|
350 | content2 | |
351 |
|
351 | |||
352 | M content1_content2_content1_content4-tracked |
|
352 | M content1_content2_content1_content4-tracked | |
353 | <<<<<<< local: 0447570f1af6 - test: local |
|
353 | <<<<<<< local: 0447570f1af6 - test: local | |
354 | content4 |
|
354 | content4 | |
355 | ||||||| base |
|
355 | ||||||| base | |
356 | content1 |
|
356 | content1 | |
357 | ======= |
|
357 | ======= | |
358 | content2 |
|
358 | content2 | |
359 | >>>>>>> other: 85100b8c675b - test: remote |
|
359 | >>>>>>> other: 85100b8c675b - test: remote | |
360 | content1_content2_content1_content4-tracked.orig: |
|
360 | content1_content2_content1_content4-tracked.orig: | |
361 | content4 |
|
361 | content4 | |
362 |
|
362 | |||
363 | M content1_content2_content1_content4-untracked |
|
363 | M content1_content2_content1_content4-untracked | |
364 | content2 |
|
364 | content2 | |
365 |
|
365 | |||
366 | M content1_content2_content1_missing-tracked |
|
366 | M content1_content2_content1_missing-tracked | |
367 | content2 |
|
367 | content2 | |
368 |
|
368 | |||
369 | M content1_content2_content1_missing-untracked |
|
369 | M content1_content2_content1_missing-untracked | |
370 | content2 |
|
370 | content2 | |
371 |
|
371 | |||
372 | M content1_content2_content2_content1-tracked |
|
372 | M content1_content2_content2_content1-tracked | |
373 | content2 |
|
373 | content2 | |
374 |
|
374 | |||
375 | M content1_content2_content2_content1-untracked |
|
375 | M content1_content2_content2_content1-untracked | |
376 | content2 |
|
376 | content2 | |
377 |
|
377 | |||
378 | C content1_content2_content2_content2-tracked |
|
378 | C content1_content2_content2_content2-tracked | |
379 | content2 |
|
379 | content2 | |
380 |
|
380 | |||
381 | M content1_content2_content2_content2-untracked |
|
381 | M content1_content2_content2_content2-untracked | |
382 | content2 |
|
382 | content2 | |
383 |
|
383 | |||
384 | M content1_content2_content2_content4-tracked |
|
384 | M content1_content2_content2_content4-tracked | |
385 | <<<<<<< local: 0447570f1af6 - test: local |
|
385 | <<<<<<< local: 0447570f1af6 - test: local | |
386 | content4 |
|
386 | content4 | |
387 | ||||||| base |
|
387 | ||||||| base | |
388 | content1 |
|
388 | content1 | |
389 | ======= |
|
389 | ======= | |
390 | content2 |
|
390 | content2 | |
391 | >>>>>>> other: 85100b8c675b - test: remote |
|
391 | >>>>>>> other: 85100b8c675b - test: remote | |
392 | content1_content2_content2_content4-tracked.orig: |
|
392 | content1_content2_content2_content4-tracked.orig: | |
393 | content4 |
|
393 | content4 | |
394 |
|
394 | |||
395 | M content1_content2_content2_content4-untracked |
|
395 | M content1_content2_content2_content4-untracked | |
396 | content2 |
|
396 | content2 | |
397 |
|
397 | |||
398 | M content1_content2_content2_missing-tracked |
|
398 | M content1_content2_content2_missing-tracked | |
399 | content2 |
|
399 | content2 | |
400 |
|
400 | |||
401 | M content1_content2_content2_missing-untracked |
|
401 | M content1_content2_content2_missing-untracked | |
402 | content2 |
|
402 | content2 | |
403 |
|
403 | |||
404 | M content1_content2_content3_content1-tracked |
|
404 | M content1_content2_content3_content1-tracked | |
405 | content2 |
|
405 | content2 | |
406 |
|
406 | |||
407 | M content1_content2_content3_content1-untracked |
|
407 | M content1_content2_content3_content1-untracked | |
408 | content2 |
|
408 | content2 | |
409 |
|
409 | |||
410 | M content1_content2_content3_content2-tracked |
|
410 | M content1_content2_content3_content2-tracked | |
411 | content2 |
|
411 | content2 | |
412 |
|
412 | |||
413 | M content1_content2_content3_content2-untracked |
|
413 | M content1_content2_content3_content2-untracked | |
414 | content2 |
|
414 | content2 | |
415 |
|
415 | |||
416 | M content1_content2_content3_content3-tracked |
|
416 | M content1_content2_content3_content3-tracked | |
417 | <<<<<<< local: 0447570f1af6 - test: local |
|
417 | <<<<<<< local: 0447570f1af6 - test: local | |
418 | content3 |
|
418 | content3 | |
419 | ||||||| base |
|
419 | ||||||| base | |
420 | content1 |
|
420 | content1 | |
421 | ======= |
|
421 | ======= | |
422 | content2 |
|
422 | content2 | |
423 | >>>>>>> other: 85100b8c675b - test: remote |
|
423 | >>>>>>> other: 85100b8c675b - test: remote | |
424 | content1_content2_content3_content3-tracked.orig: |
|
424 | content1_content2_content3_content3-tracked.orig: | |
425 | content3 |
|
425 | content3 | |
426 |
|
426 | |||
427 | M content1_content2_content3_content3-untracked |
|
427 | M content1_content2_content3_content3-untracked | |
428 | content2 |
|
428 | content2 | |
429 |
|
429 | |||
430 | M content1_content2_content3_content4-tracked |
|
430 | M content1_content2_content3_content4-tracked | |
431 | <<<<<<< local: 0447570f1af6 - test: local |
|
431 | <<<<<<< local: 0447570f1af6 - test: local | |
432 | content4 |
|
432 | content4 | |
433 | ||||||| base |
|
433 | ||||||| base | |
434 | content1 |
|
434 | content1 | |
435 | ======= |
|
435 | ======= | |
436 | content2 |
|
436 | content2 | |
437 | >>>>>>> other: 85100b8c675b - test: remote |
|
437 | >>>>>>> other: 85100b8c675b - test: remote | |
438 | content1_content2_content3_content4-tracked.orig: |
|
438 | content1_content2_content3_content4-tracked.orig: | |
439 | content4 |
|
439 | content4 | |
440 |
|
440 | |||
441 | M content1_content2_content3_content4-untracked |
|
441 | M content1_content2_content3_content4-untracked | |
442 | content2 |
|
442 | content2 | |
443 |
|
443 | |||
444 | M content1_content2_content3_missing-tracked |
|
444 | M content1_content2_content3_missing-tracked | |
445 | content2 |
|
445 | content2 | |
446 |
|
446 | |||
447 | M content1_content2_content3_missing-untracked |
|
447 | M content1_content2_content3_missing-untracked | |
448 | content2 |
|
448 | content2 | |
449 |
|
449 | |||
450 | M content1_content2_missing_content1-tracked |
|
450 | M content1_content2_missing_content1-tracked | |
451 | content2 |
|
451 | content2 | |
452 |
|
452 | |||
453 | M content1_content2_missing_content1-untracked |
|
453 | M content1_content2_missing_content1-untracked | |
454 | content2 |
|
454 | content2 | |
455 |
|
455 | |||
456 | M content1_content2_missing_content2-tracked |
|
456 | M content1_content2_missing_content2-tracked | |
457 | content2 |
|
457 | content2 | |
458 |
|
458 | |||
459 | M content1_content2_missing_content2-untracked |
|
459 | M content1_content2_missing_content2-untracked | |
460 | content2 |
|
460 | content2 | |
461 |
|
461 | |||
462 | M content1_content2_missing_content4-tracked |
|
462 | M content1_content2_missing_content4-tracked | |
463 | <<<<<<< local: 0447570f1af6 - test: local |
|
463 | <<<<<<< local: 0447570f1af6 - test: local | |
464 | content4 |
|
464 | content4 | |
465 | ||||||| base |
|
465 | ||||||| base | |
466 | content1 |
|
466 | content1 | |
467 | ======= |
|
467 | ======= | |
468 | content2 |
|
468 | content2 | |
469 | >>>>>>> other: 85100b8c675b - test: remote |
|
469 | >>>>>>> other: 85100b8c675b - test: remote | |
470 | content1_content2_missing_content4-tracked.orig: |
|
470 | content1_content2_missing_content4-tracked.orig: | |
471 | content4 |
|
471 | content4 | |
472 |
|
472 | |||
473 | M content1_content2_missing_content4-untracked |
|
473 | M content1_content2_missing_content4-untracked | |
474 | content2 |
|
474 | content2 | |
475 |
|
475 | |||
476 | M content1_content2_missing_missing-tracked |
|
476 | M content1_content2_missing_missing-tracked | |
477 | content2 |
|
477 | content2 | |
478 |
|
478 | |||
479 | M content1_content2_missing_missing-untracked |
|
479 | M content1_content2_missing_missing-untracked | |
480 | content2 |
|
480 | content2 | |
481 |
|
481 | |||
482 | R content1_missing_content1_content1-tracked |
|
482 | R content1_missing_content1_content1-tracked | |
483 | <missing> |
|
483 | <missing> | |
484 |
|
484 | |||
485 | R content1_missing_content1_content1-untracked |
|
485 | R content1_missing_content1_content1-untracked | |
486 | content1 |
|
486 | content1 | |
487 |
|
487 | |||
488 | M content1_missing_content1_content4-tracked |
|
488 | M content1_missing_content1_content4-tracked | |
489 | content4 |
|
489 | content4 | |
490 |
|
490 | |||
491 | R content1_missing_content1_content4-untracked |
|
491 | R content1_missing_content1_content4-untracked | |
492 | content4 |
|
492 | content4 | |
493 |
|
493 | |||
494 | R content1_missing_content1_missing-tracked |
|
494 | R content1_missing_content1_missing-tracked | |
495 | <missing> |
|
495 | <missing> | |
496 |
|
496 | |||
497 | R content1_missing_content1_missing-untracked |
|
497 | R content1_missing_content1_missing-untracked | |
498 | <missing> |
|
498 | <missing> | |
499 |
|
499 | |||
500 | R content1_missing_content3_content1-tracked |
|
500 | R content1_missing_content3_content1-tracked | |
501 | <missing> |
|
501 | <missing> | |
502 |
|
502 | |||
503 | R content1_missing_content3_content1-untracked |
|
503 | R content1_missing_content3_content1-untracked | |
504 | content1 |
|
504 | content1 | |
505 |
|
505 | |||
506 | C content1_missing_content3_content3-tracked |
|
506 | C content1_missing_content3_content3-tracked | |
507 | content3 |
|
507 | content3 | |
508 |
|
508 | |||
509 | R content1_missing_content3_content3-untracked |
|
509 | R content1_missing_content3_content3-untracked | |
510 | content3 |
|
510 | content3 | |
511 |
|
511 | |||
512 | M content1_missing_content3_content4-tracked |
|
512 | M content1_missing_content3_content4-tracked | |
513 | content4 |
|
513 | content4 | |
514 |
|
514 | |||
515 | R content1_missing_content3_content4-untracked |
|
515 | R content1_missing_content3_content4-untracked | |
516 | content4 |
|
516 | content4 | |
517 |
|
517 | |||
518 | R content1_missing_content3_missing-tracked |
|
518 | R content1_missing_content3_missing-tracked | |
519 | <missing> |
|
519 | <missing> | |
520 |
|
520 | |||
521 | R content1_missing_content3_missing-untracked |
|
521 | R content1_missing_content3_missing-untracked | |
522 | <missing> |
|
522 | <missing> | |
523 |
|
523 | |||
524 | R content1_missing_missing_content1-tracked |
|
524 | R content1_missing_missing_content1-tracked | |
525 | <missing> |
|
525 | <missing> | |
526 |
|
526 | |||
527 | ? content1_missing_missing_content1-untracked |
|
527 | ? content1_missing_missing_content1-untracked | |
528 | content1 |
|
528 | content1 | |
529 |
|
529 | |||
530 | A content1_missing_missing_content4-tracked |
|
530 | A content1_missing_missing_content4-tracked | |
531 | content4 |
|
531 | content4 | |
532 |
|
532 | |||
533 | ? content1_missing_missing_content4-untracked |
|
533 | ? content1_missing_missing_content4-untracked | |
534 | content4 |
|
534 | content4 | |
535 |
|
535 | |||
536 | R content1_missing_missing_missing-tracked |
|
536 | R content1_missing_missing_missing-tracked | |
537 | <missing> |
|
537 | <missing> | |
538 |
|
538 | |||
539 | content1_missing_missing_missing-untracked: * (glob) |
|
539 | content1_missing_missing_missing-untracked: * (glob) | |
540 | <missing> |
|
540 | <missing> | |
541 |
|
541 | |||
542 | C missing_content2_content2_content2-tracked |
|
542 | C missing_content2_content2_content2-tracked | |
543 | content2 |
|
543 | content2 | |
544 |
|
544 | |||
545 | M missing_content2_content2_content2-untracked |
|
545 | M missing_content2_content2_content2-untracked | |
546 | content2 |
|
546 | content2 | |
547 |
|
547 | |||
548 | M missing_content2_content2_content4-tracked |
|
548 | M missing_content2_content2_content4-tracked | |
549 | <<<<<<< local: 0447570f1af6 - test: local |
|
549 | <<<<<<< local: 0447570f1af6 - test: local | |
550 | content4 |
|
550 | content4 | |
551 | ||||||| base |
|
551 | ||||||| base | |
552 | ======= |
|
552 | ======= | |
553 | content2 |
|
553 | content2 | |
554 | >>>>>>> other: 85100b8c675b - test: remote |
|
554 | >>>>>>> other: 85100b8c675b - test: remote | |
555 | missing_content2_content2_content4-tracked.orig: |
|
555 | missing_content2_content2_content4-tracked.orig: | |
556 | content4 |
|
556 | content4 | |
557 |
|
557 | |||
558 | M missing_content2_content2_content4-untracked |
|
558 | M missing_content2_content2_content4-untracked | |
559 | content2 |
|
559 | content2 | |
560 |
|
560 | |||
561 | M missing_content2_content2_missing-tracked |
|
561 | M missing_content2_content2_missing-tracked | |
562 | content2 |
|
562 | content2 | |
563 |
|
563 | |||
564 | M missing_content2_content2_missing-untracked |
|
564 | M missing_content2_content2_missing-untracked | |
565 | content2 |
|
565 | content2 | |
566 |
|
566 | |||
567 | M missing_content2_content3_content2-tracked |
|
567 | M missing_content2_content3_content2-tracked | |
568 | content2 |
|
568 | content2 | |
569 |
|
569 | |||
570 | M missing_content2_content3_content2-untracked |
|
570 | M missing_content2_content3_content2-untracked | |
571 | content2 |
|
571 | content2 | |
572 |
|
572 | |||
573 | M missing_content2_content3_content3-tracked |
|
573 | M missing_content2_content3_content3-tracked | |
574 | <<<<<<< local: 0447570f1af6 - test: local |
|
574 | <<<<<<< local: 0447570f1af6 - test: local | |
575 | content3 |
|
575 | content3 | |
576 | ||||||| base |
|
576 | ||||||| base | |
577 | ======= |
|
577 | ======= | |
578 | content2 |
|
578 | content2 | |
579 | >>>>>>> other: 85100b8c675b - test: remote |
|
579 | >>>>>>> other: 85100b8c675b - test: remote | |
580 | missing_content2_content3_content3-tracked.orig: |
|
580 | missing_content2_content3_content3-tracked.orig: | |
581 | content3 |
|
581 | content3 | |
582 |
|
582 | |||
583 | M missing_content2_content3_content3-untracked |
|
583 | M missing_content2_content3_content3-untracked | |
584 | content2 |
|
584 | content2 | |
585 |
|
585 | |||
586 | M missing_content2_content3_content4-tracked |
|
586 | M missing_content2_content3_content4-tracked | |
587 | <<<<<<< local: 0447570f1af6 - test: local |
|
587 | <<<<<<< local: 0447570f1af6 - test: local | |
588 | content4 |
|
588 | content4 | |
589 | ||||||| base |
|
589 | ||||||| base | |
590 | ======= |
|
590 | ======= | |
591 | content2 |
|
591 | content2 | |
592 | >>>>>>> other: 85100b8c675b - test: remote |
|
592 | >>>>>>> other: 85100b8c675b - test: remote | |
593 | missing_content2_content3_content4-tracked.orig: |
|
593 | missing_content2_content3_content4-tracked.orig: | |
594 | content4 |
|
594 | content4 | |
595 |
|
595 | |||
596 | M missing_content2_content3_content4-untracked |
|
596 | M missing_content2_content3_content4-untracked | |
597 | content2 |
|
597 | content2 | |
598 |
|
598 | |||
599 | M missing_content2_content3_missing-tracked |
|
599 | M missing_content2_content3_missing-tracked | |
600 | content2 |
|
600 | content2 | |
601 |
|
601 | |||
602 | M missing_content2_content3_missing-untracked |
|
602 | M missing_content2_content3_missing-untracked | |
603 | content2 |
|
603 | content2 | |
604 |
|
604 | |||
605 | M missing_content2_missing_content2-tracked |
|
605 | M missing_content2_missing_content2-tracked | |
606 | content2 |
|
606 | content2 | |
607 |
|
607 | |||
608 | M missing_content2_missing_content2-untracked |
|
608 | M missing_content2_missing_content2-untracked | |
609 | content2 |
|
609 | content2 | |
610 |
|
610 | |||
611 | M missing_content2_missing_content4-tracked |
|
611 | M missing_content2_missing_content4-tracked | |
612 | <<<<<<< local: 0447570f1af6 - test: local |
|
612 | <<<<<<< local: 0447570f1af6 - test: local | |
613 | content4 |
|
613 | content4 | |
614 | ||||||| base |
|
614 | ||||||| base | |
615 | ======= |
|
615 | ======= | |
616 | content2 |
|
616 | content2 | |
617 | >>>>>>> other: 85100b8c675b - test: remote |
|
617 | >>>>>>> other: 85100b8c675b - test: remote | |
618 | missing_content2_missing_content4-tracked.orig: |
|
618 | missing_content2_missing_content4-tracked.orig: | |
619 | content4 |
|
619 | content4 | |
620 |
|
620 | |||
621 | M missing_content2_missing_content4-untracked |
|
621 | M missing_content2_missing_content4-untracked | |
622 | <<<<<<< local: 0447570f1af6 - test: local |
|
622 | <<<<<<< local: 0447570f1af6 - test: local | |
623 | content4 |
|
623 | content4 | |
624 | ||||||| base |
|
624 | ||||||| base | |
625 | ======= |
|
625 | ======= | |
626 | content2 |
|
626 | content2 | |
627 | >>>>>>> other: 85100b8c675b - test: remote |
|
627 | >>>>>>> other: 85100b8c675b - test: remote | |
628 | missing_content2_missing_content4-untracked.orig: |
|
628 | missing_content2_missing_content4-untracked.orig: | |
629 | content4 |
|
629 | content4 | |
630 |
|
630 | |||
631 | M missing_content2_missing_missing-tracked |
|
631 | M missing_content2_missing_missing-tracked | |
632 | content2 |
|
632 | content2 | |
633 |
|
633 | |||
634 | M missing_content2_missing_missing-untracked |
|
634 | M missing_content2_missing_missing-untracked | |
635 | content2 |
|
635 | content2 | |
636 |
|
636 | |||
637 | C missing_missing_content3_content3-tracked |
|
637 | C missing_missing_content3_content3-tracked | |
638 | content3 |
|
638 | content3 | |
639 |
|
639 | |||
640 | R missing_missing_content3_content3-untracked |
|
640 | R missing_missing_content3_content3-untracked | |
641 | content3 |
|
641 | content3 | |
642 |
|
642 | |||
643 | M missing_missing_content3_content4-tracked |
|
643 | M missing_missing_content3_content4-tracked | |
644 | content4 |
|
644 | content4 | |
645 |
|
645 | |||
646 | R missing_missing_content3_content4-untracked |
|
646 | R missing_missing_content3_content4-untracked | |
647 | content4 |
|
647 | content4 | |
648 |
|
648 | |||
649 | R missing_missing_content3_missing-tracked |
|
649 | R missing_missing_content3_missing-tracked | |
650 | <missing> |
|
650 | <missing> | |
651 |
|
651 | |||
652 | R missing_missing_content3_missing-untracked |
|
652 | R missing_missing_content3_missing-untracked | |
653 | <missing> |
|
653 | <missing> | |
654 |
|
654 | |||
655 | A missing_missing_missing_content4-tracked |
|
655 | A missing_missing_missing_content4-tracked | |
656 | content4 |
|
656 | content4 | |
657 |
|
657 | |||
658 | ? missing_missing_missing_content4-untracked |
|
658 | ? missing_missing_missing_content4-untracked | |
659 | content4 |
|
659 | content4 | |
660 |
|
660 | |||
661 | R missing_missing_missing_missing-tracked |
|
661 | R missing_missing_missing_missing-tracked | |
662 | <missing> |
|
662 | <missing> | |
663 |
|
663 | |||
664 | missing_missing_missing_missing-untracked: * (glob) |
|
664 | missing_missing_missing_missing-untracked: * (glob) | |
665 | <missing> |
|
665 | <missing> |
@@ -1,395 +1,395 b'' | |||||
1 | #require symlink execbit |
|
1 | #require symlink execbit | |
2 |
|
2 | |||
3 | $ tellmeabout() { |
|
3 | $ tellmeabout() { | |
4 | > if [ -h $1 ]; then |
|
4 | > if [ -h $1 ]; then | |
5 | > echo $1 is a symlink: |
|
5 | > echo $1 is a symlink: | |
6 | > $TESTDIR/readlink.py $1 |
|
6 | > $TESTDIR/readlink.py $1 | |
7 | > elif [ -x $1 ]; then |
|
7 | > elif [ -x $1 ]; then | |
8 | > echo $1 is an executable file with content: |
|
8 | > echo $1 is an executable file with content: | |
9 | > cat $1 |
|
9 | > cat $1 | |
10 | > else |
|
10 | > else | |
11 | > echo $1 is a plain file with content: |
|
11 | > echo $1 is a plain file with content: | |
12 | > cat $1 |
|
12 | > cat $1 | |
13 | > fi |
|
13 | > fi | |
14 | > } |
|
14 | > } | |
15 |
|
15 | |||
16 | $ hg init test1 |
|
16 | $ hg init test1 | |
17 | $ cd test1 |
|
17 | $ cd test1 | |
18 |
|
18 | |||
19 | $ echo a > a |
|
19 | $ echo a > a | |
20 | $ hg ci -Aqmadd |
|
20 | $ hg ci -Aqmadd | |
21 | $ chmod +x a |
|
21 | $ chmod +x a | |
22 | $ hg ci -mexecutable |
|
22 | $ hg ci -mexecutable | |
23 |
|
23 | |||
24 | $ hg up -q 0 |
|
24 | $ hg up -q 0 | |
25 | $ rm a |
|
25 | $ rm a | |
26 | $ ln -s symlink a |
|
26 | $ ln -s symlink a | |
27 | $ hg ci -msymlink |
|
27 | $ hg ci -msymlink | |
28 | created new head |
|
28 | created new head | |
29 |
|
29 | |||
30 | Symlink is local parent, executable is other: |
|
30 | Symlink is local parent, executable is other: | |
31 |
|
31 | |||
32 | $ hg merge --debug |
|
32 | $ hg merge --debug | |
33 | searching for copies back to rev 1 |
|
33 | searching for copies back to rev 1 | |
34 | resolving manifests |
|
34 | resolving manifests | |
35 | branchmerge: True, force: False, partial: False |
|
35 | branchmerge: True, force: False, partial: False | |
36 | ancestor: c334dc3be0da, local: 521a1e40188f+, remote: 3574f3e69b1c |
|
36 | ancestor: c334dc3be0da, local: 521a1e40188f+, remote: 3574f3e69b1c | |
37 | preserving a for resolve of a |
|
37 | preserving a for resolve of a | |
38 | a: versions differ -> m |
|
38 | a: versions differ -> m (premerge) | |
39 | picked tool ':merge' for a (binary False symlink True) |
|
39 | picked tool ':merge' for a (binary False symlink True) | |
40 | merging a |
|
40 | merging a | |
41 | my a@521a1e40188f+ other a@3574f3e69b1c ancestor a@c334dc3be0da |
|
41 | my a@521a1e40188f+ other a@3574f3e69b1c ancestor a@c334dc3be0da | |
42 | warning: internal :merge cannot merge symlinks for a |
|
42 | warning: internal :merge cannot merge symlinks for a | |
43 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
43 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
44 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
44 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
45 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
45 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
46 | [1] |
|
46 | [1] | |
47 |
|
47 | |||
48 | $ tellmeabout a |
|
48 | $ tellmeabout a | |
49 | a is a symlink: |
|
49 | a is a symlink: | |
50 | a -> symlink |
|
50 | a -> symlink | |
51 | $ hg resolve a --tool internal:other |
|
51 | $ hg resolve a --tool internal:other | |
52 | (no more unresolved files) |
|
52 | (no more unresolved files) | |
53 | $ tellmeabout a |
|
53 | $ tellmeabout a | |
54 | a is an executable file with content: |
|
54 | a is an executable file with content: | |
55 | a |
|
55 | a | |
56 | $ hg st |
|
56 | $ hg st | |
57 | M a |
|
57 | M a | |
58 | ? a.orig |
|
58 | ? a.orig | |
59 |
|
59 | |||
60 | Symlink is other parent, executable is local: |
|
60 | Symlink is other parent, executable is local: | |
61 |
|
61 | |||
62 | $ hg update -C 1 |
|
62 | $ hg update -C 1 | |
63 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
63 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
64 |
|
64 | |||
65 | $ hg merge --debug --tool :union |
|
65 | $ hg merge --debug --tool :union | |
66 | searching for copies back to rev 1 |
|
66 | searching for copies back to rev 1 | |
67 | resolving manifests |
|
67 | resolving manifests | |
68 | branchmerge: True, force: False, partial: False |
|
68 | branchmerge: True, force: False, partial: False | |
69 | ancestor: c334dc3be0da, local: 3574f3e69b1c+, remote: 521a1e40188f |
|
69 | ancestor: c334dc3be0da, local: 3574f3e69b1c+, remote: 521a1e40188f | |
70 | preserving a for resolve of a |
|
70 | preserving a for resolve of a | |
71 | a: versions differ -> m |
|
71 | a: versions differ -> m (premerge) | |
72 | picked tool ':union' for a (binary False symlink True) |
|
72 | picked tool ':union' for a (binary False symlink True) | |
73 | merging a |
|
73 | merging a | |
74 | my a@3574f3e69b1c+ other a@521a1e40188f ancestor a@c334dc3be0da |
|
74 | my a@3574f3e69b1c+ other a@521a1e40188f ancestor a@c334dc3be0da | |
75 | warning: internal :union cannot merge symlinks for a |
|
75 | warning: internal :union cannot merge symlinks for a | |
76 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
76 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
77 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
77 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
78 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
78 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
79 | [1] |
|
79 | [1] | |
80 |
|
80 | |||
81 | $ tellmeabout a |
|
81 | $ tellmeabout a | |
82 | a is an executable file with content: |
|
82 | a is an executable file with content: | |
83 | a |
|
83 | a | |
84 |
|
84 | |||
85 | $ hg update -C 1 |
|
85 | $ hg update -C 1 | |
86 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
86 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
87 |
|
87 | |||
88 | $ hg merge --debug --tool :merge3 |
|
88 | $ hg merge --debug --tool :merge3 | |
89 | searching for copies back to rev 1 |
|
89 | searching for copies back to rev 1 | |
90 | resolving manifests |
|
90 | resolving manifests | |
91 | branchmerge: True, force: False, partial: False |
|
91 | branchmerge: True, force: False, partial: False | |
92 | ancestor: c334dc3be0da, local: 3574f3e69b1c+, remote: 521a1e40188f |
|
92 | ancestor: c334dc3be0da, local: 3574f3e69b1c+, remote: 521a1e40188f | |
93 | preserving a for resolve of a |
|
93 | preserving a for resolve of a | |
94 | a: versions differ -> m |
|
94 | a: versions differ -> m (premerge) | |
95 | picked tool ':merge3' for a (binary False symlink True) |
|
95 | picked tool ':merge3' for a (binary False symlink True) | |
96 | merging a |
|
96 | merging a | |
97 | my a@3574f3e69b1c+ other a@521a1e40188f ancestor a@c334dc3be0da |
|
97 | my a@3574f3e69b1c+ other a@521a1e40188f ancestor a@c334dc3be0da | |
98 | warning: internal :merge3 cannot merge symlinks for a |
|
98 | warning: internal :merge3 cannot merge symlinks for a | |
99 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
99 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
100 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
100 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
101 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
101 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
102 | [1] |
|
102 | [1] | |
103 |
|
103 | |||
104 | $ tellmeabout a |
|
104 | $ tellmeabout a | |
105 | a is an executable file with content: |
|
105 | a is an executable file with content: | |
106 | a |
|
106 | a | |
107 |
|
107 | |||
108 | Update to link without local change should get us a symlink (issue3316): |
|
108 | Update to link without local change should get us a symlink (issue3316): | |
109 |
|
109 | |||
110 | $ hg up -C 0 |
|
110 | $ hg up -C 0 | |
111 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
111 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
112 | $ hg up |
|
112 | $ hg up | |
113 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
113 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
114 | $ hg st |
|
114 | $ hg st | |
115 | ? a.orig |
|
115 | ? a.orig | |
116 |
|
116 | |||
117 | Update to link with local change should cause a merge prompt (issue3200): |
|
117 | Update to link with local change should cause a merge prompt (issue3200): | |
118 |
|
118 | |||
119 | $ hg up -Cq 0 |
|
119 | $ hg up -Cq 0 | |
120 | $ echo data > a |
|
120 | $ echo data > a | |
121 | $ HGMERGE= hg up -y --debug |
|
121 | $ HGMERGE= hg up -y --debug | |
122 | searching for copies back to rev 2 |
|
122 | searching for copies back to rev 2 | |
123 | resolving manifests |
|
123 | resolving manifests | |
124 | branchmerge: False, force: False, partial: False |
|
124 | branchmerge: False, force: False, partial: False | |
125 | ancestor: c334dc3be0da, local: c334dc3be0da+, remote: 521a1e40188f |
|
125 | ancestor: c334dc3be0da, local: c334dc3be0da+, remote: 521a1e40188f | |
126 | preserving a for resolve of a |
|
126 | preserving a for resolve of a | |
127 | a: versions differ -> m |
|
127 | a: versions differ -> m (premerge) | |
128 | (couldn't find merge tool hgmerge|tool hgmerge can't handle symlinks) (re) |
|
128 | (couldn't find merge tool hgmerge|tool hgmerge can't handle symlinks) (re) | |
129 | picked tool ':prompt' for a (binary False symlink True) |
|
129 | picked tool ':prompt' for a (binary False symlink True) | |
130 | no tool found to merge a |
|
130 | no tool found to merge a | |
131 | keep (l)ocal or take (o)ther? l |
|
131 | keep (l)ocal or take (o)ther? l | |
132 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
132 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
133 | $ hg diff --git |
|
133 | $ hg diff --git | |
134 | diff --git a/a b/a |
|
134 | diff --git a/a b/a | |
135 | old mode 120000 |
|
135 | old mode 120000 | |
136 | new mode 100644 |
|
136 | new mode 100644 | |
137 | --- a/a |
|
137 | --- a/a | |
138 | +++ b/a |
|
138 | +++ b/a | |
139 | @@ -1,1 +1,1 @@ |
|
139 | @@ -1,1 +1,1 @@ | |
140 | -symlink |
|
140 | -symlink | |
141 | \ No newline at end of file |
|
141 | \ No newline at end of file | |
142 | +data |
|
142 | +data | |
143 |
|
143 | |||
144 |
|
144 | |||
145 | Test only 'l' change - happens rarely, except when recovering from situations |
|
145 | Test only 'l' change - happens rarely, except when recovering from situations | |
146 | where that was what happened. |
|
146 | where that was what happened. | |
147 |
|
147 | |||
148 | $ hg init test2 |
|
148 | $ hg init test2 | |
149 | $ cd test2 |
|
149 | $ cd test2 | |
150 | $ printf base > f |
|
150 | $ printf base > f | |
151 | $ hg ci -Aqm0 |
|
151 | $ hg ci -Aqm0 | |
152 | $ echo file > f |
|
152 | $ echo file > f | |
153 | $ echo content >> f |
|
153 | $ echo content >> f | |
154 | $ hg ci -qm1 |
|
154 | $ hg ci -qm1 | |
155 | $ hg up -qr0 |
|
155 | $ hg up -qr0 | |
156 | $ rm f |
|
156 | $ rm f | |
157 | $ ln -s base f |
|
157 | $ ln -s base f | |
158 | $ hg ci -qm2 |
|
158 | $ hg ci -qm2 | |
159 | $ hg merge |
|
159 | $ hg merge | |
160 | merging f |
|
160 | merging f | |
161 | warning: internal :merge cannot merge symlinks for f |
|
161 | warning: internal :merge cannot merge symlinks for f | |
162 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') |
|
162 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') | |
163 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
163 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
164 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
164 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
165 | [1] |
|
165 | [1] | |
166 | $ tellmeabout f |
|
166 | $ tellmeabout f | |
167 | f is a symlink: |
|
167 | f is a symlink: | |
168 | f -> base |
|
168 | f -> base | |
169 |
|
169 | |||
170 | $ hg up -Cqr1 |
|
170 | $ hg up -Cqr1 | |
171 | $ hg merge |
|
171 | $ hg merge | |
172 | merging f |
|
172 | merging f | |
173 | warning: internal :merge cannot merge symlinks for f |
|
173 | warning: internal :merge cannot merge symlinks for f | |
174 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') |
|
174 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') | |
175 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
175 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
176 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
176 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
177 | [1] |
|
177 | [1] | |
178 | $ tellmeabout f |
|
178 | $ tellmeabout f | |
179 | f is a plain file with content: |
|
179 | f is a plain file with content: | |
180 | file |
|
180 | file | |
181 | content |
|
181 | content | |
182 |
|
182 | |||
183 | $ cd .. |
|
183 | $ cd .. | |
184 |
|
184 | |||
185 | Test removed 'x' flag merged with change to symlink |
|
185 | Test removed 'x' flag merged with change to symlink | |
186 |
|
186 | |||
187 | $ hg init test3 |
|
187 | $ hg init test3 | |
188 | $ cd test3 |
|
188 | $ cd test3 | |
189 | $ echo f > f |
|
189 | $ echo f > f | |
190 | $ chmod +x f |
|
190 | $ chmod +x f | |
191 | $ hg ci -Aqm0 |
|
191 | $ hg ci -Aqm0 | |
192 | $ chmod -x f |
|
192 | $ chmod -x f | |
193 | $ hg ci -qm1 |
|
193 | $ hg ci -qm1 | |
194 | $ hg up -qr0 |
|
194 | $ hg up -qr0 | |
195 | $ rm f |
|
195 | $ rm f | |
196 | $ ln -s dangling f |
|
196 | $ ln -s dangling f | |
197 | $ hg ci -qm2 |
|
197 | $ hg ci -qm2 | |
198 | $ hg merge |
|
198 | $ hg merge | |
199 | merging f |
|
199 | merging f | |
200 | warning: internal :merge cannot merge symlinks for f |
|
200 | warning: internal :merge cannot merge symlinks for f | |
201 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') |
|
201 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') | |
202 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
202 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
203 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
203 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
204 | [1] |
|
204 | [1] | |
205 | $ tellmeabout f |
|
205 | $ tellmeabout f | |
206 | f is a symlink: |
|
206 | f is a symlink: | |
207 | f -> dangling |
|
207 | f -> dangling | |
208 |
|
208 | |||
209 | $ hg up -Cqr1 |
|
209 | $ hg up -Cqr1 | |
210 | $ hg merge |
|
210 | $ hg merge | |
211 | merging f |
|
211 | merging f | |
212 | warning: internal :merge cannot merge symlinks for f |
|
212 | warning: internal :merge cannot merge symlinks for f | |
213 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') |
|
213 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') | |
214 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
214 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
215 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
215 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
216 | [1] |
|
216 | [1] | |
217 | $ tellmeabout f |
|
217 | $ tellmeabout f | |
218 | f is a plain file with content: |
|
218 | f is a plain file with content: | |
219 | f |
|
219 | f | |
220 |
|
220 | |||
221 | Test removed 'x' flag merged with content change - both ways |
|
221 | Test removed 'x' flag merged with content change - both ways | |
222 |
|
222 | |||
223 | $ hg up -Cqr0 |
|
223 | $ hg up -Cqr0 | |
224 | $ echo change > f |
|
224 | $ echo change > f | |
225 | $ hg ci -qm3 |
|
225 | $ hg ci -qm3 | |
226 | $ hg merge -r1 |
|
226 | $ hg merge -r1 | |
227 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
227 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
228 | (branch merge, don't forget to commit) |
|
228 | (branch merge, don't forget to commit) | |
229 | $ tellmeabout f |
|
229 | $ tellmeabout f | |
230 | f is a plain file with content: |
|
230 | f is a plain file with content: | |
231 | change |
|
231 | change | |
232 |
|
232 | |||
233 | $ hg up -qCr1 |
|
233 | $ hg up -qCr1 | |
234 | $ hg merge -r3 |
|
234 | $ hg merge -r3 | |
235 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
235 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
236 | (branch merge, don't forget to commit) |
|
236 | (branch merge, don't forget to commit) | |
237 | $ tellmeabout f |
|
237 | $ tellmeabout f | |
238 | f is a plain file with content: |
|
238 | f is a plain file with content: | |
239 | change |
|
239 | change | |
240 |
|
240 | |||
241 | $ cd .. |
|
241 | $ cd .. | |
242 |
|
242 | |||
243 | Test merge with no common ancestor: |
|
243 | Test merge with no common ancestor: | |
244 | a: just different |
|
244 | a: just different | |
245 | b: x vs -, different (cannot calculate x, cannot ask merge tool) |
|
245 | b: x vs -, different (cannot calculate x, cannot ask merge tool) | |
246 | c: x vs -, same (cannot calculate x, merge tool is no good) |
|
246 | c: x vs -, same (cannot calculate x, merge tool is no good) | |
247 | d: x vs l, different |
|
247 | d: x vs l, different | |
248 | e: x vs l, same |
|
248 | e: x vs l, same | |
249 | f: - vs l, different |
|
249 | f: - vs l, different | |
250 | g: - vs l, same |
|
250 | g: - vs l, same | |
251 | h: l vs l, different |
|
251 | h: l vs l, different | |
252 | (where same means the filelog entry is shared and there thus is an ancestor!) |
|
252 | (where same means the filelog entry is shared and there thus is an ancestor!) | |
253 |
|
253 | |||
254 | $ hg init test4 |
|
254 | $ hg init test4 | |
255 | $ cd test4 |
|
255 | $ cd test4 | |
256 | $ echo 0 > 0 |
|
256 | $ echo 0 > 0 | |
257 | $ hg ci -Aqm0 |
|
257 | $ hg ci -Aqm0 | |
258 |
|
258 | |||
259 | $ echo 1 > a |
|
259 | $ echo 1 > a | |
260 | $ echo 1 > b |
|
260 | $ echo 1 > b | |
261 | $ chmod +x b |
|
261 | $ chmod +x b | |
262 | $ echo x > c |
|
262 | $ echo x > c | |
263 | $ chmod +x c |
|
263 | $ chmod +x c | |
264 | $ echo 1 > d |
|
264 | $ echo 1 > d | |
265 | $ chmod +x d |
|
265 | $ chmod +x d | |
266 | $ printf x > e |
|
266 | $ printf x > e | |
267 | $ chmod +x e |
|
267 | $ chmod +x e | |
268 | $ echo 1 > f |
|
268 | $ echo 1 > f | |
269 | $ printf x > g |
|
269 | $ printf x > g | |
270 | $ ln -s 1 h |
|
270 | $ ln -s 1 h | |
271 | $ hg ci -qAm1 |
|
271 | $ hg ci -qAm1 | |
272 |
|
272 | |||
273 | $ hg up -qr0 |
|
273 | $ hg up -qr0 | |
274 | $ echo 2 > a |
|
274 | $ echo 2 > a | |
275 | $ echo 2 > b |
|
275 | $ echo 2 > b | |
276 | $ echo x > c |
|
276 | $ echo x > c | |
277 | $ ln -s 2 d |
|
277 | $ ln -s 2 d | |
278 | $ ln -s x e |
|
278 | $ ln -s x e | |
279 | $ ln -s 2 f |
|
279 | $ ln -s 2 f | |
280 | $ ln -s x g |
|
280 | $ ln -s x g | |
281 | $ ln -s 2 h |
|
281 | $ ln -s 2 h | |
282 | $ hg ci -Aqm2 |
|
282 | $ hg ci -Aqm2 | |
283 |
|
283 | |||
284 | $ hg merge |
|
284 | $ hg merge | |
285 | merging a |
|
285 | merging a | |
286 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
|||
287 | warning: cannot merge flags for b |
|
286 | warning: cannot merge flags for b | |
288 | merging b |
|
287 | merging b | |
289 | warning: conflicts while merging b! (edit, then use 'hg resolve --mark') |
|
|||
290 | warning: cannot merge flags for c |
|
288 | warning: cannot merge flags for c | |
291 | merging d |
|
289 | merging d | |
292 | warning: internal :merge cannot merge symlinks for d |
|
290 | warning: internal :merge cannot merge symlinks for d | |
293 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
|
291 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | |
294 | merging f |
|
292 | merging f | |
295 | warning: internal :merge cannot merge symlinks for f |
|
293 | warning: internal :merge cannot merge symlinks for f | |
296 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') |
|
294 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') | |
297 | merging h |
|
295 | merging h | |
298 | warning: internal :merge cannot merge symlinks for h |
|
296 | warning: internal :merge cannot merge symlinks for h | |
299 | warning: conflicts while merging h! (edit, then use 'hg resolve --mark') |
|
297 | warning: conflicts while merging h! (edit, then use 'hg resolve --mark') | |
|
298 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |||
|
299 | warning: conflicts while merging b! (edit, then use 'hg resolve --mark') | |||
300 | 3 files updated, 0 files merged, 0 files removed, 5 files unresolved |
|
300 | 3 files updated, 0 files merged, 0 files removed, 5 files unresolved | |
301 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
301 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
302 | [1] |
|
302 | [1] | |
303 | $ hg resolve -l |
|
303 | $ hg resolve -l | |
304 | U a |
|
304 | U a | |
305 | U b |
|
305 | U b | |
306 | U d |
|
306 | U d | |
307 | U f |
|
307 | U f | |
308 | U h |
|
308 | U h | |
309 | $ tellmeabout a |
|
309 | $ tellmeabout a | |
310 | a is a plain file with content: |
|
310 | a is a plain file with content: | |
311 | <<<<<<< local: 0139c5610547 - test: 2 |
|
311 | <<<<<<< local: 0139c5610547 - test: 2 | |
312 | 2 |
|
312 | 2 | |
313 | ======= |
|
313 | ======= | |
314 | 1 |
|
314 | 1 | |
315 | >>>>>>> other: 97e29675e796 - test: 1 |
|
315 | >>>>>>> other: 97e29675e796 - test: 1 | |
316 | $ tellmeabout b |
|
316 | $ tellmeabout b | |
317 | b is a plain file with content: |
|
317 | b is a plain file with content: | |
318 | <<<<<<< local: 0139c5610547 - test: 2 |
|
318 | <<<<<<< local: 0139c5610547 - test: 2 | |
319 | 2 |
|
319 | 2 | |
320 | ======= |
|
320 | ======= | |
321 | 1 |
|
321 | 1 | |
322 | >>>>>>> other: 97e29675e796 - test: 1 |
|
322 | >>>>>>> other: 97e29675e796 - test: 1 | |
323 | $ tellmeabout c |
|
323 | $ tellmeabout c | |
324 | c is a plain file with content: |
|
324 | c is a plain file with content: | |
325 | x |
|
325 | x | |
326 | $ tellmeabout d |
|
326 | $ tellmeabout d | |
327 | d is a symlink: |
|
327 | d is a symlink: | |
328 | d -> 2 |
|
328 | d -> 2 | |
329 | $ tellmeabout e |
|
329 | $ tellmeabout e | |
330 | e is a symlink: |
|
330 | e is a symlink: | |
331 | e -> x |
|
331 | e -> x | |
332 | $ tellmeabout f |
|
332 | $ tellmeabout f | |
333 | f is a symlink: |
|
333 | f is a symlink: | |
334 | f -> 2 |
|
334 | f -> 2 | |
335 | $ tellmeabout g |
|
335 | $ tellmeabout g | |
336 | g is a symlink: |
|
336 | g is a symlink: | |
337 | g -> x |
|
337 | g -> x | |
338 | $ tellmeabout h |
|
338 | $ tellmeabout h | |
339 | h is a symlink: |
|
339 | h is a symlink: | |
340 | h -> 2 |
|
340 | h -> 2 | |
341 |
|
341 | |||
342 | $ hg up -Cqr1 |
|
342 | $ hg up -Cqr1 | |
343 | $ hg merge |
|
343 | $ hg merge | |
344 | merging a |
|
344 | merging a | |
345 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
|||
346 | warning: cannot merge flags for b |
|
345 | warning: cannot merge flags for b | |
347 | merging b |
|
346 | merging b | |
348 | warning: conflicts while merging b! (edit, then use 'hg resolve --mark') |
|
|||
349 | warning: cannot merge flags for c |
|
347 | warning: cannot merge flags for c | |
350 | merging d |
|
348 | merging d | |
351 | warning: internal :merge cannot merge symlinks for d |
|
349 | warning: internal :merge cannot merge symlinks for d | |
352 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
|
350 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | |
353 | merging f |
|
351 | merging f | |
354 | warning: internal :merge cannot merge symlinks for f |
|
352 | warning: internal :merge cannot merge symlinks for f | |
355 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') |
|
353 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') | |
356 | merging h |
|
354 | merging h | |
357 | warning: internal :merge cannot merge symlinks for h |
|
355 | warning: internal :merge cannot merge symlinks for h | |
358 | warning: conflicts while merging h! (edit, then use 'hg resolve --mark') |
|
356 | warning: conflicts while merging h! (edit, then use 'hg resolve --mark') | |
|
357 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |||
|
358 | warning: conflicts while merging b! (edit, then use 'hg resolve --mark') | |||
359 | 3 files updated, 0 files merged, 0 files removed, 5 files unresolved |
|
359 | 3 files updated, 0 files merged, 0 files removed, 5 files unresolved | |
360 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
360 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
361 | [1] |
|
361 | [1] | |
362 | $ tellmeabout a |
|
362 | $ tellmeabout a | |
363 | a is a plain file with content: |
|
363 | a is a plain file with content: | |
364 | <<<<<<< local: 97e29675e796 - test: 1 |
|
364 | <<<<<<< local: 97e29675e796 - test: 1 | |
365 | 1 |
|
365 | 1 | |
366 | ======= |
|
366 | ======= | |
367 | 2 |
|
367 | 2 | |
368 | >>>>>>> other: 0139c5610547 - test: 2 |
|
368 | >>>>>>> other: 0139c5610547 - test: 2 | |
369 | $ tellmeabout b |
|
369 | $ tellmeabout b | |
370 | b is an executable file with content: |
|
370 | b is an executable file with content: | |
371 | <<<<<<< local: 97e29675e796 - test: 1 |
|
371 | <<<<<<< local: 97e29675e796 - test: 1 | |
372 | 1 |
|
372 | 1 | |
373 | ======= |
|
373 | ======= | |
374 | 2 |
|
374 | 2 | |
375 | >>>>>>> other: 0139c5610547 - test: 2 |
|
375 | >>>>>>> other: 0139c5610547 - test: 2 | |
376 | $ tellmeabout c |
|
376 | $ tellmeabout c | |
377 | c is an executable file with content: |
|
377 | c is an executable file with content: | |
378 | x |
|
378 | x | |
379 | $ tellmeabout d |
|
379 | $ tellmeabout d | |
380 | d is an executable file with content: |
|
380 | d is an executable file with content: | |
381 | 1 |
|
381 | 1 | |
382 | $ tellmeabout e |
|
382 | $ tellmeabout e | |
383 | e is an executable file with content: |
|
383 | e is an executable file with content: | |
384 | x (no-eol) |
|
384 | x (no-eol) | |
385 | $ tellmeabout f |
|
385 | $ tellmeabout f | |
386 | f is a plain file with content: |
|
386 | f is a plain file with content: | |
387 | 1 |
|
387 | 1 | |
388 | $ tellmeabout g |
|
388 | $ tellmeabout g | |
389 | g is a plain file with content: |
|
389 | g is a plain file with content: | |
390 | x (no-eol) |
|
390 | x (no-eol) | |
391 | $ tellmeabout h |
|
391 | $ tellmeabout h | |
392 | h is a symlink: |
|
392 | h is a symlink: | |
393 | h -> 1 |
|
393 | h -> 1 | |
394 |
|
394 | |||
395 | $ cd .. |
|
395 | $ cd .. |
@@ -1,147 +1,148 b'' | |||||
1 | initial |
|
1 | initial | |
2 | $ hg init test-a |
|
2 | $ hg init test-a | |
3 | $ cd test-a |
|
3 | $ cd test-a | |
4 | $ cat >test.txt <<"EOF" |
|
4 | $ cat >test.txt <<"EOF" | |
5 | > 1 |
|
5 | > 1 | |
6 | > 2 |
|
6 | > 2 | |
7 | > 3 |
|
7 | > 3 | |
8 | > EOF |
|
8 | > EOF | |
9 | $ hg add test.txt |
|
9 | $ hg add test.txt | |
10 | $ hg commit -m "Initial" |
|
10 | $ hg commit -m "Initial" | |
11 |
|
11 | |||
12 | clone |
|
12 | clone | |
13 | $ cd .. |
|
13 | $ cd .. | |
14 | $ hg clone test-a test-b |
|
14 | $ hg clone test-a test-b | |
15 | updating to branch default |
|
15 | updating to branch default | |
16 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
16 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
17 |
|
17 | |||
18 | change test-a |
|
18 | change test-a | |
19 | $ cd test-a |
|
19 | $ cd test-a | |
20 | $ cat >test.txt <<"EOF" |
|
20 | $ cat >test.txt <<"EOF" | |
21 | > one |
|
21 | > one | |
22 | > two |
|
22 | > two | |
23 | > three |
|
23 | > three | |
24 | > EOF |
|
24 | > EOF | |
25 | $ hg commit -m "Numbers as words" |
|
25 | $ hg commit -m "Numbers as words" | |
26 |
|
26 | |||
27 | change test-b |
|
27 | change test-b | |
28 | $ cd ../test-b |
|
28 | $ cd ../test-b | |
29 | $ cat >test.txt <<"EOF" |
|
29 | $ cat >test.txt <<"EOF" | |
30 | > 1 |
|
30 | > 1 | |
31 | > 2.5 |
|
31 | > 2.5 | |
32 | > 3 |
|
32 | > 3 | |
33 | > EOF |
|
33 | > EOF | |
34 | $ hg commit -m "2 -> 2.5" |
|
34 | $ hg commit -m "2 -> 2.5" | |
35 |
|
35 | |||
36 | now pull and merge from test-a |
|
36 | now pull and merge from test-a | |
37 | $ hg pull ../test-a |
|
37 | $ hg pull ../test-a | |
38 | pulling from ../test-a |
|
38 | pulling from ../test-a | |
39 | searching for changes |
|
39 | searching for changes | |
40 | adding changesets |
|
40 | adding changesets | |
41 | adding manifests |
|
41 | adding manifests | |
42 | adding file changes |
|
42 | adding file changes | |
43 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
43 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
44 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
44 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
45 | $ hg merge |
|
45 | $ hg merge | |
46 | merging test.txt |
|
46 | merging test.txt | |
47 | warning: conflicts while merging test.txt! (edit, then use 'hg resolve --mark') |
|
47 | warning: conflicts while merging test.txt! (edit, then use 'hg resolve --mark') | |
48 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
48 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
49 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
49 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
50 | [1] |
|
50 | [1] | |
51 | resolve conflict |
|
51 | resolve conflict | |
52 | $ cat >test.txt <<"EOF" |
|
52 | $ cat >test.txt <<"EOF" | |
53 | > one |
|
53 | > one | |
54 | > two-point-five |
|
54 | > two-point-five | |
55 | > three |
|
55 | > three | |
56 | > EOF |
|
56 | > EOF | |
57 | $ rm -f *.orig |
|
57 | $ rm -f *.orig | |
58 | $ hg resolve -m test.txt |
|
58 | $ hg resolve -m test.txt | |
59 | (no more unresolved files) |
|
59 | (no more unresolved files) | |
60 | $ hg commit -m "Merge 1" |
|
60 | $ hg commit -m "Merge 1" | |
61 |
|
61 | |||
62 | change test-a again |
|
62 | change test-a again | |
63 | $ cd ../test-a |
|
63 | $ cd ../test-a | |
64 | $ cat >test.txt <<"EOF" |
|
64 | $ cat >test.txt <<"EOF" | |
65 | > one |
|
65 | > one | |
66 | > two-point-one |
|
66 | > two-point-one | |
67 | > three |
|
67 | > three | |
68 | > EOF |
|
68 | > EOF | |
69 | $ hg commit -m "two -> two-point-one" |
|
69 | $ hg commit -m "two -> two-point-one" | |
70 |
|
70 | |||
71 | pull and merge from test-a again |
|
71 | pull and merge from test-a again | |
72 | $ cd ../test-b |
|
72 | $ cd ../test-b | |
73 | $ hg pull ../test-a |
|
73 | $ hg pull ../test-a | |
74 | pulling from ../test-a |
|
74 | pulling from ../test-a | |
75 | searching for changes |
|
75 | searching for changes | |
76 | adding changesets |
|
76 | adding changesets | |
77 | adding manifests |
|
77 | adding manifests | |
78 | adding file changes |
|
78 | adding file changes | |
79 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
79 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
80 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
80 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
81 | $ hg merge --debug |
|
81 | $ hg merge --debug | |
82 | searching for copies back to rev 1 |
|
82 | searching for copies back to rev 1 | |
83 | resolving manifests |
|
83 | resolving manifests | |
84 | branchmerge: True, force: False, partial: False |
|
84 | branchmerge: True, force: False, partial: False | |
85 | ancestor: 96b70246a118, local: 50c3a7e29886+, remote: 40d11a4173a8 |
|
85 | ancestor: 96b70246a118, local: 50c3a7e29886+, remote: 40d11a4173a8 | |
86 | preserving test.txt for resolve of test.txt |
|
86 | preserving test.txt for resolve of test.txt | |
87 | test.txt: versions differ -> m |
|
87 | test.txt: versions differ -> m (premerge) | |
88 | picked tool ':merge' for test.txt (binary False symlink False) |
|
88 | picked tool ':merge' for test.txt (binary False symlink False) | |
89 | merging test.txt |
|
89 | merging test.txt | |
90 | my test.txt@50c3a7e29886+ other test.txt@40d11a4173a8 ancestor test.txt@96b70246a118 |
|
90 | my test.txt@50c3a7e29886+ other test.txt@40d11a4173a8 ancestor test.txt@96b70246a118 | |
|
91 | test.txt: versions differ -> m (merge) | |||
91 | picked tool ':merge' for test.txt (binary False symlink False) |
|
92 | picked tool ':merge' for test.txt (binary False symlink False) | |
92 | my test.txt@50c3a7e29886+ other test.txt@40d11a4173a8 ancestor test.txt@96b70246a118 |
|
93 | my test.txt@50c3a7e29886+ other test.txt@40d11a4173a8 ancestor test.txt@96b70246a118 | |
93 | warning: conflicts while merging test.txt! (edit, then use 'hg resolve --mark') |
|
94 | warning: conflicts while merging test.txt! (edit, then use 'hg resolve --mark') | |
94 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
95 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
95 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
96 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
96 | [1] |
|
97 | [1] | |
97 |
|
98 | |||
98 | $ cat test.txt |
|
99 | $ cat test.txt | |
99 | one |
|
100 | one | |
100 | <<<<<<< local: 50c3a7e29886 - test: Merge 1 |
|
101 | <<<<<<< local: 50c3a7e29886 - test: Merge 1 | |
101 | two-point-five |
|
102 | two-point-five | |
102 | ======= |
|
103 | ======= | |
103 | two-point-one |
|
104 | two-point-one | |
104 | >>>>>>> other: 40d11a4173a8 - test: two -> two-point-one |
|
105 | >>>>>>> other: 40d11a4173a8 - test: two -> two-point-one | |
105 | three |
|
106 | three | |
106 |
|
107 | |||
107 | $ hg debugindex test.txt |
|
108 | $ hg debugindex test.txt | |
108 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
109 | rev offset length ..... linkrev nodeid p1 p2 (re) | |
109 | 0 0 7 ..... 0 01365c4cca56 000000000000 000000000000 (re) |
|
110 | 0 0 7 ..... 0 01365c4cca56 000000000000 000000000000 (re) | |
110 | 1 7 9 ..... 1 7b013192566a 01365c4cca56 000000000000 (re) |
|
111 | 1 7 9 ..... 1 7b013192566a 01365c4cca56 000000000000 (re) | |
111 | 2 16 15 ..... 2 8fe46a3eb557 01365c4cca56 000000000000 (re) |
|
112 | 2 16 15 ..... 2 8fe46a3eb557 01365c4cca56 000000000000 (re) | |
112 | 3 31 2. ..... 3 fc3148072371 7b013192566a 8fe46a3eb557 (re) |
|
113 | 3 31 2. ..... 3 fc3148072371 7b013192566a 8fe46a3eb557 (re) | |
113 | 4 5. 25 ..... 4 d40249267ae3 8fe46a3eb557 000000000000 (re) |
|
114 | 4 5. 25 ..... 4 d40249267ae3 8fe46a3eb557 000000000000 (re) | |
114 |
|
115 | |||
115 | $ hg log |
|
116 | $ hg log | |
116 | changeset: 4:40d11a4173a8 |
|
117 | changeset: 4:40d11a4173a8 | |
117 | tag: tip |
|
118 | tag: tip | |
118 | parent: 2:96b70246a118 |
|
119 | parent: 2:96b70246a118 | |
119 | user: test |
|
120 | user: test | |
120 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
121 | date: Thu Jan 01 00:00:00 1970 +0000 | |
121 | summary: two -> two-point-one |
|
122 | summary: two -> two-point-one | |
122 |
|
123 | |||
123 | changeset: 3:50c3a7e29886 |
|
124 | changeset: 3:50c3a7e29886 | |
124 | parent: 1:d1e159716d41 |
|
125 | parent: 1:d1e159716d41 | |
125 | parent: 2:96b70246a118 |
|
126 | parent: 2:96b70246a118 | |
126 | user: test |
|
127 | user: test | |
127 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
128 | date: Thu Jan 01 00:00:00 1970 +0000 | |
128 | summary: Merge 1 |
|
129 | summary: Merge 1 | |
129 |
|
130 | |||
130 | changeset: 2:96b70246a118 |
|
131 | changeset: 2:96b70246a118 | |
131 | parent: 0:b1832b9d912a |
|
132 | parent: 0:b1832b9d912a | |
132 | user: test |
|
133 | user: test | |
133 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
134 | date: Thu Jan 01 00:00:00 1970 +0000 | |
134 | summary: Numbers as words |
|
135 | summary: Numbers as words | |
135 |
|
136 | |||
136 | changeset: 1:d1e159716d41 |
|
137 | changeset: 1:d1e159716d41 | |
137 | user: test |
|
138 | user: test | |
138 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
139 | date: Thu Jan 01 00:00:00 1970 +0000 | |
139 | summary: 2 -> 2.5 |
|
140 | summary: 2 -> 2.5 | |
140 |
|
141 | |||
141 | changeset: 0:b1832b9d912a |
|
142 | changeset: 0:b1832b9d912a | |
142 | user: test |
|
143 | user: test | |
143 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
144 | date: Thu Jan 01 00:00:00 1970 +0000 | |
144 | summary: Initial |
|
145 | summary: Initial | |
145 |
|
146 | |||
146 |
|
147 | |||
147 | $ cd .. |
|
148 | $ cd .. |
@@ -1,94 +1,94 b'' | |||||
1 | test that we don't interrupt the merge session if |
|
1 | test that we don't interrupt the merge session if | |
2 | a file-level merge failed |
|
2 | a file-level merge failed | |
3 |
|
3 | |||
4 | $ hg init repo |
|
4 | $ hg init repo | |
5 | $ cd repo |
|
5 | $ cd repo | |
6 |
|
6 | |||
7 | $ echo foo > foo |
|
7 | $ echo foo > foo | |
8 | $ echo a > bar |
|
8 | $ echo a > bar | |
9 | $ hg ci -Am 'add foo' |
|
9 | $ hg ci -Am 'add foo' | |
10 | adding bar |
|
10 | adding bar | |
11 | adding foo |
|
11 | adding foo | |
12 |
|
12 | |||
13 | $ hg mv foo baz |
|
13 | $ hg mv foo baz | |
14 | $ echo b >> bar |
|
14 | $ echo b >> bar | |
15 | $ echo quux > quux1 |
|
15 | $ echo quux > quux1 | |
16 | $ hg ci -Am 'mv foo baz' |
|
16 | $ hg ci -Am 'mv foo baz' | |
17 | adding quux1 |
|
17 | adding quux1 | |
18 |
|
18 | |||
19 | $ hg up -qC 0 |
|
19 | $ hg up -qC 0 | |
20 | $ echo >> foo |
|
20 | $ echo >> foo | |
21 | $ echo c >> bar |
|
21 | $ echo c >> bar | |
22 | $ echo quux > quux2 |
|
22 | $ echo quux > quux2 | |
23 | $ hg ci -Am 'change foo' |
|
23 | $ hg ci -Am 'change foo' | |
24 | adding quux2 |
|
24 | adding quux2 | |
25 | created new head |
|
25 | created new head | |
26 |
|
26 | |||
27 | test with the rename on the remote side |
|
27 | test with the rename on the remote side | |
28 | $ HGMERGE=false hg merge |
|
28 | $ HGMERGE=false hg merge | |
29 | merging bar |
|
29 | merging bar | |
|
30 | merging foo and baz to baz | |||
30 | merging bar failed! |
|
31 | merging bar failed! | |
31 | merging foo and baz to baz |
|
|||
32 | 1 files updated, 1 files merged, 0 files removed, 1 files unresolved |
|
32 | 1 files updated, 1 files merged, 0 files removed, 1 files unresolved | |
33 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
33 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
34 | [1] |
|
34 | [1] | |
35 | $ hg resolve -l |
|
35 | $ hg resolve -l | |
36 | U bar |
|
36 | U bar | |
37 | R baz |
|
37 | R baz | |
38 |
|
38 | |||
39 | test with the rename on the local side |
|
39 | test with the rename on the local side | |
40 | $ hg up -C 1 |
|
40 | $ hg up -C 1 | |
41 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
41 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
42 | $ HGMERGE=false hg merge |
|
42 | $ HGMERGE=false hg merge | |
43 | merging bar |
|
43 | merging bar | |
|
44 | merging baz and foo to baz | |||
44 | merging bar failed! |
|
45 | merging bar failed! | |
45 | merging baz and foo to baz |
|
|||
46 | 1 files updated, 1 files merged, 0 files removed, 1 files unresolved |
|
46 | 1 files updated, 1 files merged, 0 files removed, 1 files unresolved | |
47 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
47 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
48 | [1] |
|
48 | [1] | |
49 |
|
49 | |||
50 | show unresolved |
|
50 | show unresolved | |
51 | $ hg resolve -l |
|
51 | $ hg resolve -l | |
52 | U bar |
|
52 | U bar | |
53 | R baz |
|
53 | R baz | |
54 |
|
54 | |||
55 | unmark baz |
|
55 | unmark baz | |
56 | $ hg resolve -u baz |
|
56 | $ hg resolve -u baz | |
57 |
|
57 | |||
58 | show |
|
58 | show | |
59 | $ hg resolve -l |
|
59 | $ hg resolve -l | |
60 | U bar |
|
60 | U bar | |
61 | U baz |
|
61 | U baz | |
62 | $ hg st |
|
62 | $ hg st | |
63 | M bar |
|
63 | M bar | |
64 | M baz |
|
64 | M baz | |
65 | M quux2 |
|
65 | M quux2 | |
66 | ? bar.orig |
|
66 | ? bar.orig | |
67 |
|
67 | |||
68 | re-resolve baz |
|
68 | re-resolve baz | |
69 | $ hg resolve baz |
|
69 | $ hg resolve baz | |
70 | merging baz and foo to baz |
|
70 | merging baz and foo to baz | |
71 |
|
71 | |||
72 | after resolve |
|
72 | after resolve | |
73 | $ hg resolve -l |
|
73 | $ hg resolve -l | |
74 | U bar |
|
74 | U bar | |
75 | R baz |
|
75 | R baz | |
76 |
|
76 | |||
77 | resolve all warning |
|
77 | resolve all warning | |
78 | $ hg resolve |
|
78 | $ hg resolve | |
79 | abort: no files or directories specified |
|
79 | abort: no files or directories specified | |
80 | (use --all to re-merge all unresolved files) |
|
80 | (use --all to re-merge all unresolved files) | |
81 | [255] |
|
81 | [255] | |
82 |
|
82 | |||
83 | resolve all |
|
83 | resolve all | |
84 | $ hg resolve -a |
|
84 | $ hg resolve -a | |
85 | merging bar |
|
85 | merging bar | |
86 | warning: conflicts while merging bar! (edit, then use 'hg resolve --mark') |
|
86 | warning: conflicts while merging bar! (edit, then use 'hg resolve --mark') | |
87 | [1] |
|
87 | [1] | |
88 |
|
88 | |||
89 | after |
|
89 | after | |
90 | $ hg resolve -l |
|
90 | $ hg resolve -l | |
91 | U bar |
|
91 | U bar | |
92 | R baz |
|
92 | R baz | |
93 |
|
93 | |||
94 | $ cd .. |
|
94 | $ cd .. |
@@ -1,188 +1,188 b'' | |||||
1 | $ hg init |
|
1 | $ hg init | |
2 |
|
2 | |||
3 | $ echo "[merge]" >> .hg/hgrc |
|
3 | $ echo "[merge]" >> .hg/hgrc | |
4 | $ echo "followcopies = 1" >> .hg/hgrc |
|
4 | $ echo "followcopies = 1" >> .hg/hgrc | |
5 |
|
5 | |||
6 | $ echo foo > a |
|
6 | $ echo foo > a | |
7 | $ echo foo > a2 |
|
7 | $ echo foo > a2 | |
8 | $ hg add a a2 |
|
8 | $ hg add a a2 | |
9 | $ hg ci -m "start" |
|
9 | $ hg ci -m "start" | |
10 |
|
10 | |||
11 | $ hg mv a b |
|
11 | $ hg mv a b | |
12 | $ hg mv a2 b2 |
|
12 | $ hg mv a2 b2 | |
13 | $ hg ci -m "rename" |
|
13 | $ hg ci -m "rename" | |
14 |
|
14 | |||
15 | $ hg co 0 |
|
15 | $ hg co 0 | |
16 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
16 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
17 |
|
17 | |||
18 | $ echo blahblah > a |
|
18 | $ echo blahblah > a | |
19 | $ echo blahblah > a2 |
|
19 | $ echo blahblah > a2 | |
20 | $ hg mv a2 c2 |
|
20 | $ hg mv a2 c2 | |
21 | $ hg ci -m "modify" |
|
21 | $ hg ci -m "modify" | |
22 | created new head |
|
22 | created new head | |
23 |
|
23 | |||
24 | $ hg merge -y --debug |
|
24 | $ hg merge -y --debug | |
25 | searching for copies back to rev 1 |
|
25 | searching for copies back to rev 1 | |
26 | unmatched files in local: |
|
26 | unmatched files in local: | |
27 | c2 |
|
27 | c2 | |
28 | unmatched files in other: |
|
28 | unmatched files in other: | |
29 | b |
|
29 | b | |
30 | b2 |
|
30 | b2 | |
31 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
31 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
32 | src: 'a' -> dst: 'b' * |
|
32 | src: 'a' -> dst: 'b' * | |
33 | src: 'a2' -> dst: 'b2' ! |
|
33 | src: 'a2' -> dst: 'b2' ! | |
34 | src: 'a2' -> dst: 'c2' ! |
|
34 | src: 'a2' -> dst: 'c2' ! | |
35 | checking for directory renames |
|
35 | checking for directory renames | |
36 | resolving manifests |
|
36 | resolving manifests | |
37 | branchmerge: True, force: False, partial: False |
|
37 | branchmerge: True, force: False, partial: False | |
38 | ancestor: af1939970a1c, local: 044f8520aeeb+, remote: 85c198ef2f6c |
|
38 | ancestor: af1939970a1c, local: 044f8520aeeb+, remote: 85c198ef2f6c | |
39 | preserving a for resolve of b |
|
39 | preserving a for resolve of b | |
40 | removing a |
|
40 | removing a | |
41 | b2: remote created -> g |
|
41 | b2: remote created -> g | |
42 | getting b2 |
|
42 | getting b2 | |
43 | b: remote moved from a -> m |
|
43 | b: remote moved from a -> m (premerge) | |
44 | picked tool ':merge' for b (binary False symlink False) |
|
44 | picked tool ':merge' for b (binary False symlink False) | |
45 | merging a and b to b |
|
45 | merging a and b to b | |
46 | my b@044f8520aeeb+ other b@85c198ef2f6c ancestor a@af1939970a1c |
|
46 | my b@044f8520aeeb+ other b@85c198ef2f6c ancestor a@af1939970a1c | |
47 | premerge successful |
|
47 | premerge successful | |
48 | note: possible conflict - a2 was renamed multiple times to: |
|
48 | note: possible conflict - a2 was renamed multiple times to: | |
49 | c2 |
|
49 | c2 | |
50 | b2 |
|
50 | b2 | |
51 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
51 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
52 | (branch merge, don't forget to commit) |
|
52 | (branch merge, don't forget to commit) | |
53 |
|
53 | |||
54 | $ hg status -AC |
|
54 | $ hg status -AC | |
55 | M b |
|
55 | M b | |
56 | a |
|
56 | a | |
57 | M b2 |
|
57 | M b2 | |
58 | R a |
|
58 | R a | |
59 | C c2 |
|
59 | C c2 | |
60 |
|
60 | |||
61 | $ cat b |
|
61 | $ cat b | |
62 | blahblah |
|
62 | blahblah | |
63 |
|
63 | |||
64 | $ hg ci -m "merge" |
|
64 | $ hg ci -m "merge" | |
65 |
|
65 | |||
66 | $ hg debugindex b |
|
66 | $ hg debugindex b | |
67 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
67 | rev offset length ..... linkrev nodeid p1 p2 (re) | |
68 | 0 0 67 ..... 1 57eacc201a7f 000000000000 000000000000 (re) |
|
68 | 0 0 67 ..... 1 57eacc201a7f 000000000000 000000000000 (re) | |
69 | 1 67 72 ..... 3 4727ba907962 000000000000 57eacc201a7f (re) |
|
69 | 1 67 72 ..... 3 4727ba907962 000000000000 57eacc201a7f (re) | |
70 |
|
70 | |||
71 | $ hg debugrename b |
|
71 | $ hg debugrename b | |
72 | b renamed from a:dd03b83622e78778b403775d0d074b9ac7387a66 |
|
72 | b renamed from a:dd03b83622e78778b403775d0d074b9ac7387a66 | |
73 |
|
73 | |||
74 | This used to trigger a "divergent renames" warning, despite no renames |
|
74 | This used to trigger a "divergent renames" warning, despite no renames | |
75 |
|
75 | |||
76 | $ hg cp b b3 |
|
76 | $ hg cp b b3 | |
77 | $ hg cp b b4 |
|
77 | $ hg cp b b4 | |
78 | $ hg ci -A -m 'copy b twice' |
|
78 | $ hg ci -A -m 'copy b twice' | |
79 | $ hg up eb92d88a9712 |
|
79 | $ hg up eb92d88a9712 | |
80 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
80 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
81 | $ hg up |
|
81 | $ hg up | |
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 | $ hg rm b3 b4 |
|
83 | $ hg rm b3 b4 | |
84 | $ hg ci -m 'clean up a bit of our mess' |
|
84 | $ hg ci -m 'clean up a bit of our mess' | |
85 |
|
85 | |||
86 | We'd rather not warn on divergent renames done in the same changeset (issue2113) |
|
86 | We'd rather not warn on divergent renames done in the same changeset (issue2113) | |
87 |
|
87 | |||
88 | $ hg cp b b3 |
|
88 | $ hg cp b b3 | |
89 | $ hg mv b b4 |
|
89 | $ hg mv b b4 | |
90 | $ hg ci -A -m 'divergent renames in same changeset' |
|
90 | $ hg ci -A -m 'divergent renames in same changeset' | |
91 | $ hg up c761c6948de0 |
|
91 | $ hg up c761c6948de0 | |
92 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
92 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
93 | $ hg up |
|
93 | $ hg up | |
94 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
94 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
95 |
|
95 | |||
96 | Check for issue2642 |
|
96 | Check for issue2642 | |
97 |
|
97 | |||
98 | $ hg init t |
|
98 | $ hg init t | |
99 | $ cd t |
|
99 | $ cd t | |
100 |
|
100 | |||
101 | $ echo c0 > f1 |
|
101 | $ echo c0 > f1 | |
102 | $ hg ci -Aqm0 |
|
102 | $ hg ci -Aqm0 | |
103 |
|
103 | |||
104 | $ hg up null -q |
|
104 | $ hg up null -q | |
105 | $ echo c1 > f1 # backport |
|
105 | $ echo c1 > f1 # backport | |
106 | $ hg ci -Aqm1 |
|
106 | $ hg ci -Aqm1 | |
107 | $ hg mv f1 f2 |
|
107 | $ hg mv f1 f2 | |
108 | $ hg ci -qm2 |
|
108 | $ hg ci -qm2 | |
109 |
|
109 | |||
110 | $ hg up 0 -q |
|
110 | $ hg up 0 -q | |
111 | $ hg merge 1 -q --tool internal:local |
|
111 | $ hg merge 1 -q --tool internal:local | |
112 | $ hg ci -qm3 |
|
112 | $ hg ci -qm3 | |
113 |
|
113 | |||
114 | $ hg merge 2 |
|
114 | $ hg merge 2 | |
115 | merging f1 and f2 to f2 |
|
115 | merging f1 and f2 to f2 | |
116 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
116 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
117 | (branch merge, don't forget to commit) |
|
117 | (branch merge, don't forget to commit) | |
118 |
|
118 | |||
119 | $ cat f2 |
|
119 | $ cat f2 | |
120 | c0 |
|
120 | c0 | |
121 |
|
121 | |||
122 | $ cd .. |
|
122 | $ cd .. | |
123 |
|
123 | |||
124 | Check for issue2089 |
|
124 | Check for issue2089 | |
125 |
|
125 | |||
126 | $ hg init repo2089 |
|
126 | $ hg init repo2089 | |
127 | $ cd repo2089 |
|
127 | $ cd repo2089 | |
128 |
|
128 | |||
129 | $ echo c0 > f1 |
|
129 | $ echo c0 > f1 | |
130 | $ hg ci -Aqm0 |
|
130 | $ hg ci -Aqm0 | |
131 |
|
131 | |||
132 | $ hg up null -q |
|
132 | $ hg up null -q | |
133 | $ echo c1 > f1 |
|
133 | $ echo c1 > f1 | |
134 | $ hg ci -Aqm1 |
|
134 | $ hg ci -Aqm1 | |
135 |
|
135 | |||
136 | $ hg up 0 -q |
|
136 | $ hg up 0 -q | |
137 | $ hg merge 1 -q --tool internal:local |
|
137 | $ hg merge 1 -q --tool internal:local | |
138 | $ echo c2 > f1 |
|
138 | $ echo c2 > f1 | |
139 | $ hg ci -qm2 |
|
139 | $ hg ci -qm2 | |
140 |
|
140 | |||
141 | $ hg up 1 -q |
|
141 | $ hg up 1 -q | |
142 | $ hg mv f1 f2 |
|
142 | $ hg mv f1 f2 | |
143 | $ hg ci -Aqm3 |
|
143 | $ hg ci -Aqm3 | |
144 |
|
144 | |||
145 | $ hg up 2 -q |
|
145 | $ hg up 2 -q | |
146 | $ hg merge 3 |
|
146 | $ hg merge 3 | |
147 | merging f1 and f2 to f2 |
|
147 | merging f1 and f2 to f2 | |
148 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
148 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
149 | (branch merge, don't forget to commit) |
|
149 | (branch merge, don't forget to commit) | |
150 |
|
150 | |||
151 | $ cat f2 |
|
151 | $ cat f2 | |
152 | c2 |
|
152 | c2 | |
153 |
|
153 | |||
154 | $ cd .. |
|
154 | $ cd .. | |
155 |
|
155 | |||
156 | Check for issue3074 |
|
156 | Check for issue3074 | |
157 |
|
157 | |||
158 | $ hg init repo3074 |
|
158 | $ hg init repo3074 | |
159 | $ cd repo3074 |
|
159 | $ cd repo3074 | |
160 | $ echo foo > file |
|
160 | $ echo foo > file | |
161 | $ hg add file |
|
161 | $ hg add file | |
162 | $ hg commit -m "added file" |
|
162 | $ hg commit -m "added file" | |
163 | $ hg mv file newfile |
|
163 | $ hg mv file newfile | |
164 | $ hg commit -m "renamed file" |
|
164 | $ hg commit -m "renamed file" | |
165 | $ hg update 0 |
|
165 | $ hg update 0 | |
166 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
166 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
167 | $ hg rm file |
|
167 | $ hg rm file | |
168 | $ hg commit -m "deleted file" |
|
168 | $ hg commit -m "deleted file" | |
169 | created new head |
|
169 | created new head | |
170 | $ hg merge --debug |
|
170 | $ hg merge --debug | |
171 | searching for copies back to rev 1 |
|
171 | searching for copies back to rev 1 | |
172 | unmatched files in other: |
|
172 | unmatched files in other: | |
173 | newfile |
|
173 | newfile | |
174 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
174 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
175 | src: 'file' -> dst: 'newfile' % |
|
175 | src: 'file' -> dst: 'newfile' % | |
176 | checking for directory renames |
|
176 | checking for directory renames | |
177 | resolving manifests |
|
177 | resolving manifests | |
178 | branchmerge: True, force: False, partial: False |
|
178 | branchmerge: True, force: False, partial: False | |
179 | ancestor: 19d7f95df299, local: 0084274f6b67+, remote: 5d32493049f0 |
|
179 | ancestor: 19d7f95df299, local: 0084274f6b67+, remote: 5d32493049f0 | |
180 | newfile: remote created -> g |
|
180 | newfile: remote created -> g | |
181 | getting newfile |
|
181 | getting newfile | |
182 | note: possible conflict - file was deleted and renamed to: |
|
182 | note: possible conflict - file was deleted and renamed to: | |
183 | newfile |
|
183 | newfile | |
184 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
184 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
185 | (branch merge, don't forget to commit) |
|
185 | (branch merge, don't forget to commit) | |
186 | $ hg status |
|
186 | $ hg status | |
187 | M newfile |
|
187 | M newfile | |
188 | $ cd .. |
|
188 | $ cd .. |
@@ -1,1039 +1,1071 b'' | |||||
1 |
|
1 | |||
2 | $ mkdir -p t |
|
2 | $ mkdir -p t | |
3 | $ cd t |
|
3 | $ cd t | |
4 | $ cat <<EOF > merge |
|
4 | $ cat <<EOF > merge | |
5 | > import sys, os |
|
5 | > import sys, os | |
6 | > f = open(sys.argv[1], "wb") |
|
6 | > f = open(sys.argv[1], "wb") | |
7 | > f.write("merge %s %s %s" % (sys.argv[1], sys.argv[2], sys.argv[3])) |
|
7 | > f.write("merge %s %s %s" % (sys.argv[1], sys.argv[2], sys.argv[3])) | |
8 | > f.close() |
|
8 | > f.close() | |
9 | > EOF |
|
9 | > EOF | |
10 |
|
10 | |||
11 | perform a test merge with possible renaming |
|
11 | perform a test merge with possible renaming | |
12 | args: |
|
12 | args: | |
13 | $1 = action in local branch |
|
13 | $1 = action in local branch | |
14 | $2 = action in remote branch |
|
14 | $2 = action in remote branch | |
15 | $3 = action in working dir |
|
15 | $3 = action in working dir | |
16 | $4 = expected result |
|
16 | $4 = expected result | |
17 |
|
17 | |||
18 | $ tm() |
|
18 | $ tm() | |
19 | > { |
|
19 | > { | |
20 | > hg init t |
|
20 | > hg init t | |
21 | > cd t |
|
21 | > cd t | |
22 | > echo "[merge]" >> .hg/hgrc |
|
22 | > echo "[merge]" >> .hg/hgrc | |
23 | > echo "followcopies = 1" >> .hg/hgrc |
|
23 | > echo "followcopies = 1" >> .hg/hgrc | |
24 | > |
|
24 | > | |
25 | > # base |
|
25 | > # base | |
26 | > echo base > a |
|
26 | > echo base > a | |
27 | > echo base > rev # used to force commits |
|
27 | > echo base > rev # used to force commits | |
28 | > hg add a rev |
|
28 | > hg add a rev | |
29 | > hg ci -m "base" |
|
29 | > hg ci -m "base" | |
30 | > |
|
30 | > | |
31 | > # remote |
|
31 | > # remote | |
32 | > echo remote > rev |
|
32 | > echo remote > rev | |
33 | > if [ "$2" != "" ] ; then $2 ; fi |
|
33 | > if [ "$2" != "" ] ; then $2 ; fi | |
34 | > hg ci -m "remote" |
|
34 | > hg ci -m "remote" | |
35 | > |
|
35 | > | |
36 | > # local |
|
36 | > # local | |
37 | > hg co -q 0 |
|
37 | > hg co -q 0 | |
38 | > echo local > rev |
|
38 | > echo local > rev | |
39 | > if [ "$1" != "" ] ; then $1 ; fi |
|
39 | > if [ "$1" != "" ] ; then $1 ; fi | |
40 | > hg ci -m "local" |
|
40 | > hg ci -m "local" | |
41 | > |
|
41 | > | |
42 | > # working dir |
|
42 | > # working dir | |
43 | > echo local > rev |
|
43 | > echo local > rev | |
44 | > if [ "$3" != "" ] ; then $3 ; fi |
|
44 | > if [ "$3" != "" ] ; then $3 ; fi | |
45 | > |
|
45 | > | |
46 | > # merge |
|
46 | > # merge | |
47 | > echo "--------------" |
|
47 | > echo "--------------" | |
48 | > echo "test L:$1 R:$2 W:$3 - $4" |
|
48 | > echo "test L:$1 R:$2 W:$3 - $4" | |
49 | > echo "--------------" |
|
49 | > echo "--------------" | |
50 | > hg merge -y --debug --traceback --tool="python ../merge" |
|
50 | > hg merge -y --debug --traceback --tool="python ../merge" | |
51 | > |
|
51 | > | |
52 | > echo "--------------" |
|
52 | > echo "--------------" | |
53 | > hg status -camC -X rev |
|
53 | > hg status -camC -X rev | |
54 | > |
|
54 | > | |
55 | > hg ci -m "merge" |
|
55 | > hg ci -m "merge" | |
56 | > |
|
56 | > | |
57 | > echo "--------------" |
|
57 | > echo "--------------" | |
58 | > echo |
|
58 | > echo | |
59 | > |
|
59 | > | |
60 | > cd .. |
|
60 | > cd .. | |
61 | > rm -r t |
|
61 | > rm -r t | |
62 | > } |
|
62 | > } | |
63 | $ up() { |
|
63 | $ up() { | |
64 | > cp rev $1 |
|
64 | > cp rev $1 | |
65 | > hg add $1 2> /dev/null |
|
65 | > hg add $1 2> /dev/null | |
66 | > if [ "$2" != "" ] ; then |
|
66 | > if [ "$2" != "" ] ; then | |
67 | > cp rev $2 |
|
67 | > cp rev $2 | |
68 | > hg add $2 2> /dev/null |
|
68 | > hg add $2 2> /dev/null | |
69 | > fi |
|
69 | > fi | |
70 | > } |
|
70 | > } | |
71 | $ uc() { up $1; hg cp $1 $2; } # update + copy |
|
71 | $ uc() { up $1; hg cp $1 $2; } # update + copy | |
72 | $ um() { up $1; hg mv $1 $2; } |
|
72 | $ um() { up $1; hg mv $1 $2; } | |
73 | $ nc() { hg cp $1 $2; } # just copy |
|
73 | $ nc() { hg cp $1 $2; } # just copy | |
74 | $ nm() { hg mv $1 $2; } # just move |
|
74 | $ nm() { hg mv $1 $2; } # just move | |
75 | $ tm "up a " "nc a b" " " "1 get local a to b" |
|
75 | $ tm "up a " "nc a b" " " "1 get local a to b" | |
76 | created new head |
|
76 | created new head | |
77 | -------------- |
|
77 | -------------- | |
78 | test L:up a R:nc a b W: - 1 get local a to b |
|
78 | test L:up a R:nc a b W: - 1 get local a to b | |
79 | -------------- |
|
79 | -------------- | |
80 | searching for copies back to rev 1 |
|
80 | searching for copies back to rev 1 | |
81 | unmatched files in other: |
|
81 | unmatched files in other: | |
82 | b |
|
82 | b | |
83 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
83 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
84 | src: 'a' -> dst: 'b' * |
|
84 | src: 'a' -> dst: 'b' * | |
85 | checking for directory renames |
|
85 | checking for directory renames | |
86 | resolving manifests |
|
86 | resolving manifests | |
87 | branchmerge: True, force: False, partial: False |
|
87 | branchmerge: True, force: False, partial: False | |
88 | ancestor: 924404dff337, local: e300d1c794ec+, remote: 4ce40f5aca24 |
|
88 | ancestor: 924404dff337, local: e300d1c794ec+, remote: 4ce40f5aca24 | |
89 | preserving a for resolve of b |
|
89 | preserving a for resolve of b | |
90 | preserving rev for resolve of rev |
|
90 | preserving rev for resolve of rev | |
91 | a: remote unchanged -> k |
|
91 | a: remote unchanged -> k | |
92 | b: remote copied from a -> m |
|
92 | b: remote copied from a -> m (premerge) | |
93 | picked tool 'python ../merge' for b (binary False symlink False) |
|
93 | picked tool 'python ../merge' for b (binary False symlink False) | |
94 | merging a and b to b |
|
94 | merging a and b to b | |
95 | my b@e300d1c794ec+ other b@4ce40f5aca24 ancestor a@924404dff337 |
|
95 | my b@e300d1c794ec+ other b@4ce40f5aca24 ancestor a@924404dff337 | |
96 | premerge successful |
|
96 | premerge successful | |
97 | rev: versions differ -> m |
|
97 | rev: versions differ -> m (premerge) | |
98 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
98 | picked tool 'python ../merge' for rev (binary False symlink False) | |
99 | merging rev |
|
99 | merging rev | |
100 | my rev@e300d1c794ec+ other rev@4ce40f5aca24 ancestor rev@924404dff337 |
|
100 | my rev@e300d1c794ec+ other rev@4ce40f5aca24 ancestor rev@924404dff337 | |
|
101 | rev: versions differ -> m (merge) | |||
101 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
102 | picked tool 'python ../merge' for rev (binary False symlink False) | |
102 | my rev@e300d1c794ec+ other rev@4ce40f5aca24 ancestor rev@924404dff337 |
|
103 | my rev@e300d1c794ec+ other rev@4ce40f5aca24 ancestor rev@924404dff337 | |
103 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
104 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) | |
104 | merge tool returned: 0 |
|
105 | merge tool returned: 0 | |
105 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
106 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
106 | (branch merge, don't forget to commit) |
|
107 | (branch merge, don't forget to commit) | |
107 | -------------- |
|
108 | -------------- | |
108 | M b |
|
109 | M b | |
109 | a |
|
110 | a | |
110 | C a |
|
111 | C a | |
111 | -------------- |
|
112 | -------------- | |
112 |
|
113 | |||
113 | $ tm "nc a b" "up a " " " "2 get rem change to a and b" |
|
114 | $ tm "nc a b" "up a " " " "2 get rem change to a and b" | |
114 | created new head |
|
115 | created new head | |
115 | -------------- |
|
116 | -------------- | |
116 | test L:nc a b R:up a W: - 2 get rem change to a and b |
|
117 | test L:nc a b R:up a W: - 2 get rem change to a and b | |
117 | -------------- |
|
118 | -------------- | |
118 | searching for copies back to rev 1 |
|
119 | searching for copies back to rev 1 | |
119 | unmatched files in local: |
|
120 | unmatched files in local: | |
120 | b |
|
121 | b | |
121 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
122 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
122 | src: 'a' -> dst: 'b' * |
|
123 | src: 'a' -> dst: 'b' * | |
123 | checking for directory renames |
|
124 | checking for directory renames | |
124 | resolving manifests |
|
125 | resolving manifests | |
125 | branchmerge: True, force: False, partial: False |
|
126 | branchmerge: True, force: False, partial: False | |
126 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: f4db7e329e71 |
|
127 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: f4db7e329e71 | |
127 | preserving b for resolve of b |
|
128 | preserving b for resolve of b | |
128 | preserving rev for resolve of rev |
|
129 | preserving rev for resolve of rev | |
129 | a: remote is newer -> g |
|
130 | a: remote is newer -> g | |
130 | getting a |
|
131 | getting a | |
131 | b: local copied/moved from a -> m |
|
132 | b: local copied/moved from a -> m (premerge) | |
132 | picked tool 'python ../merge' for b (binary False symlink False) |
|
133 | picked tool 'python ../merge' for b (binary False symlink False) | |
133 | merging b and a to b |
|
134 | merging b and a to b | |
134 | my b@86a2aa42fc76+ other a@f4db7e329e71 ancestor a@924404dff337 |
|
135 | my b@86a2aa42fc76+ other a@f4db7e329e71 ancestor a@924404dff337 | |
135 | premerge successful |
|
136 | premerge successful | |
136 | rev: versions differ -> m |
|
137 | rev: versions differ -> m (premerge) | |
137 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
138 | picked tool 'python ../merge' for rev (binary False symlink False) | |
138 | merging rev |
|
139 | merging rev | |
139 | my rev@86a2aa42fc76+ other rev@f4db7e329e71 ancestor rev@924404dff337 |
|
140 | my rev@86a2aa42fc76+ other rev@f4db7e329e71 ancestor rev@924404dff337 | |
|
141 | rev: versions differ -> m (merge) | |||
140 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
142 | picked tool 'python ../merge' for rev (binary False symlink False) | |
141 | my rev@86a2aa42fc76+ other rev@f4db7e329e71 ancestor rev@924404dff337 |
|
143 | my rev@86a2aa42fc76+ other rev@f4db7e329e71 ancestor rev@924404dff337 | |
142 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
144 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) | |
143 | merge tool returned: 0 |
|
145 | merge tool returned: 0 | |
144 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
146 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
145 | (branch merge, don't forget to commit) |
|
147 | (branch merge, don't forget to commit) | |
146 | -------------- |
|
148 | -------------- | |
147 | M a |
|
149 | M a | |
148 | M b |
|
150 | M b | |
149 | a |
|
151 | a | |
150 | -------------- |
|
152 | -------------- | |
151 |
|
153 | |||
152 | $ tm "up a " "nm a b" " " "3 get local a change to b, remove a" |
|
154 | $ tm "up a " "nm a b" " " "3 get local a change to b, remove a" | |
153 | created new head |
|
155 | created new head | |
154 | -------------- |
|
156 | -------------- | |
155 | test L:up a R:nm a b W: - 3 get local a change to b, remove a |
|
157 | test L:up a R:nm a b W: - 3 get local a change to b, remove a | |
156 | -------------- |
|
158 | -------------- | |
157 | searching for copies back to rev 1 |
|
159 | searching for copies back to rev 1 | |
158 | unmatched files in other: |
|
160 | unmatched files in other: | |
159 | b |
|
161 | b | |
160 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
162 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
161 | src: 'a' -> dst: 'b' * |
|
163 | src: 'a' -> dst: 'b' * | |
162 | checking for directory renames |
|
164 | checking for directory renames | |
163 | resolving manifests |
|
165 | resolving manifests | |
164 | branchmerge: True, force: False, partial: False |
|
166 | branchmerge: True, force: False, partial: False | |
165 | ancestor: 924404dff337, local: e300d1c794ec+, remote: bdb19105162a |
|
167 | ancestor: 924404dff337, local: e300d1c794ec+, remote: bdb19105162a | |
166 | preserving a for resolve of b |
|
168 | preserving a for resolve of b | |
167 | preserving rev for resolve of rev |
|
169 | preserving rev for resolve of rev | |
168 | removing a |
|
170 | removing a | |
169 | b: remote moved from a -> m |
|
171 | b: remote moved from a -> m (premerge) | |
170 | picked tool 'python ../merge' for b (binary False symlink False) |
|
172 | picked tool 'python ../merge' for b (binary False symlink False) | |
171 | merging a and b to b |
|
173 | merging a and b to b | |
172 | my b@e300d1c794ec+ other b@bdb19105162a ancestor a@924404dff337 |
|
174 | my b@e300d1c794ec+ other b@bdb19105162a ancestor a@924404dff337 | |
173 | premerge successful |
|
175 | premerge successful | |
174 | rev: versions differ -> m |
|
176 | rev: versions differ -> m (premerge) | |
175 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
177 | picked tool 'python ../merge' for rev (binary False symlink False) | |
176 | merging rev |
|
178 | merging rev | |
177 | my rev@e300d1c794ec+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
179 | my rev@e300d1c794ec+ other rev@bdb19105162a ancestor rev@924404dff337 | |
|
180 | rev: versions differ -> m (merge) | |||
178 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
181 | picked tool 'python ../merge' for rev (binary False symlink False) | |
179 | my rev@e300d1c794ec+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
182 | my rev@e300d1c794ec+ other rev@bdb19105162a ancestor rev@924404dff337 | |
180 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
183 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) | |
181 | merge tool returned: 0 |
|
184 | merge tool returned: 0 | |
182 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
185 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
183 | (branch merge, don't forget to commit) |
|
186 | (branch merge, don't forget to commit) | |
184 | -------------- |
|
187 | -------------- | |
185 | M b |
|
188 | M b | |
186 | a |
|
189 | a | |
187 | -------------- |
|
190 | -------------- | |
188 |
|
191 | |||
189 | $ tm "nm a b" "up a " " " "4 get remote change to b" |
|
192 | $ tm "nm a b" "up a " " " "4 get remote change to b" | |
190 | created new head |
|
193 | created new head | |
191 | -------------- |
|
194 | -------------- | |
192 | test L:nm a b R:up a W: - 4 get remote change to b |
|
195 | test L:nm a b R:up a W: - 4 get remote change to b | |
193 | -------------- |
|
196 | -------------- | |
194 | searching for copies back to rev 1 |
|
197 | searching for copies back to rev 1 | |
195 | unmatched files in local: |
|
198 | unmatched files in local: | |
196 | b |
|
199 | b | |
197 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
200 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
198 | src: 'a' -> dst: 'b' * |
|
201 | src: 'a' -> dst: 'b' * | |
199 | checking for directory renames |
|
202 | checking for directory renames | |
200 | resolving manifests |
|
203 | resolving manifests | |
201 | branchmerge: True, force: False, partial: False |
|
204 | branchmerge: True, force: False, partial: False | |
202 | ancestor: 924404dff337, local: 02963e448370+, remote: f4db7e329e71 |
|
205 | ancestor: 924404dff337, local: 02963e448370+, remote: f4db7e329e71 | |
203 | preserving b for resolve of b |
|
206 | preserving b for resolve of b | |
204 | preserving rev for resolve of rev |
|
207 | preserving rev for resolve of rev | |
205 | b: local copied/moved from a -> m |
|
208 | b: local copied/moved from a -> m (premerge) | |
206 | picked tool 'python ../merge' for b (binary False symlink False) |
|
209 | picked tool 'python ../merge' for b (binary False symlink False) | |
207 | merging b and a to b |
|
210 | merging b and a to b | |
208 | my b@02963e448370+ other a@f4db7e329e71 ancestor a@924404dff337 |
|
211 | my b@02963e448370+ other a@f4db7e329e71 ancestor a@924404dff337 | |
209 | premerge successful |
|
212 | premerge successful | |
210 | rev: versions differ -> m |
|
213 | rev: versions differ -> m (premerge) | |
211 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
214 | picked tool 'python ../merge' for rev (binary False symlink False) | |
212 | merging rev |
|
215 | merging rev | |
213 | my rev@02963e448370+ other rev@f4db7e329e71 ancestor rev@924404dff337 |
|
216 | my rev@02963e448370+ other rev@f4db7e329e71 ancestor rev@924404dff337 | |
|
217 | rev: versions differ -> m (merge) | |||
214 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
218 | picked tool 'python ../merge' for rev (binary False symlink False) | |
215 | my rev@02963e448370+ other rev@f4db7e329e71 ancestor rev@924404dff337 |
|
219 | my rev@02963e448370+ other rev@f4db7e329e71 ancestor rev@924404dff337 | |
216 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
220 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) | |
217 | merge tool returned: 0 |
|
221 | merge tool returned: 0 | |
218 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
222 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
219 | (branch merge, don't forget to commit) |
|
223 | (branch merge, don't forget to commit) | |
220 | -------------- |
|
224 | -------------- | |
221 | M b |
|
225 | M b | |
222 | a |
|
226 | a | |
223 | -------------- |
|
227 | -------------- | |
224 |
|
228 | |||
225 | $ tm " " "nc a b" " " "5 get b" |
|
229 | $ tm " " "nc a b" " " "5 get b" | |
226 | created new head |
|
230 | created new head | |
227 | -------------- |
|
231 | -------------- | |
228 | test L: R:nc a b W: - 5 get b |
|
232 | test L: R:nc a b W: - 5 get b | |
229 | -------------- |
|
233 | -------------- | |
230 | searching for copies back to rev 1 |
|
234 | searching for copies back to rev 1 | |
231 | unmatched files in other: |
|
235 | unmatched files in other: | |
232 | b |
|
236 | b | |
233 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
237 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
234 | src: 'a' -> dst: 'b' |
|
238 | src: 'a' -> dst: 'b' | |
235 | checking for directory renames |
|
239 | checking for directory renames | |
236 | resolving manifests |
|
240 | resolving manifests | |
237 | branchmerge: True, force: False, partial: False |
|
241 | branchmerge: True, force: False, partial: False | |
238 | ancestor: 924404dff337, local: 94b33a1b7f2d+, remote: 4ce40f5aca24 |
|
242 | ancestor: 924404dff337, local: 94b33a1b7f2d+, remote: 4ce40f5aca24 | |
239 | preserving rev for resolve of rev |
|
243 | preserving rev for resolve of rev | |
240 | b: remote created -> g |
|
244 | b: remote created -> g | |
241 | getting b |
|
245 | getting b | |
242 | rev: versions differ -> m |
|
246 | rev: versions differ -> m (premerge) | |
243 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
247 | picked tool 'python ../merge' for rev (binary False symlink False) | |
244 | merging rev |
|
248 | merging rev | |
245 | my rev@94b33a1b7f2d+ other rev@4ce40f5aca24 ancestor rev@924404dff337 |
|
249 | my rev@94b33a1b7f2d+ other rev@4ce40f5aca24 ancestor rev@924404dff337 | |
|
250 | rev: versions differ -> m (merge) | |||
246 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
251 | picked tool 'python ../merge' for rev (binary False symlink False) | |
247 | my rev@94b33a1b7f2d+ other rev@4ce40f5aca24 ancestor rev@924404dff337 |
|
252 | my rev@94b33a1b7f2d+ other rev@4ce40f5aca24 ancestor rev@924404dff337 | |
248 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
253 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) | |
249 | merge tool returned: 0 |
|
254 | merge tool returned: 0 | |
250 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
255 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
251 | (branch merge, don't forget to commit) |
|
256 | (branch merge, don't forget to commit) | |
252 | -------------- |
|
257 | -------------- | |
253 | M b |
|
258 | M b | |
254 | C a |
|
259 | C a | |
255 | -------------- |
|
260 | -------------- | |
256 |
|
261 | |||
257 | $ tm "nc a b" " " " " "6 nothing" |
|
262 | $ tm "nc a b" " " " " "6 nothing" | |
258 | created new head |
|
263 | created new head | |
259 | -------------- |
|
264 | -------------- | |
260 | test L:nc a b R: W: - 6 nothing |
|
265 | test L:nc a b R: W: - 6 nothing | |
261 | -------------- |
|
266 | -------------- | |
262 | searching for copies back to rev 1 |
|
267 | searching for copies back to rev 1 | |
263 | unmatched files in local: |
|
268 | unmatched files in local: | |
264 | b |
|
269 | b | |
265 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
270 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
266 | src: 'a' -> dst: 'b' |
|
271 | src: 'a' -> dst: 'b' | |
267 | checking for directory renames |
|
272 | checking for directory renames | |
268 | resolving manifests |
|
273 | resolving manifests | |
269 | branchmerge: True, force: False, partial: False |
|
274 | branchmerge: True, force: False, partial: False | |
270 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 97c705ade336 |
|
275 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 97c705ade336 | |
271 | preserving rev for resolve of rev |
|
276 | preserving rev for resolve of rev | |
272 | rev: versions differ -> m |
|
277 | rev: versions differ -> m (premerge) | |
273 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
278 | picked tool 'python ../merge' for rev (binary False symlink False) | |
274 | merging rev |
|
279 | merging rev | |
275 | my rev@86a2aa42fc76+ other rev@97c705ade336 ancestor rev@924404dff337 |
|
280 | my rev@86a2aa42fc76+ other rev@97c705ade336 ancestor rev@924404dff337 | |
|
281 | rev: versions differ -> m (merge) | |||
276 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
282 | picked tool 'python ../merge' for rev (binary False symlink False) | |
277 | my rev@86a2aa42fc76+ other rev@97c705ade336 ancestor rev@924404dff337 |
|
283 | my rev@86a2aa42fc76+ other rev@97c705ade336 ancestor rev@924404dff337 | |
278 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
284 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) | |
279 | merge tool returned: 0 |
|
285 | merge tool returned: 0 | |
280 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
286 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
281 | (branch merge, don't forget to commit) |
|
287 | (branch merge, don't forget to commit) | |
282 | -------------- |
|
288 | -------------- | |
283 | C a |
|
289 | C a | |
284 | C b |
|
290 | C b | |
285 | -------------- |
|
291 | -------------- | |
286 |
|
292 | |||
287 | $ tm " " "nm a b" " " "7 get b" |
|
293 | $ tm " " "nm a b" " " "7 get b" | |
288 | created new head |
|
294 | created new head | |
289 | -------------- |
|
295 | -------------- | |
290 | test L: R:nm a b W: - 7 get b |
|
296 | test L: R:nm a b W: - 7 get b | |
291 | -------------- |
|
297 | -------------- | |
292 | searching for copies back to rev 1 |
|
298 | searching for copies back to rev 1 | |
293 | unmatched files in other: |
|
299 | unmatched files in other: | |
294 | b |
|
300 | b | |
295 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
301 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
296 | src: 'a' -> dst: 'b' |
|
302 | src: 'a' -> dst: 'b' | |
297 | checking for directory renames |
|
303 | checking for directory renames | |
298 | resolving manifests |
|
304 | resolving manifests | |
299 | branchmerge: True, force: False, partial: False |
|
305 | branchmerge: True, force: False, partial: False | |
300 | ancestor: 924404dff337, local: 94b33a1b7f2d+, remote: bdb19105162a |
|
306 | ancestor: 924404dff337, local: 94b33a1b7f2d+, remote: bdb19105162a | |
301 | preserving rev for resolve of rev |
|
307 | preserving rev for resolve of rev | |
302 | a: other deleted -> r |
|
308 | a: other deleted -> r | |
303 | removing a |
|
309 | removing a | |
304 | b: remote created -> g |
|
310 | b: remote created -> g | |
305 | getting b |
|
311 | getting b | |
306 | rev: versions differ -> m |
|
312 | rev: versions differ -> m (premerge) | |
307 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
313 | picked tool 'python ../merge' for rev (binary False symlink False) | |
308 | merging rev |
|
314 | merging rev | |
309 | my rev@94b33a1b7f2d+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
315 | my rev@94b33a1b7f2d+ other rev@bdb19105162a ancestor rev@924404dff337 | |
|
316 | rev: versions differ -> m (merge) | |||
310 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
317 | picked tool 'python ../merge' for rev (binary False symlink False) | |
311 | my rev@94b33a1b7f2d+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
318 | my rev@94b33a1b7f2d+ other rev@bdb19105162a ancestor rev@924404dff337 | |
312 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
319 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) | |
313 | merge tool returned: 0 |
|
320 | merge tool returned: 0 | |
314 | 1 files updated, 1 files merged, 1 files removed, 0 files unresolved |
|
321 | 1 files updated, 1 files merged, 1 files removed, 0 files unresolved | |
315 | (branch merge, don't forget to commit) |
|
322 | (branch merge, don't forget to commit) | |
316 | -------------- |
|
323 | -------------- | |
317 | M b |
|
324 | M b | |
318 | -------------- |
|
325 | -------------- | |
319 |
|
326 | |||
320 | $ tm "nm a b" " " " " "8 nothing" |
|
327 | $ tm "nm a b" " " " " "8 nothing" | |
321 | created new head |
|
328 | created new head | |
322 | -------------- |
|
329 | -------------- | |
323 | test L:nm a b R: W: - 8 nothing |
|
330 | test L:nm a b R: W: - 8 nothing | |
324 | -------------- |
|
331 | -------------- | |
325 | searching for copies back to rev 1 |
|
332 | searching for copies back to rev 1 | |
326 | unmatched files in local: |
|
333 | unmatched files in local: | |
327 | b |
|
334 | b | |
328 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
335 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
329 | src: 'a' -> dst: 'b' |
|
336 | src: 'a' -> dst: 'b' | |
330 | checking for directory renames |
|
337 | checking for directory renames | |
331 | resolving manifests |
|
338 | resolving manifests | |
332 | branchmerge: True, force: False, partial: False |
|
339 | branchmerge: True, force: False, partial: False | |
333 | ancestor: 924404dff337, local: 02963e448370+, remote: 97c705ade336 |
|
340 | ancestor: 924404dff337, local: 02963e448370+, remote: 97c705ade336 | |
334 | preserving rev for resolve of rev |
|
341 | preserving rev for resolve of rev | |
335 | rev: versions differ -> m |
|
342 | rev: versions differ -> m (premerge) | |
336 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
343 | picked tool 'python ../merge' for rev (binary False symlink False) | |
337 | merging rev |
|
344 | merging rev | |
338 | my rev@02963e448370+ other rev@97c705ade336 ancestor rev@924404dff337 |
|
345 | my rev@02963e448370+ other rev@97c705ade336 ancestor rev@924404dff337 | |
|
346 | rev: versions differ -> m (merge) | |||
339 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
347 | picked tool 'python ../merge' for rev (binary False symlink False) | |
340 | my rev@02963e448370+ other rev@97c705ade336 ancestor rev@924404dff337 |
|
348 | my rev@02963e448370+ other rev@97c705ade336 ancestor rev@924404dff337 | |
341 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
349 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) | |
342 | merge tool returned: 0 |
|
350 | merge tool returned: 0 | |
343 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
351 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
344 | (branch merge, don't forget to commit) |
|
352 | (branch merge, don't forget to commit) | |
345 | -------------- |
|
353 | -------------- | |
346 | C b |
|
354 | C b | |
347 | -------------- |
|
355 | -------------- | |
348 |
|
356 | |||
349 | $ tm "um a b" "um a b" " " "9 do merge with ancestor in a" |
|
357 | $ tm "um a b" "um a b" " " "9 do merge with ancestor in a" | |
350 | created new head |
|
358 | created new head | |
351 | -------------- |
|
359 | -------------- | |
352 | test L:um a b R:um a b W: - 9 do merge with ancestor in a |
|
360 | test L:um a b R:um a b W: - 9 do merge with ancestor in a | |
353 | -------------- |
|
361 | -------------- | |
354 | searching for copies back to rev 1 |
|
362 | searching for copies back to rev 1 | |
355 | unmatched files new in both: |
|
363 | unmatched files new in both: | |
356 | b |
|
364 | b | |
357 | resolving manifests |
|
365 | resolving manifests | |
358 | branchmerge: True, force: False, partial: False |
|
366 | branchmerge: True, force: False, partial: False | |
359 | ancestor: 924404dff337, local: 62e7bf090eba+, remote: 49b6d8032493 |
|
367 | ancestor: 924404dff337, local: 62e7bf090eba+, remote: 49b6d8032493 | |
360 | preserving b for resolve of b |
|
368 | preserving b for resolve of b | |
361 | preserving rev for resolve of rev |
|
369 | preserving rev for resolve of rev | |
362 | b: both renamed from a -> m |
|
370 | b: both renamed from a -> m (premerge) | |
363 | picked tool 'python ../merge' for b (binary False symlink False) |
|
371 | picked tool 'python ../merge' for b (binary False symlink False) | |
364 | merging b |
|
372 | merging b | |
365 | my b@62e7bf090eba+ other b@49b6d8032493 ancestor a@924404dff337 |
|
373 | my b@62e7bf090eba+ other b@49b6d8032493 ancestor a@924404dff337 | |
|
374 | rev: versions differ -> m (premerge) | |||
|
375 | picked tool 'python ../merge' for rev (binary False symlink False) | |||
|
376 | merging rev | |||
|
377 | my rev@62e7bf090eba+ other rev@49b6d8032493 ancestor rev@924404dff337 | |||
|
378 | b: both renamed from a -> m (merge) | |||
366 | picked tool 'python ../merge' for b (binary False symlink False) |
|
379 | picked tool 'python ../merge' for b (binary False symlink False) | |
367 | my b@62e7bf090eba+ other b@49b6d8032493 ancestor a@924404dff337 |
|
380 | my b@62e7bf090eba+ other b@49b6d8032493 ancestor a@924404dff337 | |
368 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) |
|
381 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) | |
369 | merge tool returned: 0 |
|
382 | merge tool returned: 0 | |
370 | rev: versions differ -> m |
|
383 | rev: versions differ -> m (merge) | |
371 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
|||
372 | merging rev |
|
|||
373 | my rev@62e7bf090eba+ other rev@49b6d8032493 ancestor rev@924404dff337 |
|
|||
374 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
384 | picked tool 'python ../merge' for rev (binary False symlink False) | |
375 | my rev@62e7bf090eba+ other rev@49b6d8032493 ancestor rev@924404dff337 |
|
385 | my rev@62e7bf090eba+ other rev@49b6d8032493 ancestor rev@924404dff337 | |
376 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
386 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) | |
377 | merge tool returned: 0 |
|
387 | merge tool returned: 0 | |
378 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
388 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
379 | (branch merge, don't forget to commit) |
|
389 | (branch merge, don't forget to commit) | |
380 | -------------- |
|
390 | -------------- | |
381 | M b |
|
391 | M b | |
382 | -------------- |
|
392 | -------------- | |
383 |
|
393 | |||
384 |
|
394 | |||
385 | m "um a c" "um x c" " " "10 do merge with no ancestor" |
|
395 | m "um a c" "um x c" " " "10 do merge with no ancestor" | |
386 |
|
396 | |||
387 | $ tm "nm a b" "nm a c" " " "11 get c, keep b" |
|
397 | $ tm "nm a b" "nm a c" " " "11 get c, keep b" | |
388 | created new head |
|
398 | created new head | |
389 | -------------- |
|
399 | -------------- | |
390 | test L:nm a b R:nm a c W: - 11 get c, keep b |
|
400 | test L:nm a b R:nm a c W: - 11 get c, keep b | |
391 | -------------- |
|
401 | -------------- | |
392 | searching for copies back to rev 1 |
|
402 | searching for copies back to rev 1 | |
393 | unmatched files in local: |
|
403 | unmatched files in local: | |
394 | b |
|
404 | b | |
395 | unmatched files in other: |
|
405 | unmatched files in other: | |
396 | c |
|
406 | c | |
397 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
407 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
398 | src: 'a' -> dst: 'b' ! |
|
408 | src: 'a' -> dst: 'b' ! | |
399 | src: 'a' -> dst: 'c' ! |
|
409 | src: 'a' -> dst: 'c' ! | |
400 | checking for directory renames |
|
410 | checking for directory renames | |
401 | resolving manifests |
|
411 | resolving manifests | |
402 | branchmerge: True, force: False, partial: False |
|
412 | branchmerge: True, force: False, partial: False | |
403 | ancestor: 924404dff337, local: 02963e448370+, remote: fe905ef2c33e |
|
413 | ancestor: 924404dff337, local: 02963e448370+, remote: fe905ef2c33e | |
404 | preserving rev for resolve of rev |
|
414 | preserving rev for resolve of rev | |
405 | c: remote created -> g |
|
415 | c: remote created -> g | |
406 | getting c |
|
416 | getting c | |
407 | rev: versions differ -> m |
|
417 | rev: versions differ -> m (premerge) | |
408 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
418 | picked tool 'python ../merge' for rev (binary False symlink False) | |
409 | merging rev |
|
419 | merging rev | |
410 | my rev@02963e448370+ other rev@fe905ef2c33e ancestor rev@924404dff337 |
|
420 | my rev@02963e448370+ other rev@fe905ef2c33e ancestor rev@924404dff337 | |
|
421 | rev: versions differ -> m (merge) | |||
411 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
422 | picked tool 'python ../merge' for rev (binary False symlink False) | |
412 | my rev@02963e448370+ other rev@fe905ef2c33e ancestor rev@924404dff337 |
|
423 | my rev@02963e448370+ other rev@fe905ef2c33e ancestor rev@924404dff337 | |
413 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
424 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) | |
414 | merge tool returned: 0 |
|
425 | merge tool returned: 0 | |
415 | note: possible conflict - a was renamed multiple times to: |
|
426 | note: possible conflict - a was renamed multiple times to: | |
416 | b |
|
427 | b | |
417 | c |
|
428 | c | |
418 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
429 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
419 | (branch merge, don't forget to commit) |
|
430 | (branch merge, don't forget to commit) | |
420 | -------------- |
|
431 | -------------- | |
421 | M c |
|
432 | M c | |
422 | C b |
|
433 | C b | |
423 | -------------- |
|
434 | -------------- | |
424 |
|
435 | |||
425 | $ tm "nc a b" "up b " " " "12 merge b no ancestor" |
|
436 | $ tm "nc a b" "up b " " " "12 merge b no ancestor" | |
426 | created new head |
|
437 | created new head | |
427 | -------------- |
|
438 | -------------- | |
428 | test L:nc a b R:up b W: - 12 merge b no ancestor |
|
439 | test L:nc a b R:up b W: - 12 merge b no ancestor | |
429 | -------------- |
|
440 | -------------- | |
430 | searching for copies back to rev 1 |
|
441 | searching for copies back to rev 1 | |
431 | unmatched files new in both: |
|
442 | unmatched files new in both: | |
432 | b |
|
443 | b | |
433 | resolving manifests |
|
444 | resolving manifests | |
434 | branchmerge: True, force: False, partial: False |
|
445 | branchmerge: True, force: False, partial: False | |
435 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: af30c7647fc7 |
|
446 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: af30c7647fc7 | |
436 | preserving b for resolve of b |
|
447 | preserving b for resolve of b | |
437 | preserving rev for resolve of rev |
|
448 | preserving rev for resolve of rev | |
438 | b: both created -> m |
|
449 | b: both created -> m (premerge) | |
439 | picked tool 'python ../merge' for b (binary False symlink False) |
|
450 | picked tool 'python ../merge' for b (binary False symlink False) | |
440 | merging b |
|
451 | merging b | |
441 | my b@86a2aa42fc76+ other b@af30c7647fc7 ancestor b@000000000000 |
|
452 | my b@86a2aa42fc76+ other b@af30c7647fc7 ancestor b@000000000000 | |
|
453 | rev: versions differ -> m (premerge) | |||
|
454 | picked tool 'python ../merge' for rev (binary False symlink False) | |||
|
455 | merging rev | |||
|
456 | my rev@86a2aa42fc76+ other rev@af30c7647fc7 ancestor rev@924404dff337 | |||
|
457 | b: both created -> m (merge) | |||
442 | picked tool 'python ../merge' for b (binary False symlink False) |
|
458 | picked tool 'python ../merge' for b (binary False symlink False) | |
443 | my b@86a2aa42fc76+ other b@af30c7647fc7 ancestor b@000000000000 |
|
459 | my b@86a2aa42fc76+ other b@af30c7647fc7 ancestor b@000000000000 | |
444 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) |
|
460 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) | |
445 | merge tool returned: 0 |
|
461 | merge tool returned: 0 | |
446 | rev: versions differ -> m |
|
462 | rev: versions differ -> m (merge) | |
447 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
|||
448 | merging rev |
|
|||
449 | my rev@86a2aa42fc76+ other rev@af30c7647fc7 ancestor rev@924404dff337 |
|
|||
450 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
463 | picked tool 'python ../merge' for rev (binary False symlink False) | |
451 | my rev@86a2aa42fc76+ other rev@af30c7647fc7 ancestor rev@924404dff337 |
|
464 | my rev@86a2aa42fc76+ other rev@af30c7647fc7 ancestor rev@924404dff337 | |
452 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
465 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) | |
453 | merge tool returned: 0 |
|
466 | merge tool returned: 0 | |
454 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
467 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
455 | (branch merge, don't forget to commit) |
|
468 | (branch merge, don't forget to commit) | |
456 | -------------- |
|
469 | -------------- | |
457 | M b |
|
470 | M b | |
458 | C a |
|
471 | C a | |
459 | -------------- |
|
472 | -------------- | |
460 |
|
473 | |||
461 | $ tm "up b " "nm a b" " " "13 merge b no ancestor" |
|
474 | $ tm "up b " "nm a b" " " "13 merge b no ancestor" | |
462 | created new head |
|
475 | created new head | |
463 | -------------- |
|
476 | -------------- | |
464 | test L:up b R:nm a b W: - 13 merge b no ancestor |
|
477 | test L:up b R:nm a b W: - 13 merge b no ancestor | |
465 | -------------- |
|
478 | -------------- | |
466 | searching for copies back to rev 1 |
|
479 | searching for copies back to rev 1 | |
467 | unmatched files new in both: |
|
480 | unmatched files new in both: | |
468 | b |
|
481 | b | |
469 | resolving manifests |
|
482 | resolving manifests | |
470 | branchmerge: True, force: False, partial: False |
|
483 | branchmerge: True, force: False, partial: False | |
471 | ancestor: 924404dff337, local: 59318016310c+, remote: bdb19105162a |
|
484 | ancestor: 924404dff337, local: 59318016310c+, remote: bdb19105162a | |
472 | preserving b for resolve of b |
|
485 | preserving b for resolve of b | |
473 | preserving rev for resolve of rev |
|
486 | preserving rev for resolve of rev | |
474 | a: other deleted -> r |
|
487 | a: other deleted -> r | |
475 | removing a |
|
488 | removing a | |
476 | b: both created -> m |
|
489 | b: both created -> m (premerge) | |
477 | picked tool 'python ../merge' for b (binary False symlink False) |
|
490 | picked tool 'python ../merge' for b (binary False symlink False) | |
478 | merging b |
|
491 | merging b | |
479 | my b@59318016310c+ other b@bdb19105162a ancestor b@000000000000 |
|
492 | my b@59318016310c+ other b@bdb19105162a ancestor b@000000000000 | |
|
493 | rev: versions differ -> m (premerge) | |||
|
494 | picked tool 'python ../merge' for rev (binary False symlink False) | |||
|
495 | merging rev | |||
|
496 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 | |||
|
497 | b: both created -> m (merge) | |||
480 | picked tool 'python ../merge' for b (binary False symlink False) |
|
498 | picked tool 'python ../merge' for b (binary False symlink False) | |
481 | my b@59318016310c+ other b@bdb19105162a ancestor b@000000000000 |
|
499 | my b@59318016310c+ other b@bdb19105162a ancestor b@000000000000 | |
482 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) |
|
500 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) | |
483 | merge tool returned: 0 |
|
501 | merge tool returned: 0 | |
484 | rev: versions differ -> m |
|
502 | rev: versions differ -> m (merge) | |
485 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
|||
486 | merging rev |
|
|||
487 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
|||
488 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
503 | picked tool 'python ../merge' for rev (binary False symlink False) | |
489 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
504 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 | |
490 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
505 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) | |
491 | merge tool returned: 0 |
|
506 | merge tool returned: 0 | |
492 | 0 files updated, 2 files merged, 1 files removed, 0 files unresolved |
|
507 | 0 files updated, 2 files merged, 1 files removed, 0 files unresolved | |
493 | (branch merge, don't forget to commit) |
|
508 | (branch merge, don't forget to commit) | |
494 | -------------- |
|
509 | -------------- | |
495 | M b |
|
510 | M b | |
496 | -------------- |
|
511 | -------------- | |
497 |
|
512 | |||
498 | $ tm "nc a b" "up a b" " " "14 merge b no ancestor" |
|
513 | $ tm "nc a b" "up a b" " " "14 merge b no ancestor" | |
499 | created new head |
|
514 | created new head | |
500 | -------------- |
|
515 | -------------- | |
501 | test L:nc a b R:up a b W: - 14 merge b no ancestor |
|
516 | test L:nc a b R:up a b W: - 14 merge b no ancestor | |
502 | -------------- |
|
517 | -------------- | |
503 | searching for copies back to rev 1 |
|
518 | searching for copies back to rev 1 | |
504 | unmatched files new in both: |
|
519 | unmatched files new in both: | |
505 | b |
|
520 | b | |
506 | resolving manifests |
|
521 | resolving manifests | |
507 | branchmerge: True, force: False, partial: False |
|
522 | branchmerge: True, force: False, partial: False | |
508 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 8dbce441892a |
|
523 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 8dbce441892a | |
509 | preserving b for resolve of b |
|
524 | preserving b for resolve of b | |
510 | preserving rev for resolve of rev |
|
525 | preserving rev for resolve of rev | |
511 | a: remote is newer -> g |
|
526 | a: remote is newer -> g | |
512 | getting a |
|
527 | getting a | |
513 | b: both created -> m |
|
528 | b: both created -> m (premerge) | |
514 | picked tool 'python ../merge' for b (binary False symlink False) |
|
529 | picked tool 'python ../merge' for b (binary False symlink False) | |
515 | merging b |
|
530 | merging b | |
516 | my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 |
|
531 | my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 | |
|
532 | rev: versions differ -> m (premerge) | |||
|
533 | picked tool 'python ../merge' for rev (binary False symlink False) | |||
|
534 | merging rev | |||
|
535 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 | |||
|
536 | b: both created -> m (merge) | |||
517 | picked tool 'python ../merge' for b (binary False symlink False) |
|
537 | picked tool 'python ../merge' for b (binary False symlink False) | |
518 | my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 |
|
538 | my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 | |
519 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) |
|
539 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) | |
520 | merge tool returned: 0 |
|
540 | merge tool returned: 0 | |
521 | rev: versions differ -> m |
|
541 | rev: versions differ -> m (merge) | |
522 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
|||
523 | merging rev |
|
|||
524 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 |
|
|||
525 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
542 | picked tool 'python ../merge' for rev (binary False symlink False) | |
526 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 |
|
543 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 | |
527 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
544 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) | |
528 | merge tool returned: 0 |
|
545 | merge tool returned: 0 | |
529 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
546 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
530 | (branch merge, don't forget to commit) |
|
547 | (branch merge, don't forget to commit) | |
531 | -------------- |
|
548 | -------------- | |
532 | M a |
|
549 | M a | |
533 | M b |
|
550 | M b | |
534 | -------------- |
|
551 | -------------- | |
535 |
|
552 | |||
536 | $ tm "up b " "nm a b" " " "15 merge b no ancestor, remove a" |
|
553 | $ tm "up b " "nm a b" " " "15 merge b no ancestor, remove a" | |
537 | created new head |
|
554 | created new head | |
538 | -------------- |
|
555 | -------------- | |
539 | test L:up b R:nm a b W: - 15 merge b no ancestor, remove a |
|
556 | test L:up b R:nm a b W: - 15 merge b no ancestor, remove a | |
540 | -------------- |
|
557 | -------------- | |
541 | searching for copies back to rev 1 |
|
558 | searching for copies back to rev 1 | |
542 | unmatched files new in both: |
|
559 | unmatched files new in both: | |
543 | b |
|
560 | b | |
544 | resolving manifests |
|
561 | resolving manifests | |
545 | branchmerge: True, force: False, partial: False |
|
562 | branchmerge: True, force: False, partial: False | |
546 | ancestor: 924404dff337, local: 59318016310c+, remote: bdb19105162a |
|
563 | ancestor: 924404dff337, local: 59318016310c+, remote: bdb19105162a | |
547 | preserving b for resolve of b |
|
564 | preserving b for resolve of b | |
548 | preserving rev for resolve of rev |
|
565 | preserving rev for resolve of rev | |
549 | a: other deleted -> r |
|
566 | a: other deleted -> r | |
550 | removing a |
|
567 | removing a | |
551 | b: both created -> m |
|
568 | b: both created -> m (premerge) | |
552 | picked tool 'python ../merge' for b (binary False symlink False) |
|
569 | picked tool 'python ../merge' for b (binary False symlink False) | |
553 | merging b |
|
570 | merging b | |
554 | my b@59318016310c+ other b@bdb19105162a ancestor b@000000000000 |
|
571 | my b@59318016310c+ other b@bdb19105162a ancestor b@000000000000 | |
|
572 | rev: versions differ -> m (premerge) | |||
|
573 | picked tool 'python ../merge' for rev (binary False symlink False) | |||
|
574 | merging rev | |||
|
575 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 | |||
|
576 | b: both created -> m (merge) | |||
555 | picked tool 'python ../merge' for b (binary False symlink False) |
|
577 | picked tool 'python ../merge' for b (binary False symlink False) | |
556 | my b@59318016310c+ other b@bdb19105162a ancestor b@000000000000 |
|
578 | my b@59318016310c+ other b@bdb19105162a ancestor b@000000000000 | |
557 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) |
|
579 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) | |
558 | merge tool returned: 0 |
|
580 | merge tool returned: 0 | |
559 | rev: versions differ -> m |
|
581 | rev: versions differ -> m (merge) | |
560 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
|||
561 | merging rev |
|
|||
562 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
|||
563 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
582 | picked tool 'python ../merge' for rev (binary False symlink False) | |
564 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
583 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 | |
565 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
584 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) | |
566 | merge tool returned: 0 |
|
585 | merge tool returned: 0 | |
567 | 0 files updated, 2 files merged, 1 files removed, 0 files unresolved |
|
586 | 0 files updated, 2 files merged, 1 files removed, 0 files unresolved | |
568 | (branch merge, don't forget to commit) |
|
587 | (branch merge, don't forget to commit) | |
569 | -------------- |
|
588 | -------------- | |
570 | M b |
|
589 | M b | |
571 | -------------- |
|
590 | -------------- | |
572 |
|
591 | |||
573 | $ tm "nc a b" "up a b" " " "16 get a, merge b no ancestor" |
|
592 | $ tm "nc a b" "up a b" " " "16 get a, merge b no ancestor" | |
574 | created new head |
|
593 | created new head | |
575 | -------------- |
|
594 | -------------- | |
576 | test L:nc a b R:up a b W: - 16 get a, merge b no ancestor |
|
595 | test L:nc a b R:up a b W: - 16 get a, merge b no ancestor | |
577 | -------------- |
|
596 | -------------- | |
578 | searching for copies back to rev 1 |
|
597 | searching for copies back to rev 1 | |
579 | unmatched files new in both: |
|
598 | unmatched files new in both: | |
580 | b |
|
599 | b | |
581 | resolving manifests |
|
600 | resolving manifests | |
582 | branchmerge: True, force: False, partial: False |
|
601 | branchmerge: True, force: False, partial: False | |
583 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 8dbce441892a |
|
602 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 8dbce441892a | |
584 | preserving b for resolve of b |
|
603 | preserving b for resolve of b | |
585 | preserving rev for resolve of rev |
|
604 | preserving rev for resolve of rev | |
586 | a: remote is newer -> g |
|
605 | a: remote is newer -> g | |
587 | getting a |
|
606 | getting a | |
588 | b: both created -> m |
|
607 | b: both created -> m (premerge) | |
589 | picked tool 'python ../merge' for b (binary False symlink False) |
|
608 | picked tool 'python ../merge' for b (binary False symlink False) | |
590 | merging b |
|
609 | merging b | |
591 | my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 |
|
610 | my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 | |
|
611 | rev: versions differ -> m (premerge) | |||
|
612 | picked tool 'python ../merge' for rev (binary False symlink False) | |||
|
613 | merging rev | |||
|
614 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 | |||
|
615 | b: both created -> m (merge) | |||
592 | picked tool 'python ../merge' for b (binary False symlink False) |
|
616 | picked tool 'python ../merge' for b (binary False symlink False) | |
593 | my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 |
|
617 | my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 | |
594 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) |
|
618 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) | |
595 | merge tool returned: 0 |
|
619 | merge tool returned: 0 | |
596 | rev: versions differ -> m |
|
620 | rev: versions differ -> m (merge) | |
597 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
|||
598 | merging rev |
|
|||
599 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 |
|
|||
600 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
621 | picked tool 'python ../merge' for rev (binary False symlink False) | |
601 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 |
|
622 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 | |
602 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
623 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) | |
603 | merge tool returned: 0 |
|
624 | merge tool returned: 0 | |
604 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
625 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
605 | (branch merge, don't forget to commit) |
|
626 | (branch merge, don't forget to commit) | |
606 | -------------- |
|
627 | -------------- | |
607 | M a |
|
628 | M a | |
608 | M b |
|
629 | M b | |
609 | -------------- |
|
630 | -------------- | |
610 |
|
631 | |||
611 | $ tm "up a b" "nc a b" " " "17 keep a, merge b no ancestor" |
|
632 | $ tm "up a b" "nc a b" " " "17 keep a, merge b no ancestor" | |
612 | created new head |
|
633 | created new head | |
613 | -------------- |
|
634 | -------------- | |
614 | test L:up a b R:nc a b W: - 17 keep a, merge b no ancestor |
|
635 | test L:up a b R:nc a b W: - 17 keep a, merge b no ancestor | |
615 | -------------- |
|
636 | -------------- | |
616 | searching for copies back to rev 1 |
|
637 | searching for copies back to rev 1 | |
617 | unmatched files new in both: |
|
638 | unmatched files new in both: | |
618 | b |
|
639 | b | |
619 | resolving manifests |
|
640 | resolving manifests | |
620 | branchmerge: True, force: False, partial: False |
|
641 | branchmerge: True, force: False, partial: False | |
621 | ancestor: 924404dff337, local: 0b76e65c8289+, remote: 4ce40f5aca24 |
|
642 | ancestor: 924404dff337, local: 0b76e65c8289+, remote: 4ce40f5aca24 | |
622 | preserving b for resolve of b |
|
643 | preserving b for resolve of b | |
623 | preserving rev for resolve of rev |
|
644 | preserving rev for resolve of rev | |
624 | a: remote unchanged -> k |
|
645 | a: remote unchanged -> k | |
625 | b: both created -> m |
|
646 | b: both created -> m (premerge) | |
626 | picked tool 'python ../merge' for b (binary False symlink False) |
|
647 | picked tool 'python ../merge' for b (binary False symlink False) | |
627 | merging b |
|
648 | merging b | |
628 | my b@0b76e65c8289+ other b@4ce40f5aca24 ancestor b@000000000000 |
|
649 | my b@0b76e65c8289+ other b@4ce40f5aca24 ancestor b@000000000000 | |
|
650 | rev: versions differ -> m (premerge) | |||
|
651 | picked tool 'python ../merge' for rev (binary False symlink False) | |||
|
652 | merging rev | |||
|
653 | my rev@0b76e65c8289+ other rev@4ce40f5aca24 ancestor rev@924404dff337 | |||
|
654 | b: both created -> m (merge) | |||
629 | picked tool 'python ../merge' for b (binary False symlink False) |
|
655 | picked tool 'python ../merge' for b (binary False symlink False) | |
630 | my b@0b76e65c8289+ other b@4ce40f5aca24 ancestor b@000000000000 |
|
656 | my b@0b76e65c8289+ other b@4ce40f5aca24 ancestor b@000000000000 | |
631 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) |
|
657 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) | |
632 | merge tool returned: 0 |
|
658 | merge tool returned: 0 | |
633 | rev: versions differ -> m |
|
659 | rev: versions differ -> m (merge) | |
634 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
|||
635 | merging rev |
|
|||
636 | my rev@0b76e65c8289+ other rev@4ce40f5aca24 ancestor rev@924404dff337 |
|
|||
637 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
660 | picked tool 'python ../merge' for rev (binary False symlink False) | |
638 | my rev@0b76e65c8289+ other rev@4ce40f5aca24 ancestor rev@924404dff337 |
|
661 | my rev@0b76e65c8289+ other rev@4ce40f5aca24 ancestor rev@924404dff337 | |
639 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
662 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) | |
640 | merge tool returned: 0 |
|
663 | merge tool returned: 0 | |
641 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
664 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
642 | (branch merge, don't forget to commit) |
|
665 | (branch merge, don't forget to commit) | |
643 | -------------- |
|
666 | -------------- | |
644 | M b |
|
667 | M b | |
645 | C a |
|
668 | C a | |
646 | -------------- |
|
669 | -------------- | |
647 |
|
670 | |||
648 | $ tm "nm a b" "up a b" " " "18 merge b no ancestor" |
|
671 | $ tm "nm a b" "up a b" " " "18 merge b no ancestor" | |
649 | created new head |
|
672 | created new head | |
650 | -------------- |
|
673 | -------------- | |
651 | test L:nm a b R:up a b W: - 18 merge b no ancestor |
|
674 | test L:nm a b R:up a b W: - 18 merge b no ancestor | |
652 | -------------- |
|
675 | -------------- | |
653 | searching for copies back to rev 1 |
|
676 | searching for copies back to rev 1 | |
654 | unmatched files new in both: |
|
677 | unmatched files new in both: | |
655 | b |
|
678 | b | |
656 | resolving manifests |
|
679 | resolving manifests | |
657 | branchmerge: True, force: False, partial: False |
|
680 | branchmerge: True, force: False, partial: False | |
658 | ancestor: 924404dff337, local: 02963e448370+, remote: 8dbce441892a |
|
681 | ancestor: 924404dff337, local: 02963e448370+, remote: 8dbce441892a | |
659 | remote changed a which local deleted |
|
682 | remote changed a which local deleted | |
660 | use (c)hanged version or leave (d)eleted? c |
|
683 | use (c)hanged version or leave (d)eleted? c | |
661 | preserving b for resolve of b |
|
684 | preserving b for resolve of b | |
662 | preserving rev for resolve of rev |
|
685 | preserving rev for resolve of rev | |
663 | a: prompt recreating -> g |
|
686 | a: prompt recreating -> g | |
664 | getting a |
|
687 | getting a | |
665 | b: both created -> m |
|
688 | b: both created -> m (premerge) | |
666 | picked tool 'python ../merge' for b (binary False symlink False) |
|
689 | picked tool 'python ../merge' for b (binary False symlink False) | |
667 | merging b |
|
690 | merging b | |
668 | my b@02963e448370+ other b@8dbce441892a ancestor b@000000000000 |
|
691 | my b@02963e448370+ other b@8dbce441892a ancestor b@000000000000 | |
|
692 | rev: versions differ -> m (premerge) | |||
|
693 | picked tool 'python ../merge' for rev (binary False symlink False) | |||
|
694 | merging rev | |||
|
695 | my rev@02963e448370+ other rev@8dbce441892a ancestor rev@924404dff337 | |||
|
696 | b: both created -> m (merge) | |||
669 | picked tool 'python ../merge' for b (binary False symlink False) |
|
697 | picked tool 'python ../merge' for b (binary False symlink False) | |
670 | my b@02963e448370+ other b@8dbce441892a ancestor b@000000000000 |
|
698 | my b@02963e448370+ other b@8dbce441892a ancestor b@000000000000 | |
671 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) |
|
699 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) | |
672 | merge tool returned: 0 |
|
700 | merge tool returned: 0 | |
673 | rev: versions differ -> m |
|
701 | rev: versions differ -> m (merge) | |
674 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
|||
675 | merging rev |
|
|||
676 | my rev@02963e448370+ other rev@8dbce441892a ancestor rev@924404dff337 |
|
|||
677 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
702 | picked tool 'python ../merge' for rev (binary False symlink False) | |
678 | my rev@02963e448370+ other rev@8dbce441892a ancestor rev@924404dff337 |
|
703 | my rev@02963e448370+ other rev@8dbce441892a ancestor rev@924404dff337 | |
679 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
704 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) | |
680 | merge tool returned: 0 |
|
705 | merge tool returned: 0 | |
681 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
706 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
682 | (branch merge, don't forget to commit) |
|
707 | (branch merge, don't forget to commit) | |
683 | -------------- |
|
708 | -------------- | |
684 | M a |
|
709 | M a | |
685 | M b |
|
710 | M b | |
686 | -------------- |
|
711 | -------------- | |
687 |
|
712 | |||
688 | $ tm "up a b" "nm a b" " " "19 merge b no ancestor, prompt remove a" |
|
713 | $ tm "up a b" "nm a b" " " "19 merge b no ancestor, prompt remove a" | |
689 | created new head |
|
714 | created new head | |
690 | -------------- |
|
715 | -------------- | |
691 | test L:up a b R:nm a b W: - 19 merge b no ancestor, prompt remove a |
|
716 | test L:up a b R:nm a b W: - 19 merge b no ancestor, prompt remove a | |
692 | -------------- |
|
717 | -------------- | |
693 | searching for copies back to rev 1 |
|
718 | searching for copies back to rev 1 | |
694 | unmatched files new in both: |
|
719 | unmatched files new in both: | |
695 | b |
|
720 | b | |
696 | resolving manifests |
|
721 | resolving manifests | |
697 | branchmerge: True, force: False, partial: False |
|
722 | branchmerge: True, force: False, partial: False | |
698 | ancestor: 924404dff337, local: 0b76e65c8289+, remote: bdb19105162a |
|
723 | ancestor: 924404dff337, local: 0b76e65c8289+, remote: bdb19105162a | |
699 | local changed a which remote deleted |
|
724 | local changed a which remote deleted | |
700 | use (c)hanged version or (d)elete? c |
|
725 | use (c)hanged version or (d)elete? c | |
701 | preserving b for resolve of b |
|
726 | preserving b for resolve of b | |
702 | preserving rev for resolve of rev |
|
727 | preserving rev for resolve of rev | |
703 | a: prompt keep -> a |
|
728 | a: prompt keep -> a | |
704 | b: both created -> m |
|
729 | b: both created -> m (premerge) | |
705 | picked tool 'python ../merge' for b (binary False symlink False) |
|
730 | picked tool 'python ../merge' for b (binary False symlink False) | |
706 | merging b |
|
731 | merging b | |
707 | my b@0b76e65c8289+ other b@bdb19105162a ancestor b@000000000000 |
|
732 | my b@0b76e65c8289+ other b@bdb19105162a ancestor b@000000000000 | |
|
733 | rev: versions differ -> m (premerge) | |||
|
734 | picked tool 'python ../merge' for rev (binary False symlink False) | |||
|
735 | merging rev | |||
|
736 | my rev@0b76e65c8289+ other rev@bdb19105162a ancestor rev@924404dff337 | |||
|
737 | b: both created -> m (merge) | |||
708 | picked tool 'python ../merge' for b (binary False symlink False) |
|
738 | picked tool 'python ../merge' for b (binary False symlink False) | |
709 | my b@0b76e65c8289+ other b@bdb19105162a ancestor b@000000000000 |
|
739 | my b@0b76e65c8289+ other b@bdb19105162a ancestor b@000000000000 | |
710 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) |
|
740 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) | |
711 | merge tool returned: 0 |
|
741 | merge tool returned: 0 | |
712 | rev: versions differ -> m |
|
742 | rev: versions differ -> m (merge) | |
713 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
|||
714 | merging rev |
|
|||
715 | my rev@0b76e65c8289+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
|||
716 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
743 | picked tool 'python ../merge' for rev (binary False symlink False) | |
717 | my rev@0b76e65c8289+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
744 | my rev@0b76e65c8289+ other rev@bdb19105162a ancestor rev@924404dff337 | |
718 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
745 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) | |
719 | merge tool returned: 0 |
|
746 | merge tool returned: 0 | |
720 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
747 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
721 | (branch merge, don't forget to commit) |
|
748 | (branch merge, don't forget to commit) | |
722 | -------------- |
|
749 | -------------- | |
723 | M b |
|
750 | M b | |
724 | C a |
|
751 | C a | |
725 | -------------- |
|
752 | -------------- | |
726 |
|
753 | |||
727 | $ tm "up a " "um a b" " " "20 merge a and b to b, remove a" |
|
754 | $ tm "up a " "um a b" " " "20 merge a and b to b, remove a" | |
728 | created new head |
|
755 | created new head | |
729 | -------------- |
|
756 | -------------- | |
730 | test L:up a R:um a b W: - 20 merge a and b to b, remove a |
|
757 | test L:up a R:um a b W: - 20 merge a and b to b, remove a | |
731 | -------------- |
|
758 | -------------- | |
732 | searching for copies back to rev 1 |
|
759 | searching for copies back to rev 1 | |
733 | unmatched files in other: |
|
760 | unmatched files in other: | |
734 | b |
|
761 | b | |
735 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
762 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
736 | src: 'a' -> dst: 'b' * |
|
763 | src: 'a' -> dst: 'b' * | |
737 | checking for directory renames |
|
764 | checking for directory renames | |
738 | resolving manifests |
|
765 | resolving manifests | |
739 | branchmerge: True, force: False, partial: False |
|
766 | branchmerge: True, force: False, partial: False | |
740 | ancestor: 924404dff337, local: e300d1c794ec+, remote: 49b6d8032493 |
|
767 | ancestor: 924404dff337, local: e300d1c794ec+, remote: 49b6d8032493 | |
741 | preserving a for resolve of b |
|
768 | preserving a for resolve of b | |
742 | preserving rev for resolve of rev |
|
769 | preserving rev for resolve of rev | |
743 | removing a |
|
770 | removing a | |
744 | b: remote moved from a -> m |
|
771 | b: remote moved from a -> m (premerge) | |
745 | picked tool 'python ../merge' for b (binary False symlink False) |
|
772 | picked tool 'python ../merge' for b (binary False symlink False) | |
746 | merging a and b to b |
|
773 | merging a and b to b | |
747 | my b@e300d1c794ec+ other b@49b6d8032493 ancestor a@924404dff337 |
|
774 | my b@e300d1c794ec+ other b@49b6d8032493 ancestor a@924404dff337 | |
|
775 | rev: versions differ -> m (premerge) | |||
|
776 | picked tool 'python ../merge' for rev (binary False symlink False) | |||
|
777 | merging rev | |||
|
778 | my rev@e300d1c794ec+ other rev@49b6d8032493 ancestor rev@924404dff337 | |||
|
779 | b: remote moved from a -> m (merge) | |||
748 | picked tool 'python ../merge' for b (binary False symlink False) |
|
780 | picked tool 'python ../merge' for b (binary False symlink False) | |
749 | my b@e300d1c794ec+ other b@49b6d8032493 ancestor a@924404dff337 |
|
781 | my b@e300d1c794ec+ other b@49b6d8032493 ancestor a@924404dff337 | |
750 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) |
|
782 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) | |
751 | merge tool returned: 0 |
|
783 | merge tool returned: 0 | |
752 | rev: versions differ -> m |
|
784 | rev: versions differ -> m (merge) | |
753 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
|||
754 | merging rev |
|
|||
755 | my rev@e300d1c794ec+ other rev@49b6d8032493 ancestor rev@924404dff337 |
|
|||
756 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
785 | picked tool 'python ../merge' for rev (binary False symlink False) | |
757 | my rev@e300d1c794ec+ other rev@49b6d8032493 ancestor rev@924404dff337 |
|
786 | my rev@e300d1c794ec+ other rev@49b6d8032493 ancestor rev@924404dff337 | |
758 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
787 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) | |
759 | merge tool returned: 0 |
|
788 | merge tool returned: 0 | |
760 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
789 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
761 | (branch merge, don't forget to commit) |
|
790 | (branch merge, don't forget to commit) | |
762 | -------------- |
|
791 | -------------- | |
763 | M b |
|
792 | M b | |
764 | a |
|
793 | a | |
765 | -------------- |
|
794 | -------------- | |
766 |
|
795 | |||
767 | $ tm "um a b" "up a " " " "21 merge a and b to b" |
|
796 | $ tm "um a b" "up a " " " "21 merge a and b to b" | |
768 | created new head |
|
797 | created new head | |
769 | -------------- |
|
798 | -------------- | |
770 | test L:um a b R:up a W: - 21 merge a and b to b |
|
799 | test L:um a b R:up a W: - 21 merge a and b to b | |
771 | -------------- |
|
800 | -------------- | |
772 | searching for copies back to rev 1 |
|
801 | searching for copies back to rev 1 | |
773 | unmatched files in local: |
|
802 | unmatched files in local: | |
774 | b |
|
803 | b | |
775 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
804 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
776 | src: 'a' -> dst: 'b' * |
|
805 | src: 'a' -> dst: 'b' * | |
777 | checking for directory renames |
|
806 | checking for directory renames | |
778 | resolving manifests |
|
807 | resolving manifests | |
779 | branchmerge: True, force: False, partial: False |
|
808 | branchmerge: True, force: False, partial: False | |
780 | ancestor: 924404dff337, local: 62e7bf090eba+, remote: f4db7e329e71 |
|
809 | ancestor: 924404dff337, local: 62e7bf090eba+, remote: f4db7e329e71 | |
781 | preserving b for resolve of b |
|
810 | preserving b for resolve of b | |
782 | preserving rev for resolve of rev |
|
811 | preserving rev for resolve of rev | |
783 | b: local copied/moved from a -> m |
|
812 | b: local copied/moved from a -> m (premerge) | |
784 | picked tool 'python ../merge' for b (binary False symlink False) |
|
813 | picked tool 'python ../merge' for b (binary False symlink False) | |
785 | merging b and a to b |
|
814 | merging b and a to b | |
786 | my b@62e7bf090eba+ other a@f4db7e329e71 ancestor a@924404dff337 |
|
815 | my b@62e7bf090eba+ other a@f4db7e329e71 ancestor a@924404dff337 | |
|
816 | rev: versions differ -> m (premerge) | |||
|
817 | picked tool 'python ../merge' for rev (binary False symlink False) | |||
|
818 | merging rev | |||
|
819 | my rev@62e7bf090eba+ other rev@f4db7e329e71 ancestor rev@924404dff337 | |||
|
820 | b: local copied/moved from a -> m (merge) | |||
787 | picked tool 'python ../merge' for b (binary False symlink False) |
|
821 | picked tool 'python ../merge' for b (binary False symlink False) | |
788 | my b@62e7bf090eba+ other a@f4db7e329e71 ancestor a@924404dff337 |
|
822 | my b@62e7bf090eba+ other a@f4db7e329e71 ancestor a@924404dff337 | |
789 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) |
|
823 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) | |
790 | merge tool returned: 0 |
|
824 | merge tool returned: 0 | |
791 | rev: versions differ -> m |
|
825 | rev: versions differ -> m (merge) | |
792 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
|||
793 | merging rev |
|
|||
794 | my rev@62e7bf090eba+ other rev@f4db7e329e71 ancestor rev@924404dff337 |
|
|||
795 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
826 | picked tool 'python ../merge' for rev (binary False symlink False) | |
796 | my rev@62e7bf090eba+ other rev@f4db7e329e71 ancestor rev@924404dff337 |
|
827 | my rev@62e7bf090eba+ other rev@f4db7e329e71 ancestor rev@924404dff337 | |
797 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
828 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) | |
798 | merge tool returned: 0 |
|
829 | merge tool returned: 0 | |
799 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
830 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
800 | (branch merge, don't forget to commit) |
|
831 | (branch merge, don't forget to commit) | |
801 | -------------- |
|
832 | -------------- | |
802 | M b |
|
833 | M b | |
803 | a |
|
834 | a | |
804 | -------------- |
|
835 | -------------- | |
805 |
|
836 | |||
806 |
|
837 | |||
807 | m "nm a b" "um x a" " " "22 get a, keep b" |
|
838 | m "nm a b" "um x a" " " "22 get a, keep b" | |
808 |
|
839 | |||
809 | $ tm "nm a b" "up a c" " " "23 get c, keep b" |
|
840 | $ tm "nm a b" "up a c" " " "23 get c, keep b" | |
810 | created new head |
|
841 | created new head | |
811 | -------------- |
|
842 | -------------- | |
812 | test L:nm a b R:up a c W: - 23 get c, keep b |
|
843 | test L:nm a b R:up a c W: - 23 get c, keep b | |
813 | -------------- |
|
844 | -------------- | |
814 | searching for copies back to rev 1 |
|
845 | searching for copies back to rev 1 | |
815 | unmatched files in local: |
|
846 | unmatched files in local: | |
816 | b |
|
847 | b | |
817 | unmatched files in other: |
|
848 | unmatched files in other: | |
818 | c |
|
849 | c | |
819 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
850 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
820 | src: 'a' -> dst: 'b' * |
|
851 | src: 'a' -> dst: 'b' * | |
821 | checking for directory renames |
|
852 | checking for directory renames | |
822 | resolving manifests |
|
853 | resolving manifests | |
823 | branchmerge: True, force: False, partial: False |
|
854 | branchmerge: True, force: False, partial: False | |
824 | ancestor: 924404dff337, local: 02963e448370+, remote: 2b958612230f |
|
855 | ancestor: 924404dff337, local: 02963e448370+, remote: 2b958612230f | |
825 | preserving b for resolve of b |
|
856 | preserving b for resolve of b | |
826 | preserving rev for resolve of rev |
|
857 | preserving rev for resolve of rev | |
827 | c: remote created -> g |
|
858 | c: remote created -> g | |
828 | getting c |
|
859 | getting c | |
829 | b: local copied/moved from a -> m |
|
860 | b: local copied/moved from a -> m (premerge) | |
830 | picked tool 'python ../merge' for b (binary False symlink False) |
|
861 | picked tool 'python ../merge' for b (binary False symlink False) | |
831 | merging b and a to b |
|
862 | merging b and a to b | |
832 | my b@02963e448370+ other a@2b958612230f ancestor a@924404dff337 |
|
863 | my b@02963e448370+ other a@2b958612230f ancestor a@924404dff337 | |
833 | premerge successful |
|
864 | premerge successful | |
834 | rev: versions differ -> m |
|
865 | rev: versions differ -> m (premerge) | |
835 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
866 | picked tool 'python ../merge' for rev (binary False symlink False) | |
836 | merging rev |
|
867 | merging rev | |
837 | my rev@02963e448370+ other rev@2b958612230f ancestor rev@924404dff337 |
|
868 | my rev@02963e448370+ other rev@2b958612230f ancestor rev@924404dff337 | |
|
869 | rev: versions differ -> m (merge) | |||
838 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
870 | picked tool 'python ../merge' for rev (binary False symlink False) | |
839 | my rev@02963e448370+ other rev@2b958612230f ancestor rev@924404dff337 |
|
871 | my rev@02963e448370+ other rev@2b958612230f ancestor rev@924404dff337 | |
840 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
872 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) | |
841 | merge tool returned: 0 |
|
873 | merge tool returned: 0 | |
842 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
874 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
843 | (branch merge, don't forget to commit) |
|
875 | (branch merge, don't forget to commit) | |
844 | -------------- |
|
876 | -------------- | |
845 | M b |
|
877 | M b | |
846 | a |
|
878 | a | |
847 | M c |
|
879 | M c | |
848 | -------------- |
|
880 | -------------- | |
849 |
|
881 | |||
850 |
|
882 | |||
851 | $ cd .. |
|
883 | $ cd .. | |
852 |
|
884 | |||
853 |
|
885 | |||
854 | Systematic and terse testing of merge merges and ancestor calculation: |
|
886 | Systematic and terse testing of merge merges and ancestor calculation: | |
855 |
|
887 | |||
856 | Expected result: |
|
888 | Expected result: | |
857 |
|
889 | |||
858 | \ a m1 m2 dst |
|
890 | \ a m1 m2 dst | |
859 | 0 - f f f "versions differ" |
|
891 | 0 - f f f "versions differ" | |
860 | 1 f g g g "versions differ" |
|
892 | 1 f g g g "versions differ" | |
861 | 2 f f f f "versions differ" |
|
893 | 2 f f f f "versions differ" | |
862 | 3 f f g f+g "remote copied to " + f |
|
894 | 3 f f g f+g "remote copied to " + f | |
863 | 4 f f g g "remote moved to " + f |
|
895 | 4 f f g g "remote moved to " + f | |
864 | 5 f g f f+g "local copied to " + f2 |
|
896 | 5 f g f f+g "local copied to " + f2 | |
865 | 6 f g f g "local moved to " + f2 |
|
897 | 6 f g f g "local moved to " + f2 | |
866 | 7 - (f) f f "remote differs from untracked local" |
|
898 | 7 - (f) f f "remote differs from untracked local" | |
867 | 8 f (f) f f "remote differs from untracked local" |
|
899 | 8 f (f) f f "remote differs from untracked local" | |
868 |
|
900 | |||
869 | $ hg init ancestortest |
|
901 | $ hg init ancestortest | |
870 | $ cd ancestortest |
|
902 | $ cd ancestortest | |
871 | $ for x in 1 2 3 4 5 6 8; do mkdir $x; echo a > $x/f; done |
|
903 | $ for x in 1 2 3 4 5 6 8; do mkdir $x; echo a > $x/f; done | |
872 | $ hg ci -Aqm "a" |
|
904 | $ hg ci -Aqm "a" | |
873 | $ mkdir 0 |
|
905 | $ mkdir 0 | |
874 | $ touch 0/f |
|
906 | $ touch 0/f | |
875 | $ hg mv 1/f 1/g |
|
907 | $ hg mv 1/f 1/g | |
876 | $ hg cp 5/f 5/g |
|
908 | $ hg cp 5/f 5/g | |
877 | $ hg mv 6/f 6/g |
|
909 | $ hg mv 6/f 6/g | |
878 | $ hg rm 8/f |
|
910 | $ hg rm 8/f | |
879 | $ for x in */*; do echo m1 > $x; done |
|
911 | $ for x in */*; do echo m1 > $x; done | |
880 | $ hg ci -Aqm "m1" |
|
912 | $ hg ci -Aqm "m1" | |
881 | $ hg up -qr0 |
|
913 | $ hg up -qr0 | |
882 | $ mkdir 0 7 |
|
914 | $ mkdir 0 7 | |
883 | $ touch 0/f 7/f |
|
915 | $ touch 0/f 7/f | |
884 | $ hg mv 1/f 1/g |
|
916 | $ hg mv 1/f 1/g | |
885 | $ hg cp 3/f 3/g |
|
917 | $ hg cp 3/f 3/g | |
886 | $ hg mv 4/f 4/g |
|
918 | $ hg mv 4/f 4/g | |
887 | $ for x in */*; do echo m2 > $x; done |
|
919 | $ for x in */*; do echo m2 > $x; done | |
888 | $ hg ci -Aqm "m2" |
|
920 | $ hg ci -Aqm "m2" | |
889 | $ hg up -qr1 |
|
921 | $ hg up -qr1 | |
890 | $ mkdir 7 8 |
|
922 | $ mkdir 7 8 | |
891 | $ echo m > 7/f |
|
923 | $ echo m > 7/f | |
892 | $ echo m > 8/f |
|
924 | $ echo m > 8/f | |
893 | $ hg merge -f --tool internal:dump -v --debug -r2 | sed '/^ 0\/f: both created -> m/,$d' 2> /dev/null |
|
925 | $ hg merge -f --tool internal:dump -v --debug -r2 | sed '/^ 0\/f: both created -> m/,$d' 2> /dev/null | |
894 | searching for copies back to rev 1 |
|
926 | searching for copies back to rev 1 | |
895 | unmatched files in local: |
|
927 | unmatched files in local: | |
896 | 5/g |
|
928 | 5/g | |
897 | 6/g |
|
929 | 6/g | |
898 | unmatched files in other: |
|
930 | unmatched files in other: | |
899 | 3/g |
|
931 | 3/g | |
900 | 4/g |
|
932 | 4/g | |
901 | 7/f |
|
933 | 7/f | |
902 | unmatched files new in both: |
|
934 | unmatched files new in both: | |
903 | 0/f |
|
935 | 0/f | |
904 | 1/g |
|
936 | 1/g | |
905 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
937 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
906 | src: '3/f' -> dst: '3/g' * |
|
938 | src: '3/f' -> dst: '3/g' * | |
907 | src: '4/f' -> dst: '4/g' * |
|
939 | src: '4/f' -> dst: '4/g' * | |
908 | src: '5/f' -> dst: '5/g' * |
|
940 | src: '5/f' -> dst: '5/g' * | |
909 | src: '6/f' -> dst: '6/g' * |
|
941 | src: '6/f' -> dst: '6/g' * | |
910 | checking for directory renames |
|
942 | checking for directory renames | |
911 | resolving manifests |
|
943 | resolving manifests | |
912 | branchmerge: True, force: True, partial: False |
|
944 | branchmerge: True, force: True, partial: False | |
913 | ancestor: e6cb3cf11019, local: ec44bf929ab5+, remote: c62e34d0b898 |
|
945 | ancestor: e6cb3cf11019, local: ec44bf929ab5+, remote: c62e34d0b898 | |
914 | remote changed 8/f which local deleted |
|
946 | remote changed 8/f which local deleted | |
915 | use (c)hanged version or leave (d)eleted? c |
|
947 | use (c)hanged version or leave (d)eleted? c | |
916 | preserving 0/f for resolve of 0/f |
|
948 | preserving 0/f for resolve of 0/f | |
917 | preserving 1/g for resolve of 1/g |
|
949 | preserving 1/g for resolve of 1/g | |
918 | preserving 2/f for resolve of 2/f |
|
950 | preserving 2/f for resolve of 2/f | |
919 | preserving 3/f for resolve of 3/f |
|
951 | preserving 3/f for resolve of 3/f | |
920 | preserving 3/f for resolve of 3/g |
|
952 | preserving 3/f for resolve of 3/g | |
921 | preserving 4/f for resolve of 4/g |
|
953 | preserving 4/f for resolve of 4/g | |
922 | preserving 5/f for resolve of 5/f |
|
954 | preserving 5/f for resolve of 5/f | |
923 | preserving 5/g for resolve of 5/g |
|
955 | preserving 5/g for resolve of 5/g | |
924 | preserving 6/g for resolve of 6/g |
|
956 | preserving 6/g for resolve of 6/g | |
925 | preserving 7/f for resolve of 7/f |
|
957 | preserving 7/f for resolve of 7/f | |
926 | removing 4/f |
|
958 | removing 4/f | |
927 | 8/f: prompt recreating -> g |
|
959 | 8/f: prompt recreating -> g | |
928 | getting 8/f |
|
960 | getting 8/f | |
929 | $ hg mani |
|
961 | $ hg mani | |
930 | 0/f |
|
962 | 0/f | |
931 | 1/g |
|
963 | 1/g | |
932 | 2/f |
|
964 | 2/f | |
933 | 3/f |
|
965 | 3/f | |
934 | 4/f |
|
966 | 4/f | |
935 | 5/f |
|
967 | 5/f | |
936 | 5/g |
|
968 | 5/g | |
937 | 6/g |
|
969 | 6/g | |
938 | $ for f in */*; do echo $f:; cat $f; done |
|
970 | $ for f in */*; do echo $f:; cat $f; done | |
939 | 0/f: |
|
971 | 0/f: | |
940 | m1 |
|
972 | m1 | |
941 | 0/f.base: |
|
973 | 0/f.base: | |
942 | 0/f.local: |
|
974 | 0/f.local: | |
943 | m1 |
|
975 | m1 | |
944 | 0/f.orig: |
|
976 | 0/f.orig: | |
945 | m1 |
|
977 | m1 | |
946 | 0/f.other: |
|
978 | 0/f.other: | |
947 | m2 |
|
979 | m2 | |
948 | 1/g: |
|
980 | 1/g: | |
949 | m1 |
|
981 | m1 | |
950 | 1/g.base: |
|
982 | 1/g.base: | |
951 | a |
|
983 | a | |
952 | 1/g.local: |
|
984 | 1/g.local: | |
953 | m1 |
|
985 | m1 | |
954 | 1/g.orig: |
|
986 | 1/g.orig: | |
955 | m1 |
|
987 | m1 | |
956 | 1/g.other: |
|
988 | 1/g.other: | |
957 | m2 |
|
989 | m2 | |
958 | 2/f: |
|
990 | 2/f: | |
959 | m1 |
|
991 | m1 | |
960 | 2/f.base: |
|
992 | 2/f.base: | |
961 | a |
|
993 | a | |
962 | 2/f.local: |
|
994 | 2/f.local: | |
963 | m1 |
|
995 | m1 | |
964 | 2/f.orig: |
|
996 | 2/f.orig: | |
965 | m1 |
|
997 | m1 | |
966 | 2/f.other: |
|
998 | 2/f.other: | |
967 | m2 |
|
999 | m2 | |
968 | 3/f: |
|
1000 | 3/f: | |
969 | m1 |
|
1001 | m1 | |
970 | 3/f.base: |
|
1002 | 3/f.base: | |
971 | a |
|
1003 | a | |
972 | 3/f.local: |
|
1004 | 3/f.local: | |
973 | m1 |
|
1005 | m1 | |
974 | 3/f.orig: |
|
1006 | 3/f.orig: | |
975 | m1 |
|
1007 | m1 | |
976 | 3/f.other: |
|
1008 | 3/f.other: | |
977 | m2 |
|
1009 | m2 | |
978 | 3/g: |
|
1010 | 3/g: | |
979 | m1 |
|
1011 | m1 | |
980 | 3/g.base: |
|
1012 | 3/g.base: | |
981 | a |
|
1013 | a | |
982 | 3/g.local: |
|
1014 | 3/g.local: | |
983 | m1 |
|
1015 | m1 | |
984 | 3/g.orig: |
|
1016 | 3/g.orig: | |
985 | m1 |
|
1017 | m1 | |
986 | 3/g.other: |
|
1018 | 3/g.other: | |
987 | m2 |
|
1019 | m2 | |
988 | 4/g: |
|
1020 | 4/g: | |
989 | m1 |
|
1021 | m1 | |
990 | 4/g.base: |
|
1022 | 4/g.base: | |
991 | a |
|
1023 | a | |
992 | 4/g.local: |
|
1024 | 4/g.local: | |
993 | m1 |
|
1025 | m1 | |
994 | 4/g.orig: |
|
1026 | 4/g.orig: | |
995 | m1 |
|
1027 | m1 | |
996 | 4/g.other: |
|
1028 | 4/g.other: | |
997 | m2 |
|
1029 | m2 | |
998 | 5/f: |
|
1030 | 5/f: | |
999 | m1 |
|
1031 | m1 | |
1000 | 5/f.base: |
|
1032 | 5/f.base: | |
1001 | a |
|
1033 | a | |
1002 | 5/f.local: |
|
1034 | 5/f.local: | |
1003 | m1 |
|
1035 | m1 | |
1004 | 5/f.orig: |
|
1036 | 5/f.orig: | |
1005 | m1 |
|
1037 | m1 | |
1006 | 5/f.other: |
|
1038 | 5/f.other: | |
1007 | m2 |
|
1039 | m2 | |
1008 | 5/g: |
|
1040 | 5/g: | |
1009 | m1 |
|
1041 | m1 | |
1010 | 5/g.base: |
|
1042 | 5/g.base: | |
1011 | a |
|
1043 | a | |
1012 | 5/g.local: |
|
1044 | 5/g.local: | |
1013 | m1 |
|
1045 | m1 | |
1014 | 5/g.orig: |
|
1046 | 5/g.orig: | |
1015 | m1 |
|
1047 | m1 | |
1016 | 5/g.other: |
|
1048 | 5/g.other: | |
1017 | m2 |
|
1049 | m2 | |
1018 | 6/g: |
|
1050 | 6/g: | |
1019 | m1 |
|
1051 | m1 | |
1020 | 6/g.base: |
|
1052 | 6/g.base: | |
1021 | a |
|
1053 | a | |
1022 | 6/g.local: |
|
1054 | 6/g.local: | |
1023 | m1 |
|
1055 | m1 | |
1024 | 6/g.orig: |
|
1056 | 6/g.orig: | |
1025 | m1 |
|
1057 | m1 | |
1026 | 6/g.other: |
|
1058 | 6/g.other: | |
1027 | m2 |
|
1059 | m2 | |
1028 | 7/f: |
|
1060 | 7/f: | |
1029 | m |
|
1061 | m | |
1030 | 7/f.base: |
|
1062 | 7/f.base: | |
1031 | 7/f.local: |
|
1063 | 7/f.local: | |
1032 | m |
|
1064 | m | |
1033 | 7/f.orig: |
|
1065 | 7/f.orig: | |
1034 | m |
|
1066 | m | |
1035 | 7/f.other: |
|
1067 | 7/f.other: | |
1036 | m2 |
|
1068 | m2 | |
1037 | 8/f: |
|
1069 | 8/f: | |
1038 | m2 |
|
1070 | m2 | |
1039 | $ cd .. |
|
1071 | $ cd .. |
@@ -1,355 +1,355 b'' | |||||
1 | $ cat <<EOF >> $HGRCPATH |
|
1 | $ cat <<EOF >> $HGRCPATH | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > color = |
|
3 | > color = | |
4 | > [color] |
|
4 | > [color] | |
5 | > mode = ansi |
|
5 | > mode = ansi | |
6 | > EOF |
|
6 | > EOF | |
7 | Terminfo codes compatibility fix |
|
7 | Terminfo codes compatibility fix | |
8 | $ echo "color.none=0" >> $HGRCPATH |
|
8 | $ echo "color.none=0" >> $HGRCPATH | |
9 |
|
9 | |||
10 | $ hg init repo1 |
|
10 | $ hg init repo1 | |
11 | $ cd repo1 |
|
11 | $ cd repo1 | |
12 | $ mkdir a b a/1 b/1 b/2 |
|
12 | $ mkdir a b a/1 b/1 b/2 | |
13 | $ touch in_root a/in_a b/in_b a/1/in_a_1 b/1/in_b_1 b/2/in_b_2 |
|
13 | $ touch in_root a/in_a b/in_b a/1/in_a_1 b/1/in_b_1 b/2/in_b_2 | |
14 |
|
14 | |||
15 | hg status in repo root: |
|
15 | hg status in repo root: | |
16 |
|
16 | |||
17 | $ hg status --color=always |
|
17 | $ hg status --color=always | |
18 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) |
|
18 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) | |
19 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) |
|
19 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) | |
20 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) |
|
20 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) | |
21 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) |
|
21 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) | |
22 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) |
|
22 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) | |
23 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) |
|
23 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) | |
24 |
|
24 | |||
25 | $ hg status --color=debug |
|
25 | $ hg status --color=debug | |
26 | [status.unknown|? ][status.unknown|a/1/in_a_1] |
|
26 | [status.unknown|? ][status.unknown|a/1/in_a_1] | |
27 | [status.unknown|? ][status.unknown|a/in_a] |
|
27 | [status.unknown|? ][status.unknown|a/in_a] | |
28 | [status.unknown|? ][status.unknown|b/1/in_b_1] |
|
28 | [status.unknown|? ][status.unknown|b/1/in_b_1] | |
29 | [status.unknown|? ][status.unknown|b/2/in_b_2] |
|
29 | [status.unknown|? ][status.unknown|b/2/in_b_2] | |
30 | [status.unknown|? ][status.unknown|b/in_b] |
|
30 | [status.unknown|? ][status.unknown|b/in_b] | |
31 | [status.unknown|? ][status.unknown|in_root] |
|
31 | [status.unknown|? ][status.unknown|in_root] | |
32 |
|
32 | |||
33 | hg status . in repo root: |
|
33 | hg status . in repo root: | |
34 |
|
34 | |||
35 | $ hg status --color=always . |
|
35 | $ hg status --color=always . | |
36 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) |
|
36 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) | |
37 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) |
|
37 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) | |
38 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) |
|
38 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) | |
39 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) |
|
39 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) | |
40 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) |
|
40 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) | |
41 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) |
|
41 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) | |
42 |
|
42 | |||
43 | $ hg status --color=always --cwd a |
|
43 | $ hg status --color=always --cwd a | |
44 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) |
|
44 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) | |
45 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) |
|
45 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) | |
46 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) |
|
46 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) | |
47 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) |
|
47 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) | |
48 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) |
|
48 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) | |
49 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) |
|
49 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) | |
50 | $ hg status --color=always --cwd a . |
|
50 | $ hg status --color=always --cwd a . | |
51 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m1/in_a_1\x1b[0m (esc) |
|
51 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m1/in_a_1\x1b[0m (esc) | |
52 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_a\x1b[0m (esc) |
|
52 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_a\x1b[0m (esc) | |
53 | $ hg status --color=always --cwd a .. |
|
53 | $ hg status --color=always --cwd a .. | |
54 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m1/in_a_1\x1b[0m (esc) |
|
54 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m1/in_a_1\x1b[0m (esc) | |
55 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_a\x1b[0m (esc) |
|
55 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_a\x1b[0m (esc) | |
56 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../b/1/in_b_1\x1b[0m (esc) |
|
56 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../b/1/in_b_1\x1b[0m (esc) | |
57 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../b/2/in_b_2\x1b[0m (esc) |
|
57 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../b/2/in_b_2\x1b[0m (esc) | |
58 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../b/in_b\x1b[0m (esc) |
|
58 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../b/in_b\x1b[0m (esc) | |
59 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_root\x1b[0m (esc) |
|
59 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_root\x1b[0m (esc) | |
60 |
|
60 | |||
61 | $ hg status --color=always --cwd b |
|
61 | $ hg status --color=always --cwd b | |
62 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) |
|
62 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) | |
63 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) |
|
63 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) | |
64 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) |
|
64 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) | |
65 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) |
|
65 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) | |
66 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) |
|
66 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) | |
67 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) |
|
67 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) | |
68 | $ hg status --color=always --cwd b . |
|
68 | $ hg status --color=always --cwd b . | |
69 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m1/in_b_1\x1b[0m (esc) |
|
69 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m1/in_b_1\x1b[0m (esc) | |
70 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m2/in_b_2\x1b[0m (esc) |
|
70 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m2/in_b_2\x1b[0m (esc) | |
71 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b\x1b[0m (esc) |
|
71 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b\x1b[0m (esc) | |
72 | $ hg status --color=always --cwd b .. |
|
72 | $ hg status --color=always --cwd b .. | |
73 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../a/1/in_a_1\x1b[0m (esc) |
|
73 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../a/1/in_a_1\x1b[0m (esc) | |
74 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../a/in_a\x1b[0m (esc) |
|
74 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../a/in_a\x1b[0m (esc) | |
75 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m1/in_b_1\x1b[0m (esc) |
|
75 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m1/in_b_1\x1b[0m (esc) | |
76 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m2/in_b_2\x1b[0m (esc) |
|
76 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m2/in_b_2\x1b[0m (esc) | |
77 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b\x1b[0m (esc) |
|
77 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b\x1b[0m (esc) | |
78 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_root\x1b[0m (esc) |
|
78 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_root\x1b[0m (esc) | |
79 |
|
79 | |||
80 | $ hg status --color=always --cwd a/1 |
|
80 | $ hg status --color=always --cwd a/1 | |
81 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) |
|
81 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) | |
82 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) |
|
82 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) | |
83 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) |
|
83 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) | |
84 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) |
|
84 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) | |
85 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) |
|
85 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) | |
86 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) |
|
86 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) | |
87 | $ hg status --color=always --cwd a/1 . |
|
87 | $ hg status --color=always --cwd a/1 . | |
88 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_a_1\x1b[0m (esc) |
|
88 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_a_1\x1b[0m (esc) | |
89 | $ hg status --color=always --cwd a/1 .. |
|
89 | $ hg status --color=always --cwd a/1 .. | |
90 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_a_1\x1b[0m (esc) |
|
90 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_a_1\x1b[0m (esc) | |
91 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_a\x1b[0m (esc) |
|
91 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_a\x1b[0m (esc) | |
92 |
|
92 | |||
93 | $ hg status --color=always --cwd b/1 |
|
93 | $ hg status --color=always --cwd b/1 | |
94 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) |
|
94 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) | |
95 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) |
|
95 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) | |
96 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) |
|
96 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) | |
97 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) |
|
97 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) | |
98 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) |
|
98 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) | |
99 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) |
|
99 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) | |
100 | $ hg status --color=always --cwd b/1 . |
|
100 | $ hg status --color=always --cwd b/1 . | |
101 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_1\x1b[0m (esc) |
|
101 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_1\x1b[0m (esc) | |
102 | $ hg status --color=always --cwd b/1 .. |
|
102 | $ hg status --color=always --cwd b/1 .. | |
103 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_1\x1b[0m (esc) |
|
103 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_1\x1b[0m (esc) | |
104 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../2/in_b_2\x1b[0m (esc) |
|
104 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../2/in_b_2\x1b[0m (esc) | |
105 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_b\x1b[0m (esc) |
|
105 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_b\x1b[0m (esc) | |
106 |
|
106 | |||
107 | $ hg status --color=always --cwd b/2 |
|
107 | $ hg status --color=always --cwd b/2 | |
108 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) |
|
108 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) | |
109 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) |
|
109 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) | |
110 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) |
|
110 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) | |
111 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) |
|
111 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) | |
112 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) |
|
112 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) | |
113 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) |
|
113 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) | |
114 | $ hg status --color=always --cwd b/2 . |
|
114 | $ hg status --color=always --cwd b/2 . | |
115 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_2\x1b[0m (esc) |
|
115 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_2\x1b[0m (esc) | |
116 | $ hg status --color=always --cwd b/2 .. |
|
116 | $ hg status --color=always --cwd b/2 .. | |
117 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../1/in_b_1\x1b[0m (esc) |
|
117 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../1/in_b_1\x1b[0m (esc) | |
118 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_2\x1b[0m (esc) |
|
118 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_2\x1b[0m (esc) | |
119 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_b\x1b[0m (esc) |
|
119 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_b\x1b[0m (esc) | |
120 |
|
120 | |||
121 | Make sure --color=never works |
|
121 | Make sure --color=never works | |
122 | $ hg status --color=never |
|
122 | $ hg status --color=never | |
123 | ? a/1/in_a_1 |
|
123 | ? a/1/in_a_1 | |
124 | ? a/in_a |
|
124 | ? a/in_a | |
125 | ? b/1/in_b_1 |
|
125 | ? b/1/in_b_1 | |
126 | ? b/2/in_b_2 |
|
126 | ? b/2/in_b_2 | |
127 | ? b/in_b |
|
127 | ? b/in_b | |
128 | ? in_root |
|
128 | ? in_root | |
129 |
|
129 | |||
130 | Make sure ui.formatted=False works |
|
130 | Make sure ui.formatted=False works | |
131 | $ hg status --config ui.formatted=False |
|
131 | $ hg status --config ui.formatted=False | |
132 | ? a/1/in_a_1 |
|
132 | ? a/1/in_a_1 | |
133 | ? a/in_a |
|
133 | ? a/in_a | |
134 | ? b/1/in_b_1 |
|
134 | ? b/1/in_b_1 | |
135 | ? b/2/in_b_2 |
|
135 | ? b/2/in_b_2 | |
136 | ? b/in_b |
|
136 | ? b/in_b | |
137 | ? in_root |
|
137 | ? in_root | |
138 |
|
138 | |||
139 | $ cd .. |
|
139 | $ cd .. | |
140 |
|
140 | |||
141 | $ hg init repo2 |
|
141 | $ hg init repo2 | |
142 | $ cd repo2 |
|
142 | $ cd repo2 | |
143 | $ touch modified removed deleted ignored |
|
143 | $ touch modified removed deleted ignored | |
144 | $ echo "^ignored$" > .hgignore |
|
144 | $ echo "^ignored$" > .hgignore | |
145 | $ hg ci -A -m 'initial checkin' |
|
145 | $ hg ci -A -m 'initial checkin' | |
146 | adding .hgignore |
|
146 | adding .hgignore | |
147 | adding deleted |
|
147 | adding deleted | |
148 | adding modified |
|
148 | adding modified | |
149 | adding removed |
|
149 | adding removed | |
150 | $ hg log --color=debug |
|
150 | $ hg log --color=debug | |
151 | [log.changeset changeset.draft|changeset: 0:389aef86a55e] |
|
151 | [log.changeset changeset.draft|changeset: 0:389aef86a55e] | |
152 | [log.tag|tag: tip] |
|
152 | [log.tag|tag: tip] | |
153 | [log.user|user: test] |
|
153 | [log.user|user: test] | |
154 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
154 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
155 | [log.summary|summary: initial checkin] |
|
155 | [log.summary|summary: initial checkin] | |
156 |
|
156 | |||
157 | Labels on empty strings should not be displayed, labels on custom |
|
157 | Labels on empty strings should not be displayed, labels on custom | |
158 | templates should be. |
|
158 | templates should be. | |
159 |
|
159 | |||
160 | $ hg log --color=debug -T '{label("my.label",author)}\n{label("skipped.label","")}' |
|
160 | $ hg log --color=debug -T '{label("my.label",author)}\n{label("skipped.label","")}' | |
161 | [my.label|test] |
|
161 | [my.label|test] | |
162 | $ touch modified added unknown ignored |
|
162 | $ touch modified added unknown ignored | |
163 | $ hg add added |
|
163 | $ hg add added | |
164 | $ hg remove removed |
|
164 | $ hg remove removed | |
165 | $ rm deleted |
|
165 | $ rm deleted | |
166 |
|
166 | |||
167 | hg status: |
|
167 | hg status: | |
168 |
|
168 | |||
169 | $ hg status --color=always |
|
169 | $ hg status --color=always | |
170 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) |
|
170 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) | |
171 | \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc) |
|
171 | \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc) | |
172 | \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc) |
|
172 | \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc) | |
173 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc) |
|
173 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc) | |
174 |
|
174 | |||
175 | hg status modified added removed deleted unknown never-existed ignored: |
|
175 | hg status modified added removed deleted unknown never-existed ignored: | |
176 |
|
176 | |||
177 | $ hg status --color=always modified added removed deleted unknown never-existed ignored |
|
177 | $ hg status --color=always modified added removed deleted unknown never-existed ignored | |
178 | never-existed: * (glob) |
|
178 | never-existed: * (glob) | |
179 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) |
|
179 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) | |
180 | \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc) |
|
180 | \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc) | |
181 | \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc) |
|
181 | \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc) | |
182 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc) |
|
182 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc) | |
183 |
|
183 | |||
184 | $ hg copy modified copied |
|
184 | $ hg copy modified copied | |
185 |
|
185 | |||
186 | hg status -C: |
|
186 | hg status -C: | |
187 |
|
187 | |||
188 | $ hg status --color=always -C |
|
188 | $ hg status --color=always -C | |
189 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) |
|
189 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) | |
190 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1mcopied\x1b[0m (esc) |
|
190 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1mcopied\x1b[0m (esc) | |
191 | \x1b[0;0m modified\x1b[0m (esc) |
|
191 | \x1b[0;0m modified\x1b[0m (esc) | |
192 | \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc) |
|
192 | \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc) | |
193 | \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc) |
|
193 | \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc) | |
194 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc) |
|
194 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc) | |
195 |
|
195 | |||
196 | hg status -A: |
|
196 | hg status -A: | |
197 |
|
197 | |||
198 | $ hg status --color=always -A |
|
198 | $ hg status --color=always -A | |
199 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) |
|
199 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) | |
200 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1mcopied\x1b[0m (esc) |
|
200 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1mcopied\x1b[0m (esc) | |
201 | \x1b[0;0m modified\x1b[0m (esc) |
|
201 | \x1b[0;0m modified\x1b[0m (esc) | |
202 | \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc) |
|
202 | \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc) | |
203 | \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc) |
|
203 | \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc) | |
204 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc) |
|
204 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc) | |
205 | \x1b[0;30;1mI \x1b[0m\x1b[0;30;1mignored\x1b[0m (esc) |
|
205 | \x1b[0;30;1mI \x1b[0m\x1b[0;30;1mignored\x1b[0m (esc) | |
206 | \x1b[0;0mC \x1b[0m\x1b[0;0m.hgignore\x1b[0m (esc) |
|
206 | \x1b[0;0mC \x1b[0m\x1b[0;0m.hgignore\x1b[0m (esc) | |
207 | \x1b[0;0mC \x1b[0m\x1b[0;0mmodified\x1b[0m (esc) |
|
207 | \x1b[0;0mC \x1b[0m\x1b[0;0mmodified\x1b[0m (esc) | |
208 |
|
208 | |||
209 |
|
209 | |||
210 | hg status -A (with terminfo color): |
|
210 | hg status -A (with terminfo color): | |
211 |
|
211 | |||
212 | #if tic |
|
212 | #if tic | |
213 |
|
213 | |||
214 | $ mkdir "$TESTTMP/terminfo" |
|
214 | $ mkdir "$TESTTMP/terminfo" | |
215 | $ TERMINFO="$TESTTMP/terminfo" tic "$TESTDIR/hgterm.ti" |
|
215 | $ TERMINFO="$TESTTMP/terminfo" tic "$TESTDIR/hgterm.ti" | |
216 | $ TERM=hgterm TERMINFO="$TESTTMP/terminfo" hg status --config color.mode=terminfo --color=always -A |
|
216 | $ TERM=hgterm TERMINFO="$TESTTMP/terminfo" hg status --config color.mode=terminfo --color=always -A | |
217 | \x1b[30m\x1b[32m\x1b[1mA \x1b[30m\x1b[30m\x1b[32m\x1b[1madded\x1b[30m (esc) |
|
217 | \x1b[30m\x1b[32m\x1b[1mA \x1b[30m\x1b[30m\x1b[32m\x1b[1madded\x1b[30m (esc) | |
218 | \x1b[30m\x1b[32m\x1b[1mA \x1b[30m\x1b[30m\x1b[32m\x1b[1mcopied\x1b[30m (esc) |
|
218 | \x1b[30m\x1b[32m\x1b[1mA \x1b[30m\x1b[30m\x1b[32m\x1b[1mcopied\x1b[30m (esc) | |
219 | \x1b[30m\x1b[30m modified\x1b[30m (esc) |
|
219 | \x1b[30m\x1b[30m modified\x1b[30m (esc) | |
220 | \x1b[30m\x1b[31m\x1b[1mR \x1b[30m\x1b[30m\x1b[31m\x1b[1mremoved\x1b[30m (esc) |
|
220 | \x1b[30m\x1b[31m\x1b[1mR \x1b[30m\x1b[30m\x1b[31m\x1b[1mremoved\x1b[30m (esc) | |
221 | \x1b[30m\x1b[36m\x1b[1m\x1b[4m! \x1b[30m\x1b[30m\x1b[36m\x1b[1m\x1b[4mdeleted\x1b[30m (esc) |
|
221 | \x1b[30m\x1b[36m\x1b[1m\x1b[4m! \x1b[30m\x1b[30m\x1b[36m\x1b[1m\x1b[4mdeleted\x1b[30m (esc) | |
222 | \x1b[30m\x1b[35m\x1b[1m\x1b[4m? \x1b[30m\x1b[30m\x1b[35m\x1b[1m\x1b[4munknown\x1b[30m (esc) |
|
222 | \x1b[30m\x1b[35m\x1b[1m\x1b[4m? \x1b[30m\x1b[30m\x1b[35m\x1b[1m\x1b[4munknown\x1b[30m (esc) | |
223 | \x1b[30m\x1b[30m\x1b[1mI \x1b[30m\x1b[30m\x1b[30m\x1b[1mignored\x1b[30m (esc) |
|
223 | \x1b[30m\x1b[30m\x1b[1mI \x1b[30m\x1b[30m\x1b[30m\x1b[1mignored\x1b[30m (esc) | |
224 | \x1b[30m\x1b[30mC \x1b[30m\x1b[30m\x1b[30m.hgignore\x1b[30m (esc) |
|
224 | \x1b[30m\x1b[30mC \x1b[30m\x1b[30m\x1b[30m.hgignore\x1b[30m (esc) | |
225 | \x1b[30m\x1b[30mC \x1b[30m\x1b[30m\x1b[30mmodified\x1b[30m (esc) |
|
225 | \x1b[30m\x1b[30mC \x1b[30m\x1b[30m\x1b[30mmodified\x1b[30m (esc) | |
226 |
|
226 | |||
227 | #endif |
|
227 | #endif | |
228 |
|
228 | |||
229 |
|
229 | |||
230 | $ echo "^ignoreddir$" > .hgignore |
|
230 | $ echo "^ignoreddir$" > .hgignore | |
231 | $ mkdir ignoreddir |
|
231 | $ mkdir ignoreddir | |
232 | $ touch ignoreddir/file |
|
232 | $ touch ignoreddir/file | |
233 |
|
233 | |||
234 | hg status ignoreddir/file: |
|
234 | hg status ignoreddir/file: | |
235 |
|
235 | |||
236 | $ hg status --color=always ignoreddir/file |
|
236 | $ hg status --color=always ignoreddir/file | |
237 |
|
237 | |||
238 | hg status -i ignoreddir/file: |
|
238 | hg status -i ignoreddir/file: | |
239 |
|
239 | |||
240 | $ hg status --color=always -i ignoreddir/file |
|
240 | $ hg status --color=always -i ignoreddir/file | |
241 | \x1b[0;30;1mI \x1b[0m\x1b[0;30;1mignoreddir/file\x1b[0m (esc) |
|
241 | \x1b[0;30;1mI \x1b[0m\x1b[0;30;1mignoreddir/file\x1b[0m (esc) | |
242 | $ cd .. |
|
242 | $ cd .. | |
243 |
|
243 | |||
244 | check 'status -q' and some combinations |
|
244 | check 'status -q' and some combinations | |
245 |
|
245 | |||
246 | $ hg init repo3 |
|
246 | $ hg init repo3 | |
247 | $ cd repo3 |
|
247 | $ cd repo3 | |
248 | $ touch modified removed deleted ignored |
|
248 | $ touch modified removed deleted ignored | |
249 | $ echo "^ignored$" > .hgignore |
|
249 | $ echo "^ignored$" > .hgignore | |
250 | $ hg commit -A -m 'initial checkin' |
|
250 | $ hg commit -A -m 'initial checkin' | |
251 | adding .hgignore |
|
251 | adding .hgignore | |
252 | adding deleted |
|
252 | adding deleted | |
253 | adding modified |
|
253 | adding modified | |
254 | adding removed |
|
254 | adding removed | |
255 | $ touch added unknown ignored |
|
255 | $ touch added unknown ignored | |
256 | $ hg add added |
|
256 | $ hg add added | |
257 | $ echo "test" >> modified |
|
257 | $ echo "test" >> modified | |
258 | $ hg remove removed |
|
258 | $ hg remove removed | |
259 | $ rm deleted |
|
259 | $ rm deleted | |
260 | $ hg copy modified copied |
|
260 | $ hg copy modified copied | |
261 |
|
261 | |||
262 | test unknown color |
|
262 | test unknown color | |
263 |
|
263 | |||
264 | $ hg --config color.status.modified=periwinkle status --color=always |
|
264 | $ hg --config color.status.modified=periwinkle status --color=always | |
265 | ignoring unknown color/effect 'periwinkle' (configured in color.status.modified) |
|
265 | ignoring unknown color/effect 'periwinkle' (configured in color.status.modified) | |
266 | M modified |
|
266 | M modified | |
267 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) |
|
267 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) | |
268 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1mcopied\x1b[0m (esc) |
|
268 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1mcopied\x1b[0m (esc) | |
269 | \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc) |
|
269 | \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc) | |
270 | \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc) |
|
270 | \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc) | |
271 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc) |
|
271 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc) | |
272 |
|
272 | |||
273 | Run status with 2 different flags. |
|
273 | Run status with 2 different flags. | |
274 | Check if result is the same or different. |
|
274 | Check if result is the same or different. | |
275 | If result is not as expected, raise error |
|
275 | If result is not as expected, raise error | |
276 |
|
276 | |||
277 | $ assert() { |
|
277 | $ assert() { | |
278 | > hg status --color=always $1 > ../a |
|
278 | > hg status --color=always $1 > ../a | |
279 | > hg status --color=always $2 > ../b |
|
279 | > hg status --color=always $2 > ../b | |
280 | > if diff ../a ../b > /dev/null; then |
|
280 | > if diff ../a ../b > /dev/null; then | |
281 | > out=0 |
|
281 | > out=0 | |
282 | > else |
|
282 | > else | |
283 | > out=1 |
|
283 | > out=1 | |
284 | > fi |
|
284 | > fi | |
285 | > if [ $3 -eq 0 ]; then |
|
285 | > if [ $3 -eq 0 ]; then | |
286 | > df="same" |
|
286 | > df="same" | |
287 | > else |
|
287 | > else | |
288 | > df="different" |
|
288 | > df="different" | |
289 | > fi |
|
289 | > fi | |
290 | > if [ $out -ne $3 ]; then |
|
290 | > if [ $out -ne $3 ]; then | |
291 | > echo "Error on $1 and $2, should be $df." |
|
291 | > echo "Error on $1 and $2, should be $df." | |
292 | > fi |
|
292 | > fi | |
293 | > } |
|
293 | > } | |
294 |
|
294 | |||
295 | assert flag1 flag2 [0-same | 1-different] |
|
295 | assert flag1 flag2 [0-same | 1-different] | |
296 |
|
296 | |||
297 | $ assert "-q" "-mard" 0 |
|
297 | $ assert "-q" "-mard" 0 | |
298 | $ assert "-A" "-marduicC" 0 |
|
298 | $ assert "-A" "-marduicC" 0 | |
299 | $ assert "-qA" "-mardcC" 0 |
|
299 | $ assert "-qA" "-mardcC" 0 | |
300 | $ assert "-qAui" "-A" 0 |
|
300 | $ assert "-qAui" "-A" 0 | |
301 | $ assert "-qAu" "-marducC" 0 |
|
301 | $ assert "-qAu" "-marducC" 0 | |
302 | $ assert "-qAi" "-mardicC" 0 |
|
302 | $ assert "-qAi" "-mardicC" 0 | |
303 | $ assert "-qu" "-u" 0 |
|
303 | $ assert "-qu" "-u" 0 | |
304 | $ assert "-q" "-u" 1 |
|
304 | $ assert "-q" "-u" 1 | |
305 | $ assert "-m" "-a" 1 |
|
305 | $ assert "-m" "-a" 1 | |
306 | $ assert "-r" "-d" 1 |
|
306 | $ assert "-r" "-d" 1 | |
307 | $ cd .. |
|
307 | $ cd .. | |
308 |
|
308 | |||
309 | test 'resolve -l' |
|
309 | test 'resolve -l' | |
310 |
|
310 | |||
311 | $ hg init repo4 |
|
311 | $ hg init repo4 | |
312 | $ cd repo4 |
|
312 | $ cd repo4 | |
313 | $ echo "file a" > a |
|
313 | $ echo "file a" > a | |
314 | $ echo "file b" > b |
|
314 | $ echo "file b" > b | |
315 | $ hg add a b |
|
315 | $ hg add a b | |
316 | $ hg commit -m "initial" |
|
316 | $ hg commit -m "initial" | |
317 | $ echo "file a change 1" > a |
|
317 | $ echo "file a change 1" > a | |
318 | $ echo "file b change 1" > b |
|
318 | $ echo "file b change 1" > b | |
319 | $ hg commit -m "head 1" |
|
319 | $ hg commit -m "head 1" | |
320 | $ hg update 0 |
|
320 | $ hg update 0 | |
321 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
321 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
322 | $ echo "file a change 2" > a |
|
322 | $ echo "file a change 2" > a | |
323 | $ echo "file b change 2" > b |
|
323 | $ echo "file b change 2" > b | |
324 | $ hg commit -m "head 2" |
|
324 | $ hg commit -m "head 2" | |
325 | created new head |
|
325 | created new head | |
326 | $ hg merge |
|
326 | $ hg merge | |
327 | merging a |
|
327 | merging a | |
|
328 | merging b | |||
328 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
329 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
329 | merging b |
|
|||
330 | warning: conflicts while merging b! (edit, then use 'hg resolve --mark') |
|
330 | warning: conflicts while merging b! (edit, then use 'hg resolve --mark') | |
331 | 0 files updated, 0 files merged, 0 files removed, 2 files unresolved |
|
331 | 0 files updated, 0 files merged, 0 files removed, 2 files unresolved | |
332 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
332 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
333 | [1] |
|
333 | [1] | |
334 | $ hg resolve -m b |
|
334 | $ hg resolve -m b | |
335 |
|
335 | |||
336 | hg resolve with one unresolved, one resolved: |
|
336 | hg resolve with one unresolved, one resolved: | |
337 |
|
337 | |||
338 | $ hg resolve --color=always -l |
|
338 | $ hg resolve --color=always -l | |
339 | \x1b[0;31;1mU \x1b[0m\x1b[0;31;1ma\x1b[0m (esc) |
|
339 | \x1b[0;31;1mU \x1b[0m\x1b[0;31;1ma\x1b[0m (esc) | |
340 | \x1b[0;32;1mR \x1b[0m\x1b[0;32;1mb\x1b[0m (esc) |
|
340 | \x1b[0;32;1mR \x1b[0m\x1b[0;32;1mb\x1b[0m (esc) | |
341 |
|
341 | |||
342 | color coding of error message with current availability of curses |
|
342 | color coding of error message with current availability of curses | |
343 |
|
343 | |||
344 | $ hg unknowncommand > /dev/null |
|
344 | $ hg unknowncommand > /dev/null | |
345 | hg: unknown command 'unknowncommand' |
|
345 | hg: unknown command 'unknowncommand' | |
346 | [255] |
|
346 | [255] | |
347 |
|
347 | |||
348 | color coding of error message without curses |
|
348 | color coding of error message without curses | |
349 |
|
349 | |||
350 | $ echo 'raise ImportError' > curses.py |
|
350 | $ echo 'raise ImportError' > curses.py | |
351 | $ PYTHONPATH=`pwd`:$PYTHONPATH hg unknowncommand > /dev/null |
|
351 | $ PYTHONPATH=`pwd`:$PYTHONPATH hg unknowncommand > /dev/null | |
352 | hg: unknown command 'unknowncommand' |
|
352 | hg: unknown command 'unknowncommand' | |
353 | [255] |
|
353 | [255] | |
354 |
|
354 | |||
355 | $ cd .. |
|
355 | $ cd .. |
@@ -1,1758 +1,1759 b'' | |||||
1 | Let commit recurse into subrepos by default to match pre-2.0 behavior: |
|
1 | Let commit recurse into subrepos by default to match pre-2.0 behavior: | |
2 |
|
2 | |||
3 | $ echo "[ui]" >> $HGRCPATH |
|
3 | $ echo "[ui]" >> $HGRCPATH | |
4 | $ echo "commitsubrepos = Yes" >> $HGRCPATH |
|
4 | $ echo "commitsubrepos = Yes" >> $HGRCPATH | |
5 |
|
5 | |||
6 | $ hg init t |
|
6 | $ hg init t | |
7 | $ cd t |
|
7 | $ cd t | |
8 |
|
8 | |||
9 | first revision, no sub |
|
9 | first revision, no sub | |
10 |
|
10 | |||
11 | $ echo a > a |
|
11 | $ echo a > a | |
12 | $ hg ci -Am0 |
|
12 | $ hg ci -Am0 | |
13 | adding a |
|
13 | adding a | |
14 |
|
14 | |||
15 | add first sub |
|
15 | add first sub | |
16 |
|
16 | |||
17 | $ echo s = s > .hgsub |
|
17 | $ echo s = s > .hgsub | |
18 | $ hg add .hgsub |
|
18 | $ hg add .hgsub | |
19 | $ hg init s |
|
19 | $ hg init s | |
20 | $ echo a > s/a |
|
20 | $ echo a > s/a | |
21 |
|
21 | |||
22 | Issue2232: committing a subrepo without .hgsub |
|
22 | Issue2232: committing a subrepo without .hgsub | |
23 |
|
23 | |||
24 | $ hg ci -mbad s |
|
24 | $ hg ci -mbad s | |
25 | abort: can't commit subrepos without .hgsub |
|
25 | abort: can't commit subrepos without .hgsub | |
26 | [255] |
|
26 | [255] | |
27 |
|
27 | |||
28 | $ hg -R s add s/a |
|
28 | $ hg -R s add s/a | |
29 | $ hg files -S |
|
29 | $ hg files -S | |
30 | .hgsub |
|
30 | .hgsub | |
31 | a |
|
31 | a | |
32 | s/a (glob) |
|
32 | s/a (glob) | |
33 |
|
33 | |||
34 | $ hg -R s ci -Ams0 |
|
34 | $ hg -R s ci -Ams0 | |
35 | $ hg sum |
|
35 | $ hg sum | |
36 | parent: 0:f7b1eb17ad24 tip |
|
36 | parent: 0:f7b1eb17ad24 tip | |
37 | 0 |
|
37 | 0 | |
38 | branch: default |
|
38 | branch: default | |
39 | commit: 1 added, 1 subrepos |
|
39 | commit: 1 added, 1 subrepos | |
40 | update: (current) |
|
40 | update: (current) | |
41 | phases: 1 draft |
|
41 | phases: 1 draft | |
42 | $ hg ci -m1 |
|
42 | $ hg ci -m1 | |
43 |
|
43 | |||
44 | test handling .hgsubstate "added" explicitly. |
|
44 | test handling .hgsubstate "added" explicitly. | |
45 |
|
45 | |||
46 | $ hg parents --template '{node}\n{files}\n' |
|
46 | $ hg parents --template '{node}\n{files}\n' | |
47 | 7cf8cfea66e410e8e3336508dfeec07b3192de51 |
|
47 | 7cf8cfea66e410e8e3336508dfeec07b3192de51 | |
48 | .hgsub .hgsubstate |
|
48 | .hgsub .hgsubstate | |
49 | $ hg rollback -q |
|
49 | $ hg rollback -q | |
50 | $ hg add .hgsubstate |
|
50 | $ hg add .hgsubstate | |
51 | $ hg ci -m1 |
|
51 | $ hg ci -m1 | |
52 | $ hg parents --template '{node}\n{files}\n' |
|
52 | $ hg parents --template '{node}\n{files}\n' | |
53 | 7cf8cfea66e410e8e3336508dfeec07b3192de51 |
|
53 | 7cf8cfea66e410e8e3336508dfeec07b3192de51 | |
54 | .hgsub .hgsubstate |
|
54 | .hgsub .hgsubstate | |
55 |
|
55 | |||
56 | Revert subrepo and test subrepo fileset keyword: |
|
56 | Revert subrepo and test subrepo fileset keyword: | |
57 |
|
57 | |||
58 | $ echo b > s/a |
|
58 | $ echo b > s/a | |
59 | $ hg revert --dry-run "set:subrepo('glob:s*')" |
|
59 | $ hg revert --dry-run "set:subrepo('glob:s*')" | |
60 | reverting subrepo s |
|
60 | reverting subrepo s | |
61 | reverting s/a (glob) |
|
61 | reverting s/a (glob) | |
62 | $ cat s/a |
|
62 | $ cat s/a | |
63 | b |
|
63 | b | |
64 | $ hg revert "set:subrepo('glob:s*')" |
|
64 | $ hg revert "set:subrepo('glob:s*')" | |
65 | reverting subrepo s |
|
65 | reverting subrepo s | |
66 | reverting s/a (glob) |
|
66 | reverting s/a (glob) | |
67 | $ cat s/a |
|
67 | $ cat s/a | |
68 | a |
|
68 | a | |
69 | $ rm s/a.orig |
|
69 | $ rm s/a.orig | |
70 |
|
70 | |||
71 | Revert subrepo with no backup. The "reverting s/a" line is gone since |
|
71 | Revert subrepo with no backup. The "reverting s/a" line is gone since | |
72 | we're really running 'hg update' in the subrepo: |
|
72 | we're really running 'hg update' in the subrepo: | |
73 |
|
73 | |||
74 | $ echo b > s/a |
|
74 | $ echo b > s/a | |
75 | $ hg revert --no-backup s |
|
75 | $ hg revert --no-backup s | |
76 | reverting subrepo s |
|
76 | reverting subrepo s | |
77 |
|
77 | |||
78 | Issue2022: update -C |
|
78 | Issue2022: update -C | |
79 |
|
79 | |||
80 | $ echo b > s/a |
|
80 | $ echo b > s/a | |
81 | $ hg sum |
|
81 | $ hg sum | |
82 | parent: 1:7cf8cfea66e4 tip |
|
82 | parent: 1:7cf8cfea66e4 tip | |
83 | 1 |
|
83 | 1 | |
84 | branch: default |
|
84 | branch: default | |
85 | commit: 1 subrepos |
|
85 | commit: 1 subrepos | |
86 | update: (current) |
|
86 | update: (current) | |
87 | phases: 2 draft |
|
87 | phases: 2 draft | |
88 | $ hg co -C 1 |
|
88 | $ hg co -C 1 | |
89 | 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 | |
90 | $ hg sum |
|
90 | $ hg sum | |
91 | parent: 1:7cf8cfea66e4 tip |
|
91 | parent: 1:7cf8cfea66e4 tip | |
92 | 1 |
|
92 | 1 | |
93 | branch: default |
|
93 | branch: default | |
94 | commit: (clean) |
|
94 | commit: (clean) | |
95 | update: (current) |
|
95 | update: (current) | |
96 | phases: 2 draft |
|
96 | phases: 2 draft | |
97 |
|
97 | |||
98 | commands that require a clean repo should respect subrepos |
|
98 | commands that require a clean repo should respect subrepos | |
99 |
|
99 | |||
100 | $ echo b >> s/a |
|
100 | $ echo b >> s/a | |
101 | $ hg backout tip |
|
101 | $ hg backout tip | |
102 | abort: uncommitted changes in subrepository 's' |
|
102 | abort: uncommitted changes in subrepository 's' | |
103 | [255] |
|
103 | [255] | |
104 | $ hg revert -C -R s s/a |
|
104 | $ hg revert -C -R s s/a | |
105 |
|
105 | |||
106 | add sub sub |
|
106 | add sub sub | |
107 |
|
107 | |||
108 | $ echo ss = ss > s/.hgsub |
|
108 | $ echo ss = ss > s/.hgsub | |
109 | $ hg init s/ss |
|
109 | $ hg init s/ss | |
110 | $ echo a > s/ss/a |
|
110 | $ echo a > s/ss/a | |
111 | $ hg -R s add s/.hgsub |
|
111 | $ hg -R s add s/.hgsub | |
112 | $ hg -R s/ss add s/ss/a |
|
112 | $ hg -R s/ss add s/ss/a | |
113 | $ hg sum |
|
113 | $ hg sum | |
114 | parent: 1:7cf8cfea66e4 tip |
|
114 | parent: 1:7cf8cfea66e4 tip | |
115 | 1 |
|
115 | 1 | |
116 | branch: default |
|
116 | branch: default | |
117 | commit: 1 subrepos |
|
117 | commit: 1 subrepos | |
118 | update: (current) |
|
118 | update: (current) | |
119 | phases: 2 draft |
|
119 | phases: 2 draft | |
120 | $ hg ci -m2 |
|
120 | $ hg ci -m2 | |
121 | committing subrepository s |
|
121 | committing subrepository s | |
122 | committing subrepository s/ss (glob) |
|
122 | committing subrepository s/ss (glob) | |
123 | $ hg sum |
|
123 | $ hg sum | |
124 | parent: 2:df30734270ae tip |
|
124 | parent: 2:df30734270ae tip | |
125 | 2 |
|
125 | 2 | |
126 | branch: default |
|
126 | branch: default | |
127 | commit: (clean) |
|
127 | commit: (clean) | |
128 | update: (current) |
|
128 | update: (current) | |
129 | phases: 3 draft |
|
129 | phases: 3 draft | |
130 |
|
130 | |||
131 | test handling .hgsubstate "modified" explicitly. |
|
131 | test handling .hgsubstate "modified" explicitly. | |
132 |
|
132 | |||
133 | $ hg parents --template '{node}\n{files}\n' |
|
133 | $ hg parents --template '{node}\n{files}\n' | |
134 | df30734270ae757feb35e643b7018e818e78a9aa |
|
134 | df30734270ae757feb35e643b7018e818e78a9aa | |
135 | .hgsubstate |
|
135 | .hgsubstate | |
136 | $ hg rollback -q |
|
136 | $ hg rollback -q | |
137 | $ hg status -A .hgsubstate |
|
137 | $ hg status -A .hgsubstate | |
138 | M .hgsubstate |
|
138 | M .hgsubstate | |
139 | $ hg ci -m2 |
|
139 | $ hg ci -m2 | |
140 | $ hg parents --template '{node}\n{files}\n' |
|
140 | $ hg parents --template '{node}\n{files}\n' | |
141 | df30734270ae757feb35e643b7018e818e78a9aa |
|
141 | df30734270ae757feb35e643b7018e818e78a9aa | |
142 | .hgsubstate |
|
142 | .hgsubstate | |
143 |
|
143 | |||
144 | bump sub rev (and check it is ignored by ui.commitsubrepos) |
|
144 | bump sub rev (and check it is ignored by ui.commitsubrepos) | |
145 |
|
145 | |||
146 | $ echo b > s/a |
|
146 | $ echo b > s/a | |
147 | $ hg -R s ci -ms1 |
|
147 | $ hg -R s ci -ms1 | |
148 | $ hg --config ui.commitsubrepos=no ci -m3 |
|
148 | $ hg --config ui.commitsubrepos=no ci -m3 | |
149 |
|
149 | |||
150 | leave sub dirty (and check ui.commitsubrepos=no aborts the commit) |
|
150 | leave sub dirty (and check ui.commitsubrepos=no aborts the commit) | |
151 |
|
151 | |||
152 | $ echo c > s/a |
|
152 | $ echo c > s/a | |
153 | $ hg --config ui.commitsubrepos=no ci -m4 |
|
153 | $ hg --config ui.commitsubrepos=no ci -m4 | |
154 | abort: uncommitted changes in subrepository 's' |
|
154 | abort: uncommitted changes in subrepository 's' | |
155 | (use --subrepos for recursive commit) |
|
155 | (use --subrepos for recursive commit) | |
156 | [255] |
|
156 | [255] | |
157 | $ hg id |
|
157 | $ hg id | |
158 | f6affe3fbfaa+ tip |
|
158 | f6affe3fbfaa+ tip | |
159 | $ hg -R s ci -mc |
|
159 | $ hg -R s ci -mc | |
160 | $ hg id |
|
160 | $ hg id | |
161 | f6affe3fbfaa+ tip |
|
161 | f6affe3fbfaa+ tip | |
162 | $ echo d > s/a |
|
162 | $ echo d > s/a | |
163 | $ hg ci -m4 |
|
163 | $ hg ci -m4 | |
164 | committing subrepository s |
|
164 | committing subrepository s | |
165 | $ hg tip -R s |
|
165 | $ hg tip -R s | |
166 | changeset: 4:02dcf1d70411 |
|
166 | changeset: 4:02dcf1d70411 | |
167 | tag: tip |
|
167 | tag: tip | |
168 | user: test |
|
168 | user: test | |
169 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
169 | date: Thu Jan 01 00:00:00 1970 +0000 | |
170 | summary: 4 |
|
170 | summary: 4 | |
171 |
|
171 | |||
172 |
|
172 | |||
173 | check caching |
|
173 | check caching | |
174 |
|
174 | |||
175 | $ hg co 0 |
|
175 | $ hg co 0 | |
176 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
176 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
177 | $ hg debugsub |
|
177 | $ hg debugsub | |
178 |
|
178 | |||
179 | restore |
|
179 | restore | |
180 |
|
180 | |||
181 | $ hg co |
|
181 | $ hg co | |
182 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
182 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
183 | $ hg debugsub |
|
183 | $ hg debugsub | |
184 | path s |
|
184 | path s | |
185 | source s |
|
185 | source s | |
186 | revision 02dcf1d704118aee3ee306ccfa1910850d5b05ef |
|
186 | revision 02dcf1d704118aee3ee306ccfa1910850d5b05ef | |
187 |
|
187 | |||
188 | new branch for merge tests |
|
188 | new branch for merge tests | |
189 |
|
189 | |||
190 | $ hg co 1 |
|
190 | $ hg co 1 | |
191 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
191 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
192 | $ echo t = t >> .hgsub |
|
192 | $ echo t = t >> .hgsub | |
193 | $ hg init t |
|
193 | $ hg init t | |
194 | $ echo t > t/t |
|
194 | $ echo t > t/t | |
195 | $ hg -R t add t |
|
195 | $ hg -R t add t | |
196 | adding t/t (glob) |
|
196 | adding t/t (glob) | |
197 |
|
197 | |||
198 | 5 |
|
198 | 5 | |
199 |
|
199 | |||
200 | $ hg ci -m5 # add sub |
|
200 | $ hg ci -m5 # add sub | |
201 | committing subrepository t |
|
201 | committing subrepository t | |
202 | created new head |
|
202 | created new head | |
203 | $ echo t2 > t/t |
|
203 | $ echo t2 > t/t | |
204 |
|
204 | |||
205 | 6 |
|
205 | 6 | |
206 |
|
206 | |||
207 | $ hg st -R s |
|
207 | $ hg st -R s | |
208 | $ hg ci -m6 # change sub |
|
208 | $ hg ci -m6 # change sub | |
209 | committing subrepository t |
|
209 | committing subrepository t | |
210 | $ hg debugsub |
|
210 | $ hg debugsub | |
211 | path s |
|
211 | path s | |
212 | source s |
|
212 | source s | |
213 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
213 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 | |
214 | path t |
|
214 | path t | |
215 | source t |
|
215 | source t | |
216 | revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad |
|
216 | revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad | |
217 | $ echo t3 > t/t |
|
217 | $ echo t3 > t/t | |
218 |
|
218 | |||
219 | 7 |
|
219 | 7 | |
220 |
|
220 | |||
221 | $ hg ci -m7 # change sub again for conflict test |
|
221 | $ hg ci -m7 # change sub again for conflict test | |
222 | committing subrepository t |
|
222 | committing subrepository t | |
223 | $ hg rm .hgsub |
|
223 | $ hg rm .hgsub | |
224 |
|
224 | |||
225 | 8 |
|
225 | 8 | |
226 |
|
226 | |||
227 | $ hg ci -m8 # remove sub |
|
227 | $ hg ci -m8 # remove sub | |
228 |
|
228 | |||
229 | test handling .hgsubstate "removed" explicitly. |
|
229 | test handling .hgsubstate "removed" explicitly. | |
230 |
|
230 | |||
231 | $ hg parents --template '{node}\n{files}\n' |
|
231 | $ hg parents --template '{node}\n{files}\n' | |
232 | 96615c1dad2dc8e3796d7332c77ce69156f7b78e |
|
232 | 96615c1dad2dc8e3796d7332c77ce69156f7b78e | |
233 | .hgsub .hgsubstate |
|
233 | .hgsub .hgsubstate | |
234 | $ hg rollback -q |
|
234 | $ hg rollback -q | |
235 | $ hg remove .hgsubstate |
|
235 | $ hg remove .hgsubstate | |
236 | $ hg ci -m8 |
|
236 | $ hg ci -m8 | |
237 | $ hg parents --template '{node}\n{files}\n' |
|
237 | $ hg parents --template '{node}\n{files}\n' | |
238 | 96615c1dad2dc8e3796d7332c77ce69156f7b78e |
|
238 | 96615c1dad2dc8e3796d7332c77ce69156f7b78e | |
239 | .hgsub .hgsubstate |
|
239 | .hgsub .hgsubstate | |
240 |
|
240 | |||
241 | merge tests |
|
241 | merge tests | |
242 |
|
242 | |||
243 | $ hg co -C 3 |
|
243 | $ hg co -C 3 | |
244 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
244 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
245 | $ hg merge 5 # test adding |
|
245 | $ hg merge 5 # test adding | |
246 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
246 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
247 | (branch merge, don't forget to commit) |
|
247 | (branch merge, don't forget to commit) | |
248 | $ hg debugsub |
|
248 | $ hg debugsub | |
249 | path s |
|
249 | path s | |
250 | source s |
|
250 | source s | |
251 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 |
|
251 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 | |
252 | path t |
|
252 | path t | |
253 | source t |
|
253 | source t | |
254 | revision 60ca1237c19474e7a3978b0dc1ca4e6f36d51382 |
|
254 | revision 60ca1237c19474e7a3978b0dc1ca4e6f36d51382 | |
255 | $ hg ci -m9 |
|
255 | $ hg ci -m9 | |
256 | created new head |
|
256 | created new head | |
257 | $ hg merge 6 --debug # test change |
|
257 | $ hg merge 6 --debug # test change | |
258 | searching for copies back to rev 2 |
|
258 | searching for copies back to rev 2 | |
259 | resolving manifests |
|
259 | resolving manifests | |
260 | branchmerge: True, force: False, partial: False |
|
260 | branchmerge: True, force: False, partial: False | |
261 | ancestor: 1f14a2e2d3ec, local: f0d2028bf86d+, remote: 1831e14459c4 |
|
261 | ancestor: 1f14a2e2d3ec, local: f0d2028bf86d+, remote: 1831e14459c4 | |
262 | .hgsubstate: versions differ -> m |
|
262 | .hgsubstate: versions differ -> m (premerge) | |
263 | subrepo merge f0d2028bf86d+ 1831e14459c4 1f14a2e2d3ec |
|
263 | subrepo merge f0d2028bf86d+ 1831e14459c4 1f14a2e2d3ec | |
264 | subrepo t: other changed, get t:6747d179aa9a688023c4b0cad32e4c92bb7f34ad:hg |
|
264 | subrepo t: other changed, get t:6747d179aa9a688023c4b0cad32e4c92bb7f34ad:hg | |
265 | getting subrepo t |
|
265 | getting subrepo t | |
266 | resolving manifests |
|
266 | resolving manifests | |
267 | branchmerge: False, force: False, partial: False |
|
267 | branchmerge: False, force: False, partial: False | |
268 | ancestor: 60ca1237c194, local: 60ca1237c194+, remote: 6747d179aa9a |
|
268 | ancestor: 60ca1237c194, local: 60ca1237c194+, remote: 6747d179aa9a | |
269 | t: remote is newer -> g |
|
269 | t: remote is newer -> g | |
270 | getting t |
|
270 | getting t | |
271 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
271 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
272 | (branch merge, don't forget to commit) |
|
272 | (branch merge, don't forget to commit) | |
273 | $ hg debugsub |
|
273 | $ hg debugsub | |
274 | path s |
|
274 | path s | |
275 | source s |
|
275 | source s | |
276 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 |
|
276 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 | |
277 | path t |
|
277 | path t | |
278 | source t |
|
278 | source t | |
279 | revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad |
|
279 | revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad | |
280 | $ echo conflict > t/t |
|
280 | $ echo conflict > t/t | |
281 | $ hg ci -m10 |
|
281 | $ hg ci -m10 | |
282 | committing subrepository t |
|
282 | committing subrepository t | |
283 | $ HGMERGE=internal:merge hg merge --debug 7 # test conflict |
|
283 | $ HGMERGE=internal:merge hg merge --debug 7 # test conflict | |
284 | searching for copies back to rev 2 |
|
284 | searching for copies back to rev 2 | |
285 | resolving manifests |
|
285 | resolving manifests | |
286 | branchmerge: True, force: False, partial: False |
|
286 | branchmerge: True, force: False, partial: False | |
287 | ancestor: 1831e14459c4, local: e45c8b14af55+, remote: f94576341bcf |
|
287 | ancestor: 1831e14459c4, local: e45c8b14af55+, remote: f94576341bcf | |
288 | .hgsubstate: versions differ -> m |
|
288 | .hgsubstate: versions differ -> m (premerge) | |
289 | subrepo merge e45c8b14af55+ f94576341bcf 1831e14459c4 |
|
289 | subrepo merge e45c8b14af55+ f94576341bcf 1831e14459c4 | |
290 | subrepo t: both sides changed |
|
290 | subrepo t: both sides changed | |
291 | subrepository t diverged (local revision: 20a0db6fbf6c, remote revision: 7af322bc1198) |
|
291 | subrepository t diverged (local revision: 20a0db6fbf6c, remote revision: 7af322bc1198) | |
292 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
292 | (M)erge, keep (l)ocal or keep (r)emote? m | |
293 | merging subrepo t |
|
293 | merging subrepo t | |
294 | searching for copies back to rev 2 |
|
294 | searching for copies back to rev 2 | |
295 | resolving manifests |
|
295 | resolving manifests | |
296 | branchmerge: True, force: False, partial: False |
|
296 | branchmerge: True, force: False, partial: False | |
297 | ancestor: 6747d179aa9a, local: 20a0db6fbf6c+, remote: 7af322bc1198 |
|
297 | ancestor: 6747d179aa9a, local: 20a0db6fbf6c+, remote: 7af322bc1198 | |
298 | preserving t for resolve of t |
|
298 | preserving t for resolve of t | |
299 | t: versions differ -> m |
|
299 | t: versions differ -> m (premerge) | |
300 | picked tool ':merge' for t (binary False symlink False) |
|
300 | picked tool ':merge' for t (binary False symlink False) | |
301 | merging t |
|
301 | merging t | |
302 | my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a |
|
302 | my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a | |
|
303 | t: versions differ -> m (merge) | |||
303 | picked tool ':merge' for t (binary False symlink False) |
|
304 | picked tool ':merge' for t (binary False symlink False) | |
304 | my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a |
|
305 | my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a | |
305 | warning: conflicts while merging t! (edit, then use 'hg resolve --mark') |
|
306 | warning: conflicts while merging t! (edit, then use 'hg resolve --mark') | |
306 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
307 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
307 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
308 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
308 | subrepo t: merge with t:7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4:hg |
|
309 | subrepo t: merge with t:7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4:hg | |
309 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
310 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
310 | (branch merge, don't forget to commit) |
|
311 | (branch merge, don't forget to commit) | |
311 |
|
312 | |||
312 | should conflict |
|
313 | should conflict | |
313 |
|
314 | |||
314 | $ cat t/t |
|
315 | $ cat t/t | |
315 | <<<<<<< local: 20a0db6fbf6c - test: 10 |
|
316 | <<<<<<< local: 20a0db6fbf6c - test: 10 | |
316 | conflict |
|
317 | conflict | |
317 | ======= |
|
318 | ======= | |
318 | t3 |
|
319 | t3 | |
319 | >>>>>>> other: 7af322bc1198 - test: 7 |
|
320 | >>>>>>> other: 7af322bc1198 - test: 7 | |
320 |
|
321 | |||
321 | 11: remove subrepo t |
|
322 | 11: remove subrepo t | |
322 |
|
323 | |||
323 | $ hg co -C 5 |
|
324 | $ hg co -C 5 | |
324 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
325 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
325 | $ hg revert -r 4 .hgsub # remove t |
|
326 | $ hg revert -r 4 .hgsub # remove t | |
326 | $ hg ci -m11 |
|
327 | $ hg ci -m11 | |
327 | created new head |
|
328 | created new head | |
328 | $ hg debugsub |
|
329 | $ hg debugsub | |
329 | path s |
|
330 | path s | |
330 | source s |
|
331 | source s | |
331 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
332 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 | |
332 |
|
333 | |||
333 | local removed, remote changed, keep changed |
|
334 | local removed, remote changed, keep changed | |
334 |
|
335 | |||
335 | $ hg merge 6 |
|
336 | $ hg merge 6 | |
336 | remote changed subrepository t which local removed |
|
337 | remote changed subrepository t which local removed | |
337 | use (c)hanged version or (d)elete? c |
|
338 | use (c)hanged version or (d)elete? c | |
338 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
339 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
339 | (branch merge, don't forget to commit) |
|
340 | (branch merge, don't forget to commit) | |
340 | BROKEN: should include subrepo t |
|
341 | BROKEN: should include subrepo t | |
341 | $ hg debugsub |
|
342 | $ hg debugsub | |
342 | path s |
|
343 | path s | |
343 | source s |
|
344 | source s | |
344 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
345 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 | |
345 | $ cat .hgsubstate |
|
346 | $ cat .hgsubstate | |
346 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
347 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s | |
347 | 6747d179aa9a688023c4b0cad32e4c92bb7f34ad t |
|
348 | 6747d179aa9a688023c4b0cad32e4c92bb7f34ad t | |
348 | $ hg ci -m 'local removed, remote changed, keep changed' |
|
349 | $ hg ci -m 'local removed, remote changed, keep changed' | |
349 | BROKEN: should include subrepo t |
|
350 | BROKEN: should include subrepo t | |
350 | $ hg debugsub |
|
351 | $ hg debugsub | |
351 | path s |
|
352 | path s | |
352 | source s |
|
353 | source s | |
353 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
354 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 | |
354 | BROKEN: should include subrepo t |
|
355 | BROKEN: should include subrepo t | |
355 | $ cat .hgsubstate |
|
356 | $ cat .hgsubstate | |
356 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
357 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s | |
357 | $ cat t/t |
|
358 | $ cat t/t | |
358 | t2 |
|
359 | t2 | |
359 |
|
360 | |||
360 | local removed, remote changed, keep removed |
|
361 | local removed, remote changed, keep removed | |
361 |
|
362 | |||
362 | $ hg co -C 11 |
|
363 | $ hg co -C 11 | |
363 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
364 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
364 | $ hg merge --config ui.interactive=true 6 <<EOF |
|
365 | $ hg merge --config ui.interactive=true 6 <<EOF | |
365 | > d |
|
366 | > d | |
366 | > EOF |
|
367 | > EOF | |
367 | remote changed subrepository t which local removed |
|
368 | remote changed subrepository t which local removed | |
368 | use (c)hanged version or (d)elete? d |
|
369 | use (c)hanged version or (d)elete? d | |
369 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
370 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
370 | (branch merge, don't forget to commit) |
|
371 | (branch merge, don't forget to commit) | |
371 | $ hg debugsub |
|
372 | $ hg debugsub | |
372 | path s |
|
373 | path s | |
373 | source s |
|
374 | source s | |
374 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
375 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 | |
375 | $ cat .hgsubstate |
|
376 | $ cat .hgsubstate | |
376 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
377 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s | |
377 | $ hg ci -m 'local removed, remote changed, keep removed' |
|
378 | $ hg ci -m 'local removed, remote changed, keep removed' | |
378 | created new head |
|
379 | created new head | |
379 | $ hg debugsub |
|
380 | $ hg debugsub | |
380 | path s |
|
381 | path s | |
381 | source s |
|
382 | source s | |
382 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
383 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 | |
383 | $ cat .hgsubstate |
|
384 | $ cat .hgsubstate | |
384 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
385 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s | |
385 |
|
386 | |||
386 | local changed, remote removed, keep changed |
|
387 | local changed, remote removed, keep changed | |
387 |
|
388 | |||
388 | $ hg co -C 6 |
|
389 | $ hg co -C 6 | |
389 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
390 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
390 | $ hg merge 11 |
|
391 | $ hg merge 11 | |
391 | local changed subrepository t which remote removed |
|
392 | local changed subrepository t which remote removed | |
392 | use (c)hanged version or (d)elete? c |
|
393 | use (c)hanged version or (d)elete? c | |
393 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
394 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
394 | (branch merge, don't forget to commit) |
|
395 | (branch merge, don't forget to commit) | |
395 | BROKEN: should include subrepo t |
|
396 | BROKEN: should include subrepo t | |
396 | $ hg debugsub |
|
397 | $ hg debugsub | |
397 | path s |
|
398 | path s | |
398 | source s |
|
399 | source s | |
399 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
400 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 | |
400 | BROKEN: should include subrepo t |
|
401 | BROKEN: should include subrepo t | |
401 | $ cat .hgsubstate |
|
402 | $ cat .hgsubstate | |
402 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
403 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s | |
403 | $ hg ci -m 'local changed, remote removed, keep changed' |
|
404 | $ hg ci -m 'local changed, remote removed, keep changed' | |
404 | created new head |
|
405 | created new head | |
405 | BROKEN: should include subrepo t |
|
406 | BROKEN: should include subrepo t | |
406 | $ hg debugsub |
|
407 | $ hg debugsub | |
407 | path s |
|
408 | path s | |
408 | source s |
|
409 | source s | |
409 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
410 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 | |
410 | BROKEN: should include subrepo t |
|
411 | BROKEN: should include subrepo t | |
411 | $ cat .hgsubstate |
|
412 | $ cat .hgsubstate | |
412 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
413 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s | |
413 | $ cat t/t |
|
414 | $ cat t/t | |
414 | t2 |
|
415 | t2 | |
415 |
|
416 | |||
416 | local changed, remote removed, keep removed |
|
417 | local changed, remote removed, keep removed | |
417 |
|
418 | |||
418 | $ hg co -C 6 |
|
419 | $ hg co -C 6 | |
419 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
420 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
420 | $ hg merge --config ui.interactive=true 11 <<EOF |
|
421 | $ hg merge --config ui.interactive=true 11 <<EOF | |
421 | > d |
|
422 | > d | |
422 | > EOF |
|
423 | > EOF | |
423 | local changed subrepository t which remote removed |
|
424 | local changed subrepository t which remote removed | |
424 | use (c)hanged version or (d)elete? d |
|
425 | use (c)hanged version or (d)elete? d | |
425 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
426 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
426 | (branch merge, don't forget to commit) |
|
427 | (branch merge, don't forget to commit) | |
427 | $ hg debugsub |
|
428 | $ hg debugsub | |
428 | path s |
|
429 | path s | |
429 | source s |
|
430 | source s | |
430 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
431 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 | |
431 | $ cat .hgsubstate |
|
432 | $ cat .hgsubstate | |
432 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
433 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s | |
433 | $ hg ci -m 'local changed, remote removed, keep removed' |
|
434 | $ hg ci -m 'local changed, remote removed, keep removed' | |
434 | created new head |
|
435 | created new head | |
435 | $ hg debugsub |
|
436 | $ hg debugsub | |
436 | path s |
|
437 | path s | |
437 | source s |
|
438 | source s | |
438 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
439 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 | |
439 | $ cat .hgsubstate |
|
440 | $ cat .hgsubstate | |
440 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
441 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s | |
441 |
|
442 | |||
442 | clean up to avoid having to fix up the tests below |
|
443 | clean up to avoid having to fix up the tests below | |
443 |
|
444 | |||
444 | $ hg co -C 10 |
|
445 | $ hg co -C 10 | |
445 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
446 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
446 | $ cat >> $HGRCPATH <<EOF |
|
447 | $ cat >> $HGRCPATH <<EOF | |
447 | > [extensions] |
|
448 | > [extensions] | |
448 | > strip= |
|
449 | > strip= | |
449 | > EOF |
|
450 | > EOF | |
450 | $ hg strip -r 11:15 |
|
451 | $ hg strip -r 11:15 | |
451 | saved backup bundle to $TESTTMP/t/.hg/strip-backup/*-backup.hg (glob) |
|
452 | saved backup bundle to $TESTTMP/t/.hg/strip-backup/*-backup.hg (glob) | |
452 |
|
453 | |||
453 | clone |
|
454 | clone | |
454 |
|
455 | |||
455 | $ cd .. |
|
456 | $ cd .. | |
456 | $ hg clone t tc |
|
457 | $ hg clone t tc | |
457 | updating to branch default |
|
458 | updating to branch default | |
458 | cloning subrepo s from $TESTTMP/t/s |
|
459 | cloning subrepo s from $TESTTMP/t/s | |
459 | cloning subrepo s/ss from $TESTTMP/t/s/ss (glob) |
|
460 | cloning subrepo s/ss from $TESTTMP/t/s/ss (glob) | |
460 | cloning subrepo t from $TESTTMP/t/t |
|
461 | cloning subrepo t from $TESTTMP/t/t | |
461 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
462 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
462 | $ cd tc |
|
463 | $ cd tc | |
463 | $ hg debugsub |
|
464 | $ hg debugsub | |
464 | path s |
|
465 | path s | |
465 | source s |
|
466 | source s | |
466 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 |
|
467 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 | |
467 | path t |
|
468 | path t | |
468 | source t |
|
469 | source t | |
469 | revision 20a0db6fbf6c3d2836e6519a642ae929bfc67c0e |
|
470 | revision 20a0db6fbf6c3d2836e6519a642ae929bfc67c0e | |
470 |
|
471 | |||
471 | push |
|
472 | push | |
472 |
|
473 | |||
473 | $ echo bah > t/t |
|
474 | $ echo bah > t/t | |
474 | $ hg ci -m11 |
|
475 | $ hg ci -m11 | |
475 | committing subrepository t |
|
476 | committing subrepository t | |
476 | $ hg push |
|
477 | $ hg push | |
477 | pushing to $TESTTMP/t (glob) |
|
478 | pushing to $TESTTMP/t (glob) | |
478 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob) |
|
479 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob) | |
479 | no changes made to subrepo s since last push to $TESTTMP/t/s |
|
480 | no changes made to subrepo s since last push to $TESTTMP/t/s | |
480 | pushing subrepo t to $TESTTMP/t/t |
|
481 | pushing subrepo t to $TESTTMP/t/t | |
481 | searching for changes |
|
482 | searching for changes | |
482 | adding changesets |
|
483 | adding changesets | |
483 | adding manifests |
|
484 | adding manifests | |
484 | adding file changes |
|
485 | adding file changes | |
485 | added 1 changesets with 1 changes to 1 files |
|
486 | added 1 changesets with 1 changes to 1 files | |
486 | searching for changes |
|
487 | searching for changes | |
487 | adding changesets |
|
488 | adding changesets | |
488 | adding manifests |
|
489 | adding manifests | |
489 | adding file changes |
|
490 | adding file changes | |
490 | added 1 changesets with 1 changes to 1 files |
|
491 | added 1 changesets with 1 changes to 1 files | |
491 |
|
492 | |||
492 | push -f |
|
493 | push -f | |
493 |
|
494 | |||
494 | $ echo bah > s/a |
|
495 | $ echo bah > s/a | |
495 | $ hg ci -m12 |
|
496 | $ hg ci -m12 | |
496 | committing subrepository s |
|
497 | committing subrepository s | |
497 | $ hg push |
|
498 | $ hg push | |
498 | pushing to $TESTTMP/t (glob) |
|
499 | pushing to $TESTTMP/t (glob) | |
499 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob) |
|
500 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob) | |
500 | pushing subrepo s to $TESTTMP/t/s |
|
501 | pushing subrepo s to $TESTTMP/t/s | |
501 | searching for changes |
|
502 | searching for changes | |
502 | abort: push creates new remote head 12a213df6fa9! (in subrepo s) |
|
503 | abort: push creates new remote head 12a213df6fa9! (in subrepo s) | |
503 | (merge or see "hg help push" for details about pushing new heads) |
|
504 | (merge or see "hg help push" for details about pushing new heads) | |
504 | [255] |
|
505 | [255] | |
505 | $ hg push -f |
|
506 | $ hg push -f | |
506 | pushing to $TESTTMP/t (glob) |
|
507 | pushing to $TESTTMP/t (glob) | |
507 | pushing subrepo s/ss to $TESTTMP/t/s/ss (glob) |
|
508 | pushing subrepo s/ss to $TESTTMP/t/s/ss (glob) | |
508 | searching for changes |
|
509 | searching for changes | |
509 | no changes found |
|
510 | no changes found | |
510 | pushing subrepo s to $TESTTMP/t/s |
|
511 | pushing subrepo s to $TESTTMP/t/s | |
511 | searching for changes |
|
512 | searching for changes | |
512 | adding changesets |
|
513 | adding changesets | |
513 | adding manifests |
|
514 | adding manifests | |
514 | adding file changes |
|
515 | adding file changes | |
515 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
516 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
516 | pushing subrepo t to $TESTTMP/t/t |
|
517 | pushing subrepo t to $TESTTMP/t/t | |
517 | searching for changes |
|
518 | searching for changes | |
518 | no changes found |
|
519 | no changes found | |
519 | searching for changes |
|
520 | searching for changes | |
520 | adding changesets |
|
521 | adding changesets | |
521 | adding manifests |
|
522 | adding manifests | |
522 | adding file changes |
|
523 | adding file changes | |
523 | added 1 changesets with 1 changes to 1 files |
|
524 | added 1 changesets with 1 changes to 1 files | |
524 |
|
525 | |||
525 | check that unmodified subrepos are not pushed |
|
526 | check that unmodified subrepos are not pushed | |
526 |
|
527 | |||
527 | $ hg clone . ../tcc |
|
528 | $ hg clone . ../tcc | |
528 | updating to branch default |
|
529 | updating to branch default | |
529 | cloning subrepo s from $TESTTMP/tc/s |
|
530 | cloning subrepo s from $TESTTMP/tc/s | |
530 | cloning subrepo s/ss from $TESTTMP/tc/s/ss (glob) |
|
531 | cloning subrepo s/ss from $TESTTMP/tc/s/ss (glob) | |
531 | cloning subrepo t from $TESTTMP/tc/t |
|
532 | cloning subrepo t from $TESTTMP/tc/t | |
532 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
533 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
533 |
|
534 | |||
534 | the subrepos on the new clone have nothing to push to its source |
|
535 | the subrepos on the new clone have nothing to push to its source | |
535 |
|
536 | |||
536 | $ hg push -R ../tcc . |
|
537 | $ hg push -R ../tcc . | |
537 | pushing to . |
|
538 | pushing to . | |
538 | no changes made to subrepo s/ss since last push to s/ss (glob) |
|
539 | no changes made to subrepo s/ss since last push to s/ss (glob) | |
539 | no changes made to subrepo s since last push to s |
|
540 | no changes made to subrepo s since last push to s | |
540 | no changes made to subrepo t since last push to t |
|
541 | no changes made to subrepo t since last push to t | |
541 | searching for changes |
|
542 | searching for changes | |
542 | no changes found |
|
543 | no changes found | |
543 | [1] |
|
544 | [1] | |
544 |
|
545 | |||
545 | the subrepos on the source do not have a clean store versus the clone target |
|
546 | the subrepos on the source do not have a clean store versus the clone target | |
546 | because they were never explicitly pushed to the source |
|
547 | because they were never explicitly pushed to the source | |
547 |
|
548 | |||
548 | $ hg push ../tcc |
|
549 | $ hg push ../tcc | |
549 | pushing to ../tcc |
|
550 | pushing to ../tcc | |
550 | pushing subrepo s/ss to ../tcc/s/ss (glob) |
|
551 | pushing subrepo s/ss to ../tcc/s/ss (glob) | |
551 | searching for changes |
|
552 | searching for changes | |
552 | no changes found |
|
553 | no changes found | |
553 | pushing subrepo s to ../tcc/s |
|
554 | pushing subrepo s to ../tcc/s | |
554 | searching for changes |
|
555 | searching for changes | |
555 | no changes found |
|
556 | no changes found | |
556 | pushing subrepo t to ../tcc/t |
|
557 | pushing subrepo t to ../tcc/t | |
557 | searching for changes |
|
558 | searching for changes | |
558 | no changes found |
|
559 | no changes found | |
559 | searching for changes |
|
560 | searching for changes | |
560 | no changes found |
|
561 | no changes found | |
561 | [1] |
|
562 | [1] | |
562 |
|
563 | |||
563 | after push their stores become clean |
|
564 | after push their stores become clean | |
564 |
|
565 | |||
565 | $ hg push ../tcc |
|
566 | $ hg push ../tcc | |
566 | pushing to ../tcc |
|
567 | pushing to ../tcc | |
567 | no changes made to subrepo s/ss since last push to ../tcc/s/ss (glob) |
|
568 | no changes made to subrepo s/ss since last push to ../tcc/s/ss (glob) | |
568 | no changes made to subrepo s since last push to ../tcc/s |
|
569 | no changes made to subrepo s since last push to ../tcc/s | |
569 | no changes made to subrepo t since last push to ../tcc/t |
|
570 | no changes made to subrepo t since last push to ../tcc/t | |
570 | searching for changes |
|
571 | searching for changes | |
571 | no changes found |
|
572 | no changes found | |
572 | [1] |
|
573 | [1] | |
573 |
|
574 | |||
574 | updating a subrepo to a different revision or changing |
|
575 | updating a subrepo to a different revision or changing | |
575 | its working directory does not make its store dirty |
|
576 | its working directory does not make its store dirty | |
576 |
|
577 | |||
577 | $ hg -R s update '.^' |
|
578 | $ hg -R s update '.^' | |
578 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
579 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
579 | $ hg push |
|
580 | $ hg push | |
580 | pushing to $TESTTMP/t (glob) |
|
581 | pushing to $TESTTMP/t (glob) | |
581 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob) |
|
582 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob) | |
582 | no changes made to subrepo s since last push to $TESTTMP/t/s |
|
583 | no changes made to subrepo s since last push to $TESTTMP/t/s | |
583 | no changes made to subrepo t since last push to $TESTTMP/t/t |
|
584 | no changes made to subrepo t since last push to $TESTTMP/t/t | |
584 | searching for changes |
|
585 | searching for changes | |
585 | no changes found |
|
586 | no changes found | |
586 | [1] |
|
587 | [1] | |
587 | $ echo foo >> s/a |
|
588 | $ echo foo >> s/a | |
588 | $ hg push |
|
589 | $ hg push | |
589 | pushing to $TESTTMP/t (glob) |
|
590 | pushing to $TESTTMP/t (glob) | |
590 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob) |
|
591 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob) | |
591 | no changes made to subrepo s since last push to $TESTTMP/t/s |
|
592 | no changes made to subrepo s since last push to $TESTTMP/t/s | |
592 | no changes made to subrepo t since last push to $TESTTMP/t/t |
|
593 | no changes made to subrepo t since last push to $TESTTMP/t/t | |
593 | searching for changes |
|
594 | searching for changes | |
594 | no changes found |
|
595 | no changes found | |
595 | [1] |
|
596 | [1] | |
596 | $ hg -R s update -C tip |
|
597 | $ hg -R s update -C tip | |
597 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
598 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
598 |
|
599 | |||
599 | committing into a subrepo makes its store (but not its parent's store) dirty |
|
600 | committing into a subrepo makes its store (but not its parent's store) dirty | |
600 |
|
601 | |||
601 | $ echo foo >> s/ss/a |
|
602 | $ echo foo >> s/ss/a | |
602 | $ hg -R s/ss commit -m 'test dirty store detection' |
|
603 | $ hg -R s/ss commit -m 'test dirty store detection' | |
603 |
|
604 | |||
604 | $ hg out -S -r `hg log -r tip -T "{node|short}"` |
|
605 | $ hg out -S -r `hg log -r tip -T "{node|short}"` | |
605 | comparing with $TESTTMP/t (glob) |
|
606 | comparing with $TESTTMP/t (glob) | |
606 | searching for changes |
|
607 | searching for changes | |
607 | no changes found |
|
608 | no changes found | |
608 | comparing with $TESTTMP/t/s |
|
609 | comparing with $TESTTMP/t/s | |
609 | searching for changes |
|
610 | searching for changes | |
610 | no changes found |
|
611 | no changes found | |
611 | comparing with $TESTTMP/t/s/ss |
|
612 | comparing with $TESTTMP/t/s/ss | |
612 | searching for changes |
|
613 | searching for changes | |
613 | changeset: 1:79ea5566a333 |
|
614 | changeset: 1:79ea5566a333 | |
614 | tag: tip |
|
615 | tag: tip | |
615 | user: test |
|
616 | user: test | |
616 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
617 | date: Thu Jan 01 00:00:00 1970 +0000 | |
617 | summary: test dirty store detection |
|
618 | summary: test dirty store detection | |
618 |
|
619 | |||
619 | comparing with $TESTTMP/t/t |
|
620 | comparing with $TESTTMP/t/t | |
620 | searching for changes |
|
621 | searching for changes | |
621 | no changes found |
|
622 | no changes found | |
622 |
|
623 | |||
623 | $ hg push |
|
624 | $ hg push | |
624 | pushing to $TESTTMP/t (glob) |
|
625 | pushing to $TESTTMP/t (glob) | |
625 | pushing subrepo s/ss to $TESTTMP/t/s/ss (glob) |
|
626 | pushing subrepo s/ss to $TESTTMP/t/s/ss (glob) | |
626 | searching for changes |
|
627 | searching for changes | |
627 | adding changesets |
|
628 | adding changesets | |
628 | adding manifests |
|
629 | adding manifests | |
629 | adding file changes |
|
630 | adding file changes | |
630 | added 1 changesets with 1 changes to 1 files |
|
631 | added 1 changesets with 1 changes to 1 files | |
631 | no changes made to subrepo s since last push to $TESTTMP/t/s |
|
632 | no changes made to subrepo s since last push to $TESTTMP/t/s | |
632 | no changes made to subrepo t since last push to $TESTTMP/t/t |
|
633 | no changes made to subrepo t since last push to $TESTTMP/t/t | |
633 | searching for changes |
|
634 | searching for changes | |
634 | no changes found |
|
635 | no changes found | |
635 | [1] |
|
636 | [1] | |
636 |
|
637 | |||
637 | a subrepo store may be clean versus one repo but not versus another |
|
638 | a subrepo store may be clean versus one repo but not versus another | |
638 |
|
639 | |||
639 | $ hg push |
|
640 | $ hg push | |
640 | pushing to $TESTTMP/t (glob) |
|
641 | pushing to $TESTTMP/t (glob) | |
641 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob) |
|
642 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob) | |
642 | no changes made to subrepo s since last push to $TESTTMP/t/s |
|
643 | no changes made to subrepo s since last push to $TESTTMP/t/s | |
643 | no changes made to subrepo t since last push to $TESTTMP/t/t |
|
644 | no changes made to subrepo t since last push to $TESTTMP/t/t | |
644 | searching for changes |
|
645 | searching for changes | |
645 | no changes found |
|
646 | no changes found | |
646 | [1] |
|
647 | [1] | |
647 | $ hg push ../tcc |
|
648 | $ hg push ../tcc | |
648 | pushing to ../tcc |
|
649 | pushing to ../tcc | |
649 | pushing subrepo s/ss to ../tcc/s/ss (glob) |
|
650 | pushing subrepo s/ss to ../tcc/s/ss (glob) | |
650 | searching for changes |
|
651 | searching for changes | |
651 | adding changesets |
|
652 | adding changesets | |
652 | adding manifests |
|
653 | adding manifests | |
653 | adding file changes |
|
654 | adding file changes | |
654 | added 1 changesets with 1 changes to 1 files |
|
655 | added 1 changesets with 1 changes to 1 files | |
655 | no changes made to subrepo s since last push to ../tcc/s |
|
656 | no changes made to subrepo s since last push to ../tcc/s | |
656 | no changes made to subrepo t since last push to ../tcc/t |
|
657 | no changes made to subrepo t since last push to ../tcc/t | |
657 | searching for changes |
|
658 | searching for changes | |
658 | no changes found |
|
659 | no changes found | |
659 | [1] |
|
660 | [1] | |
660 |
|
661 | |||
661 | update |
|
662 | update | |
662 |
|
663 | |||
663 | $ cd ../t |
|
664 | $ cd ../t | |
664 | $ hg up -C # discard our earlier merge |
|
665 | $ hg up -C # discard our earlier merge | |
665 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
666 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
666 | $ echo blah > t/t |
|
667 | $ echo blah > t/t | |
667 | $ hg ci -m13 |
|
668 | $ hg ci -m13 | |
668 | committing subrepository t |
|
669 | committing subrepository t | |
669 |
|
670 | |||
670 | backout calls revert internally with minimal opts, which should not raise |
|
671 | backout calls revert internally with minimal opts, which should not raise | |
671 | KeyError |
|
672 | KeyError | |
672 |
|
673 | |||
673 | $ hg backout ".^" |
|
674 | $ hg backout ".^" | |
674 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
675 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
675 | changeset c373c8102e68 backed out, don't forget to commit. |
|
676 | changeset c373c8102e68 backed out, don't forget to commit. | |
676 |
|
677 | |||
677 | $ hg up -C # discard changes |
|
678 | $ hg up -C # discard changes | |
678 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
679 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
679 |
|
680 | |||
680 | pull |
|
681 | pull | |
681 |
|
682 | |||
682 | $ cd ../tc |
|
683 | $ cd ../tc | |
683 | $ hg pull |
|
684 | $ hg pull | |
684 | pulling from $TESTTMP/t (glob) |
|
685 | pulling from $TESTTMP/t (glob) | |
685 | searching for changes |
|
686 | searching for changes | |
686 | adding changesets |
|
687 | adding changesets | |
687 | adding manifests |
|
688 | adding manifests | |
688 | adding file changes |
|
689 | adding file changes | |
689 | added 1 changesets with 1 changes to 1 files |
|
690 | added 1 changesets with 1 changes to 1 files | |
690 | (run 'hg update' to get a working copy) |
|
691 | (run 'hg update' to get a working copy) | |
691 |
|
692 | |||
692 | should pull t |
|
693 | should pull t | |
693 |
|
694 | |||
694 | $ hg incoming -S -r `hg log -r tip -T "{node|short}"` |
|
695 | $ hg incoming -S -r `hg log -r tip -T "{node|short}"` | |
695 | comparing with $TESTTMP/t (glob) |
|
696 | comparing with $TESTTMP/t (glob) | |
696 | no changes found |
|
697 | no changes found | |
697 | comparing with $TESTTMP/t/s |
|
698 | comparing with $TESTTMP/t/s | |
698 | searching for changes |
|
699 | searching for changes | |
699 | no changes found |
|
700 | no changes found | |
700 | comparing with $TESTTMP/t/s/ss |
|
701 | comparing with $TESTTMP/t/s/ss | |
701 | searching for changes |
|
702 | searching for changes | |
702 | no changes found |
|
703 | no changes found | |
703 | comparing with $TESTTMP/t/t |
|
704 | comparing with $TESTTMP/t/t | |
704 | searching for changes |
|
705 | searching for changes | |
705 | changeset: 5:52c0adc0515a |
|
706 | changeset: 5:52c0adc0515a | |
706 | tag: tip |
|
707 | tag: tip | |
707 | user: test |
|
708 | user: test | |
708 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
709 | date: Thu Jan 01 00:00:00 1970 +0000 | |
709 | summary: 13 |
|
710 | summary: 13 | |
710 |
|
711 | |||
711 |
|
712 | |||
712 | $ hg up |
|
713 | $ hg up | |
713 | pulling subrepo t from $TESTTMP/t/t |
|
714 | pulling subrepo t from $TESTTMP/t/t | |
714 | searching for changes |
|
715 | searching for changes | |
715 | adding changesets |
|
716 | adding changesets | |
716 | adding manifests |
|
717 | adding manifests | |
717 | adding file changes |
|
718 | adding file changes | |
718 | added 1 changesets with 1 changes to 1 files |
|
719 | added 1 changesets with 1 changes to 1 files | |
719 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
720 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
720 | $ cat t/t |
|
721 | $ cat t/t | |
721 | blah |
|
722 | blah | |
722 |
|
723 | |||
723 | bogus subrepo path aborts |
|
724 | bogus subrepo path aborts | |
724 |
|
725 | |||
725 | $ echo 'bogus=[boguspath' >> .hgsub |
|
726 | $ echo 'bogus=[boguspath' >> .hgsub | |
726 | $ hg ci -m 'bogus subrepo path' |
|
727 | $ hg ci -m 'bogus subrepo path' | |
727 | abort: missing ] in subrepo source |
|
728 | abort: missing ] in subrepo source | |
728 | [255] |
|
729 | [255] | |
729 |
|
730 | |||
730 | Issue1986: merge aborts when trying to merge a subrepo that |
|
731 | Issue1986: merge aborts when trying to merge a subrepo that | |
731 | shouldn't need merging |
|
732 | shouldn't need merging | |
732 |
|
733 | |||
733 | # subrepo layout |
|
734 | # subrepo layout | |
734 | # |
|
735 | # | |
735 | # o 5 br |
|
736 | # o 5 br | |
736 | # /| |
|
737 | # /| | |
737 | # o | 4 default |
|
738 | # o | 4 default | |
738 | # | | |
|
739 | # | | | |
739 | # | o 3 br |
|
740 | # | o 3 br | |
740 | # |/| |
|
741 | # |/| | |
741 | # o | 2 default |
|
742 | # o | 2 default | |
742 | # | | |
|
743 | # | | | |
743 | # | o 1 br |
|
744 | # | o 1 br | |
744 | # |/ |
|
745 | # |/ | |
745 | # o 0 default |
|
746 | # o 0 default | |
746 |
|
747 | |||
747 | $ cd .. |
|
748 | $ cd .. | |
748 | $ rm -rf sub |
|
749 | $ rm -rf sub | |
749 | $ hg init main |
|
750 | $ hg init main | |
750 | $ cd main |
|
751 | $ cd main | |
751 | $ hg init s |
|
752 | $ hg init s | |
752 | $ cd s |
|
753 | $ cd s | |
753 | $ echo a > a |
|
754 | $ echo a > a | |
754 | $ hg ci -Am1 |
|
755 | $ hg ci -Am1 | |
755 | adding a |
|
756 | adding a | |
756 | $ hg branch br |
|
757 | $ hg branch br | |
757 | marked working directory as branch br |
|
758 | marked working directory as branch br | |
758 | (branches are permanent and global, did you want a bookmark?) |
|
759 | (branches are permanent and global, did you want a bookmark?) | |
759 | $ echo a >> a |
|
760 | $ echo a >> a | |
760 | $ hg ci -m1 |
|
761 | $ hg ci -m1 | |
761 | $ hg up default |
|
762 | $ hg up default | |
762 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
763 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
763 | $ echo b > b |
|
764 | $ echo b > b | |
764 | $ hg ci -Am1 |
|
765 | $ hg ci -Am1 | |
765 | adding b |
|
766 | adding b | |
766 | $ hg up br |
|
767 | $ hg up br | |
767 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
768 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
768 | $ hg merge tip |
|
769 | $ hg merge tip | |
769 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
770 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
770 | (branch merge, don't forget to commit) |
|
771 | (branch merge, don't forget to commit) | |
771 | $ hg ci -m1 |
|
772 | $ hg ci -m1 | |
772 | $ hg up 2 |
|
773 | $ hg up 2 | |
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 | $ echo c > c |
|
775 | $ echo c > c | |
775 | $ hg ci -Am1 |
|
776 | $ hg ci -Am1 | |
776 | adding c |
|
777 | adding c | |
777 | $ hg up 3 |
|
778 | $ hg up 3 | |
778 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
779 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
779 | $ hg merge 4 |
|
780 | $ hg merge 4 | |
780 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
781 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
781 | (branch merge, don't forget to commit) |
|
782 | (branch merge, don't forget to commit) | |
782 | $ hg ci -m1 |
|
783 | $ hg ci -m1 | |
783 |
|
784 | |||
784 | # main repo layout: |
|
785 | # main repo layout: | |
785 | # |
|
786 | # | |
786 | # * <-- try to merge default into br again |
|
787 | # * <-- try to merge default into br again | |
787 | # .`| |
|
788 | # .`| | |
788 | # . o 5 br --> substate = 5 |
|
789 | # . o 5 br --> substate = 5 | |
789 | # . | |
|
790 | # . | | |
790 | # o | 4 default --> substate = 4 |
|
791 | # o | 4 default --> substate = 4 | |
791 | # | | |
|
792 | # | | | |
792 | # | o 3 br --> substate = 2 |
|
793 | # | o 3 br --> substate = 2 | |
793 | # |/| |
|
794 | # |/| | |
794 | # o | 2 default --> substate = 2 |
|
795 | # o | 2 default --> substate = 2 | |
795 | # | | |
|
796 | # | | | |
796 | # | o 1 br --> substate = 3 |
|
797 | # | o 1 br --> substate = 3 | |
797 | # |/ |
|
798 | # |/ | |
798 | # o 0 default --> substate = 2 |
|
799 | # o 0 default --> substate = 2 | |
799 |
|
800 | |||
800 | $ cd .. |
|
801 | $ cd .. | |
801 | $ echo 's = s' > .hgsub |
|
802 | $ echo 's = s' > .hgsub | |
802 | $ hg -R s up 2 |
|
803 | $ hg -R s up 2 | |
803 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
804 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
804 | $ hg ci -Am1 |
|
805 | $ hg ci -Am1 | |
805 | adding .hgsub |
|
806 | adding .hgsub | |
806 | $ hg branch br |
|
807 | $ hg branch br | |
807 | marked working directory as branch br |
|
808 | marked working directory as branch br | |
808 | (branches are permanent and global, did you want a bookmark?) |
|
809 | (branches are permanent and global, did you want a bookmark?) | |
809 | $ echo b > b |
|
810 | $ echo b > b | |
810 | $ hg -R s up 3 |
|
811 | $ hg -R s up 3 | |
811 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
812 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
812 | $ hg ci -Am1 |
|
813 | $ hg ci -Am1 | |
813 | adding b |
|
814 | adding b | |
814 | $ hg up default |
|
815 | $ hg up default | |
815 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
816 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
816 | $ echo c > c |
|
817 | $ echo c > c | |
817 | $ hg ci -Am1 |
|
818 | $ hg ci -Am1 | |
818 | adding c |
|
819 | adding c | |
819 | $ hg up 1 |
|
820 | $ hg up 1 | |
820 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
821 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
821 | $ hg merge 2 |
|
822 | $ hg merge 2 | |
822 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
823 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
823 | (branch merge, don't forget to commit) |
|
824 | (branch merge, don't forget to commit) | |
824 | $ hg ci -m1 |
|
825 | $ hg ci -m1 | |
825 | $ hg up 2 |
|
826 | $ hg up 2 | |
826 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
827 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
827 | $ hg -R s up 4 |
|
828 | $ hg -R s up 4 | |
828 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
829 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
829 | $ echo d > d |
|
830 | $ echo d > d | |
830 | $ hg ci -Am1 |
|
831 | $ hg ci -Am1 | |
831 | adding d |
|
832 | adding d | |
832 | $ hg up 3 |
|
833 | $ hg up 3 | |
833 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
834 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
834 | $ hg -R s up 5 |
|
835 | $ hg -R s up 5 | |
835 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
836 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
836 | $ echo e > e |
|
837 | $ echo e > e | |
837 | $ hg ci -Am1 |
|
838 | $ hg ci -Am1 | |
838 | adding e |
|
839 | adding e | |
839 |
|
840 | |||
840 | $ hg up 5 |
|
841 | $ hg up 5 | |
841 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
842 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
842 | $ hg merge 4 # try to merge default into br again |
|
843 | $ hg merge 4 # try to merge default into br again | |
843 | subrepository s diverged (local revision: f8f13b33206e, remote revision: a3f9062a4f88) |
|
844 | subrepository s diverged (local revision: f8f13b33206e, remote revision: a3f9062a4f88) | |
844 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
845 | (M)erge, keep (l)ocal or keep (r)emote? m | |
845 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
846 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
846 | (branch merge, don't forget to commit) |
|
847 | (branch merge, don't forget to commit) | |
847 | $ cd .. |
|
848 | $ cd .. | |
848 |
|
849 | |||
849 | test subrepo delete from .hgsubstate |
|
850 | test subrepo delete from .hgsubstate | |
850 |
|
851 | |||
851 | $ hg init testdelete |
|
852 | $ hg init testdelete | |
852 | $ mkdir testdelete/nested testdelete/nested2 |
|
853 | $ mkdir testdelete/nested testdelete/nested2 | |
853 | $ hg init testdelete/nested |
|
854 | $ hg init testdelete/nested | |
854 | $ hg init testdelete/nested2 |
|
855 | $ hg init testdelete/nested2 | |
855 | $ echo test > testdelete/nested/foo |
|
856 | $ echo test > testdelete/nested/foo | |
856 | $ echo test > testdelete/nested2/foo |
|
857 | $ echo test > testdelete/nested2/foo | |
857 | $ hg -R testdelete/nested add |
|
858 | $ hg -R testdelete/nested add | |
858 | adding testdelete/nested/foo (glob) |
|
859 | adding testdelete/nested/foo (glob) | |
859 | $ hg -R testdelete/nested2 add |
|
860 | $ hg -R testdelete/nested2 add | |
860 | adding testdelete/nested2/foo (glob) |
|
861 | adding testdelete/nested2/foo (glob) | |
861 | $ hg -R testdelete/nested ci -m test |
|
862 | $ hg -R testdelete/nested ci -m test | |
862 | $ hg -R testdelete/nested2 ci -m test |
|
863 | $ hg -R testdelete/nested2 ci -m test | |
863 | $ echo nested = nested > testdelete/.hgsub |
|
864 | $ echo nested = nested > testdelete/.hgsub | |
864 | $ echo nested2 = nested2 >> testdelete/.hgsub |
|
865 | $ echo nested2 = nested2 >> testdelete/.hgsub | |
865 | $ hg -R testdelete add |
|
866 | $ hg -R testdelete add | |
866 | adding testdelete/.hgsub (glob) |
|
867 | adding testdelete/.hgsub (glob) | |
867 | $ hg -R testdelete ci -m "nested 1 & 2 added" |
|
868 | $ hg -R testdelete ci -m "nested 1 & 2 added" | |
868 | $ echo nested = nested > testdelete/.hgsub |
|
869 | $ echo nested = nested > testdelete/.hgsub | |
869 | $ hg -R testdelete ci -m "nested 2 deleted" |
|
870 | $ hg -R testdelete ci -m "nested 2 deleted" | |
870 | $ cat testdelete/.hgsubstate |
|
871 | $ cat testdelete/.hgsubstate | |
871 | bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested |
|
872 | bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested | |
872 | $ hg -R testdelete remove testdelete/.hgsub |
|
873 | $ hg -R testdelete remove testdelete/.hgsub | |
873 | $ hg -R testdelete ci -m ".hgsub deleted" |
|
874 | $ hg -R testdelete ci -m ".hgsub deleted" | |
874 | $ cat testdelete/.hgsubstate |
|
875 | $ cat testdelete/.hgsubstate | |
875 | bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested |
|
876 | bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested | |
876 |
|
877 | |||
877 | test repository cloning |
|
878 | test repository cloning | |
878 |
|
879 | |||
879 | $ mkdir mercurial mercurial2 |
|
880 | $ mkdir mercurial mercurial2 | |
880 | $ hg init nested_absolute |
|
881 | $ hg init nested_absolute | |
881 | $ echo test > nested_absolute/foo |
|
882 | $ echo test > nested_absolute/foo | |
882 | $ hg -R nested_absolute add |
|
883 | $ hg -R nested_absolute add | |
883 | adding nested_absolute/foo (glob) |
|
884 | adding nested_absolute/foo (glob) | |
884 | $ hg -R nested_absolute ci -mtest |
|
885 | $ hg -R nested_absolute ci -mtest | |
885 | $ cd mercurial |
|
886 | $ cd mercurial | |
886 | $ hg init nested_relative |
|
887 | $ hg init nested_relative | |
887 | $ echo test2 > nested_relative/foo2 |
|
888 | $ echo test2 > nested_relative/foo2 | |
888 | $ hg -R nested_relative add |
|
889 | $ hg -R nested_relative add | |
889 | adding nested_relative/foo2 (glob) |
|
890 | adding nested_relative/foo2 (glob) | |
890 | $ hg -R nested_relative ci -mtest2 |
|
891 | $ hg -R nested_relative ci -mtest2 | |
891 | $ hg init main |
|
892 | $ hg init main | |
892 | $ echo "nested_relative = ../nested_relative" > main/.hgsub |
|
893 | $ echo "nested_relative = ../nested_relative" > main/.hgsub | |
893 | $ echo "nested_absolute = `pwd`/nested_absolute" >> main/.hgsub |
|
894 | $ echo "nested_absolute = `pwd`/nested_absolute" >> main/.hgsub | |
894 | $ hg -R main add |
|
895 | $ hg -R main add | |
895 | adding main/.hgsub (glob) |
|
896 | adding main/.hgsub (glob) | |
896 | $ hg -R main ci -m "add subrepos" |
|
897 | $ hg -R main ci -m "add subrepos" | |
897 | $ cd .. |
|
898 | $ cd .. | |
898 | $ hg clone mercurial/main mercurial2/main |
|
899 | $ hg clone mercurial/main mercurial2/main | |
899 | updating to branch default |
|
900 | updating to branch default | |
900 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
901 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
901 | $ cat mercurial2/main/nested_absolute/.hg/hgrc \ |
|
902 | $ cat mercurial2/main/nested_absolute/.hg/hgrc \ | |
902 | > mercurial2/main/nested_relative/.hg/hgrc |
|
903 | > mercurial2/main/nested_relative/.hg/hgrc | |
903 | [paths] |
|
904 | [paths] | |
904 | default = $TESTTMP/mercurial/nested_absolute |
|
905 | default = $TESTTMP/mercurial/nested_absolute | |
905 | [paths] |
|
906 | [paths] | |
906 | default = $TESTTMP/mercurial/nested_relative |
|
907 | default = $TESTTMP/mercurial/nested_relative | |
907 | $ rm -rf mercurial mercurial2 |
|
908 | $ rm -rf mercurial mercurial2 | |
908 |
|
909 | |||
909 | Issue1977: multirepo push should fail if subrepo push fails |
|
910 | Issue1977: multirepo push should fail if subrepo push fails | |
910 |
|
911 | |||
911 | $ hg init repo |
|
912 | $ hg init repo | |
912 | $ hg init repo/s |
|
913 | $ hg init repo/s | |
913 | $ echo a > repo/s/a |
|
914 | $ echo a > repo/s/a | |
914 | $ hg -R repo/s ci -Am0 |
|
915 | $ hg -R repo/s ci -Am0 | |
915 | adding a |
|
916 | adding a | |
916 | $ echo s = s > repo/.hgsub |
|
917 | $ echo s = s > repo/.hgsub | |
917 | $ hg -R repo ci -Am1 |
|
918 | $ hg -R repo ci -Am1 | |
918 | adding .hgsub |
|
919 | adding .hgsub | |
919 | $ hg clone repo repo2 |
|
920 | $ hg clone repo repo2 | |
920 | updating to branch default |
|
921 | updating to branch default | |
921 | cloning subrepo s from $TESTTMP/repo/s |
|
922 | cloning subrepo s from $TESTTMP/repo/s | |
922 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
923 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
923 | $ hg -q -R repo2 pull -u |
|
924 | $ hg -q -R repo2 pull -u | |
924 | $ echo 1 > repo2/s/a |
|
925 | $ echo 1 > repo2/s/a | |
925 | $ hg -R repo2/s ci -m2 |
|
926 | $ hg -R repo2/s ci -m2 | |
926 | $ hg -q -R repo2/s push |
|
927 | $ hg -q -R repo2/s push | |
927 | $ hg -R repo2/s up -C 0 |
|
928 | $ hg -R repo2/s up -C 0 | |
928 | 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 | |
929 | $ echo 2 > repo2/s/b |
|
930 | $ echo 2 > repo2/s/b | |
930 | $ hg -R repo2/s ci -m3 -A |
|
931 | $ hg -R repo2/s ci -m3 -A | |
931 | adding b |
|
932 | adding b | |
932 | created new head |
|
933 | created new head | |
933 | $ hg -R repo2 ci -m3 |
|
934 | $ hg -R repo2 ci -m3 | |
934 | $ hg -q -R repo2 push |
|
935 | $ hg -q -R repo2 push | |
935 | abort: push creates new remote head cc505f09a8b2! (in subrepo s) |
|
936 | abort: push creates new remote head cc505f09a8b2! (in subrepo s) | |
936 | (merge or see "hg help push" for details about pushing new heads) |
|
937 | (merge or see "hg help push" for details about pushing new heads) | |
937 | [255] |
|
938 | [255] | |
938 | $ hg -R repo update |
|
939 | $ hg -R repo update | |
939 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
940 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
940 |
|
941 | |||
941 | test if untracked file is not overwritten |
|
942 | test if untracked file is not overwritten | |
942 |
|
943 | |||
943 | (this also tests that updated .hgsubstate is treated as "modified", |
|
944 | (this also tests that updated .hgsubstate is treated as "modified", | |
944 | when 'merge.update()' is aborted before 'merge.recordupdates()', even |
|
945 | when 'merge.update()' is aborted before 'merge.recordupdates()', even | |
945 | if none of mode, size and timestamp of it isn't changed on the |
|
946 | if none of mode, size and timestamp of it isn't changed on the | |
946 | filesystem (see also issue4583)) |
|
947 | filesystem (see also issue4583)) | |
947 |
|
948 | |||
948 | $ echo issue3276_ok > repo/s/b |
|
949 | $ echo issue3276_ok > repo/s/b | |
949 | $ hg -R repo2 push -f -q |
|
950 | $ hg -R repo2 push -f -q | |
950 | $ touch -t 200001010000 repo/.hgsubstate |
|
951 | $ touch -t 200001010000 repo/.hgsubstate | |
951 |
|
952 | |||
952 | $ cat >> repo/.hg/hgrc <<EOF |
|
953 | $ cat >> repo/.hg/hgrc <<EOF | |
953 | > [fakedirstatewritetime] |
|
954 | > [fakedirstatewritetime] | |
954 | > # emulate invoking dirstate.write() via repo.status() |
|
955 | > # emulate invoking dirstate.write() via repo.status() | |
955 | > # at 2000-01-01 00:00 |
|
956 | > # at 2000-01-01 00:00 | |
956 | > fakenow = 200001010000 |
|
957 | > fakenow = 200001010000 | |
957 | > |
|
958 | > | |
958 | > [extensions] |
|
959 | > [extensions] | |
959 | > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py |
|
960 | > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py | |
960 | > EOF |
|
961 | > EOF | |
961 | $ hg -R repo update |
|
962 | $ hg -R repo update | |
962 | b: untracked file differs |
|
963 | b: untracked file differs | |
963 | abort: untracked files in working directory differ from files in requested revision (in subrepo s) |
|
964 | abort: untracked files in working directory differ from files in requested revision (in subrepo s) | |
964 | [255] |
|
965 | [255] | |
965 | $ cat >> repo/.hg/hgrc <<EOF |
|
966 | $ cat >> repo/.hg/hgrc <<EOF | |
966 | > [extensions] |
|
967 | > [extensions] | |
967 | > fakedirstatewritetime = ! |
|
968 | > fakedirstatewritetime = ! | |
968 | > EOF |
|
969 | > EOF | |
969 |
|
970 | |||
970 | $ cat repo/s/b |
|
971 | $ cat repo/s/b | |
971 | issue3276_ok |
|
972 | issue3276_ok | |
972 | $ rm repo/s/b |
|
973 | $ rm repo/s/b | |
973 | $ touch -t 200001010000 repo/.hgsubstate |
|
974 | $ touch -t 200001010000 repo/.hgsubstate | |
974 | $ hg -R repo revert --all |
|
975 | $ hg -R repo revert --all | |
975 | reverting repo/.hgsubstate (glob) |
|
976 | reverting repo/.hgsubstate (glob) | |
976 | reverting subrepo s |
|
977 | reverting subrepo s | |
977 | $ hg -R repo update |
|
978 | $ hg -R repo update | |
978 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
979 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
979 | $ cat repo/s/b |
|
980 | $ cat repo/s/b | |
980 | 2 |
|
981 | 2 | |
981 | $ rm -rf repo2 repo |
|
982 | $ rm -rf repo2 repo | |
982 |
|
983 | |||
983 |
|
984 | |||
984 | Issue1852 subrepos with relative paths always push/pull relative to default |
|
985 | Issue1852 subrepos with relative paths always push/pull relative to default | |
985 |
|
986 | |||
986 | Prepare a repo with subrepo |
|
987 | Prepare a repo with subrepo | |
987 |
|
988 | |||
988 | $ hg init issue1852a |
|
989 | $ hg init issue1852a | |
989 | $ cd issue1852a |
|
990 | $ cd issue1852a | |
990 | $ hg init sub/repo |
|
991 | $ hg init sub/repo | |
991 | $ echo test > sub/repo/foo |
|
992 | $ echo test > sub/repo/foo | |
992 | $ hg -R sub/repo add sub/repo/foo |
|
993 | $ hg -R sub/repo add sub/repo/foo | |
993 | $ echo sub/repo = sub/repo > .hgsub |
|
994 | $ echo sub/repo = sub/repo > .hgsub | |
994 | $ hg add .hgsub |
|
995 | $ hg add .hgsub | |
995 | $ hg ci -mtest |
|
996 | $ hg ci -mtest | |
996 | committing subrepository sub/repo (glob) |
|
997 | committing subrepository sub/repo (glob) | |
997 | $ echo test >> sub/repo/foo |
|
998 | $ echo test >> sub/repo/foo | |
998 | $ hg ci -mtest |
|
999 | $ hg ci -mtest | |
999 | committing subrepository sub/repo (glob) |
|
1000 | committing subrepository sub/repo (glob) | |
1000 | $ hg cat sub/repo/foo |
|
1001 | $ hg cat sub/repo/foo | |
1001 | test |
|
1002 | test | |
1002 | test |
|
1003 | test | |
1003 | $ mkdir -p tmp/sub/repo |
|
1004 | $ mkdir -p tmp/sub/repo | |
1004 | $ hg cat -r 0 --output tmp/%p_p sub/repo/foo |
|
1005 | $ hg cat -r 0 --output tmp/%p_p sub/repo/foo | |
1005 | $ cat tmp/sub/repo/foo_p |
|
1006 | $ cat tmp/sub/repo/foo_p | |
1006 | test |
|
1007 | test | |
1007 | $ mv sub/repo sub_ |
|
1008 | $ mv sub/repo sub_ | |
1008 | $ hg cat sub/repo/baz |
|
1009 | $ hg cat sub/repo/baz | |
1009 | skipping missing subrepository: sub/repo |
|
1010 | skipping missing subrepository: sub/repo | |
1010 | [1] |
|
1011 | [1] | |
1011 | $ rm -rf sub/repo |
|
1012 | $ rm -rf sub/repo | |
1012 | $ mv sub_ sub/repo |
|
1013 | $ mv sub_ sub/repo | |
1013 | $ cd .. |
|
1014 | $ cd .. | |
1014 |
|
1015 | |||
1015 | Create repo without default path, pull top repo, and see what happens on update |
|
1016 | Create repo without default path, pull top repo, and see what happens on update | |
1016 |
|
1017 | |||
1017 | $ hg init issue1852b |
|
1018 | $ hg init issue1852b | |
1018 | $ hg -R issue1852b pull issue1852a |
|
1019 | $ hg -R issue1852b pull issue1852a | |
1019 | pulling from issue1852a |
|
1020 | pulling from issue1852a | |
1020 | requesting all changes |
|
1021 | requesting all changes | |
1021 | adding changesets |
|
1022 | adding changesets | |
1022 | adding manifests |
|
1023 | adding manifests | |
1023 | adding file changes |
|
1024 | adding file changes | |
1024 | added 2 changesets with 3 changes to 2 files |
|
1025 | added 2 changesets with 3 changes to 2 files | |
1025 | (run 'hg update' to get a working copy) |
|
1026 | (run 'hg update' to get a working copy) | |
1026 | $ hg -R issue1852b update |
|
1027 | $ hg -R issue1852b update | |
1027 | abort: default path for subrepository not found (in subrepo sub/repo) (glob) |
|
1028 | abort: default path for subrepository not found (in subrepo sub/repo) (glob) | |
1028 | [255] |
|
1029 | [255] | |
1029 |
|
1030 | |||
1030 | Ensure a full traceback, not just the SubrepoAbort part |
|
1031 | Ensure a full traceback, not just the SubrepoAbort part | |
1031 |
|
1032 | |||
1032 | $ hg -R issue1852b update --traceback 2>&1 | grep 'raise error\.Abort' |
|
1033 | $ hg -R issue1852b update --traceback 2>&1 | grep 'raise error\.Abort' | |
1033 | raise error.Abort(_("default path for subrepository not found")) |
|
1034 | raise error.Abort(_("default path for subrepository not found")) | |
1034 |
|
1035 | |||
1035 | Pull -u now doesn't help |
|
1036 | Pull -u now doesn't help | |
1036 |
|
1037 | |||
1037 | $ hg -R issue1852b pull -u issue1852a |
|
1038 | $ hg -R issue1852b pull -u issue1852a | |
1038 | pulling from issue1852a |
|
1039 | pulling from issue1852a | |
1039 | searching for changes |
|
1040 | searching for changes | |
1040 | no changes found |
|
1041 | no changes found | |
1041 |
|
1042 | |||
1042 | Try the same, but with pull -u |
|
1043 | Try the same, but with pull -u | |
1043 |
|
1044 | |||
1044 | $ hg init issue1852c |
|
1045 | $ hg init issue1852c | |
1045 | $ hg -R issue1852c pull -r0 -u issue1852a |
|
1046 | $ hg -R issue1852c pull -r0 -u issue1852a | |
1046 | pulling from issue1852a |
|
1047 | pulling from issue1852a | |
1047 | adding changesets |
|
1048 | adding changesets | |
1048 | adding manifests |
|
1049 | adding manifests | |
1049 | adding file changes |
|
1050 | adding file changes | |
1050 | added 1 changesets with 2 changes to 2 files |
|
1051 | added 1 changesets with 2 changes to 2 files | |
1051 | cloning subrepo sub/repo from issue1852a/sub/repo (glob) |
|
1052 | cloning subrepo sub/repo from issue1852a/sub/repo (glob) | |
1052 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1053 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1053 |
|
1054 | |||
1054 | Try to push from the other side |
|
1055 | Try to push from the other side | |
1055 |
|
1056 | |||
1056 | $ hg -R issue1852a push `pwd`/issue1852c |
|
1057 | $ hg -R issue1852a push `pwd`/issue1852c | |
1057 | pushing to $TESTTMP/issue1852c (glob) |
|
1058 | pushing to $TESTTMP/issue1852c (glob) | |
1058 | pushing subrepo sub/repo to $TESTTMP/issue1852c/sub/repo (glob) |
|
1059 | pushing subrepo sub/repo to $TESTTMP/issue1852c/sub/repo (glob) | |
1059 | searching for changes |
|
1060 | searching for changes | |
1060 | no changes found |
|
1061 | no changes found | |
1061 | searching for changes |
|
1062 | searching for changes | |
1062 | adding changesets |
|
1063 | adding changesets | |
1063 | adding manifests |
|
1064 | adding manifests | |
1064 | adding file changes |
|
1065 | adding file changes | |
1065 | added 1 changesets with 1 changes to 1 files |
|
1066 | added 1 changesets with 1 changes to 1 files | |
1066 |
|
1067 | |||
1067 | Incoming and outgoing should not use the default path: |
|
1068 | Incoming and outgoing should not use the default path: | |
1068 |
|
1069 | |||
1069 | $ hg clone -q issue1852a issue1852d |
|
1070 | $ hg clone -q issue1852a issue1852d | |
1070 | $ hg -R issue1852d outgoing --subrepos issue1852c |
|
1071 | $ hg -R issue1852d outgoing --subrepos issue1852c | |
1071 | comparing with issue1852c |
|
1072 | comparing with issue1852c | |
1072 | searching for changes |
|
1073 | searching for changes | |
1073 | no changes found |
|
1074 | no changes found | |
1074 | comparing with issue1852c/sub/repo |
|
1075 | comparing with issue1852c/sub/repo | |
1075 | searching for changes |
|
1076 | searching for changes | |
1076 | no changes found |
|
1077 | no changes found | |
1077 | [1] |
|
1078 | [1] | |
1078 | $ hg -R issue1852d incoming --subrepos issue1852c |
|
1079 | $ hg -R issue1852d incoming --subrepos issue1852c | |
1079 | comparing with issue1852c |
|
1080 | comparing with issue1852c | |
1080 | searching for changes |
|
1081 | searching for changes | |
1081 | no changes found |
|
1082 | no changes found | |
1082 | comparing with issue1852c/sub/repo |
|
1083 | comparing with issue1852c/sub/repo | |
1083 | searching for changes |
|
1084 | searching for changes | |
1084 | no changes found |
|
1085 | no changes found | |
1085 | [1] |
|
1086 | [1] | |
1086 |
|
1087 | |||
1087 | Check that merge of a new subrepo doesn't write the uncommitted state to |
|
1088 | Check that merge of a new subrepo doesn't write the uncommitted state to | |
1088 | .hgsubstate (issue4622) |
|
1089 | .hgsubstate (issue4622) | |
1089 |
|
1090 | |||
1090 | $ hg init issue1852a/addedsub |
|
1091 | $ hg init issue1852a/addedsub | |
1091 | $ echo zzz > issue1852a/addedsub/zz.txt |
|
1092 | $ echo zzz > issue1852a/addedsub/zz.txt | |
1092 | $ hg -R issue1852a/addedsub ci -Aqm "initial ZZ" |
|
1093 | $ hg -R issue1852a/addedsub ci -Aqm "initial ZZ" | |
1093 |
|
1094 | |||
1094 | $ hg clone issue1852a/addedsub issue1852d/addedsub |
|
1095 | $ hg clone issue1852a/addedsub issue1852d/addedsub | |
1095 | updating to branch default |
|
1096 | updating to branch default | |
1096 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1097 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1097 |
|
1098 | |||
1098 | $ echo def > issue1852a/sub/repo/foo |
|
1099 | $ echo def > issue1852a/sub/repo/foo | |
1099 | $ hg -R issue1852a ci -SAm 'tweaked subrepo' |
|
1100 | $ hg -R issue1852a ci -SAm 'tweaked subrepo' | |
1100 | adding tmp/sub/repo/foo_p |
|
1101 | adding tmp/sub/repo/foo_p | |
1101 | committing subrepository sub/repo (glob) |
|
1102 | committing subrepository sub/repo (glob) | |
1102 |
|
1103 | |||
1103 | $ echo 'addedsub = addedsub' >> issue1852d/.hgsub |
|
1104 | $ echo 'addedsub = addedsub' >> issue1852d/.hgsub | |
1104 | $ echo xyz > issue1852d/sub/repo/foo |
|
1105 | $ echo xyz > issue1852d/sub/repo/foo | |
1105 | $ hg -R issue1852d pull -u |
|
1106 | $ hg -R issue1852d pull -u | |
1106 | pulling from $TESTTMP/issue1852a (glob) |
|
1107 | pulling from $TESTTMP/issue1852a (glob) | |
1107 | searching for changes |
|
1108 | searching for changes | |
1108 | adding changesets |
|
1109 | adding changesets | |
1109 | adding manifests |
|
1110 | adding manifests | |
1110 | adding file changes |
|
1111 | adding file changes | |
1111 | added 1 changesets with 2 changes to 2 files |
|
1112 | added 1 changesets with 2 changes to 2 files | |
1112 | subrepository sub/repo diverged (local revision: f42d5c7504a8, remote revision: 46cd4aac504c) |
|
1113 | subrepository sub/repo diverged (local revision: f42d5c7504a8, remote revision: 46cd4aac504c) | |
1113 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
1114 | (M)erge, keep (l)ocal or keep (r)emote? m | |
1114 | pulling subrepo sub/repo from $TESTTMP/issue1852a/sub/repo (glob) |
|
1115 | pulling subrepo sub/repo from $TESTTMP/issue1852a/sub/repo (glob) | |
1115 | searching for changes |
|
1116 | searching for changes | |
1116 | adding changesets |
|
1117 | adding changesets | |
1117 | adding manifests |
|
1118 | adding manifests | |
1118 | adding file changes |
|
1119 | adding file changes | |
1119 | added 1 changesets with 1 changes to 1 files |
|
1120 | added 1 changesets with 1 changes to 1 files | |
1120 | subrepository sources for sub/repo differ (glob) |
|
1121 | subrepository sources for sub/repo differ (glob) | |
1121 | use (l)ocal source (f42d5c7504a8) or (r)emote source (46cd4aac504c)? l |
|
1122 | use (l)ocal source (f42d5c7504a8) or (r)emote source (46cd4aac504c)? l | |
1122 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1123 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1123 | $ cat issue1852d/.hgsubstate |
|
1124 | $ cat issue1852d/.hgsubstate | |
1124 | f42d5c7504a811dda50f5cf3e5e16c3330b87172 sub/repo |
|
1125 | f42d5c7504a811dda50f5cf3e5e16c3330b87172 sub/repo | |
1125 |
|
1126 | |||
1126 | Check status of files when none of them belong to the first |
|
1127 | Check status of files when none of them belong to the first | |
1127 | subrepository: |
|
1128 | subrepository: | |
1128 |
|
1129 | |||
1129 | $ hg init subrepo-status |
|
1130 | $ hg init subrepo-status | |
1130 | $ cd subrepo-status |
|
1131 | $ cd subrepo-status | |
1131 | $ hg init subrepo-1 |
|
1132 | $ hg init subrepo-1 | |
1132 | $ hg init subrepo-2 |
|
1133 | $ hg init subrepo-2 | |
1133 | $ cd subrepo-2 |
|
1134 | $ cd subrepo-2 | |
1134 | $ touch file |
|
1135 | $ touch file | |
1135 | $ hg add file |
|
1136 | $ hg add file | |
1136 | $ cd .. |
|
1137 | $ cd .. | |
1137 | $ echo subrepo-1 = subrepo-1 > .hgsub |
|
1138 | $ echo subrepo-1 = subrepo-1 > .hgsub | |
1138 | $ echo subrepo-2 = subrepo-2 >> .hgsub |
|
1139 | $ echo subrepo-2 = subrepo-2 >> .hgsub | |
1139 | $ hg add .hgsub |
|
1140 | $ hg add .hgsub | |
1140 | $ hg ci -m 'Added subrepos' |
|
1141 | $ hg ci -m 'Added subrepos' | |
1141 | committing subrepository subrepo-2 |
|
1142 | committing subrepository subrepo-2 | |
1142 | $ hg st subrepo-2/file |
|
1143 | $ hg st subrepo-2/file | |
1143 |
|
1144 | |||
1144 | Check that share works with subrepo |
|
1145 | Check that share works with subrepo | |
1145 | $ hg --config extensions.share= share . ../shared |
|
1146 | $ hg --config extensions.share= share . ../shared | |
1146 | updating working directory |
|
1147 | updating working directory | |
1147 | cloning subrepo subrepo-2 from $TESTTMP/subrepo-status/subrepo-2 |
|
1148 | cloning subrepo subrepo-2 from $TESTTMP/subrepo-status/subrepo-2 | |
1148 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1149 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1149 | $ test -f ../shared/subrepo-1/.hg/sharedpath |
|
1150 | $ test -f ../shared/subrepo-1/.hg/sharedpath | |
1150 | [1] |
|
1151 | [1] | |
1151 | $ hg -R ../shared in |
|
1152 | $ hg -R ../shared in | |
1152 | abort: repository default not found! |
|
1153 | abort: repository default not found! | |
1153 | [255] |
|
1154 | [255] | |
1154 | $ hg -R ../shared/subrepo-2 showconfig paths |
|
1155 | $ hg -R ../shared/subrepo-2 showconfig paths | |
1155 | paths.default=$TESTTMP/subrepo-status/subrepo-2 |
|
1156 | paths.default=$TESTTMP/subrepo-status/subrepo-2 | |
1156 | $ hg -R ../shared/subrepo-1 sum --remote |
|
1157 | $ hg -R ../shared/subrepo-1 sum --remote | |
1157 | parent: -1:000000000000 tip (empty repository) |
|
1158 | parent: -1:000000000000 tip (empty repository) | |
1158 | branch: default |
|
1159 | branch: default | |
1159 | commit: (clean) |
|
1160 | commit: (clean) | |
1160 | update: (current) |
|
1161 | update: (current) | |
1161 | remote: (synced) |
|
1162 | remote: (synced) | |
1162 |
|
1163 | |||
1163 | Check hg update --clean |
|
1164 | Check hg update --clean | |
1164 | $ cd $TESTTMP/t |
|
1165 | $ cd $TESTTMP/t | |
1165 | $ rm -r t/t.orig |
|
1166 | $ rm -r t/t.orig | |
1166 | $ hg status -S --all |
|
1167 | $ hg status -S --all | |
1167 | C .hgsub |
|
1168 | C .hgsub | |
1168 | C .hgsubstate |
|
1169 | C .hgsubstate | |
1169 | C a |
|
1170 | C a | |
1170 | C s/.hgsub |
|
1171 | C s/.hgsub | |
1171 | C s/.hgsubstate |
|
1172 | C s/.hgsubstate | |
1172 | C s/a |
|
1173 | C s/a | |
1173 | C s/ss/a |
|
1174 | C s/ss/a | |
1174 | C t/t |
|
1175 | C t/t | |
1175 | $ echo c1 > s/a |
|
1176 | $ echo c1 > s/a | |
1176 | $ cd s |
|
1177 | $ cd s | |
1177 | $ echo c1 > b |
|
1178 | $ echo c1 > b | |
1178 | $ echo c1 > c |
|
1179 | $ echo c1 > c | |
1179 | $ hg add b |
|
1180 | $ hg add b | |
1180 | $ cd .. |
|
1181 | $ cd .. | |
1181 | $ hg status -S |
|
1182 | $ hg status -S | |
1182 | M s/a |
|
1183 | M s/a | |
1183 | A s/b |
|
1184 | A s/b | |
1184 | ? s/c |
|
1185 | ? s/c | |
1185 | $ hg update -C |
|
1186 | $ hg update -C | |
1186 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1187 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1187 | $ hg status -S |
|
1188 | $ hg status -S | |
1188 | ? s/b |
|
1189 | ? s/b | |
1189 | ? s/c |
|
1190 | ? s/c | |
1190 |
|
1191 | |||
1191 | Sticky subrepositories, no changes |
|
1192 | Sticky subrepositories, no changes | |
1192 | $ cd $TESTTMP/t |
|
1193 | $ cd $TESTTMP/t | |
1193 | $ hg id |
|
1194 | $ hg id | |
1194 | 925c17564ef8 tip |
|
1195 | 925c17564ef8 tip | |
1195 | $ hg -R s id |
|
1196 | $ hg -R s id | |
1196 | 12a213df6fa9 tip |
|
1197 | 12a213df6fa9 tip | |
1197 | $ hg -R t id |
|
1198 | $ hg -R t id | |
1198 | 52c0adc0515a tip |
|
1199 | 52c0adc0515a tip | |
1199 | $ hg update 11 |
|
1200 | $ hg update 11 | |
1200 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1201 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1201 | $ hg id |
|
1202 | $ hg id | |
1202 | 365661e5936a |
|
1203 | 365661e5936a | |
1203 | $ hg -R s id |
|
1204 | $ hg -R s id | |
1204 | fc627a69481f |
|
1205 | fc627a69481f | |
1205 | $ hg -R t id |
|
1206 | $ hg -R t id | |
1206 | e95bcfa18a35 |
|
1207 | e95bcfa18a35 | |
1207 |
|
1208 | |||
1208 | Sticky subrepositories, file changes |
|
1209 | Sticky subrepositories, file changes | |
1209 | $ touch s/f1 |
|
1210 | $ touch s/f1 | |
1210 | $ touch t/f1 |
|
1211 | $ touch t/f1 | |
1211 | $ hg add -S s/f1 |
|
1212 | $ hg add -S s/f1 | |
1212 | $ hg add -S t/f1 |
|
1213 | $ hg add -S t/f1 | |
1213 | $ hg id |
|
1214 | $ hg id | |
1214 | 365661e5936a+ |
|
1215 | 365661e5936a+ | |
1215 | $ hg -R s id |
|
1216 | $ hg -R s id | |
1216 | fc627a69481f+ |
|
1217 | fc627a69481f+ | |
1217 | $ hg -R t id |
|
1218 | $ hg -R t id | |
1218 | e95bcfa18a35+ |
|
1219 | e95bcfa18a35+ | |
1219 | $ hg update tip |
|
1220 | $ hg update tip | |
1220 | subrepository s diverged (local revision: fc627a69481f, remote revision: 12a213df6fa9) |
|
1221 | subrepository s diverged (local revision: fc627a69481f, remote revision: 12a213df6fa9) | |
1221 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
1222 | (M)erge, keep (l)ocal or keep (r)emote? m | |
1222 | subrepository sources for s differ |
|
1223 | subrepository sources for s differ | |
1223 | use (l)ocal source (fc627a69481f) or (r)emote source (12a213df6fa9)? l |
|
1224 | use (l)ocal source (fc627a69481f) or (r)emote source (12a213df6fa9)? l | |
1224 | subrepository t diverged (local revision: e95bcfa18a35, remote revision: 52c0adc0515a) |
|
1225 | subrepository t diverged (local revision: e95bcfa18a35, remote revision: 52c0adc0515a) | |
1225 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
1226 | (M)erge, keep (l)ocal or keep (r)emote? m | |
1226 | subrepository sources for t differ |
|
1227 | subrepository sources for t differ | |
1227 | use (l)ocal source (e95bcfa18a35) or (r)emote source (52c0adc0515a)? l |
|
1228 | use (l)ocal source (e95bcfa18a35) or (r)emote source (52c0adc0515a)? l | |
1228 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1229 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1229 | $ hg id |
|
1230 | $ hg id | |
1230 | 925c17564ef8+ tip |
|
1231 | 925c17564ef8+ tip | |
1231 | $ hg -R s id |
|
1232 | $ hg -R s id | |
1232 | fc627a69481f+ |
|
1233 | fc627a69481f+ | |
1233 | $ hg -R t id |
|
1234 | $ hg -R t id | |
1234 | e95bcfa18a35+ |
|
1235 | e95bcfa18a35+ | |
1235 | $ hg update --clean tip |
|
1236 | $ hg update --clean tip | |
1236 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1237 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1237 |
|
1238 | |||
1238 | Sticky subrepository, revision updates |
|
1239 | Sticky subrepository, revision updates | |
1239 | $ hg id |
|
1240 | $ hg id | |
1240 | 925c17564ef8 tip |
|
1241 | 925c17564ef8 tip | |
1241 | $ hg -R s id |
|
1242 | $ hg -R s id | |
1242 | 12a213df6fa9 tip |
|
1243 | 12a213df6fa9 tip | |
1243 | $ hg -R t id |
|
1244 | $ hg -R t id | |
1244 | 52c0adc0515a tip |
|
1245 | 52c0adc0515a tip | |
1245 | $ cd s |
|
1246 | $ cd s | |
1246 | $ hg update -r -2 |
|
1247 | $ hg update -r -2 | |
1247 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1248 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1248 | $ cd ../t |
|
1249 | $ cd ../t | |
1249 | $ hg update -r 2 |
|
1250 | $ hg update -r 2 | |
1250 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1251 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1251 | $ cd .. |
|
1252 | $ cd .. | |
1252 | $ hg update 10 |
|
1253 | $ hg update 10 | |
1253 | subrepository s diverged (local revision: 12a213df6fa9, remote revision: fc627a69481f) |
|
1254 | subrepository s diverged (local revision: 12a213df6fa9, remote revision: fc627a69481f) | |
1254 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
1255 | (M)erge, keep (l)ocal or keep (r)emote? m | |
1255 | subrepository t diverged (local revision: 52c0adc0515a, remote revision: 20a0db6fbf6c) |
|
1256 | subrepository t diverged (local revision: 52c0adc0515a, remote revision: 20a0db6fbf6c) | |
1256 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
1257 | (M)erge, keep (l)ocal or keep (r)emote? m | |
1257 | subrepository sources for t differ (in checked out version) |
|
1258 | subrepository sources for t differ (in checked out version) | |
1258 | use (l)ocal source (7af322bc1198) or (r)emote source (20a0db6fbf6c)? l |
|
1259 | use (l)ocal source (7af322bc1198) or (r)emote source (20a0db6fbf6c)? l | |
1259 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1260 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1260 | $ hg id |
|
1261 | $ hg id | |
1261 | e45c8b14af55+ |
|
1262 | e45c8b14af55+ | |
1262 | $ hg -R s id |
|
1263 | $ hg -R s id | |
1263 | 02dcf1d70411 |
|
1264 | 02dcf1d70411 | |
1264 | $ hg -R t id |
|
1265 | $ hg -R t id | |
1265 | 7af322bc1198 |
|
1266 | 7af322bc1198 | |
1266 |
|
1267 | |||
1267 | Sticky subrepository, file changes and revision updates |
|
1268 | Sticky subrepository, file changes and revision updates | |
1268 | $ touch s/f1 |
|
1269 | $ touch s/f1 | |
1269 | $ touch t/f1 |
|
1270 | $ touch t/f1 | |
1270 | $ hg add -S s/f1 |
|
1271 | $ hg add -S s/f1 | |
1271 | $ hg add -S t/f1 |
|
1272 | $ hg add -S t/f1 | |
1272 | $ hg id |
|
1273 | $ hg id | |
1273 | e45c8b14af55+ |
|
1274 | e45c8b14af55+ | |
1274 | $ hg -R s id |
|
1275 | $ hg -R s id | |
1275 | 02dcf1d70411+ |
|
1276 | 02dcf1d70411+ | |
1276 | $ hg -R t id |
|
1277 | $ hg -R t id | |
1277 | 7af322bc1198+ |
|
1278 | 7af322bc1198+ | |
1278 | $ hg update tip |
|
1279 | $ hg update tip | |
1279 | subrepository s diverged (local revision: 12a213df6fa9, remote revision: 12a213df6fa9) |
|
1280 | subrepository s diverged (local revision: 12a213df6fa9, remote revision: 12a213df6fa9) | |
1280 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
1281 | (M)erge, keep (l)ocal or keep (r)emote? m | |
1281 | subrepository sources for s differ |
|
1282 | subrepository sources for s differ | |
1282 | use (l)ocal source (02dcf1d70411) or (r)emote source (12a213df6fa9)? l |
|
1283 | use (l)ocal source (02dcf1d70411) or (r)emote source (12a213df6fa9)? l | |
1283 | subrepository t diverged (local revision: 52c0adc0515a, remote revision: 52c0adc0515a) |
|
1284 | subrepository t diverged (local revision: 52c0adc0515a, remote revision: 52c0adc0515a) | |
1284 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
1285 | (M)erge, keep (l)ocal or keep (r)emote? m | |
1285 | subrepository sources for t differ |
|
1286 | subrepository sources for t differ | |
1286 | use (l)ocal source (7af322bc1198) or (r)emote source (52c0adc0515a)? l |
|
1287 | use (l)ocal source (7af322bc1198) or (r)emote source (52c0adc0515a)? l | |
1287 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1288 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1288 | $ hg id |
|
1289 | $ hg id | |
1289 | 925c17564ef8+ tip |
|
1290 | 925c17564ef8+ tip | |
1290 | $ hg -R s id |
|
1291 | $ hg -R s id | |
1291 | 02dcf1d70411+ |
|
1292 | 02dcf1d70411+ | |
1292 | $ hg -R t id |
|
1293 | $ hg -R t id | |
1293 | 7af322bc1198+ |
|
1294 | 7af322bc1198+ | |
1294 |
|
1295 | |||
1295 | Sticky repository, update --clean |
|
1296 | Sticky repository, update --clean | |
1296 | $ hg update --clean tip |
|
1297 | $ hg update --clean tip | |
1297 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1298 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1298 | $ hg id |
|
1299 | $ hg id | |
1299 | 925c17564ef8 tip |
|
1300 | 925c17564ef8 tip | |
1300 | $ hg -R s id |
|
1301 | $ hg -R s id | |
1301 | 12a213df6fa9 tip |
|
1302 | 12a213df6fa9 tip | |
1302 | $ hg -R t id |
|
1303 | $ hg -R t id | |
1303 | 52c0adc0515a tip |
|
1304 | 52c0adc0515a tip | |
1304 |
|
1305 | |||
1305 | Test subrepo already at intended revision: |
|
1306 | Test subrepo already at intended revision: | |
1306 | $ cd s |
|
1307 | $ cd s | |
1307 | $ hg update fc627a69481f |
|
1308 | $ hg update fc627a69481f | |
1308 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1309 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1309 | $ cd .. |
|
1310 | $ cd .. | |
1310 | $ hg update 11 |
|
1311 | $ hg update 11 | |
1311 | subrepository s diverged (local revision: 12a213df6fa9, remote revision: fc627a69481f) |
|
1312 | subrepository s diverged (local revision: 12a213df6fa9, remote revision: fc627a69481f) | |
1312 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
1313 | (M)erge, keep (l)ocal or keep (r)emote? m | |
1313 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1314 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1314 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1315 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1315 | $ hg id -n |
|
1316 | $ hg id -n | |
1316 | 11+ |
|
1317 | 11+ | |
1317 | $ hg -R s id |
|
1318 | $ hg -R s id | |
1318 | fc627a69481f |
|
1319 | fc627a69481f | |
1319 | $ hg -R t id |
|
1320 | $ hg -R t id | |
1320 | e95bcfa18a35 |
|
1321 | e95bcfa18a35 | |
1321 |
|
1322 | |||
1322 | Test that removing .hgsubstate doesn't break anything: |
|
1323 | Test that removing .hgsubstate doesn't break anything: | |
1323 |
|
1324 | |||
1324 | $ hg rm -f .hgsubstate |
|
1325 | $ hg rm -f .hgsubstate | |
1325 | $ hg ci -mrm |
|
1326 | $ hg ci -mrm | |
1326 | nothing changed |
|
1327 | nothing changed | |
1327 | [1] |
|
1328 | [1] | |
1328 | $ hg log -vr tip |
|
1329 | $ hg log -vr tip | |
1329 | changeset: 13:925c17564ef8 |
|
1330 | changeset: 13:925c17564ef8 | |
1330 | tag: tip |
|
1331 | tag: tip | |
1331 | user: test |
|
1332 | user: test | |
1332 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1333 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1333 | files: .hgsubstate |
|
1334 | files: .hgsubstate | |
1334 | description: |
|
1335 | description: | |
1335 | 13 |
|
1336 | 13 | |
1336 |
|
1337 | |||
1337 |
|
1338 | |||
1338 |
|
1339 | |||
1339 | Test that removing .hgsub removes .hgsubstate: |
|
1340 | Test that removing .hgsub removes .hgsubstate: | |
1340 |
|
1341 | |||
1341 | $ hg rm .hgsub |
|
1342 | $ hg rm .hgsub | |
1342 | $ hg ci -mrm2 |
|
1343 | $ hg ci -mrm2 | |
1343 | created new head |
|
1344 | created new head | |
1344 | $ hg log -vr tip |
|
1345 | $ hg log -vr tip | |
1345 | changeset: 14:2400bccd50af |
|
1346 | changeset: 14:2400bccd50af | |
1346 | tag: tip |
|
1347 | tag: tip | |
1347 | parent: 11:365661e5936a |
|
1348 | parent: 11:365661e5936a | |
1348 | user: test |
|
1349 | user: test | |
1349 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1350 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1350 | files: .hgsub .hgsubstate |
|
1351 | files: .hgsub .hgsubstate | |
1351 | description: |
|
1352 | description: | |
1352 | rm2 |
|
1353 | rm2 | |
1353 |
|
1354 | |||
1354 |
|
1355 | |||
1355 | Test issue3153: diff -S with deleted subrepos |
|
1356 | Test issue3153: diff -S with deleted subrepos | |
1356 |
|
1357 | |||
1357 | $ hg diff --nodates -S -c . |
|
1358 | $ hg diff --nodates -S -c . | |
1358 | diff -r 365661e5936a -r 2400bccd50af .hgsub |
|
1359 | diff -r 365661e5936a -r 2400bccd50af .hgsub | |
1359 | --- a/.hgsub |
|
1360 | --- a/.hgsub | |
1360 | +++ /dev/null |
|
1361 | +++ /dev/null | |
1361 | @@ -1,2 +0,0 @@ |
|
1362 | @@ -1,2 +0,0 @@ | |
1362 | -s = s |
|
1363 | -s = s | |
1363 | -t = t |
|
1364 | -t = t | |
1364 | diff -r 365661e5936a -r 2400bccd50af .hgsubstate |
|
1365 | diff -r 365661e5936a -r 2400bccd50af .hgsubstate | |
1365 | --- a/.hgsubstate |
|
1366 | --- a/.hgsubstate | |
1366 | +++ /dev/null |
|
1367 | +++ /dev/null | |
1367 | @@ -1,2 +0,0 @@ |
|
1368 | @@ -1,2 +0,0 @@ | |
1368 | -fc627a69481fcbe5f1135069e8a3881c023e4cf5 s |
|
1369 | -fc627a69481fcbe5f1135069e8a3881c023e4cf5 s | |
1369 | -e95bcfa18a358dc4936da981ebf4147b4cad1362 t |
|
1370 | -e95bcfa18a358dc4936da981ebf4147b4cad1362 t | |
1370 |
|
1371 | |||
1371 | Test behavior of add for explicit path in subrepo: |
|
1372 | Test behavior of add for explicit path in subrepo: | |
1372 | $ cd .. |
|
1373 | $ cd .. | |
1373 | $ hg init explicit |
|
1374 | $ hg init explicit | |
1374 | $ cd explicit |
|
1375 | $ cd explicit | |
1375 | $ echo s = s > .hgsub |
|
1376 | $ echo s = s > .hgsub | |
1376 | $ hg add .hgsub |
|
1377 | $ hg add .hgsub | |
1377 | $ hg init s |
|
1378 | $ hg init s | |
1378 | $ hg ci -m0 |
|
1379 | $ hg ci -m0 | |
1379 | Adding with an explicit path in a subrepo adds the file |
|
1380 | Adding with an explicit path in a subrepo adds the file | |
1380 | $ echo c1 > f1 |
|
1381 | $ echo c1 > f1 | |
1381 | $ echo c2 > s/f2 |
|
1382 | $ echo c2 > s/f2 | |
1382 | $ hg st -S |
|
1383 | $ hg st -S | |
1383 | ? f1 |
|
1384 | ? f1 | |
1384 | ? s/f2 |
|
1385 | ? s/f2 | |
1385 | $ hg add s/f2 |
|
1386 | $ hg add s/f2 | |
1386 | $ hg st -S |
|
1387 | $ hg st -S | |
1387 | A s/f2 |
|
1388 | A s/f2 | |
1388 | ? f1 |
|
1389 | ? f1 | |
1389 | $ hg ci -R s -m0 |
|
1390 | $ hg ci -R s -m0 | |
1390 | $ hg ci -Am1 |
|
1391 | $ hg ci -Am1 | |
1391 | adding f1 |
|
1392 | adding f1 | |
1392 | Adding with an explicit path in a subrepo with -S has the same behavior |
|
1393 | Adding with an explicit path in a subrepo with -S has the same behavior | |
1393 | $ echo c3 > f3 |
|
1394 | $ echo c3 > f3 | |
1394 | $ echo c4 > s/f4 |
|
1395 | $ echo c4 > s/f4 | |
1395 | $ hg st -S |
|
1396 | $ hg st -S | |
1396 | ? f3 |
|
1397 | ? f3 | |
1397 | ? s/f4 |
|
1398 | ? s/f4 | |
1398 | $ hg add -S s/f4 |
|
1399 | $ hg add -S s/f4 | |
1399 | $ hg st -S |
|
1400 | $ hg st -S | |
1400 | A s/f4 |
|
1401 | A s/f4 | |
1401 | ? f3 |
|
1402 | ? f3 | |
1402 | $ hg ci -R s -m1 |
|
1403 | $ hg ci -R s -m1 | |
1403 | $ hg ci -Ama2 |
|
1404 | $ hg ci -Ama2 | |
1404 | adding f3 |
|
1405 | adding f3 | |
1405 | Adding without a path or pattern silently ignores subrepos |
|
1406 | Adding without a path or pattern silently ignores subrepos | |
1406 | $ echo c5 > f5 |
|
1407 | $ echo c5 > f5 | |
1407 | $ echo c6 > s/f6 |
|
1408 | $ echo c6 > s/f6 | |
1408 | $ echo c7 > s/f7 |
|
1409 | $ echo c7 > s/f7 | |
1409 | $ hg st -S |
|
1410 | $ hg st -S | |
1410 | ? f5 |
|
1411 | ? f5 | |
1411 | ? s/f6 |
|
1412 | ? s/f6 | |
1412 | ? s/f7 |
|
1413 | ? s/f7 | |
1413 | $ hg add |
|
1414 | $ hg add | |
1414 | adding f5 |
|
1415 | adding f5 | |
1415 | $ hg st -S |
|
1416 | $ hg st -S | |
1416 | A f5 |
|
1417 | A f5 | |
1417 | ? s/f6 |
|
1418 | ? s/f6 | |
1418 | ? s/f7 |
|
1419 | ? s/f7 | |
1419 | $ hg ci -R s -Am2 |
|
1420 | $ hg ci -R s -Am2 | |
1420 | adding f6 |
|
1421 | adding f6 | |
1421 | adding f7 |
|
1422 | adding f7 | |
1422 | $ hg ci -m3 |
|
1423 | $ hg ci -m3 | |
1423 | Adding without a path or pattern with -S also adds files in subrepos |
|
1424 | Adding without a path or pattern with -S also adds files in subrepos | |
1424 | $ echo c8 > f8 |
|
1425 | $ echo c8 > f8 | |
1425 | $ echo c9 > s/f9 |
|
1426 | $ echo c9 > s/f9 | |
1426 | $ echo c10 > s/f10 |
|
1427 | $ echo c10 > s/f10 | |
1427 | $ hg st -S |
|
1428 | $ hg st -S | |
1428 | ? f8 |
|
1429 | ? f8 | |
1429 | ? s/f10 |
|
1430 | ? s/f10 | |
1430 | ? s/f9 |
|
1431 | ? s/f9 | |
1431 | $ hg add -S |
|
1432 | $ hg add -S | |
1432 | adding f8 |
|
1433 | adding f8 | |
1433 | adding s/f10 (glob) |
|
1434 | adding s/f10 (glob) | |
1434 | adding s/f9 (glob) |
|
1435 | adding s/f9 (glob) | |
1435 | $ hg st -S |
|
1436 | $ hg st -S | |
1436 | A f8 |
|
1437 | A f8 | |
1437 | A s/f10 |
|
1438 | A s/f10 | |
1438 | A s/f9 |
|
1439 | A s/f9 | |
1439 | $ hg ci -R s -m3 |
|
1440 | $ hg ci -R s -m3 | |
1440 | $ hg ci -m4 |
|
1441 | $ hg ci -m4 | |
1441 | Adding with a pattern silently ignores subrepos |
|
1442 | Adding with a pattern silently ignores subrepos | |
1442 | $ echo c11 > fm11 |
|
1443 | $ echo c11 > fm11 | |
1443 | $ echo c12 > fn12 |
|
1444 | $ echo c12 > fn12 | |
1444 | $ echo c13 > s/fm13 |
|
1445 | $ echo c13 > s/fm13 | |
1445 | $ echo c14 > s/fn14 |
|
1446 | $ echo c14 > s/fn14 | |
1446 | $ hg st -S |
|
1447 | $ hg st -S | |
1447 | ? fm11 |
|
1448 | ? fm11 | |
1448 | ? fn12 |
|
1449 | ? fn12 | |
1449 | ? s/fm13 |
|
1450 | ? s/fm13 | |
1450 | ? s/fn14 |
|
1451 | ? s/fn14 | |
1451 | $ hg add 'glob:**fm*' |
|
1452 | $ hg add 'glob:**fm*' | |
1452 | adding fm11 |
|
1453 | adding fm11 | |
1453 | $ hg st -S |
|
1454 | $ hg st -S | |
1454 | A fm11 |
|
1455 | A fm11 | |
1455 | ? fn12 |
|
1456 | ? fn12 | |
1456 | ? s/fm13 |
|
1457 | ? s/fm13 | |
1457 | ? s/fn14 |
|
1458 | ? s/fn14 | |
1458 | $ hg ci -R s -Am4 |
|
1459 | $ hg ci -R s -Am4 | |
1459 | adding fm13 |
|
1460 | adding fm13 | |
1460 | adding fn14 |
|
1461 | adding fn14 | |
1461 | $ hg ci -Am5 |
|
1462 | $ hg ci -Am5 | |
1462 | adding fn12 |
|
1463 | adding fn12 | |
1463 | Adding with a pattern with -S also adds matches in subrepos |
|
1464 | Adding with a pattern with -S also adds matches in subrepos | |
1464 | $ echo c15 > fm15 |
|
1465 | $ echo c15 > fm15 | |
1465 | $ echo c16 > fn16 |
|
1466 | $ echo c16 > fn16 | |
1466 | $ echo c17 > s/fm17 |
|
1467 | $ echo c17 > s/fm17 | |
1467 | $ echo c18 > s/fn18 |
|
1468 | $ echo c18 > s/fn18 | |
1468 | $ hg st -S |
|
1469 | $ hg st -S | |
1469 | ? fm15 |
|
1470 | ? fm15 | |
1470 | ? fn16 |
|
1471 | ? fn16 | |
1471 | ? s/fm17 |
|
1472 | ? s/fm17 | |
1472 | ? s/fn18 |
|
1473 | ? s/fn18 | |
1473 | $ hg add -S 'glob:**fm*' |
|
1474 | $ hg add -S 'glob:**fm*' | |
1474 | adding fm15 |
|
1475 | adding fm15 | |
1475 | adding s/fm17 (glob) |
|
1476 | adding s/fm17 (glob) | |
1476 | $ hg st -S |
|
1477 | $ hg st -S | |
1477 | A fm15 |
|
1478 | A fm15 | |
1478 | A s/fm17 |
|
1479 | A s/fm17 | |
1479 | ? fn16 |
|
1480 | ? fn16 | |
1480 | ? s/fn18 |
|
1481 | ? s/fn18 | |
1481 | $ hg ci -R s -Am5 |
|
1482 | $ hg ci -R s -Am5 | |
1482 | adding fn18 |
|
1483 | adding fn18 | |
1483 | $ hg ci -Am6 |
|
1484 | $ hg ci -Am6 | |
1484 | adding fn16 |
|
1485 | adding fn16 | |
1485 |
|
1486 | |||
1486 | Test behavior of forget for explicit path in subrepo: |
|
1487 | Test behavior of forget for explicit path in subrepo: | |
1487 | Forgetting an explicit path in a subrepo untracks the file |
|
1488 | Forgetting an explicit path in a subrepo untracks the file | |
1488 | $ echo c19 > s/f19 |
|
1489 | $ echo c19 > s/f19 | |
1489 | $ hg add s/f19 |
|
1490 | $ hg add s/f19 | |
1490 | $ hg st -S |
|
1491 | $ hg st -S | |
1491 | A s/f19 |
|
1492 | A s/f19 | |
1492 | $ hg forget s/f19 |
|
1493 | $ hg forget s/f19 | |
1493 | $ hg st -S |
|
1494 | $ hg st -S | |
1494 | ? s/f19 |
|
1495 | ? s/f19 | |
1495 | $ rm s/f19 |
|
1496 | $ rm s/f19 | |
1496 | $ cd .. |
|
1497 | $ cd .. | |
1497 |
|
1498 | |||
1498 | Courtesy phases synchronisation to publishing server does not block the push |
|
1499 | Courtesy phases synchronisation to publishing server does not block the push | |
1499 | (issue3781) |
|
1500 | (issue3781) | |
1500 |
|
1501 | |||
1501 | $ cp -r main issue3781 |
|
1502 | $ cp -r main issue3781 | |
1502 | $ cp -r main issue3781-dest |
|
1503 | $ cp -r main issue3781-dest | |
1503 | $ cd issue3781-dest/s |
|
1504 | $ cd issue3781-dest/s | |
1504 | $ hg phase tip # show we have draft changeset |
|
1505 | $ hg phase tip # show we have draft changeset | |
1505 | 5: draft |
|
1506 | 5: draft | |
1506 | $ chmod a-w .hg/store/phaseroots # prevent phase push |
|
1507 | $ chmod a-w .hg/store/phaseroots # prevent phase push | |
1507 | $ cd ../../issue3781 |
|
1508 | $ cd ../../issue3781 | |
1508 | $ cat >> .hg/hgrc << EOF |
|
1509 | $ cat >> .hg/hgrc << EOF | |
1509 | > [paths] |
|
1510 | > [paths] | |
1510 | > default=../issue3781-dest/ |
|
1511 | > default=../issue3781-dest/ | |
1511 | > EOF |
|
1512 | > EOF | |
1512 | $ hg push --config experimental.bundle2-exp=False |
|
1513 | $ hg push --config experimental.bundle2-exp=False | |
1513 | pushing to $TESTTMP/issue3781-dest (glob) |
|
1514 | pushing to $TESTTMP/issue3781-dest (glob) | |
1514 | pushing subrepo s to $TESTTMP/issue3781-dest/s |
|
1515 | pushing subrepo s to $TESTTMP/issue3781-dest/s | |
1515 | searching for changes |
|
1516 | searching for changes | |
1516 | no changes found |
|
1517 | no changes found | |
1517 | searching for changes |
|
1518 | searching for changes | |
1518 | no changes found |
|
1519 | no changes found | |
1519 | [1] |
|
1520 | [1] | |
1520 | # clean the push cache |
|
1521 | # clean the push cache | |
1521 | $ rm s/.hg/cache/storehash/* |
|
1522 | $ rm s/.hg/cache/storehash/* | |
1522 | $ hg push --config experimental.bundle2-exp=True |
|
1523 | $ hg push --config experimental.bundle2-exp=True | |
1523 | pushing to $TESTTMP/issue3781-dest (glob) |
|
1524 | pushing to $TESTTMP/issue3781-dest (glob) | |
1524 | pushing subrepo s to $TESTTMP/issue3781-dest/s |
|
1525 | pushing subrepo s to $TESTTMP/issue3781-dest/s | |
1525 | searching for changes |
|
1526 | searching for changes | |
1526 | no changes found |
|
1527 | no changes found | |
1527 | searching for changes |
|
1528 | searching for changes | |
1528 | no changes found |
|
1529 | no changes found | |
1529 | [1] |
|
1530 | [1] | |
1530 | $ cd .. |
|
1531 | $ cd .. | |
1531 |
|
1532 | |||
1532 | Test phase choice for newly created commit with "phases.subrepochecks" |
|
1533 | Test phase choice for newly created commit with "phases.subrepochecks" | |
1533 | configuration |
|
1534 | configuration | |
1534 |
|
1535 | |||
1535 | $ cd t |
|
1536 | $ cd t | |
1536 | $ hg update -q -r 12 |
|
1537 | $ hg update -q -r 12 | |
1537 |
|
1538 | |||
1538 | $ cat >> s/ss/.hg/hgrc <<EOF |
|
1539 | $ cat >> s/ss/.hg/hgrc <<EOF | |
1539 | > [phases] |
|
1540 | > [phases] | |
1540 | > new-commit = secret |
|
1541 | > new-commit = secret | |
1541 | > EOF |
|
1542 | > EOF | |
1542 | $ cat >> s/.hg/hgrc <<EOF |
|
1543 | $ cat >> s/.hg/hgrc <<EOF | |
1543 | > [phases] |
|
1544 | > [phases] | |
1544 | > new-commit = draft |
|
1545 | > new-commit = draft | |
1545 | > EOF |
|
1546 | > EOF | |
1546 | $ echo phasecheck1 >> s/ss/a |
|
1547 | $ echo phasecheck1 >> s/ss/a | |
1547 | $ hg -R s commit -S --config phases.checksubrepos=abort -m phasecheck1 |
|
1548 | $ hg -R s commit -S --config phases.checksubrepos=abort -m phasecheck1 | |
1548 | committing subrepository ss |
|
1549 | committing subrepository ss | |
1549 | transaction abort! |
|
1550 | transaction abort! | |
1550 | rollback completed |
|
1551 | rollback completed | |
1551 | abort: can't commit in draft phase conflicting secret from subrepository ss |
|
1552 | abort: can't commit in draft phase conflicting secret from subrepository ss | |
1552 | [255] |
|
1553 | [255] | |
1553 | $ echo phasecheck2 >> s/ss/a |
|
1554 | $ echo phasecheck2 >> s/ss/a | |
1554 | $ hg -R s commit -S --config phases.checksubrepos=ignore -m phasecheck2 |
|
1555 | $ hg -R s commit -S --config phases.checksubrepos=ignore -m phasecheck2 | |
1555 | committing subrepository ss |
|
1556 | committing subrepository ss | |
1556 | $ hg -R s/ss phase tip |
|
1557 | $ hg -R s/ss phase tip | |
1557 | 3: secret |
|
1558 | 3: secret | |
1558 | $ hg -R s phase tip |
|
1559 | $ hg -R s phase tip | |
1559 | 6: draft |
|
1560 | 6: draft | |
1560 | $ echo phasecheck3 >> s/ss/a |
|
1561 | $ echo phasecheck3 >> s/ss/a | |
1561 | $ hg -R s commit -S -m phasecheck3 |
|
1562 | $ hg -R s commit -S -m phasecheck3 | |
1562 | committing subrepository ss |
|
1563 | committing subrepository ss | |
1563 | warning: changes are committed in secret phase from subrepository ss |
|
1564 | warning: changes are committed in secret phase from subrepository ss | |
1564 | $ hg -R s/ss phase tip |
|
1565 | $ hg -R s/ss phase tip | |
1565 | 4: secret |
|
1566 | 4: secret | |
1566 | $ hg -R s phase tip |
|
1567 | $ hg -R s phase tip | |
1567 | 7: secret |
|
1568 | 7: secret | |
1568 |
|
1569 | |||
1569 | $ cat >> t/.hg/hgrc <<EOF |
|
1570 | $ cat >> t/.hg/hgrc <<EOF | |
1570 | > [phases] |
|
1571 | > [phases] | |
1571 | > new-commit = draft |
|
1572 | > new-commit = draft | |
1572 | > EOF |
|
1573 | > EOF | |
1573 | $ cat >> .hg/hgrc <<EOF |
|
1574 | $ cat >> .hg/hgrc <<EOF | |
1574 | > [phases] |
|
1575 | > [phases] | |
1575 | > new-commit = public |
|
1576 | > new-commit = public | |
1576 | > EOF |
|
1577 | > EOF | |
1577 | $ echo phasecheck4 >> s/ss/a |
|
1578 | $ echo phasecheck4 >> s/ss/a | |
1578 | $ echo phasecheck4 >> t/t |
|
1579 | $ echo phasecheck4 >> t/t | |
1579 | $ hg commit -S -m phasecheck4 |
|
1580 | $ hg commit -S -m phasecheck4 | |
1580 | committing subrepository s |
|
1581 | committing subrepository s | |
1581 | committing subrepository s/ss (glob) |
|
1582 | committing subrepository s/ss (glob) | |
1582 | warning: changes are committed in secret phase from subrepository ss |
|
1583 | warning: changes are committed in secret phase from subrepository ss | |
1583 | committing subrepository t |
|
1584 | committing subrepository t | |
1584 | warning: changes are committed in secret phase from subrepository s |
|
1585 | warning: changes are committed in secret phase from subrepository s | |
1585 | created new head |
|
1586 | created new head | |
1586 | $ hg -R s/ss phase tip |
|
1587 | $ hg -R s/ss phase tip | |
1587 | 5: secret |
|
1588 | 5: secret | |
1588 | $ hg -R s phase tip |
|
1589 | $ hg -R s phase tip | |
1589 | 8: secret |
|
1590 | 8: secret | |
1590 | $ hg -R t phase tip |
|
1591 | $ hg -R t phase tip | |
1591 | 6: draft |
|
1592 | 6: draft | |
1592 | $ hg phase tip |
|
1593 | $ hg phase tip | |
1593 | 15: secret |
|
1594 | 15: secret | |
1594 |
|
1595 | |||
1595 | $ cd .. |
|
1596 | $ cd .. | |
1596 |
|
1597 | |||
1597 |
|
1598 | |||
1598 | Test that commit --secret works on both repo and subrepo (issue4182) |
|
1599 | Test that commit --secret works on both repo and subrepo (issue4182) | |
1599 |
|
1600 | |||
1600 | $ cd main |
|
1601 | $ cd main | |
1601 | $ echo secret >> b |
|
1602 | $ echo secret >> b | |
1602 | $ echo secret >> s/b |
|
1603 | $ echo secret >> s/b | |
1603 | $ hg commit --secret --subrepo -m "secret" |
|
1604 | $ hg commit --secret --subrepo -m "secret" | |
1604 | committing subrepository s |
|
1605 | committing subrepository s | |
1605 | $ hg phase -r . |
|
1606 | $ hg phase -r . | |
1606 | 6: secret |
|
1607 | 6: secret | |
1607 | $ cd s |
|
1608 | $ cd s | |
1608 | $ hg phase -r . |
|
1609 | $ hg phase -r . | |
1609 | 6: secret |
|
1610 | 6: secret | |
1610 | $ cd ../../ |
|
1611 | $ cd ../../ | |
1611 |
|
1612 | |||
1612 | Test "subrepos" template keyword |
|
1613 | Test "subrepos" template keyword | |
1613 |
|
1614 | |||
1614 | $ cd t |
|
1615 | $ cd t | |
1615 | $ hg update -q 15 |
|
1616 | $ hg update -q 15 | |
1616 | $ cat > .hgsub <<EOF |
|
1617 | $ cat > .hgsub <<EOF | |
1617 | > s = s |
|
1618 | > s = s | |
1618 | > EOF |
|
1619 | > EOF | |
1619 | $ hg commit -m "16" |
|
1620 | $ hg commit -m "16" | |
1620 | warning: changes are committed in secret phase from subrepository s |
|
1621 | warning: changes are committed in secret phase from subrepository s | |
1621 |
|
1622 | |||
1622 | (addition of ".hgsub" itself) |
|
1623 | (addition of ".hgsub" itself) | |
1623 |
|
1624 | |||
1624 | $ hg diff --nodates -c 1 .hgsubstate |
|
1625 | $ hg diff --nodates -c 1 .hgsubstate | |
1625 | diff -r f7b1eb17ad24 -r 7cf8cfea66e4 .hgsubstate |
|
1626 | diff -r f7b1eb17ad24 -r 7cf8cfea66e4 .hgsubstate | |
1626 | --- /dev/null |
|
1627 | --- /dev/null | |
1627 | +++ b/.hgsubstate |
|
1628 | +++ b/.hgsubstate | |
1628 | @@ -0,0 +1,1 @@ |
|
1629 | @@ -0,0 +1,1 @@ | |
1629 | +e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
1630 | +e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s | |
1630 | $ hg log -r 1 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" |
|
1631 | $ hg log -r 1 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" | |
1631 | f7b1eb17ad24 000000000000 |
|
1632 | f7b1eb17ad24 000000000000 | |
1632 | s |
|
1633 | s | |
1633 |
|
1634 | |||
1634 | (modification of existing entry) |
|
1635 | (modification of existing entry) | |
1635 |
|
1636 | |||
1636 | $ hg diff --nodates -c 2 .hgsubstate |
|
1637 | $ hg diff --nodates -c 2 .hgsubstate | |
1637 | diff -r 7cf8cfea66e4 -r df30734270ae .hgsubstate |
|
1638 | diff -r 7cf8cfea66e4 -r df30734270ae .hgsubstate | |
1638 | --- a/.hgsubstate |
|
1639 | --- a/.hgsubstate | |
1639 | +++ b/.hgsubstate |
|
1640 | +++ b/.hgsubstate | |
1640 | @@ -1,1 +1,1 @@ |
|
1641 | @@ -1,1 +1,1 @@ | |
1641 | -e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
1642 | -e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s | |
1642 | +dc73e2e6d2675eb2e41e33c205f4bdab4ea5111d s |
|
1643 | +dc73e2e6d2675eb2e41e33c205f4bdab4ea5111d s | |
1643 | $ hg log -r 2 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" |
|
1644 | $ hg log -r 2 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" | |
1644 | 7cf8cfea66e4 000000000000 |
|
1645 | 7cf8cfea66e4 000000000000 | |
1645 | s |
|
1646 | s | |
1646 |
|
1647 | |||
1647 | (addition of entry) |
|
1648 | (addition of entry) | |
1648 |
|
1649 | |||
1649 | $ hg diff --nodates -c 5 .hgsubstate |
|
1650 | $ hg diff --nodates -c 5 .hgsubstate | |
1650 | diff -r 7cf8cfea66e4 -r 1f14a2e2d3ec .hgsubstate |
|
1651 | diff -r 7cf8cfea66e4 -r 1f14a2e2d3ec .hgsubstate | |
1651 | --- a/.hgsubstate |
|
1652 | --- a/.hgsubstate | |
1652 | +++ b/.hgsubstate |
|
1653 | +++ b/.hgsubstate | |
1653 | @@ -1,1 +1,2 @@ |
|
1654 | @@ -1,1 +1,2 @@ | |
1654 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
1655 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s | |
1655 | +60ca1237c19474e7a3978b0dc1ca4e6f36d51382 t |
|
1656 | +60ca1237c19474e7a3978b0dc1ca4e6f36d51382 t | |
1656 | $ hg log -r 5 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" |
|
1657 | $ hg log -r 5 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" | |
1657 | 7cf8cfea66e4 000000000000 |
|
1658 | 7cf8cfea66e4 000000000000 | |
1658 | t |
|
1659 | t | |
1659 |
|
1660 | |||
1660 | (removal of existing entry) |
|
1661 | (removal of existing entry) | |
1661 |
|
1662 | |||
1662 | $ hg diff --nodates -c 16 .hgsubstate |
|
1663 | $ hg diff --nodates -c 16 .hgsubstate | |
1663 | diff -r 8bec38d2bd0b -r f2f70bc3d3c9 .hgsubstate |
|
1664 | diff -r 8bec38d2bd0b -r f2f70bc3d3c9 .hgsubstate | |
1664 | --- a/.hgsubstate |
|
1665 | --- a/.hgsubstate | |
1665 | +++ b/.hgsubstate |
|
1666 | +++ b/.hgsubstate | |
1666 | @@ -1,2 +1,1 @@ |
|
1667 | @@ -1,2 +1,1 @@ | |
1667 | 0731af8ca9423976d3743119d0865097c07bdc1b s |
|
1668 | 0731af8ca9423976d3743119d0865097c07bdc1b s | |
1668 | -e202dc79b04c88a636ea8913d9182a1346d9b3dc t |
|
1669 | -e202dc79b04c88a636ea8913d9182a1346d9b3dc t | |
1669 | $ hg log -r 16 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" |
|
1670 | $ hg log -r 16 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" | |
1670 | 8bec38d2bd0b 000000000000 |
|
1671 | 8bec38d2bd0b 000000000000 | |
1671 | t |
|
1672 | t | |
1672 |
|
1673 | |||
1673 | (merging) |
|
1674 | (merging) | |
1674 |
|
1675 | |||
1675 | $ hg diff --nodates -c 9 .hgsubstate |
|
1676 | $ hg diff --nodates -c 9 .hgsubstate | |
1676 | diff -r f6affe3fbfaa -r f0d2028bf86d .hgsubstate |
|
1677 | diff -r f6affe3fbfaa -r f0d2028bf86d .hgsubstate | |
1677 | --- a/.hgsubstate |
|
1678 | --- a/.hgsubstate | |
1678 | +++ b/.hgsubstate |
|
1679 | +++ b/.hgsubstate | |
1679 | @@ -1,1 +1,2 @@ |
|
1680 | @@ -1,1 +1,2 @@ | |
1680 | fc627a69481fcbe5f1135069e8a3881c023e4cf5 s |
|
1681 | fc627a69481fcbe5f1135069e8a3881c023e4cf5 s | |
1681 | +60ca1237c19474e7a3978b0dc1ca4e6f36d51382 t |
|
1682 | +60ca1237c19474e7a3978b0dc1ca4e6f36d51382 t | |
1682 | $ hg log -r 9 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" |
|
1683 | $ hg log -r 9 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" | |
1683 | f6affe3fbfaa 1f14a2e2d3ec |
|
1684 | f6affe3fbfaa 1f14a2e2d3ec | |
1684 | t |
|
1685 | t | |
1685 |
|
1686 | |||
1686 | (removal of ".hgsub" itself) |
|
1687 | (removal of ".hgsub" itself) | |
1687 |
|
1688 | |||
1688 | $ hg diff --nodates -c 8 .hgsubstate |
|
1689 | $ hg diff --nodates -c 8 .hgsubstate | |
1689 | diff -r f94576341bcf -r 96615c1dad2d .hgsubstate |
|
1690 | diff -r f94576341bcf -r 96615c1dad2d .hgsubstate | |
1690 | --- a/.hgsubstate |
|
1691 | --- a/.hgsubstate | |
1691 | +++ /dev/null |
|
1692 | +++ /dev/null | |
1692 | @@ -1,2 +0,0 @@ |
|
1693 | @@ -1,2 +0,0 @@ | |
1693 | -e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
1694 | -e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s | |
1694 | -7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4 t |
|
1695 | -7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4 t | |
1695 | $ hg log -r 8 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" |
|
1696 | $ hg log -r 8 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" | |
1696 | f94576341bcf 000000000000 |
|
1697 | f94576341bcf 000000000000 | |
1697 |
|
1698 | |||
1698 | Test that '[paths]' is configured correctly at subrepo creation |
|
1699 | Test that '[paths]' is configured correctly at subrepo creation | |
1699 |
|
1700 | |||
1700 | $ cd $TESTTMP/tc |
|
1701 | $ cd $TESTTMP/tc | |
1701 | $ cat > .hgsub <<EOF |
|
1702 | $ cat > .hgsub <<EOF | |
1702 | > # to clear bogus subrepo path 'bogus=[boguspath' |
|
1703 | > # to clear bogus subrepo path 'bogus=[boguspath' | |
1703 | > s = s |
|
1704 | > s = s | |
1704 | > t = t |
|
1705 | > t = t | |
1705 | > EOF |
|
1706 | > EOF | |
1706 | $ hg update -q --clean null |
|
1707 | $ hg update -q --clean null | |
1707 | $ rm -rf s t |
|
1708 | $ rm -rf s t | |
1708 | $ cat >> .hg/hgrc <<EOF |
|
1709 | $ cat >> .hg/hgrc <<EOF | |
1709 | > [paths] |
|
1710 | > [paths] | |
1710 | > default-push = /foo/bar |
|
1711 | > default-push = /foo/bar | |
1711 | > EOF |
|
1712 | > EOF | |
1712 | $ hg update -q |
|
1713 | $ hg update -q | |
1713 | $ cat s/.hg/hgrc |
|
1714 | $ cat s/.hg/hgrc | |
1714 | [paths] |
|
1715 | [paths] | |
1715 | default = $TESTTMP/t/s |
|
1716 | default = $TESTTMP/t/s | |
1716 | default-push = /foo/bar/s |
|
1717 | default-push = /foo/bar/s | |
1717 | $ cat s/ss/.hg/hgrc |
|
1718 | $ cat s/ss/.hg/hgrc | |
1718 | [paths] |
|
1719 | [paths] | |
1719 | default = $TESTTMP/t/s/ss |
|
1720 | default = $TESTTMP/t/s/ss | |
1720 | default-push = /foo/bar/s/ss |
|
1721 | default-push = /foo/bar/s/ss | |
1721 | $ cat t/.hg/hgrc |
|
1722 | $ cat t/.hg/hgrc | |
1722 | [paths] |
|
1723 | [paths] | |
1723 | default = $TESTTMP/t/t |
|
1724 | default = $TESTTMP/t/t | |
1724 | default-push = /foo/bar/t |
|
1725 | default-push = /foo/bar/t | |
1725 |
|
1726 | |||
1726 | $ cd $TESTTMP/t |
|
1727 | $ cd $TESTTMP/t | |
1727 | $ hg up -qC 0 |
|
1728 | $ hg up -qC 0 | |
1728 | $ echo 'bar' > bar.txt |
|
1729 | $ echo 'bar' > bar.txt | |
1729 | $ hg ci -Am 'branch before subrepo add' |
|
1730 | $ hg ci -Am 'branch before subrepo add' | |
1730 | adding bar.txt |
|
1731 | adding bar.txt | |
1731 | created new head |
|
1732 | created new head | |
1732 | $ hg merge -r "first(subrepo('s'))" |
|
1733 | $ hg merge -r "first(subrepo('s'))" | |
1733 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1734 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1734 | (branch merge, don't forget to commit) |
|
1735 | (branch merge, don't forget to commit) | |
1735 | $ hg status -S -X '.hgsub*' |
|
1736 | $ hg status -S -X '.hgsub*' | |
1736 | A s/a |
|
1737 | A s/a | |
1737 | ? s/b |
|
1738 | ? s/b | |
1738 | ? s/c |
|
1739 | ? s/c | |
1739 | ? s/f1 |
|
1740 | ? s/f1 | |
1740 | $ hg status -S --rev 'p2()' |
|
1741 | $ hg status -S --rev 'p2()' | |
1741 | A bar.txt |
|
1742 | A bar.txt | |
1742 | ? s/b |
|
1743 | ? s/b | |
1743 | ? s/c |
|
1744 | ? s/c | |
1744 | ? s/f1 |
|
1745 | ? s/f1 | |
1745 | $ hg diff -S -X '.hgsub*' --nodates |
|
1746 | $ hg diff -S -X '.hgsub*' --nodates | |
1746 | diff -r 000000000000 s/a |
|
1747 | diff -r 000000000000 s/a | |
1747 | --- /dev/null |
|
1748 | --- /dev/null | |
1748 | +++ b/s/a |
|
1749 | +++ b/s/a | |
1749 | @@ -0,0 +1,1 @@ |
|
1750 | @@ -0,0 +1,1 @@ | |
1750 | +a |
|
1751 | +a | |
1751 | $ hg diff -S --rev 'p2()' --nodates |
|
1752 | $ hg diff -S --rev 'p2()' --nodates | |
1752 | diff -r 7cf8cfea66e4 bar.txt |
|
1753 | diff -r 7cf8cfea66e4 bar.txt | |
1753 | --- /dev/null |
|
1754 | --- /dev/null | |
1754 | +++ b/bar.txt |
|
1755 | +++ b/bar.txt | |
1755 | @@ -0,0 +1,1 @@ |
|
1756 | @@ -0,0 +1,1 @@ | |
1756 | +bar |
|
1757 | +bar | |
1757 |
|
1758 | |||
1758 | $ cd .. |
|
1759 | $ cd .. |
@@ -1,228 +1,231 b'' | |||||
1 | $ HGMERGE=true; export HGMERGE |
|
1 | $ HGMERGE=true; export HGMERGE | |
2 |
|
2 | |||
3 | $ hg init r1 |
|
3 | $ hg init r1 | |
4 | $ cd r1 |
|
4 | $ cd r1 | |
5 | $ echo a > a |
|
5 | $ echo a > a | |
6 | $ hg addremove |
|
6 | $ hg addremove | |
7 | adding a |
|
7 | adding a | |
8 | $ hg commit -m "1" |
|
8 | $ hg commit -m "1" | |
9 |
|
9 | |||
10 | $ hg clone . ../r2 |
|
10 | $ hg clone . ../r2 | |
11 | updating to branch default |
|
11 | updating to branch default | |
12 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
12 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
13 | $ cd ../r2 |
|
13 | $ cd ../r2 | |
14 | $ hg up |
|
14 | $ hg up | |
15 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
15 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
16 | $ echo abc > a |
|
16 | $ echo abc > a | |
17 | $ hg diff --nodates |
|
17 | $ hg diff --nodates | |
18 | diff -r c19d34741b0a a |
|
18 | diff -r c19d34741b0a a | |
19 | --- a/a |
|
19 | --- a/a | |
20 | +++ b/a |
|
20 | +++ b/a | |
21 | @@ -1,1 +1,1 @@ |
|
21 | @@ -1,1 +1,1 @@ | |
22 | -a |
|
22 | -a | |
23 | +abc |
|
23 | +abc | |
24 |
|
24 | |||
25 | $ cd ../r1 |
|
25 | $ cd ../r1 | |
26 | $ echo b > b |
|
26 | $ echo b > b | |
27 | $ echo a2 > a |
|
27 | $ echo a2 > a | |
28 | $ hg addremove |
|
28 | $ hg addremove | |
29 | adding b |
|
29 | adding b | |
30 | $ hg commit -m "2" |
|
30 | $ hg commit -m "2" | |
31 |
|
31 | |||
32 | $ cd ../r2 |
|
32 | $ cd ../r2 | |
33 | $ hg -q pull ../r1 |
|
33 | $ hg -q pull ../r1 | |
34 | $ hg status |
|
34 | $ hg status | |
35 | M a |
|
35 | M a | |
36 | $ hg parents |
|
36 | $ hg parents | |
37 | changeset: 0:c19d34741b0a |
|
37 | changeset: 0:c19d34741b0a | |
38 | user: test |
|
38 | user: test | |
39 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
39 | date: Thu Jan 01 00:00:00 1970 +0000 | |
40 | summary: 1 |
|
40 | summary: 1 | |
41 |
|
41 | |||
42 | $ hg --debug up |
|
42 | $ hg --debug up | |
43 | searching for copies back to rev 1 |
|
43 | searching for copies back to rev 1 | |
44 | unmatched files in other: |
|
44 | unmatched files in other: | |
45 | b |
|
45 | b | |
46 | resolving manifests |
|
46 | resolving manifests | |
47 | branchmerge: False, force: False, partial: False |
|
47 | branchmerge: False, force: False, partial: False | |
48 | ancestor: c19d34741b0a, local: c19d34741b0a+, remote: 1e71731e6fbb |
|
48 | ancestor: c19d34741b0a, local: c19d34741b0a+, remote: 1e71731e6fbb | |
49 | preserving a for resolve of a |
|
49 | preserving a for resolve of a | |
50 | b: remote created -> g |
|
50 | b: remote created -> g | |
51 | getting b |
|
51 | getting b | |
52 | a: versions differ -> m |
|
52 | a: versions differ -> m (premerge) | |
53 | picked tool 'true' for a (binary False symlink False) |
|
53 | picked tool 'true' for a (binary False symlink False) | |
54 | merging a |
|
54 | merging a | |
55 | my a@c19d34741b0a+ other a@1e71731e6fbb ancestor a@c19d34741b0a |
|
55 | my a@c19d34741b0a+ other a@1e71731e6fbb ancestor a@c19d34741b0a | |
|
56 | a: versions differ -> m (merge) | |||
56 | picked tool 'true' for a (binary False symlink False) |
|
57 | picked tool 'true' for a (binary False symlink False) | |
57 | my a@c19d34741b0a+ other a@1e71731e6fbb ancestor a@c19d34741b0a |
|
58 | my a@c19d34741b0a+ other a@1e71731e6fbb ancestor a@c19d34741b0a | |
58 | launching merge tool: true *$TESTTMP/r2/a* * * (glob) |
|
59 | launching merge tool: true *$TESTTMP/r2/a* * * (glob) | |
59 | merge tool returned: 0 |
|
60 | merge tool returned: 0 | |
60 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
61 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
61 | $ hg parents |
|
62 | $ hg parents | |
62 | changeset: 1:1e71731e6fbb |
|
63 | changeset: 1:1e71731e6fbb | |
63 | tag: tip |
|
64 | tag: tip | |
64 | user: test |
|
65 | user: test | |
65 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
66 | date: Thu Jan 01 00:00:00 1970 +0000 | |
66 | summary: 2 |
|
67 | summary: 2 | |
67 |
|
68 | |||
68 | $ hg --debug up 0 |
|
69 | $ hg --debug up 0 | |
69 | resolving manifests |
|
70 | resolving manifests | |
70 | branchmerge: False, force: False, partial: False |
|
71 | branchmerge: False, force: False, partial: False | |
71 | ancestor: 1e71731e6fbb, local: 1e71731e6fbb+, remote: c19d34741b0a |
|
72 | ancestor: 1e71731e6fbb, local: 1e71731e6fbb+, remote: c19d34741b0a | |
72 | preserving a for resolve of a |
|
73 | preserving a for resolve of a | |
73 | b: other deleted -> r |
|
74 | b: other deleted -> r | |
74 | removing b |
|
75 | removing b | |
75 | a: versions differ -> m |
|
76 | a: versions differ -> m (premerge) | |
76 | picked tool 'true' for a (binary False symlink False) |
|
77 | picked tool 'true' for a (binary False symlink False) | |
77 | merging a |
|
78 | merging a | |
78 | my a@1e71731e6fbb+ other a@c19d34741b0a ancestor a@1e71731e6fbb |
|
79 | my a@1e71731e6fbb+ other a@c19d34741b0a ancestor a@1e71731e6fbb | |
|
80 | a: versions differ -> m (merge) | |||
79 | picked tool 'true' for a (binary False symlink False) |
|
81 | picked tool 'true' for a (binary False symlink False) | |
80 | my a@1e71731e6fbb+ other a@c19d34741b0a ancestor a@1e71731e6fbb |
|
82 | my a@1e71731e6fbb+ other a@c19d34741b0a ancestor a@1e71731e6fbb | |
81 | launching merge tool: true *$TESTTMP/r2/a* * * (glob) |
|
83 | launching merge tool: true *$TESTTMP/r2/a* * * (glob) | |
82 | merge tool returned: 0 |
|
84 | merge tool returned: 0 | |
83 | 0 files updated, 1 files merged, 1 files removed, 0 files unresolved |
|
85 | 0 files updated, 1 files merged, 1 files removed, 0 files unresolved | |
84 | $ hg parents |
|
86 | $ hg parents | |
85 | changeset: 0:c19d34741b0a |
|
87 | changeset: 0:c19d34741b0a | |
86 | user: test |
|
88 | user: test | |
87 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
89 | date: Thu Jan 01 00:00:00 1970 +0000 | |
88 | summary: 1 |
|
90 | summary: 1 | |
89 |
|
91 | |||
90 | $ hg parents |
|
92 | $ hg parents | |
91 | changeset: 0:c19d34741b0a |
|
93 | changeset: 0:c19d34741b0a | |
92 | user: test |
|
94 | user: test | |
93 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
95 | date: Thu Jan 01 00:00:00 1970 +0000 | |
94 | summary: 1 |
|
96 | summary: 1 | |
95 |
|
97 | |||
96 | $ hg --debug up |
|
98 | $ hg --debug up | |
97 | searching for copies back to rev 1 |
|
99 | searching for copies back to rev 1 | |
98 | unmatched files in other: |
|
100 | unmatched files in other: | |
99 | b |
|
101 | b | |
100 | resolving manifests |
|
102 | resolving manifests | |
101 | branchmerge: False, force: False, partial: False |
|
103 | branchmerge: False, force: False, partial: False | |
102 | ancestor: c19d34741b0a, local: c19d34741b0a+, remote: 1e71731e6fbb |
|
104 | ancestor: c19d34741b0a, local: c19d34741b0a+, remote: 1e71731e6fbb | |
103 | preserving a for resolve of a |
|
105 | preserving a for resolve of a | |
104 | b: remote created -> g |
|
106 | b: remote created -> g | |
105 | getting b |
|
107 | getting b | |
106 | a: versions differ -> m |
|
108 | a: versions differ -> m (premerge) | |
107 | picked tool 'true' for a (binary False symlink False) |
|
109 | picked tool 'true' for a (binary False symlink False) | |
108 | merging a |
|
110 | merging a | |
109 | my a@c19d34741b0a+ other a@1e71731e6fbb ancestor a@c19d34741b0a |
|
111 | my a@c19d34741b0a+ other a@1e71731e6fbb ancestor a@c19d34741b0a | |
|
112 | a: versions differ -> m (merge) | |||
110 | picked tool 'true' for a (binary False symlink False) |
|
113 | picked tool 'true' for a (binary False symlink False) | |
111 | my a@c19d34741b0a+ other a@1e71731e6fbb ancestor a@c19d34741b0a |
|
114 | my a@c19d34741b0a+ other a@1e71731e6fbb ancestor a@c19d34741b0a | |
112 | launching merge tool: true *$TESTTMP/r2/a* * * (glob) |
|
115 | launching merge tool: true *$TESTTMP/r2/a* * * (glob) | |
113 | merge tool returned: 0 |
|
116 | merge tool returned: 0 | |
114 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
117 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
115 | $ hg parents |
|
118 | $ hg parents | |
116 | changeset: 1:1e71731e6fbb |
|
119 | changeset: 1:1e71731e6fbb | |
117 | tag: tip |
|
120 | tag: tip | |
118 | user: test |
|
121 | user: test | |
119 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
122 | date: Thu Jan 01 00:00:00 1970 +0000 | |
120 | summary: 2 |
|
123 | summary: 2 | |
121 |
|
124 | |||
122 | $ hg -v history |
|
125 | $ hg -v history | |
123 | changeset: 1:1e71731e6fbb |
|
126 | changeset: 1:1e71731e6fbb | |
124 | tag: tip |
|
127 | tag: tip | |
125 | user: test |
|
128 | user: test | |
126 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
129 | date: Thu Jan 01 00:00:00 1970 +0000 | |
127 | files: a b |
|
130 | files: a b | |
128 | description: |
|
131 | description: | |
129 | 2 |
|
132 | 2 | |
130 |
|
133 | |||
131 |
|
134 | |||
132 | changeset: 0:c19d34741b0a |
|
135 | changeset: 0:c19d34741b0a | |
133 | user: test |
|
136 | user: test | |
134 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
137 | date: Thu Jan 01 00:00:00 1970 +0000 | |
135 | files: a |
|
138 | files: a | |
136 | description: |
|
139 | description: | |
137 | 1 |
|
140 | 1 | |
138 |
|
141 | |||
139 |
|
142 | |||
140 | $ hg diff --nodates |
|
143 | $ hg diff --nodates | |
141 | diff -r 1e71731e6fbb a |
|
144 | diff -r 1e71731e6fbb a | |
142 | --- a/a |
|
145 | --- a/a | |
143 | +++ b/a |
|
146 | +++ b/a | |
144 | @@ -1,1 +1,1 @@ |
|
147 | @@ -1,1 +1,1 @@ | |
145 | -a2 |
|
148 | -a2 | |
146 | +abc |
|
149 | +abc | |
147 |
|
150 | |||
148 |
|
151 | |||
149 | create a second head |
|
152 | create a second head | |
150 |
|
153 | |||
151 | $ cd ../r1 |
|
154 | $ cd ../r1 | |
152 | $ hg up 0 |
|
155 | $ hg up 0 | |
153 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
156 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
154 | $ echo b2 > b |
|
157 | $ echo b2 > b | |
155 | $ echo a3 > a |
|
158 | $ echo a3 > a | |
156 | $ hg addremove |
|
159 | $ hg addremove | |
157 | adding b |
|
160 | adding b | |
158 | $ hg commit -m "3" |
|
161 | $ hg commit -m "3" | |
159 | created new head |
|
162 | created new head | |
160 |
|
163 | |||
161 | $ cd ../r2 |
|
164 | $ cd ../r2 | |
162 | $ hg -q pull ../r1 |
|
165 | $ hg -q pull ../r1 | |
163 | $ hg status |
|
166 | $ hg status | |
164 | M a |
|
167 | M a | |
165 | $ hg parents |
|
168 | $ hg parents | |
166 | changeset: 1:1e71731e6fbb |
|
169 | changeset: 1:1e71731e6fbb | |
167 | user: test |
|
170 | user: test | |
168 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
171 | date: Thu Jan 01 00:00:00 1970 +0000 | |
169 | summary: 2 |
|
172 | summary: 2 | |
170 |
|
173 | |||
171 | $ hg --debug up |
|
174 | $ hg --debug up | |
172 | abort: uncommitted changes |
|
175 | abort: uncommitted changes | |
173 | (commit and merge, or update --clean to discard changes) |
|
176 | (commit and merge, or update --clean to discard changes) | |
174 | [255] |
|
177 | [255] | |
175 |
|
178 | |||
176 | test conflicting untracked files |
|
179 | test conflicting untracked files | |
177 |
|
180 | |||
178 | $ hg up -qC 0 |
|
181 | $ hg up -qC 0 | |
179 | $ echo untracked > b |
|
182 | $ echo untracked > b | |
180 | $ hg st |
|
183 | $ hg st | |
181 | ? b |
|
184 | ? b | |
182 | $ hg up 1 |
|
185 | $ hg up 1 | |
183 | b: untracked file differs |
|
186 | b: untracked file differs | |
184 | abort: untracked files in working directory differ from files in requested revision |
|
187 | abort: untracked files in working directory differ from files in requested revision | |
185 | [255] |
|
188 | [255] | |
186 | $ rm b |
|
189 | $ rm b | |
187 |
|
190 | |||
188 | test conflicting untracked ignored file |
|
191 | test conflicting untracked ignored file | |
189 |
|
192 | |||
190 | $ hg up -qC 0 |
|
193 | $ hg up -qC 0 | |
191 | $ echo ignored > .hgignore |
|
194 | $ echo ignored > .hgignore | |
192 | $ hg add .hgignore |
|
195 | $ hg add .hgignore | |
193 | $ hg ci -m 'add .hgignore' |
|
196 | $ hg ci -m 'add .hgignore' | |
194 | created new head |
|
197 | created new head | |
195 | $ echo ignored > ignored |
|
198 | $ echo ignored > ignored | |
196 | $ hg add ignored |
|
199 | $ hg add ignored | |
197 | $ hg ci -m 'add ignored file' |
|
200 | $ hg ci -m 'add ignored file' | |
198 |
|
201 | |||
199 | $ hg up -q 'desc("add .hgignore")' |
|
202 | $ hg up -q 'desc("add .hgignore")' | |
200 | $ echo untracked > ignored |
|
203 | $ echo untracked > ignored | |
201 | $ hg st |
|
204 | $ hg st | |
202 | $ hg up 'desc("add ignored file")' |
|
205 | $ hg up 'desc("add ignored file")' | |
203 | ignored: untracked file differs |
|
206 | ignored: untracked file differs | |
204 | abort: untracked files in working directory differ from files in requested revision |
|
207 | abort: untracked files in working directory differ from files in requested revision | |
205 | [255] |
|
208 | [255] | |
206 |
|
209 | |||
207 | test a local add |
|
210 | test a local add | |
208 |
|
211 | |||
209 | $ cd .. |
|
212 | $ cd .. | |
210 | $ hg init a |
|
213 | $ hg init a | |
211 | $ hg init b |
|
214 | $ hg init b | |
212 | $ echo a > a/a |
|
215 | $ echo a > a/a | |
213 | $ echo a > b/a |
|
216 | $ echo a > b/a | |
214 | $ hg --cwd a commit -A -m a |
|
217 | $ hg --cwd a commit -A -m a | |
215 | adding a |
|
218 | adding a | |
216 | $ cd b |
|
219 | $ cd b | |
217 | $ hg add a |
|
220 | $ hg add a | |
218 | $ hg pull -u ../a |
|
221 | $ hg pull -u ../a | |
219 | pulling from ../a |
|
222 | pulling from ../a | |
220 | requesting all changes |
|
223 | requesting all changes | |
221 | adding changesets |
|
224 | adding changesets | |
222 | adding manifests |
|
225 | adding manifests | |
223 | adding file changes |
|
226 | adding file changes | |
224 | added 1 changesets with 1 changes to 1 files |
|
227 | added 1 changesets with 1 changes to 1 files | |
225 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
228 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
226 | $ hg st |
|
229 | $ hg st | |
227 |
|
230 | |||
228 | $ cd .. |
|
231 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now