Commit 73e36ed3 authored by maruel@chromium.org's avatar maruel@chromium.org

Fix AffectedFile.IsDirectory() to use the right path.

BUG=gcl commit doesn't show any "svn: 'bleh' is not a working copy" error
R=jam

Review URL: http://codereview.chromium.org/113782

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@16781 0039d316-1c4b-4281-b951-d872f2087c98
parent 0ff1fab8
...@@ -346,13 +346,14 @@ class AffectedFile(object): ...@@ -346,13 +346,14 @@ class AffectedFile(object):
def IsDirectory(self): def IsDirectory(self):
"""Returns true if this object is a directory.""" """Returns true if this object is a directory."""
if os.path.exists(self.path): path = self.AbsoluteLocalPath()
if os.path.exists(path):
# Retrieve directly from the file system; it is much faster than querying # Retrieve directly from the file system; it is much faster than querying
# subversion, especially on Windows. # subversion, especially on Windows.
return os.path.isdir(self.path) return os.path.isdir(path)
else: else:
return gclient.CaptureSVNInfo(self.path).get('Node Kind') in ('dir', return gclient.CaptureSVNInfo(path).get('Node Kind') in ('dir',
'directory') 'directory')
def SvnProperty(self, property_name): def SvnProperty(self, property_name):
"""Returns the specified SVN property of this file, or the empty string """Returns the specified SVN property of this file, or the empty string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment