comparison mercurial/localrepo.py @ 18661:4fb92f14a97a

commit: factor out post-commit cleanup into workingctx This pulls some of the logic for the cleanup that needs to happen after a commit has been made otu of localrepo.commit and into workingctx. This is part of a larger refactoring effort that will eventually allow us to perform some types of merges in-memory.
author David Schleimer <dschleimer@fb.com>
date Fri, 08 Feb 2013 05:36:08 -0800
parents 7e6946ed5756
children b2b4ddc55caa
comparison
equal deleted inserted replaced
18660:7e6946ed5756 18661:4fb92f14a97a
1277 _('note: commit message saved in %s\n') % msgfn) 1277 _('note: commit message saved in %s\n') % msgfn)
1278 raise 1278 raise
1279 1279
1280 # update bookmarks, dirstate and mergestate 1280 # update bookmarks, dirstate and mergestate
1281 bookmarks.update(self, [p1, p2], ret) 1281 bookmarks.update(self, [p1, p2], ret)
1282 for f in changes[0] + changes[1]: 1282 cctx.markcommitted(ret)
1283 self.dirstate.normal(f)
1284 for f in changes[2]:
1285 self.dirstate.drop(f)
1286 self.dirstate.setparents(ret)
1287 ms.reset() 1283 ms.reset()
1288 finally: 1284 finally:
1289 wlock.release() 1285 wlock.release()
1290 1286
1291 def commithook(node=hex(ret), parent1=hookp1, parent2=hookp2): 1287 def commithook(node=hex(ret), parent1=hookp1, parent2=hookp2):