Mercurial > hg
diff hgext/narrow/narrowcommands.py @ 40829:77173267878b
narrow: don't resurrect old commits when narrowing (don't strip obsmarkers)
If you have an old obsolescence-chain of commits that has been pruned
and you narrow your repo so that some of those commits get stripped
(because they affected the removed paths), then we would currently
resurrect the commit that came before (along the obsmarker chain) the
last stripped commit. That happens by the usual rules for
obsmarker-stripping. However, it's quite surprising when it happens
when you narrow your repo. This patch makes narrowing not strip
obsmarkers.
Differential Revision: https://phab.mercurial-scm.org/D5364
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 03 Dec 2018 16:56:09 -0800 |
parents | 773572e5cba2 |
children | 74e023f5a922 |
line wrap: on
line diff
--- a/hgext/narrow/narrowcommands.py Sun Nov 18 19:55:53 2018 +0900 +++ b/hgext/narrow/narrowcommands.py Mon Dec 03 16:56:09 2018 -0800 @@ -215,7 +215,9 @@ urev = max(repo.revs('(::%n) - %ln + null', repo['.'].node(), visibletostrip)) hg.clean(repo, urev) - repair.strip(ui, unfi, tostrip, topic='narrow') + overrides = {('devel', 'strip-obsmarkers'): False} + with ui.configoverride(overrides, 'narrow'): + repair.strip(ui, unfi, tostrip, topic='narrow') todelete = [] for f, f2, size in repo.store.datafiles():