[Commented On] D10971: dirstate: infer the 'n' state from `from_p2`
baymax (Baymax, Your Personal Patch-care Companion)
phabricator at mercurial-scm.org
Tue Jul 6 18:15:21 UTC 2021
baymax added a comment.
baymax updated this revision to Diff 28873.
✅ refresh by Heptapod after a successful CI run (🐙 💚)
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D10971?vs=28792&id=28873
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D10971/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D10971
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
@@ -742,6 +742,7 @@
entry.mtime = MTIME_UNSET;
} else if from_p2 {
assert!(!possibly_dirty);
+ entry.state = EntryState::Normal;
entry.size = SIZE_FROM_OTHER_PARENT;
entry.mtime = MTIME_UNSET;
} else if possibly_dirty {
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
@@ -91,6 +91,7 @@
entry.mtime = MTIME_UNSET;
} else if from_p2 {
assert!(!possibly_dirty);
+ entry.state = EntryState::Normal;
entry.size = SIZE_FROM_OTHER_PARENT;
entry.mtime = MTIME_UNSET;
} else if possibly_dirty {
diff --git a/mercurial/dirstatemap.py b/mercurial/dirstatemap.py
--- a/mercurial/dirstatemap.py
+++ b/mercurial/dirstatemap.py
@@ -172,6 +172,7 @@
mtime = AMBIGUOUS_TIME
elif from_p2:
assert not possibly_dirty
+ state = b'n'
size = FROM_P2
mtime = AMBIGUOUS_TIME
elif possibly_dirty:
diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -543,7 +543,7 @@
self._addpath(f, merged=True)
else:
# add-like
- self._addpath(f, b'n', 0, from_p2=True)
+ self._addpath(f, from_p2=True)
self._map.copymap.pop(f, None)
def add(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/0bf1dfe4/attachment-0002.html>
More information about the Mercurial-patches
mailing list