From 758d6ccf1f54ca20bec12598957fc1bcfa8a7ffb Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Tue, 13 Jan 2009 00:14:04 -0500 Subject: Fix style hook for Mercurial >= 1.1 --- util/style.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'util/style.py') 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 -- cgit v1.2.3