comparison 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
comparison
equal deleted inserted replaced
45508:27822b8436bf 45509:2bc978921e8a
252 urev = _findupdatetarget(repo, revs) 252 urev = _findupdatetarget(repo, revs)
253 uctx = repo[urev] 253 uctx = repo[urev]
254 254
255 # only reset the dirstate for files that would actually change 255 # only reset the dirstate for files that would actually change
256 # between the working context and uctx 256 # between the working context and uctx
257 descendantrevs = repo.revs(b"%d::.", uctx.rev()) 257 descendantrevs = repo.revs(b"only(., %d)", uctx.rev())
258 changedfiles = [] 258 changedfiles = []
259 for rev in descendantrevs: 259 for rev in descendantrevs:
260 # blindly reset the files, regardless of what actually changed 260 # blindly reset the files, regardless of what actually changed
261 changedfiles.extend(repo[rev].files()) 261 changedfiles.extend(repo[rev].files())
262 262