[Updated] D10970: dirstate: infer the 'n' state from `possibly_dirty`
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Tue Jul 6 19:13:00 UTC 2021
Closed by commit rHG80617f3c0f9a: dirstate: infer the 'n' state from `possibly_dirty` (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/D10970?vs=28872&id=28909
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D10970/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D10970
AFFECTED FILES
mercurial/dirstate.py
mercurial/dirstatemap.py
rust/hg-core/src/dirstate/dirstate_map.rs
rust/hg-core/src/dirstate_tree/dirstate_map.rs
CHANGE DETAILS
diff --git a/rust/hg-core/src/dirstate_tree/dirstate_map.rs b/rust/hg-core/src/dirstate_tree/dirstate_map.rs
--- a/rust/hg-core/src/dirstate_tree/dirstate_map.rs
+++ b/rust/hg-core/src/dirstate_tree/dirstate_map.rs
@@ -745,6 +745,7 @@
entry.size = SIZE_FROM_OTHER_PARENT;
entry.mtime = MTIME_UNSET;
} else if possibly_dirty {
+ entry.state = EntryState::Normal;
entry.size = SIZE_NON_NORMAL;
entry.mtime = MTIME_UNSET;
} else {
diff --git a/rust/hg-core/src/dirstate/dirstate_map.rs b/rust/hg-core/src/dirstate/dirstate_map.rs
--- a/rust/hg-core/src/dirstate/dirstate_map.rs
+++ b/rust/hg-core/src/dirstate/dirstate_map.rs
@@ -94,6 +94,7 @@
entry.size = SIZE_FROM_OTHER_PARENT;
entry.mtime = MTIME_UNSET;
} else if possibly_dirty {
+ entry.state = EntryState::Normal;
entry.size = SIZE_NON_NORMAL;
entry.mtime = MTIME_UNSET;
} else {
diff --git a/mercurial/dirstatemap.py b/mercurial/dirstatemap.py
--- a/mercurial/dirstatemap.py
+++ b/mercurial/dirstatemap.py
@@ -175,6 +175,7 @@
size = FROM_P2
mtime = AMBIGUOUS_TIME
elif possibly_dirty:
+ state = b'n'
size = NONNORMAL
mtime = AMBIGUOUS_TIME
else:
diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -530,7 +530,7 @@
return
elif entry.merged or entry.from_p2:
return
- self._addpath(f, b'n', 0, possibly_dirty=True)
+ self._addpath(f, 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/20210706/c26c0a6c/attachment-0002.html>
More information about the Mercurial-patches
mailing list