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

Unified Diff: tools/svndiff.py

Issue 49323006: svndiff for the windows (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 4f9618512aa6d566c5e31c5c7fcb10a0360aa10d..79de71fcf0da0e15781207c750143db05127acb9 100755
--- a/tools/svndiff.py
+++ b/tools/svndiff.py
@@ -87,8 +87,13 @@ def FindPathToSkDiff(user_set_path=None):
raise Exception('unable to find skdiff at user-set path %s' %
user_set_path)
trunk_path = os.path.join(os.path.dirname(__file__), os.pardir)
- possible_paths = [os.path.join(trunk_path, 'out', 'Release', 'skdiff'),
- os.path.join(trunk_path, 'out', 'Debug', 'skdiff')]
+
+ extension = ""
bsalomon 2013/10/28 21:07:22 is it really dumb to init to an empty string? I do
epoger 2013/10/28 21:14:41 Probably a "real" Python programmer would scoff at
bsalomon 2013/10/29 14:23:43 Done.
+ if os.name is "nt":
+ extension = ".exe"
+
+ possible_paths = [os.path.join(trunk_path, 'out', 'Release', 'skdiff' + extension),
epoger 2013/10/28 21:14:41 wrap at 80 chars please (I love enforcing rules th
bsalomon 2013/10/29 14:23:43 Done.
+ os.path.join(trunk_path, 'out', 'Debug', 'skdiff' + extension)]
for try_path in possible_paths:
if os.path.isfile(try_path):
return try_path
@@ -202,7 +207,7 @@ def _GitExportBaseVersionOfFile(file_within_repo, dest_path):
# For now, though, "git show" is the most straightforward implementation
# I could come up with. I tried using "git cat-file", but I had trouble
# getting it to work as desired.
- args = ['git', 'show', os.path.join('HEAD:.', file_within_repo)]
+ args = ['git', 'show', 'HEAD:./' + file_within_repo]
bsalomon 2013/10/28 21:07:22 we're passing a path from a path that was extracte
epoger 2013/10/28 21:14:41 Makes sense. Please add your explanation to the c
bsalomon 2013/10/29 14:23:43 Done.
with open(dest_path, 'wb') as outfile:
proc = subprocess.Popen(args, stdout=outfile)
proc.communicate()
« 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