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

Unified Diff: tools/svndiff.py

Issue 23902030: Use relative paths in svndiff, so results can be exported by Apache (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 3 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: tools/svndiff.py
===================================================================
--- tools/svndiff.py (revision 11259)
+++ tools/svndiff.py (working copy)
@@ -220,10 +220,8 @@
path_to_skdiff = os.path.abspath(FindPathToSkDiff(path_to_skdiff))
if not dest_dir:
dest_dir = tempfile.mkdtemp()
- dest_dir = os.path.abspath(dest_dir)
- os.chdir(source_dir)
- using_svn = os.path.isdir('.svn')
+ using_svn = os.path.isdir(os.path.join(source_dir, '.svn'))
# Prepare temporary directories.
modified_flattened_dir = os.path.join(dest_dir, 'modified_flattened')
@@ -236,7 +234,7 @@
# Get a list of all locally modified (including added/deleted) files,
# descending subdirectories.
if using_svn:
- svn_repo = svn.Svn('.')
+ svn_repo = svn.Svn(source_dir)
modified_file_paths = svn_repo.GetFilesWithStatus(
svn.STATUS_ADDED | svn.STATUS_DELETED | svn.STATUS_MODIFIED)
else:
@@ -259,7 +257,7 @@
platform_prefix = re.sub(os.sep, '__',
os.path.dirname(modified_file_path)) + '__'
_CallJsonDiff(old_json_path=original_file_path,
- new_json_path=modified_file_path,
+ new_json_path=os.path.join(source_dir, modified_file_path),
old_flattened_dir=original_flattened_dir,
new_flattened_dir=modified_flattened_dir,
filename_prefix=platform_prefix)
« 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