comparison mercurial/commands.py @ 32131:35a69efbf190

bisect: allow resetting with unfinished graft/rebase/etc "hg bisect --reset" just deletes the state file (it doesn't move back to the starting point like rebase does); it can not conflict with an ongoing rebase etc. checkunfinished() has this documentation: It's probably good to check this right before bailifchanged(). So that's where I moved it.
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 03 May 2017 09:09:44 -0700
parents 7000196a8178
children 347ab2d47463
comparison
equal deleted inserted replaced
32130:c3dcec6cbc1b 32131:35a69efbf190
835 else: 835 else:
836 reset = True 836 reset = True
837 elif extra or good + bad + skip + reset + extend + bool(command) > 1: 837 elif extra or good + bad + skip + reset + extend + bool(command) > 1:
838 raise error.Abort(_('incompatible arguments')) 838 raise error.Abort(_('incompatible arguments'))
839 839
840 cmdutil.checkunfinished(repo)
841
842 if reset: 840 if reset:
843 hbisect.resetstate(repo) 841 hbisect.resetstate(repo)
844 return 842 return
845 843
846 state = hbisect.load_state(repo) 844 state = hbisect.load_state(repo)
863 861
864 def mayupdate(repo, node, show_stats=True): 862 def mayupdate(repo, node, show_stats=True):
865 """common used update sequence""" 863 """common used update sequence"""
866 if noupdate: 864 if noupdate:
867 return 865 return
866 cmdutil.checkunfinished(repo)
868 cmdutil.bailifchanged(repo) 867 cmdutil.bailifchanged(repo)
869 return hg.clean(repo, node, show_stats=show_stats) 868 return hg.clean(repo, node, show_stats=show_stats)
870 869
871 displayer = cmdutil.show_changeset(ui, repo, {}) 870 displayer = cmdutil.show_changeset(ui, repo, {})
872 871