summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2009-01-13 00:14:04 -0500
committerAli Saidi <saidi@eecs.umich.edu>2009-01-13 00:14:04 -0500
commit758d6ccf1f54ca20bec12598957fc1bcfa8a7ffb (patch)
treeddec768306420132ac9253080ba72aac30ece59b /util
parent81180a3bf005586d7ca1fae77dd7888b99e45864 (diff)
downloadgem5-758d6ccf1f54ca20bec12598957fc1bcfa8a7ffb.tar.xz
Fix style hook for Mercurial >= 1.1
Diffstat (limited to 'util')
-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