diff --git a/scm.py b/scm.py index 2addcefefc..b1b0496f4f 100644 --- a/scm.py +++ b/scm.py @@ -1024,6 +1024,11 @@ class SVN(object): logging.info('Ignoring external %s' % file_status[1]) continue + # This is the case where '! L .' is returned by 'svn status'. Just + # strip off the '/.'. + if file_path.endswith(os.path.sep + '.'): + file_path = file_path[:-2] + if callback: callback(file_status) diff --git a/tests/gclient_scm_test.py b/tests/gclient_scm_test.py index ebe5e45dca..0d8e722d08 100755 --- a/tests/gclient_scm_test.py +++ b/tests/gclient_scm_test.py @@ -290,7 +290,8 @@ class SVNWrapperTestCase(BaseTestCase): ('~ ', '.'), ] gclient_scm.scm.SVN.CaptureStatus(None, self.base_path).AndReturn(items) - file_path = join(self.base_path, '.') + # RemoveDirectory() doesn't work on path ending with '.', like 'foo/.'. + file_path = self.base_path gclient_scm.os.path.exists(file_path).AndReturn(True) gclient_scm.os.path.isfile(file_path).AndReturn(False) gclient_scm.os.path.islink(file_path).AndReturn(False) @@ -305,7 +306,7 @@ class SVNWrapperTestCase(BaseTestCase): relpath=self.relpath) file_list2 = [] scm.revert(options, self.args, file_list2) - self.checkstdout(('%s\n' % file_path)) + self.checkstdout(('%s\n' % os.path.join(file_path, '.'))) def testStatus(self): options = self.Options(verbose=True)