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

Unified Diff: scm.py

Issue 554013: Fix svn mv/cp/ren diff for real this time, for try jobs. (Closed)
Patch Set: Created 10 years, 11 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 | no next file » | 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 2ec5825c3284ff5818a246a17aff0873af04444d..c47a00c2466847ee0a4483db83aca31ec5a5e5e5 100644
--- a/scm.py
+++ b/scm.py
@@ -611,10 +611,7 @@ class SVN(object):
command = ["diff", "--config-dir", bogus_dir, filename]
if revision:
command.extend(['--revision', revision])
- data = SVN.Capture(command, None)
- if data:
- pass
- elif SVN.IsMoved(filename):
+ if SVN.IsMoved(filename):
if full_move:
file_content = gclient_utils.FileRead(filename, 'rb')
# Prepend '+' to every lines.
@@ -629,12 +626,13 @@ class SVN(object):
data += "@@ -0,0 +1,%d @@\n" % nb_lines
data += ''.join(file_content)
else:
- # svn diff on a mv/cp'd file outputs nothing.
- # We put in an empty Index entry so upload.py knows about them.
- data = "Index: %s\n" % filename
+ # svn diff on a mv/cp'd file outputs nothing if there was no change.
+ data = SVN.Capture(command, None)
+ if not data:
+ # We put in an empty Index entry so upload.py knows about them.
+ data = "Index: %s\n" % filename
else:
- # The file is not modified anymore. It should be removed from the set.
- pass
+ data = SVN.Capture(command, None)
finally:
shutil.rmtree(bogus_dir)
return data
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698