Mercurial > public > mercurial-scm > hg
comparison mercurial/merge.py @ 27088:e2b79f57903a
mergestate: add a way to record pending dirstate actions
We're going to use this in resolve in the next patch.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Fri, 20 Nov 2015 16:55:01 -0800 |
parents | 98fc58378a3f |
children | ef6f98473a48 |
comparison
equal
deleted
inserted
replaced
27087:98fc58378a3f | 27088:e2b79f57903a |
---|---|
514 actions = {'r': [], 'a': [], 'g': []} | 514 actions = {'r': [], 'a': [], 'g': []} |
515 for f, (r, action) in self._results.iteritems(): | 515 for f, (r, action) in self._results.iteritems(): |
516 if action is not None: | 516 if action is not None: |
517 actions[action].append((f, None, "merge result")) | 517 actions[action].append((f, None, "merge result")) |
518 return actions | 518 return actions |
519 | |
520 def recordactions(self): | |
521 """record remove/add/get actions in the dirstate""" | |
522 branchmerge = self._repo.dirstate.p2() != nullid | |
523 recordupdates(self._repo, self.actions(), branchmerge) | |
519 | 524 |
520 def _checkunknownfile(repo, wctx, mctx, f, f2=None): | 525 def _checkunknownfile(repo, wctx, mctx, f, f2=None): |
521 if f2 is None: | 526 if f2 is None: |
522 f2 = f | 527 f2 = f |
523 return (os.path.isfile(repo.wjoin(f)) | 528 return (os.path.isfile(repo.wjoin(f)) |