Show More
@@ -312,7 +312,7 b' def applyupdates(repo, action, wctx, mct' | |||
|
312 | 312 | |
|
313 | 313 | return updated, merged, removed, unresolved |
|
314 | 314 | |
|
315 |
def recordupdates(repo, action, branchmerge |
|
|
315 | def recordupdates(repo, action, branchmerge): | |
|
316 | 316 | "record merge actions to the dirstate" |
|
317 | 317 | |
|
318 | 318 | for a in action: |
@@ -335,21 +335,22 b' def recordupdates(repo, action, branchme' | |||
|
335 | 335 | # We've done a branch merge, mark this file as merged |
|
336 | 336 | # so that we properly record the merger later |
|
337 | 337 | repo.dirstate.update([fd], 'm') |
|
338 | if f != f2: # copy/rename | |
|
339 | if move: | |
|
340 | repo.dirstate.update([f], 'r') | |
|
341 | if f != fd: | |
|
342 | repo.dirstate.copy(f, fd) | |
|
343 | else: | |
|
344 | repo.dirstate.copy(f2, fd) | |
|
338 | 345 | else: |
|
339 | 346 | # We've update-merged a locally modified file, so |
|
340 | 347 | # we set the dirstate to emulate a normal checkout |
|
341 | 348 | # of that file some time in the past. Thus our |
|
342 | 349 | # merge will appear as a normal local file |
|
343 | 350 | # modification. |
|
344 | f_len = mctx.filectx(f).size() | |
|
345 | repo.dirstate.update([fd], 'n', st_size=f_len, st_mtime=-1) | |
|
346 | if f != f2: # copy/rename | |
|
351 | repo.dirstate.update([fd], 'n', st_size=-1, st_mtime=-1) | |
|
347 | 352 | if move: |
|
348 |
repo.dirstate. |
|
|
349 | if f != fd: | |
|
350 | repo.dirstate.copy(f, fd) | |
|
351 | else: | |
|
352 | repo.dirstate.copy(f2, fd) | |
|
353 | repo.dirstate.forget([f]) | |
|
353 | 354 | |
|
354 | 355 | def update(repo, node, branchmerge, force, partial, wlock): |
|
355 | 356 | """ |
@@ -403,7 +404,7 b' def update(repo, node, branchmerge, forc' | |||
|
403 | 404 | stats = applyupdates(repo, action, wc, p2) |
|
404 | 405 | |
|
405 | 406 | if not partial: |
|
406 |
recordupdates(repo, action, branchmerge |
|
|
407 | recordupdates(repo, action, branchmerge) | |
|
407 | 408 | repo.dirstate.setparents(fp1, fp2) |
|
408 | 409 | repo.hook('update', parent1=xp1, parent2=xp2, error=stats[3]) |
|
409 | 410 |
General Comments 0
You need to be logged in to leave comments.
Login now