mirror of
https://github.com/facebook/sapling.git
synced 2025-01-08 14:46:47 +03:00
undo: disallow interactive undo on Windows
Summary: `interactiveui` depends on `termios`, which is POSIX-only. Reviewed By: farnz Differential Revision: D8418018 fbshipit-source-id: f3d36c8a2e1fae11c37e29d87a44f3e31ab02a53
This commit is contained in:
parent
6fd3772316
commit
4a0a71fd5e
@ -23,6 +23,7 @@ from mercurial import (
|
||||
obsolete,
|
||||
obsutil,
|
||||
phases,
|
||||
pycompat,
|
||||
registrar,
|
||||
revlog,
|
||||
revset,
|
||||
@ -36,7 +37,10 @@ from mercurial import (
|
||||
from mercurial.i18n import _
|
||||
from mercurial.node import bin, hex, nullid
|
||||
|
||||
from . import interactiveui
|
||||
if not pycompat.iswindows:
|
||||
from . import interactiveui
|
||||
else:
|
||||
interactiveui = None
|
||||
|
||||
|
||||
cmdtable = {}
|
||||
@ -780,6 +784,8 @@ def undo(ui, repo, *args, **opts):
|
||||
branch = opts.get("branch")
|
||||
preview = opts.get("preview")
|
||||
interactive = opts.get("interactive")
|
||||
if interactive and interactiveui is None:
|
||||
raise error.Abort(_("interactive ui is not supported on Windows"))
|
||||
if interactive:
|
||||
preview = True
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user