From: Ali Saidi Date: Tue, 13 Jan 2009 05:14:04 +0000 (-0500) Subject: Fix style hook for Mercurial >= 1.1 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=758d6ccf1f54ca20bec12598957fc1bcfa8a7ffb;p=gem5.git Fix style hook for Mercurial >= 1.1 --- 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