[Updated] D11429: dirstate: fix restoration of "merged" state after a remove
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Mon Sep 20 14:07:47 UTC 2021
Closed by commit rHG87b3010c08e0: dirstate: fix restoration of "merged" state after a remove (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/D11429?vs=30267&id=30311
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D11429/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D11429
AFFECTED FILES
mercurial/dirstate.py
tests/test-merge-remove.t
CHANGE DETAILS
diff --git a/tests/test-merge-remove.t b/tests/test-merge-remove.t
--- a/tests/test-merge-remove.t
+++ b/tests/test-merge-remove.t
@@ -55,8 +55,8 @@
adding foo1
$ hg debugstate --no-dates
- n 0 -2 unset bar
- n 0 -2 unset foo1
+ m 0 -2 unset bar
+ m 0 -2 unset foo1
copy: foo -> foo1
$ hg st -qC
@@ -74,8 +74,8 @@
reverting foo1
$ hg debugstate --no-dates
- n 0 -2 unset bar
- n 0 -2 unset foo1
+ m 0 -2 unset bar
+ m 0 -2 unset foo1
copy: foo -> foo1
$ hg st -qC
diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -734,7 +734,10 @@
# (see `merged_removed` and `from_p2_removed`)
if entry.merged_removed or entry.from_p2_removed:
source = self._map.copymap.get(f)
- self._addpath(f, from_p2=True)
+ if entry.merged_removed:
+ self._addpath(f, merged=True)
+ else:
+ self._addpath(f, from_p2=True)
self._map.copymap.pop(f, None)
if source is not None:
self.copy(source, f)
To: marmoute, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210920/6dd11dea/attachment-0002.html>
More information about the Mercurial-patches
mailing list