changeset 21483:6adfc311eee8

localrepo: use _matchstatus of context objects Now that we have the machinery in place, we call the context method for changing the match object in the case of comparing the working directory with its parent. This removes the last of the hard-coded workingctx knowledge in localrepo paving the way for us to remove localrepo.status completely.
author Sean Farley <sean.michael.farley@gmail.com>
date Wed, 23 Apr 2014 15:54:26 -0500
parents 869a28d016e9
children 96cdf2e3dbef
files mercurial/localrepo.py
diffstat 1 files changed, 2 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Thu Apr 24 08:32:28 2014 -0500
+++ b/mercurial/localrepo.py	Wed Apr 23 15:54:26 2014 -0500
@@ -1533,23 +1533,15 @@
             ctx1, ctx2 = ctx2, ctx1
 
         working = ctx2.rev() is None
-        parentworking = working and ctx1 == self['.']
-        match = match or matchmod.always(self.root, self.getcwd())
         listignored, listclean, listunknown = ignored, clean, unknown
 
         # load earliest manifest first for caching reasons
         if not working and ctx2.rev() < ctx1.rev():
             ctx2.manifest()
 
-        if not parentworking:
-            def bad(f, msg):
-                # 'f' may be a directory pattern from 'match.files()',
-                # so 'f not in ctx1' is not enough
-                if f not in ctx1 and f not in ctx1.dirs():
-                    self.ui.warn('%s: %s\n' % (self.dirstate.pathto(f), msg))
-            match.bad = bad
-
         r = [[], [], [], [], [], [], []]
+        match = ctx2._matchstatus(ctx1, r, match, listignored, listclean,
+                                  listunknown)
         r = ctx2._prestatus(ctx1, r, match, listignored, listclean, listunknown)
         r = ctx2._buildstatus(ctx1, r, match, listignored, listclean,
                               listunknown)