summaryrefslogtreecommitdiff
path: root/util/style.py
diff options
context:
space:
mode:
Diffstat (limited to 'util/style.py')
-rw-r--r--util/style.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/util/style.py b/util/style.py
index a117fab70..fa9a30b54 100644
--- a/util/style.py
+++ b/util/style.py
@@ -304,7 +304,12 @@ def do_check_whitespace(ui, repo, *files, **args):
if prompt(fname):
return True
- wctx = repo.workingctx()
+ try:
+ wctx = repo.workingctx()
+ except:
+ from mercurial import context
+ wctx = context.workingctx(repo)
+
for fname in modified:
if skip(fname):
continue