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