# HG changeset patch # User Gábor Stefanik <gabor.stefa...@nng.com> # Date 1481126137 -3600 # Wed Dec 07 16:55:37 2016 +0100 # Node ID dabbe365b843fcf9b8a0de6c08e9db6100b391e9 # Parent 6472c33e16326b8c817a8bae0e75053b19badb2c update: introduce config option ui.allowdirtyupdate for dirty nonlinear updates
Make it easier to test codepaths common to graft and update without having to mess around with obsolete markers to force a nonlinear update. Named by analogy with ui.allowemptycommit. diff -r 6472c33e1632 -r dabbe365b843 mercurial/merge.py --- a/mercurial/merge.py Mon Dec 05 17:40:01 2016 +0100 +++ b/mercurial/merge.py Wed Dec 07 16:55:37 2016 +0100 @@ -1536,7 +1536,10 @@ if pas not in ([p1], [p2]): # nonlinear dirty = wc.dirty(missing=True) - if dirty or onode is None: + # experimental config: ui.allowdirtyupdate + if repo.ui.configbool('ui', 'allowdirtyupdate', False): + pas = [p1] + elif dirty or onode is None: # Branching is a bit strange to ensure we do the minimal # amount of call to obsolete.background. foreground = obsolete.foreground(repo, [p1.node()]) _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel