159 copy, diverge = copies.copies(repo, p1, p2, pa, dirs) |
159 copy, diverge = copies.copies(repo, p1, p2, pa, dirs) |
160 for of, fl in diverge.iteritems(): |
160 for of, fl in diverge.iteritems(): |
161 act("divergent renames", "dr", of, fl) |
161 act("divergent renames", "dr", of, fl) |
162 |
162 |
163 repo.ui.note(_("resolving manifests\n")) |
163 repo.ui.note(_("resolving manifests\n")) |
164 repo.ui.debug(_(" overwrite %s partial %s\n") % (overwrite, bool(partial))) |
164 repo.ui.debug(" overwrite %s partial %s\n" % (overwrite, bool(partial))) |
165 repo.ui.debug(_(" ancestor %s local %s remote %s\n") % (pa, p1, p2)) |
165 repo.ui.debug(" ancestor %s local %s remote %s\n" % (pa, p1, p2)) |
166 |
166 |
167 m1, m2, ma = p1.manifest(), p2.manifest(), pa.manifest() |
167 m1, m2, ma = p1.manifest(), p2.manifest(), pa.manifest() |
168 copied = set(copy.values()) |
168 copied = set(copy.values()) |
169 |
169 |
170 # Compare manifests |
170 # Compare manifests |
250 f, m = a[:2] |
250 f, m = a[:2] |
251 if m == 'm': # merge |
251 if m == 'm': # merge |
252 f2, fd, flags, move = a[2:] |
252 f2, fd, flags, move = a[2:] |
253 if f == '.hgsubstate': # merged internally |
253 if f == '.hgsubstate': # merged internally |
254 continue |
254 continue |
255 repo.ui.debug(_("preserving %s for resolve of %s\n") % (f, fd)) |
255 repo.ui.debug("preserving %s for resolve of %s\n" % (f, fd)) |
256 fcl = wctx[f] |
256 fcl = wctx[f] |
257 fco = mctx[f2] |
257 fco = mctx[f2] |
258 fca = fcl.ancestor(fco) or repo.filectx(f, fileid=nullrev) |
258 fca = fcl.ancestor(fco) or repo.filectx(f, fileid=nullrev) |
259 ms.add(fcl, fco, fca, fd, flags) |
259 ms.add(fcl, fco, fca, fd, flags) |
260 if f != fd and move: |
260 if f != fd and move: |
261 moves.append(f) |
261 moves.append(f) |
262 |
262 |
263 # remove renamed files after safely stored |
263 # remove renamed files after safely stored |
264 for f in moves: |
264 for f in moves: |
265 if util.lexists(repo.wjoin(f)): |
265 if util.lexists(repo.wjoin(f)): |
266 repo.ui.debug(_("removing %s\n") % f) |
266 repo.ui.debug("removing %s\n" % f) |
267 os.unlink(repo.wjoin(f)) |
267 os.unlink(repo.wjoin(f)) |
268 |
268 |
269 audit_path = util.path_auditor(repo.root) |
269 audit_path = util.path_auditor(repo.root) |
270 |
270 |
271 for a in action: |
271 for a in action: |
297 updated += 1 |
297 updated += 1 |
298 else: |
298 else: |
299 merged += 1 |
299 merged += 1 |
300 util.set_flags(repo.wjoin(fd), 'l' in flags, 'x' in flags) |
300 util.set_flags(repo.wjoin(fd), 'l' in flags, 'x' in flags) |
301 if f != fd and move and util.lexists(repo.wjoin(f)): |
301 if f != fd and move and util.lexists(repo.wjoin(f)): |
302 repo.ui.debug(_("removing %s\n") % f) |
302 repo.ui.debug("removing %s\n" % f) |
303 os.unlink(repo.wjoin(f)) |
303 os.unlink(repo.wjoin(f)) |
304 elif m == "g": # get |
304 elif m == "g": # get |
305 flags = a[2] |
305 flags = a[2] |
306 repo.ui.note(_("getting %s\n") % f) |
306 repo.ui.note(_("getting %s\n") % f) |
307 t = mctx.filectx(f).data() |
307 t = mctx.filectx(f).data() |