changeset 18036:8b846dbc57b6

merge: support calculating merge actions against non-working contexts This is not currently used. It is instead a pre-requisite to performing non-conflicting grafts in memory, which a subsequent patch will do.
author David Schleimer <dschleimer@fb.com>
date Tue, 04 Dec 2012 12:54:18 -0800
parents 5881d5b7552f
children c8326ffdcb4f
files mercurial/context.py mercurial/merge.py
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Tue Dec 04 12:54:18 2012 -0800
+++ b/mercurial/context.py	Tue Dec 04 12:54:18 2012 -0800
@@ -355,6 +355,9 @@
     def dirs(self):
         return self._dirs
 
+    def dirty(self):
+        return False
+
 class filectx(object):
     """A filecontext object makes access to data related to a particular
        filerevision convenient."""
--- a/mercurial/merge.py	Tue Dec 04 12:54:18 2012 -0800
+++ b/mercurial/merge.py	Tue Dec 04 12:54:18 2012 -0800
@@ -461,7 +461,8 @@
             _checkcollision(mctx, tctx)
     if not force:
         _checkunknown(repo, tctx, mctx)
-    action += _forgetremoved(tctx, mctx, branchmerge)
+    if tctx.rev() is None:
+        action += _forgetremoved(tctx, mctx, branchmerge)
     action += manifestmerge(repo, tctx, mctx,
                             ancestor,
                             force and not branchmerge,