Skip to content

Commit

Permalink
Merge pull request #2836 from xonsh/hgsplit
Browse files Browse the repository at this point in the history
unthread hg split
  • Loading branch information
gforsyth committed Sep 23, 2018
2 parents 30dc4c9 + bde0430 commit 1abe301
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
13 changes: 13 additions & 0 deletions news/hgsplit.rst
@@ -0,0 +1,13 @@
**Added:** None

**Changed:** None

**Deprecated:** None

**Removed:** None

**Fixed:**

* The ``hg split`` command will now predict as unthreadable.

**Security:** None
6 changes: 5 additions & 1 deletion xonsh/commands_cache.py
Expand Up @@ -371,9 +371,13 @@ def HG_PREDICTOR_PARSER():
def predict_hg(args):
"""Predict if mercurial is about to be run in interactive mode.
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)
return not ns.interactive
if ns.command == "split":
return False
else:
return not ns.interactive


def default_threadable_predictors():
Expand Down

0 comments on commit 1abe301

Please sign in to comment.