Show More
@@ -1,333 +1,329 b'' | |||
|
1 | 1 | # merge.py - directory-level update/merge handling for Mercurial |
|
2 | 2 | # |
|
3 | 3 | # Copyright 2006 Matt Mackall <mpm@selenic.com> |
|
4 | 4 | # |
|
5 | 5 | # This software may be used and distributed according to the terms |
|
6 | 6 | # of the GNU General Public License, incorporated herein by reference. |
|
7 | 7 | |
|
8 | 8 | from node import * |
|
9 | 9 | from i18n import gettext as _ |
|
10 | 10 | from demandload import * |
|
11 | 11 | demandload(globals(), "util os tempfile") |
|
12 | 12 | |
|
13 | 13 | def fmerge(f, local, other, ancestor): |
|
14 | 14 | """merge executable flags""" |
|
15 | 15 | a, b, c = ancestor.execf(f), local.execf(f), other.execf(f) |
|
16 | 16 | return ((a^b) | (a^c)) ^ a |
|
17 | 17 | |
|
18 | 18 | def merge3(repo, fn, my, other, p1, p2): |
|
19 | 19 | """perform a 3-way merge in the working directory""" |
|
20 | 20 | |
|
21 | 21 | def temp(prefix, node): |
|
22 | 22 | pre = "%s~%s." % (os.path.basename(fn), prefix) |
|
23 | 23 | (fd, name) = tempfile.mkstemp(prefix=pre) |
|
24 | 24 | f = os.fdopen(fd, "wb") |
|
25 | 25 | repo.wwrite(fn, fl.read(node), f) |
|
26 | 26 | f.close() |
|
27 | 27 | return name |
|
28 | 28 | |
|
29 | 29 | fl = repo.file(fn) |
|
30 | 30 | base = fl.ancestor(my, other) |
|
31 | 31 | a = repo.wjoin(fn) |
|
32 | 32 | b = temp("base", base) |
|
33 | 33 | c = temp("other", other) |
|
34 | 34 | |
|
35 | 35 | repo.ui.note(_("resolving %s\n") % fn) |
|
36 | 36 | repo.ui.debug(_("file %s: my %s other %s ancestor %s\n") % |
|
37 | 37 | (fn, short(my), short(other), short(base))) |
|
38 | 38 | |
|
39 | 39 | cmd = (os.environ.get("HGMERGE") or repo.ui.config("ui", "merge") |
|
40 | 40 | or "hgmerge") |
|
41 | 41 | r = util.system('%s "%s" "%s" "%s"' % (cmd, a, b, c), cwd=repo.root, |
|
42 | 42 | environ={'HG_FILE': fn, |
|
43 | 43 | 'HG_MY_NODE': p1, |
|
44 | 44 | 'HG_OTHER_NODE': p2, |
|
45 | 45 | 'HG_FILE_MY_NODE': hex(my), |
|
46 | 46 | 'HG_FILE_OTHER_NODE': hex(other), |
|
47 | 47 | 'HG_FILE_BASE_NODE': hex(base)}) |
|
48 | 48 | if r: |
|
49 | 49 | repo.ui.warn(_("merging %s failed!\n") % fn) |
|
50 | 50 | |
|
51 | 51 | os.unlink(b) |
|
52 | 52 | os.unlink(c) |
|
53 | 53 | return r |
|
54 | 54 | |
|
55 | 55 | def update(repo, node, branchmerge=False, force=False, partial=None, |
|
56 | 56 | wlock=None, show_stats=True, remind=True): |
|
57 | 57 | |
|
58 | 58 | overwrite = force and not branchmerge |
|
59 | 59 | forcemerge = force and branchmerge |
|
60 | 60 | |
|
61 | 61 | if not wlock: |
|
62 | 62 | wlock = repo.wlock() |
|
63 | 63 | |
|
64 | 64 | ### check phase |
|
65 | 65 | |
|
66 | 66 | pl = repo.dirstate.parents() |
|
67 | 67 | if not overwrite and pl[1] != nullid: |
|
68 | 68 | raise util.Abort(_("outstanding uncommitted merges")) |
|
69 | 69 | |
|
70 | 70 | p1, p2 = pl[0], node |
|
71 | 71 | pa = repo.changelog.ancestor(p1, p2) |
|
72 | 72 | |
|
73 | 73 | # are we going backwards? |
|
74 | 74 | backwards = (pa == p2) |
|
75 | 75 | |
|
76 | 76 | # is there a linear path from p1 to p2? |
|
77 | 77 | linear_path = (pa == p1 or pa == p2) |
|
78 | 78 | if branchmerge and linear_path: |
|
79 | 79 | raise util.Abort(_("there is nothing to merge, just use " |
|
80 | 80 | "'hg update' or look at 'hg heads'")) |
|
81 | 81 | |
|
82 | 82 | if not linear_path and not (overwrite or branchmerge): |
|
83 | 83 | raise util.Abort(_("update spans branches, use 'hg merge' " |
|
84 | 84 | "or 'hg update -C' to lose changes")) |
|
85 | 85 | |
|
86 | 86 | modified, added, removed, deleted, unknown = repo.status()[:5] |
|
87 | 87 | if branchmerge and not forcemerge: |
|
88 | 88 | if modified or added or removed: |
|
89 | 89 | raise util.Abort(_("outstanding uncommitted changes")) |
|
90 | 90 | |
|
91 | 91 | m1n = repo.changelog.read(p1)[0] |
|
92 | 92 | m2n = repo.changelog.read(p2)[0] |
|
93 | 93 | man = repo.manifest.ancestor(m1n, m2n) |
|
94 | 94 | m1 = repo.manifest.read(m1n).copy() |
|
95 | 95 | m2 = repo.manifest.read(m2n).copy() |
|
96 | 96 | ma = repo.manifest.read(man) |
|
97 | 97 | |
|
98 | 98 | if not force: |
|
99 | 99 | for f in unknown: |
|
100 | 100 | if f in m2: |
|
101 | 101 | if repo.file(f).cmp(m2[f], repo.wread(f)): |
|
102 | 102 | raise util.Abort(_("'%s' already exists in the working" |
|
103 | 103 | " dir and differs from remote") % f) |
|
104 | 104 | |
|
105 | 105 | # resolve the manifest to determine which files |
|
106 | 106 | # we care about merging |
|
107 | 107 | repo.ui.note(_("resolving manifests\n")) |
|
108 | 108 | repo.ui.debug(_(" overwrite %s branchmerge %s partial %s linear %s\n") % |
|
109 | 109 | (overwrite, branchmerge, bool(partial), linear_path)) |
|
110 | 110 | repo.ui.debug(_(" ancestor %s local %s remote %s\n") % |
|
111 | 111 | (short(man), short(m1n), short(m2n))) |
|
112 | 112 | |
|
113 |
|
|
|
114 | get = {} | |
|
113 | action = {} | |
|
115 | 114 | remove = [] |
|
116 | 115 | forget = [] |
|
117 | 116 | |
|
118 | 117 | # update m1 from working dir |
|
119 | 118 | umap = dict.fromkeys(unknown) |
|
120 | 119 | |
|
121 | 120 | for f in added + modified + unknown: |
|
122 | 121 | m1[f] = m1.get(f, nullid) + "+" |
|
123 | 122 | m1.set(f, util.is_exec(repo.wjoin(f), m1.execf(f))) |
|
124 | 123 | |
|
125 | 124 | for f in deleted + removed: |
|
126 | 125 | del m1[f] |
|
127 | 126 | |
|
128 | 127 | # If we're jumping between revisions (as opposed to merging), |
|
129 | 128 | # and if neither the working directory nor the target rev has |
|
130 | 129 | # the file, then we need to remove it from the dirstate, to |
|
131 | 130 | # prevent the dirstate from listing the file when it is no |
|
132 | 131 | # longer in the manifest. |
|
133 | 132 | if linear_path and f not in m2: |
|
134 | 133 | forget.append(f) |
|
135 | 134 | |
|
136 | 135 | if partial: |
|
137 | 136 | for f in m1.keys(): |
|
138 | 137 | if not partial(f): del m1[f] |
|
139 | 138 | for f in m2.keys(): |
|
140 | 139 | if not partial(f): del m2[f] |
|
141 | 140 | |
|
142 | 141 | # Compare manifests |
|
143 | 142 | for f, n in m1.iteritems(): |
|
144 | 143 | if f in m2: |
|
145 | 144 | queued = 0 |
|
146 | 145 | |
|
147 | 146 | # are files different? |
|
148 | 147 | if n != m2[f]: |
|
149 | 148 | a = ma.get(f, nullid) |
|
150 | 149 | # are both different from the ancestor? |
|
151 | 150 | if not overwrite and n != a and m2[f] != a: |
|
152 | 151 | repo.ui.debug(_(" %s versions differ, resolve\n") % f) |
|
153 |
|
|
|
152 | action[f] = (fmerge(f, m1, m2, ma), n[:20], m2[f]) | |
|
154 | 153 | queued = 1 |
|
155 | 154 | # are we clobbering? |
|
156 | 155 | # is remote's version newer? |
|
157 | 156 | # or are we going back in time and clean? |
|
158 | 157 | elif overwrite or m2[f] != a or (backwards and not n[20:]): |
|
159 | 158 | repo.ui.debug(_(" remote %s is newer, get\n") % f) |
|
160 |
|
|
|
159 | action[f] = (m2.execf(f), m2[f], None) | |
|
161 | 160 | queued = 1 |
|
162 | 161 | elif f in umap or f in added: |
|
163 | 162 | # this unknown file is the same as the checkout |
|
164 | 163 | # we need to reset the dirstate if the file was added |
|
165 |
|
|
|
164 | action[f] = (m2.execf(f), m2[f], None) | |
|
166 | 165 | |
|
167 | 166 | # do we still need to look at mode bits? |
|
168 | 167 | if not queued and m1.execf(f) != m2.execf(f): |
|
169 | 168 | if overwrite: |
|
170 | 169 | repo.ui.debug(_(" updating permissions for %s\n") % f) |
|
171 | 170 | util.set_exec(repo.wjoin(f), m2.execf(f)) |
|
172 | 171 | else: |
|
173 | 172 | if fmerge(f, m1, m2, ma) != m1.execf(f): |
|
174 | 173 | repo.ui.debug(_(" updating permissions for %s\n") |
|
175 | 174 | % f) |
|
176 | 175 | util.set_exec(repo.wjoin(f), mode) |
|
177 | 176 | del m2[f] |
|
178 | 177 | elif f in ma: |
|
179 | 178 | if n != ma[f]: |
|
180 | 179 | r = _("d") |
|
181 | 180 | if not overwrite: |
|
182 | 181 | r = repo.ui.prompt( |
|
183 | 182 | (_(" local changed %s which remote deleted\n") % f) + |
|
184 | 183 | _("(k)eep or (d)elete?"), _("[kd]"), _("k")) |
|
185 | 184 | if r == _("d"): |
|
186 | 185 | remove.append(f) |
|
187 | 186 | else: |
|
188 | 187 | repo.ui.debug(_("other deleted %s\n") % f) |
|
189 | 188 | remove.append(f) # other deleted it |
|
190 | 189 | else: |
|
191 | 190 | # file is created on branch or in working directory |
|
192 | 191 | if overwrite and f not in umap: |
|
193 | 192 | repo.ui.debug(_("remote deleted %s, clobbering\n") % f) |
|
194 | 193 | remove.append(f) |
|
195 | 194 | elif not n[20:]: # same as parent |
|
196 | 195 | if backwards: |
|
197 | 196 | repo.ui.debug(_("remote deleted %s\n") % f) |
|
198 | 197 | remove.append(f) |
|
199 | 198 | else: |
|
200 | 199 | repo.ui.debug(_("local modified %s, keeping\n") % f) |
|
201 | 200 | else: |
|
202 | 201 | repo.ui.debug(_("working dir created %s, keeping\n") % f) |
|
203 | 202 | |
|
204 | 203 | for f, n in m2.iteritems(): |
|
205 | 204 | if f[0] == "/": |
|
206 | 205 | continue |
|
207 | 206 | if f in ma and n != ma[f]: |
|
208 | 207 | r = _("k") |
|
209 | 208 | if not overwrite: |
|
210 | 209 | r = repo.ui.prompt( |
|
211 | 210 | (_("remote changed %s which local deleted\n") % f) + |
|
212 | 211 | _("(k)eep or (d)elete?"), _("[kd]"), _("k")) |
|
213 | 212 | if r == _("k"): |
|
214 |
|
|
|
213 | action[f] = (m2.execf(f), n, None) | |
|
215 | 214 | elif f not in ma: |
|
216 | 215 | repo.ui.debug(_("remote created %s\n") % f) |
|
217 |
|
|
|
216 | action[f] = (m2.execf(f), n, None) | |
|
218 | 217 | else: |
|
219 | 218 | if overwrite or backwards: |
|
220 | 219 | repo.ui.debug(_("local deleted %s, recreating\n") % f) |
|
221 |
|
|
|
220 | action[f] = (m2.execf(f), n, None) | |
|
222 | 221 | else: |
|
223 | 222 | repo.ui.debug(_("local deleted %s\n") % f) |
|
224 | 223 | |
|
225 | 224 | del m1, m2, ma |
|
226 | 225 | |
|
227 | 226 | ### apply phase |
|
228 | 227 | |
|
229 | 228 | if linear_path or overwrite: |
|
230 | 229 | # we don't need to do any magic, just jump to the new rev |
|
231 | 230 | p1, p2 = p2, nullid |
|
232 | 231 | |
|
233 | 232 | xp1 = hex(p1) |
|
234 | 233 | xp2 = hex(p2) |
|
235 | 234 | if p2 == nullid: xxp2 = '' |
|
236 | 235 | else: xxp2 = xp2 |
|
237 | 236 | |
|
238 | 237 | repo.hook('preupdate', throw=True, parent1=xp1, parent2=xxp2) |
|
239 | 238 | |
|
240 | # get the files we don't need to change | |
|
241 | files = get.keys() | |
|
239 | # update files | |
|
240 | unresolved = [] | |
|
241 | updated = 0 | |
|
242 | merged = 0 | |
|
243 | files = action.keys() | |
|
242 | 244 | files.sort() |
|
243 | 245 | for f in files: |
|
244 |
flag, |
|
|
246 | flag, my, other = action[f] | |
|
245 | 247 | if f[0] == "/": |
|
246 | 248 | continue |
|
247 | repo.ui.note(_("getting %s\n") % f) | |
|
248 | t = repo.file(f).read(node) | |
|
249 | repo.wwrite(f, t) | |
|
250 | util.set_exec(repo.wjoin(f), flag) | |
|
251 | ||
|
252 | # merge the tricky bits | |
|
253 | unresolved = [] | |
|
254 | files = merge.keys() | |
|
255 | files.sort() | |
|
256 | for f in files: | |
|
257 | repo.ui.status(_("merging %s\n") % f) | |
|
258 | flag, my, other = merge[f] | |
|
259 | ret = merge3(repo, f, my, other, xp1, xp2) | |
|
260 | if ret: | |
|
261 | unresolved.append(f) | |
|
249 | if other: | |
|
250 | repo.ui.status(_("merging %s\n") % f) | |
|
251 | if merge3(repo, f, my, other, xp1, xp2): | |
|
252 | unresolved.append(f) | |
|
253 | merged += 1 | |
|
254 | else: | |
|
255 | repo.ui.note(_("getting %s\n") % f) | |
|
256 | t = repo.file(f).read(my) | |
|
257 | repo.wwrite(f, t) | |
|
258 | updated += 1 | |
|
262 | 259 | util.set_exec(repo.wjoin(f), flag) |
|
263 | 260 | |
|
264 | 261 | remove.sort() |
|
265 | 262 | for f in remove: |
|
266 | 263 | repo.ui.note(_("removing %s\n") % f) |
|
267 | 264 | util.audit_path(f) |
|
268 | 265 | try: |
|
269 | 266 | util.unlink(repo.wjoin(f)) |
|
270 | 267 | except OSError, inst: |
|
271 | 268 | if inst.errno != errno.ENOENT: |
|
272 | 269 | repo.ui.warn(_("update failed to remove %s: %s!\n") % |
|
273 | 270 | (f, inst.strerror)) |
|
274 | 271 | |
|
275 | 272 | # update dirstate |
|
276 | 273 | if not partial: |
|
277 | 274 | repo.dirstate.setparents(p1, p2) |
|
278 | 275 | repo.dirstate.forget(forget) |
|
279 | 276 | if branchmerge: |
|
280 | 277 | repo.dirstate.update(remove, 'r') |
|
281 | 278 | else: |
|
282 | 279 | repo.dirstate.forget(remove) |
|
283 | 280 | |
|
284 |
files = |
|
|
285 | files.sort() | |
|
286 | for f in files: | |
|
287 | if branchmerge: | |
|
288 | repo.dirstate.update([f], 'n', st_mtime=-1) | |
|
289 | else: | |
|
290 | repo.dirstate.update([f], 'n') | |
|
291 | ||
|
292 | files = merge.keys() | |
|
281 | files = action.keys() | |
|
293 | 282 | files.sort() |
|
294 | 283 | for f in files: |
|
295 | if branchmerge: | |
|
296 | # We've done a branch merge, mark this file as merged | |
|
297 | # so that we properly record the merger later | |
|
298 |
repo.dirstate.update([f], ' |
|
|
284 | flag, my, other = action[f] | |
|
285 | if not other: | |
|
286 | if branchmerge: | |
|
287 | repo.dirstate.update([f], 'n', st_mtime=-1) | |
|
288 | else: | |
|
289 | repo.dirstate.update([f], 'n') | |
|
299 | 290 | else: |
|
300 | # We've update-merged a locally modified file, so | |
|
301 | # we set the dirstate to emulate a normal checkout | |
|
302 |
# o |
|
|
303 | # merge will appear as a normal local file | |
|
304 |
|
|
|
305 | fl = repo.file(f) | |
|
306 | f_len = fl.size(fl.rev(other)) | |
|
307 | repo.dirstate.update([f], 'n', st_size=f_len, st_mtime=-1) | |
|
291 | if branchmerge: | |
|
292 | # We've done a branch merge, mark this file as merged | |
|
293 | # so that we properly record the merger later | |
|
294 | repo.dirstate.update([f], 'm') | |
|
295 | else: | |
|
296 | # We've update-merged a locally modified file, so | |
|
297 | # we set the dirstate to emulate a normal checkout | |
|
298 | # of that file some time in the past. Thus our | |
|
299 | # merge will appear as a normal local file | |
|
300 | # modification. | |
|
301 | fl = repo.file(f) | |
|
302 | f_len = fl.size(fl.rev(other)) | |
|
303 | repo.dirstate.update([f], 'n', st_size=f_len, st_mtime=-1) | |
|
308 | 304 | |
|
309 | 305 | if show_stats: |
|
310 |
stats = (( |
|
|
311 |
( |
|
|
306 | stats = ((updated, _("updated")), | |
|
307 | (merged - len(unresolved), _("merged")), | |
|
312 | 308 | (len(remove), _("removed")), |
|
313 | 309 | (len(unresolved), _("unresolved"))) |
|
314 | 310 | note = ", ".join([_("%d files %s") % s for s in stats]) |
|
315 | 311 | repo.ui.status("%s\n" % note) |
|
316 | 312 | if not partial: |
|
317 | 313 | if branchmerge: |
|
318 | 314 | if unresolved: |
|
319 | 315 | repo.ui.status(_("There are unresolved merges," |
|
320 | 316 | " you can redo the full merge using:\n" |
|
321 | 317 | " hg update -C %s\n" |
|
322 | 318 | " hg merge %s\n" |
|
323 | 319 | % (repo.changelog.rev(p1), |
|
324 | 320 | repo.changelog.rev(p2)))) |
|
325 | 321 | elif remind: |
|
326 | 322 | repo.ui.status(_("(branch merge, don't forget to commit)\n")) |
|
327 | 323 | elif unresolved: |
|
328 | 324 | repo.ui.status(_("There are unresolved merges with" |
|
329 | 325 | " locally modified files.\n")) |
|
330 | 326 | |
|
331 | 327 | repo.hook('update', parent1=xp1, parent2=xxp2, error=len(unresolved)) |
|
332 | 328 | return len(unresolved) |
|
333 | 329 |
@@ -1,141 +1,141 b'' | |||
|
1 | 1 | adding a |
|
2 | 2 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
3 | 3 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
4 | 4 | diff -r 33aaa84a386b a |
|
5 | 5 | --- a/a |
|
6 | 6 | +++ b/a |
|
7 | 7 | @@ -1,1 +1,1 @@ a |
|
8 | 8 | -a |
|
9 | 9 | +abc |
|
10 | 10 | adding b |
|
11 | 11 | M a |
|
12 | 12 | changeset: 0:33aaa84a386b |
|
13 | 13 | user: test |
|
14 | 14 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
15 | 15 | summary: 1 |
|
16 | 16 | |
|
17 | 17 | resolving manifests |
|
18 | 18 | overwrite False branchmerge False partial False linear True |
|
19 | 19 | ancestor a0c8bcbbb45c local a0c8bcbbb45c remote 1165e8bd193e |
|
20 | 20 | a versions differ, resolve |
|
21 | 21 | remote created b |
|
22 | getting b | |
|
23 | 22 | merging a |
|
24 | 23 | resolving a |
|
25 | 24 | file a: my b789fdd96dc2 other d730145abbf9 ancestor b789fdd96dc2 |
|
25 | getting b | |
|
26 | 26 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
27 | 27 | changeset: 1:802f095af299 |
|
28 | 28 | tag: tip |
|
29 | 29 | user: test |
|
30 | 30 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
31 | 31 | summary: 2 |
|
32 | 32 | |
|
33 | 33 | resolving manifests |
|
34 | 34 | overwrite False branchmerge False partial False linear True |
|
35 | 35 | ancestor a0c8bcbbb45c local 1165e8bd193e remote a0c8bcbbb45c |
|
36 | 36 | remote deleted b |
|
37 | 37 | removing b |
|
38 | 38 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
39 | 39 | changeset: 0:33aaa84a386b |
|
40 | 40 | user: test |
|
41 | 41 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
42 | 42 | summary: 1 |
|
43 | 43 | |
|
44 | 44 | abort: there is nothing to merge - use "hg update" instead |
|
45 | 45 | failed |
|
46 | 46 | changeset: 0:33aaa84a386b |
|
47 | 47 | user: test |
|
48 | 48 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
49 | 49 | summary: 1 |
|
50 | 50 | |
|
51 | 51 | resolving manifests |
|
52 | 52 | overwrite False branchmerge False partial False linear True |
|
53 | 53 | ancestor a0c8bcbbb45c local a0c8bcbbb45c remote 1165e8bd193e |
|
54 | 54 | a versions differ, resolve |
|
55 | 55 | remote created b |
|
56 | getting b | |
|
57 | 56 | merging a |
|
58 | 57 | resolving a |
|
59 | 58 | file a: my b789fdd96dc2 other d730145abbf9 ancestor b789fdd96dc2 |
|
59 | getting b | |
|
60 | 60 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
61 | 61 | changeset: 1:802f095af299 |
|
62 | 62 | tag: tip |
|
63 | 63 | user: test |
|
64 | 64 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
65 | 65 | summary: 2 |
|
66 | 66 | |
|
67 | 67 | changeset: 1:802f095af299 |
|
68 | 68 | tag: tip |
|
69 | 69 | user: test |
|
70 | 70 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
71 | 71 | files: a b |
|
72 | 72 | description: |
|
73 | 73 | 2 |
|
74 | 74 | |
|
75 | 75 | |
|
76 | 76 | changeset: 0:33aaa84a386b |
|
77 | 77 | user: test |
|
78 | 78 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
79 | 79 | files: a |
|
80 | 80 | description: |
|
81 | 81 | 1 |
|
82 | 82 | |
|
83 | 83 | |
|
84 | 84 | diff -r 802f095af299 a |
|
85 | 85 | --- a/a |
|
86 | 86 | +++ b/a |
|
87 | 87 | @@ -1,1 +1,1 @@ a2 |
|
88 | 88 | -a2 |
|
89 | 89 | +abc |
|
90 | 90 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
91 | 91 | adding b |
|
92 | 92 | M a |
|
93 | 93 | changeset: 1:802f095af299 |
|
94 | 94 | user: test |
|
95 | 95 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
96 | 96 | summary: 2 |
|
97 | 97 | |
|
98 | 98 | abort: update spans branches, use 'hg merge' or 'hg update -C' to lose changes |
|
99 | 99 | failed |
|
100 | 100 | abort: outstanding uncommitted changes |
|
101 | 101 | failed |
|
102 | 102 | resolving manifests |
|
103 | 103 | overwrite False branchmerge True partial False linear False |
|
104 | 104 | ancestor a0c8bcbbb45c local 1165e8bd193e remote 4096f2872392 |
|
105 | 105 | a versions differ, resolve |
|
106 | 106 | b versions differ, resolve |
|
107 | 107 | merging a |
|
108 | 108 | resolving a |
|
109 | 109 | file a: my d730145abbf9 other 13e0d5f949fa ancestor b789fdd96dc2 |
|
110 | 110 | merging b |
|
111 | 111 | resolving b |
|
112 | 112 | file b: my 1e88685f5dde other 61de8c7723ca ancestor 000000000000 |
|
113 | 113 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
114 | 114 | (branch merge, don't forget to commit) |
|
115 | 115 | changeset: 1:802f095af299 |
|
116 | 116 | user: test |
|
117 | 117 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
118 | 118 | summary: 2 |
|
119 | 119 | |
|
120 | 120 | changeset: 2:030602aee63d |
|
121 | 121 | tag: tip |
|
122 | 122 | parent: 0:33aaa84a386b |
|
123 | 123 | user: test |
|
124 | 124 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
125 | 125 | summary: 3 |
|
126 | 126 | |
|
127 | 127 | diff -r 802f095af299 a |
|
128 | 128 | --- a/a |
|
129 | 129 | +++ b/a |
|
130 | 130 | @@ -1,1 +1,1 @@ a2 |
|
131 | 131 | -a2 |
|
132 | 132 | +abc |
|
133 | 133 | adding a |
|
134 | 134 | pulling from ../a |
|
135 | 135 | requesting all changes |
|
136 | 136 | adding changesets |
|
137 | 137 | adding manifests |
|
138 | 138 | adding file changes |
|
139 | 139 | added 1 changesets with 1 changes to 1 files |
|
140 | 140 | merging a |
|
141 | 141 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
General Comments 0
You need to be logged in to leave comments.
Login now