Fix style hook for Mercurial >= 1.1
This commit is contained in:
parent
81180a3bf0
commit
758d6ccf1f
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue