##// END OF EJS Templates
narrow: don't resurrect old commits when narrowing (don't strip obsmarkers)...
Martin von Zweigbergk -
r40864:77173267 default
parent child Browse files
Show More
@@ -215,7 +215,9 b' def _narrow(ui, repo, remote, commoninc,'
215 215 urev = max(repo.revs('(::%n) - %ln + null',
216 216 repo['.'].node(), visibletostrip))
217 217 hg.clean(repo, urev)
218 repair.strip(ui, unfi, tostrip, topic='narrow')
218 overrides = {('devel', 'strip-obsmarkers'): False}
219 with ui.configoverride(overrides, 'narrow'):
220 repair.strip(ui, unfi, tostrip, topic='narrow')
219 221
220 222 todelete = []
221 223 for f, f2, size in repo.store.datafiles():
@@ -214,6 +214,29 b' Updates to nullid if necessary'
214 214 000000000000
215 215 $ cd ..
216 216
217 Narrowing doesn't resurrect old commits (unlike what regular `hg strip` does)
218 $ hg clone --narrow ssh://user@dummy/master narrow-obsmarkers --include d0 --include d3 -q
219 $ cd narrow-obsmarkers
220 $ echo a >> d0/f2
221 $ hg add d0/f2
222 $ hg ci -m 'modify d0/'
223 $ echo a >> d3/f2
224 $ hg add d3/f2
225 $ hg commit --amend -m 'modify d0/ and d3/'
226 $ hg log -T "{rev}: {desc}\n"
227 5: modify d0/ and d3/
228 3: add d10/f
229 2: add d3/f
230 1: add d2/f
231 0: add d0/f
232 $ hg tracked --removeinclude d3 --force-delete-local-changes -q
233 $ hg log -T "{rev}: {desc}\n"
234 3: add d10/f
235 2: add d3/f
236 1: add d2/f
237 0: add d0/f
238 $ cd ..
239
217 240 Can remove last include, making repo empty
218 241 $ hg clone --narrow ssh://user@dummy/master narrow-empty --include d0 -r 5
219 242 adding changesets
General Comments 0
You need to be logged in to leave comments. Login now