Mercurial > public > mercurial-scm > hg-stable
diff mercurial/merge.py @ 19482:499fc471296b stable
update: add tracking of interrupted updates (issue3113)
This takes advantage of the new checkunfinished infrastructure
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 25 Jul 2013 00:33:28 -0500 |
parents | feaf5749d7a4 |
children | 76df01e56e7f |
line wrap: on
line diff
--- a/mercurial/merge.py Thu Jul 25 00:00:47 2013 -0500 +++ b/mercurial/merge.py Thu Jul 25 00:33:28 2013 -0500 @@ -747,12 +747,17 @@ fp1, fp2, xp1, xp2 = fp2, nullid, xp2, '' if not partial: repo.hook('preupdate', throw=True, parent1=xp1, parent2=xp2) + # note that we're in the middle of an update + repo.vfs.write('updatestate', p2.hex()) stats = applyupdates(repo, actions, wc, p2, pa, overwrite) if not partial: repo.setparents(fp1, fp2) recordupdates(repo, actions, branchmerge) + # update completed, clear state + util.unlink(repo.join('updatestate')) + if not branchmerge: repo.dirstate.setbranch(p2.branch()) finally: