unthread hg split

This commit is contained in:
Anthony Scopatz 2018-09-22 10:59:00 -04:00
parent 79daa5abc6
commit 1ee2dc96da
2 changed files with 18 additions and 1 deletions

13
news/hgsplit.rst Normal file
View file

@ -0,0 +1,13 @@
**Added:** None
**Changed:** None
**Deprecated:** None
**Removed:** None
**Fixed:**
* The ``hg split`` command will now predict as unthreadable.
**Security:** None

View file

@ -371,9 +371,13 @@ def HG_PREDICTOR_PARSER():
def predict_hg(args): def predict_hg(args):
"""Predict if mercurial is about to be run in interactive mode. """Predict if mercurial is about to be run in interactive mode.
If it is interactive, predict False. If it isn't, predict True. If it is interactive, predict False. If it isn't, predict True.
Also predict False for certain commands, such as split.
""" """
ns, _ = HG_PREDICTOR_PARSER.parse_known_args(args) ns, _ = HG_PREDICTOR_PARSER.parse_known_args(args)
return not ns.interactive if hg.command == "split":
return False
else:
return not ns.interactive
def default_threadable_predictors(): def default_threadable_predictors():