[Updated] D10932: dirstate: add an explicit `possibly_dirty` parameter to `_addpath`

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Sat Jul 3 19:28:50 UTC 2021


Closed by commit rHG91520abe2b2c: dirstate: add an explicit `possibly_dirty` parameter to `_addpath` (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D10932?vs=28733&id=28764

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D10932/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D10932

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -446,6 +446,7 @@
         size=NONNORMAL,
         mtime=AMBIGUOUS_TIME,
         from_p2=False,
+        possibly_dirty=False,
     ):
         oldstate = self[f]
         if state == b'a' or oldstate == b'r':
@@ -466,6 +467,8 @@
         if from_p2:
             size = FROM_P2
             mtime = AMBIGUOUS_TIME
+        elif possibly_dirty:
+            mtime = AMBIGUOUS_TIME
         else:
             assert size != FROM_P2
             if size != NONNORMAL:
@@ -522,7 +525,7 @@
                     return
                 if entry[0] == b'm' or entry[0] == b'n' and entry[2] == FROM_P2:
                     return
-        self._addpath(f, b'n', 0)
+        self._addpath(f, b'n', 0, possibly_dirty=True)
         self._map.copymap.pop(f, None)
 
     def otherparent(self, f):



To: marmoute, #hg-reviewers, SimonSapin, pulkit
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210703/1709bfaa/attachment-0002.html>


More information about the Mercurial-patches mailing list