DRAM: Make latency parameters be Param.Latency instead of ints.
[gem5.git] / util / style.py
index 7238b980136b7bb7708954ad4850a9af749ad7a5..18b224f276a99142b7f73ddef5451decd1565ef6 100644 (file)
@@ -286,7 +286,7 @@ def check_whitespace(ui, repo, hooktype, node, parent1, parent2):
 
     for fname in added:
         ok = True
-        for line,num in checkwhite(fname):
+        for line,num in checkwhite(repo.wjoin(fname)):
             ui.write("invalid whitespace in %s:%d\n" % (fname, num))
             if verbose:
                 ui.write(">>%s<<\n" % line[-1])
@@ -298,6 +298,9 @@ def check_whitespace(ui, repo, hooktype, node, parent1, parent2):
 
     wctx = repo.workingctx()
     for fname in modified:
+        if not whitespace_file(fname):
+            continue
+
         fctx = wctx.filectx(fname)
         pctx = fctx.parents()
         assert len(pctx) in (1, 2)
@@ -306,7 +309,7 @@ def check_whitespace(ui, repo, hooktype, node, parent1, parent2):
         lines = mdiff.splitnewlines(file_data)
         mod_lines = modified_lines(pctx[0].data(), file_data, len(lines))
         if len(pctx) == 2:
-            m2 = modified_lines(pctx[1].data(), file_data)
+            m2 = modified_lines(pctx[1].data(), file_data, len(lines))
             mod_lines = mod_lines & m2 # only the lines that are new in both
 
         fixonly = set()