Patchwork [2,of,5] workingctx: also pass status tuple into poststatusfixup

login
register
mail settings
Submitter Siddharth Agarwal
Date June 12, 2017, 10:36 p.m.
Message ID <3097d182d5b89ba643e8.1497306996@devvm31800.prn1.facebook.com>
Download mbox | patch
Permalink /patch/21350/
State Accepted
Headers show

Comments

Siddharth Agarwal - June 12, 2017, 10:36 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1497301003 25200
#      Mon Jun 12 13:56:43 2017 -0700
# Node ID 3097d182d5b89ba643e834215dc41e7e34716857
# Parent  f9a3b5bd5c5a9e1fdf68f5b0af1675ecfbc7ae7a
workingctx: also pass status tuple into poststatusfixup

fsmonitor is going to need this to compute its set of notable files to persist.

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -1740,7 +1740,7 @@  class workingctx(committablectx):
 
         return modified, deleted, fixup
 
-    def _poststatusfixup(self, fixup):
+    def _poststatusfixup(self, status, fixup):
         """update dirstate for files that are actually clean"""
         if fixup:
             try:
@@ -1792,7 +1792,7 @@  class workingctx(committablectx):
             if fixup and listclean:
                 s.clean.extend(fixup)
 
-        self._poststatusfixup(fixup)
+        self._poststatusfixup(s, fixup)
 
         if match.always():
             # cache for performance
diff --git a/tests/fakedirstatewritetime.py b/tests/fakedirstatewritetime.py
--- a/tests/fakedirstatewritetime.py
+++ b/tests/fakedirstatewritetime.py
@@ -55,9 +55,9 @@  def fakewrite(ui, func):
         parsers.pack_dirstate = orig_pack_dirstate
         dirstate._getfsnow = orig_dirstate_getfsnow
 
-def _poststatusfixup(orig, workingctx, fixup):
+def _poststatusfixup(orig, workingctx, status, fixup):
     ui = workingctx.repo().ui
-    return fakewrite(ui, lambda : orig(workingctx, fixup))
+    return fakewrite(ui, lambda : orig(workingctx, status, fixup))
 
 def markcommitted(orig, committablectx, node):
     ui = committablectx.repo().ui