changeset 8b0eee09deaf in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=8b0eee09deaf
description:
style: Make the style hook work in directories other than the root.
diffstat:
util/style.py | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diffs (43 lines):
diff -r 76095b05f4da -r 8b0eee09deaf util/style.py
--- a/util/style.py Mon May 23 14:29:23 2011 -0700
+++ b/util/style.py Tue May 24 21:19:31 2011 -0700
@@ -400,10 +400,12 @@
if skip(fname):
continue
- if whitespace.apply(fname, prompt):
+ fpath = joinpath(repo.root, fname)
+
+ if whitespace.apply(fpath, prompt):
return True
- if sorted_includes.apply(fname, prompt):
+ if sorted_includes.apply(fpath, prompt):
return True
try:
@@ -416,12 +418,13 @@
if skip(fname):
continue
+ fpath = joinpath(repo.root, fname)
regions = modregions(wctx, fname)
- if whitespace.apply(fname, prompt, regions):
+ if whitespace.apply(fpath, prompt, regions):
return True
- if sorted_includes.apply(fname, prompt, regions):
+ if sorted_includes.apply(fpath, prompt, regions):
return True
return False
@@ -434,7 +437,7 @@
verbose = 0
stats = ValidationStats()
for f in modified + added:
- validate(f, stats, verbose, None)
+ validate(joinpath(repo.root, f), stats, verbose, None)
if stats:
stats.dump()
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev