diff hgext/strip.py @ 45509:2bc978921e8a stable

strip: with --keep, consider all revs "removed" from the wcp (issue6270) The current code was blink to change from other branches when stripping merges that are ancestors of the working copy parents.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 18 Sep 2020 12:20:28 +0200
parents b7808443ed6a
children 93a0f3ba36bb
line wrap: on
line diff
--- a/hgext/strip.py	Fri Sep 18 12:10:12 2020 +0200
+++ b/hgext/strip.py	Fri Sep 18 12:20:28 2020 +0200
@@ -254,7 +254,7 @@
 
             # only reset the dirstate for files that would actually change
             # between the working context and uctx
-            descendantrevs = repo.revs(b"%d::.", uctx.rev())
+            descendantrevs = repo.revs(b"only(., %d)", uctx.rev())
             changedfiles = []
             for rev in descendantrevs:
                 # blindly reset the files, regardless of what actually changed