Skip to content
Snippets Groups Projects
Commit da304f78 authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

dirstate-item: replace call to new_from_p2

The constructor is on its way out, so we inline the last relevant call before
dropping it.

Differential Revision: https://phab.mercurial-scm.org/D11602
parent b45c4dc6
No related branches found
No related tags found
No related merge requests found
......@@ -162,7 +162,7 @@
return cls(p1_tracked=p1_tracked, p2_info=p2_info)
elif state == b'n':
if size == FROM_P2:
return cls.new_from_p2()
return cls(wc_tracked=True, p2_info=True)
elif size == NONNORMAL:
return cls.new_possibly_dirty()
elif mtime == AMBIGUOUS_TIME:
......
......@@ -68,7 +68,12 @@
match state {
EntryState::Normal => {
if size == SIZE_FROM_OTHER_PARENT {
Self::new_from_p2()
Self {
// might be missing P1_TRACKED
flags: Flags::WDIR_TRACKED | Flags::P2_INFO,
mode_size: None,
mtime: None,
}
} else if size == SIZE_NON_NORMAL {
Self::new_possibly_dirty()
} else if mtime == MTIME_UNSET {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment