Patchwork [08,of,19] localrepo: use _generatestatus from context

login
register
mail settings
Submitter Sean Farley
Date May 15, 2014, 9:16 p.m.
Message ID <a689734f58d9cf710c0a.1400188586@laptop.local>
Download mbox | patch
Permalink /patch/4767/
State Changes Requested
Headers show

Comments

Sean Farley - May 15, 2014, 9:16 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1398134174 18000
#      Mon Apr 21 21:36:14 2014 -0500
# Node ID a689734f58d9cf710c0ac21243d69e652d40377a
# Parent  1ae1f9895dc54cceeafa95e095f19f936917d2fd
localrepo: use _generatestatus from context

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1549,33 +1549,16 @@  class localrepository(object):
         r = [[], [], [], [], [], [], []]
         if working: # we need to scan the working dir
             r = ctx2._dirstatestatus(match=match, ignored=listignored,
                                      clean=listclean, unknown=listunknown)
 
+        if not parentworking:
+            r = ctx2._generatestatus(ctx1, s, match, listignored, listclean,
+                                     listunknown)
+
         modified, added, removed, deleted, unknown, ignored, clean = r
 
-        if not parentworking:
-            mf1 = ctx1._manifestmatches(match, r)
-            mf2 = ctx2._manifestmatches(match, r)
-
-            modified, added, clean = [], [], []
-            deleted, unknown, ignored = r[3], [], []
-            withflags = mf1.withflags() | mf2.withflags()
-            for fn, mf2node in mf2.iteritems():
-                if fn in mf1:
-                    if (fn not in deleted and
-                        ((fn in withflags and mf1.flags(fn) != mf2.flags(fn)) or
-                         (mf1[fn] != mf2node and
-                          (mf2node or ctx1[fn].cmp(ctx2[fn]))))):
-                        modified.append(fn)
-                    elif listclean:
-                        clean.append(fn)
-                    del mf1[fn]
-                elif fn not in deleted:
-                    added.append(fn)
-            removed = mf1.keys()
-
         if working:
             modified = ctx2._filtersuspectsymlink(modified)
 
         if reversed:
             added, removed = removed, added