style: Don't try to fix files that should be ignored.
authorNathan Binkert <nate@binkert.org>
Wed, 15 Aug 2007 01:21:23 +0000 (18:21 -0700)
committerNathan Binkert <nate@binkert.org>
Wed, 15 Aug 2007 01:21:23 +0000 (18:21 -0700)
The style hook was ignoring new files, but processing all modified
files.

--HG--
extra : convert_revision : 97400c24a12103d7ac3d4f69b026853816c39d72

util/style.py

index 3d733638838b266a441bf76a5f4496b31fe8b52b..866bef9b8f77fa70d16ac67fa30d7f15fdee7b6b 100644 (file)
@@ -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)