style: Don't try to fix files that should be ignored.

The style hook was ignoring new files, but processing all modified
files.

--HG--
extra : convert_revision : 97400c24a12103d7ac3d4f69b026853816c39d72
This commit is contained in:
Nathan Binkert 2007-08-14 18:21:23 -07:00
parent 0cb32aadb1
commit a9e4daf574

View 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)