Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1069)

Unified Diff: scm.py

Issue 6576005: Fix bug introduced in r51121: gcl upload crashes on a 'revived' file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/presubmit_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scm.py
diff --git a/scm.py b/scm.py
index 872b3fe05c5b9c114c783527c319706ae8c8caff..f0b956ab4254ca026ac3374b78e97585d1f83077 100644
--- a/scm.py
+++ b/scm.py
@@ -659,6 +659,7 @@ class SVN(object):
used.
The diff will always use relative paths.
"""
+ assert isinstance(filenames, (list, tuple))
previous_cwd = os.getcwd()
root = root or SVN.GetCheckoutRoot(previous_cwd)
root = os.path.normcase(os.path.join(root, ''))
@@ -703,7 +704,14 @@ class SVN(object):
rev = int(info.get('Copied From Rev'))
assert srcurl.startswith(root)
src = srcurl[len(root)+1:]
- srcinfo = SVN.CaptureInfo(srcurl)
+ try:
+ srcinfo = SVN.CaptureInfo(srcurl)
+ except gclient_utils.CheckCallError, e:
+ if not 'Not a valid URL' in e.stderr:
+ raise
+ # Assume the file was deleted. No idea how to figure out at which
+ # revision the file was deleted.
nsylvain 2011/02/23 22:08:35 The new file most likely has a mergeinfo property
M-A Ruel 2011/02/24 01:37:58 The idea is to not use the svn:mergeinfo metadata
+ srcinfo = {'Revision': rev}
if (srcinfo.get('Revision') != rev and
SVN.Capture(['diff', '-r', '%d:head' % rev, srcurl])):
metaheaders.append("#$ svn cp -r %d %s %s "
« no previous file with comments | « no previous file | tests/presubmit_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698