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

Unified Diff: tools/svndiff.py

Issue 634313006: Use the function recently added to common in svndiff.py (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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
diff --git a/tools/svndiff.py b/tools/svndiff.py
index 716d497014e9c941356af55014adc0870029761d..e4ed90ee5b6aa1960321f21ae77fe3b6bd700ca2 100755
--- a/tools/svndiff.py
+++ b/tools/svndiff.py
@@ -46,6 +46,8 @@ import gm_json
import jsondiff
import svn
+from common.py.utils import git_utils
tfarina 2014/10/09 03:07:10 is this right? I'm not familiar with python way to
borenet 2014/10/09 12:14:36 It depends on what's in PYTHONPATH. I'm fine with
tfarina 2014/10/10 00:03:59 Done.
+
USAGE_STRING = 'Usage: %s [options]'
HELP_STRING = '''
@@ -185,12 +187,6 @@ def _RunCommand(args):
raise Exception('command "%s" failed: %s' % (args, stderr))
return stdout
-def _GitGetModifiedFiles():
- """Returns a list of locally modified files within the current working dir.
-
- TODO(epoger): Move this into a git utility package?
- """
- return _RunCommand(['git', 'ls-files', '-m']).splitlines()
def _GitExportBaseVersionOfFile(file_within_repo, dest_path):
"""Retrieves a copy of the base version of a file within the repository.
@@ -254,7 +250,7 @@ def SvnDiff(path_to_skdiff, dest_dir, source_dir):
modified_file_paths = svn_repo.GetFilesWithStatus(
svn.STATUS_ADDED | svn.STATUS_DELETED | svn.STATUS_MODIFIED)
else:
- modified_file_paths = _GitGetModifiedFiles()
+ modified_file_paths = git_utils.GetModifiedFiles()
# For each modified file:
# 1. copy its current contents into modified_flattened_dir
« 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