Fix style hook for Mercurial >= 1.1

This commit is contained in:
Ali Saidi 2009-01-13 00:14:04 -05:00
parent 81180a3bf0
commit 758d6ccf1f

View file

@ -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