From: Nathan Binkert Date: Tue, 21 Aug 2007 23:15:14 +0000 (-0700) Subject: style: fix style hook when run from a repo subdir. X-Git-Tag: m5_2.0_beta4~157^2~3 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3555b2aecca85457d4ce5899ebafd2a7cde08e53;p=gem5.git 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 --- diff --git a/util/style.py b/util/style.py index 866bef9b8..18b224f27 100644 --- a/util/style.py +++ b/util/style.py @@ -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])