style: fix style hook when run from a repo subdir.

Before this fix, the style hook would blow up when you did a qrefresh to add
a new file, but executed the qrefresh from a repository sub directory.

--HG--
extra : convert_revision : 851b0421dfa5c5b23d0f49441c4ba2e0ac579c5d
This commit is contained in:
Nathan Binkert 2007-08-21 16:15:14 -07:00
parent 464a51e29e
commit 3555b2aecc

View file

@ -286,7 +286,7 @@ def check_whitespace(ui, repo, hooktype, node, parent1, parent2):
for fname in added: for fname in added:
ok = True 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)) ui.write("invalid whitespace in %s:%d\n" % (fname, num))
if verbose: if verbose:
ui.write(">>%s<<\n" % line[-1]) ui.write(">>%s<<\n" % line[-1])