Mercurial > hg
changeset 3388:5eecae4ff722
merge with upstream
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Sat, 14 Oct 2006 10:39:40 +0200 |
parents | 2065789f6a3e (current diff) ba7c74081861 (diff) |
children | efbe24c7d8d9 |
files | |
diffstat | 1 files changed, 11 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/merge.py Fri Oct 13 15:34:35 2006 -0300 +++ b/mercurial/merge.py Sat Oct 14 10:39:40 2006 +0200 @@ -312,7 +312,7 @@ return updated, merged, removed, unresolved -def recordupdates(repo, action, branchmerge, mctx): +def recordupdates(repo, action, branchmerge): "record merge actions to the dirstate" for a in action: @@ -335,21 +335,22 @@ # We've done a branch merge, mark this file as merged # so that we properly record the merger later repo.dirstate.update([fd], 'm') + if f != f2: # copy/rename + if move: + repo.dirstate.update([f], 'r') + if f != fd: + repo.dirstate.copy(f, fd) + else: + repo.dirstate.copy(f2, fd) else: # We've update-merged a locally modified file, so # we set the dirstate to emulate a normal checkout # of that file some time in the past. Thus our # merge will appear as a normal local file # modification. - f_len = mctx.filectx(f).size() - repo.dirstate.update([fd], 'n', st_size=f_len, st_mtime=-1) - if f != f2: # copy/rename + repo.dirstate.update([fd], 'n', st_size=-1, st_mtime=-1) if move: - repo.dirstate.update([f], 'r') - if f != fd: - repo.dirstate.copy(f, fd) - else: - repo.dirstate.copy(f2, fd) + repo.dirstate.forget([f]) def update(repo, node, branchmerge, force, partial, wlock): """ @@ -403,7 +404,7 @@ stats = applyupdates(repo, action, wc, p2) if not partial: - recordupdates(repo, action, branchmerge, p2) + recordupdates(repo, action, branchmerge) repo.dirstate.setparents(fp1, fp2) repo.hook('update', parent1=xp1, parent2=xp2, error=stats[3])