Project prefix directory should work with Hg.

Patch based on one by tomic80.
This commit is contained in:
erg@google.com 2010-10-04 22:18:07 +00:00
parent 7ead64485b
commit 42e59b0ce7

1
cpplint/cpplint.py vendored
View File

@ -719,6 +719,7 @@ class FileInfo:
not os.path.exists(os.path.join(root_dir, ".git")) and
not os.path.exists(os.path.join(root_dir, ".hg"))):
root_dir = os.path.dirname(root_dir)
if (os.path.exists(os.path.join(root_dir, ".git")) or
os.path.exists(os.path.join(root_dir, ".hg"))):
prefix = os.path.commonprefix([root_dir, project_dir])