From 926ae6a75ffe5a613477970f2782ccabd4bcb4e0 Mon Sep 17 00:00:00 2001 From: "maruel@chromium.org" Date: Mon, 16 Nov 2009 15:35:39 +0000 Subject: [PATCH] Fix 2 recently introduced errors. TEST=none BUG=none Review URL: http://codereview.chromium.org/391072 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@32058 0039d316-1c4b-4281-b951-d872f2087c98 --- scm.py | 3 ++- trychange.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scm.py b/scm.py index c47afaa3f..9c12ba836 100644 --- a/scm.py +++ b/scm.py @@ -363,7 +363,8 @@ class SVN(object): empty string is also returned. """ output = SVN.Run(["propget", property_name, file], None) - if (output.startswith("svn: ") and + if (output and + output.startswith("svn: ") and output.endswith("is not under version control")): return "" else: diff --git a/trychange.py b/trychange.py index a1c1de358..65e935a08 100755 --- a/trychange.py +++ b/trychange.py @@ -151,7 +151,7 @@ class SVN(SCM): os.chdir(root) # Directories will return None so filter them out. - diff = filter(None, [scm.SVN.Diff(f) for f in files]) + diff = filter(None, [scm.SVN.DiffItem(f) for f in files]) os.chdir(previous_cwd) return "".join(diff)