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

Unified Diff: checkout.py

Issue 317783008: Do not assign revision when checking the commit existence. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Use strip instead Created 6 years, 6 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: checkout.py
diff --git a/checkout.py b/checkout.py
index 5ba4ba93d3fc4d1db6880523977d611c5ec45b1a..5dbb375caad2f0dd0e37fff83f862d8e57a3218b 100644
--- a/checkout.py
+++ b/checkout.py
@@ -594,11 +594,11 @@ class GitCheckout(CheckoutBase):
try:
# Look if the commit hash already exist. If so, we can skip a
# 'git fetch' call.
- revision = self._check_output_git(['rev-parse', revision])
+ revision = self._check_output_git(['rev-parse', revision]).rstrip()
except subprocess.CalledProcessError:
self._check_call_git(
['fetch', self.remote, self.remote_branch, '--quiet'])
- revision = self._check_output_git(['rev-parse', revision])
+ revision = self._check_output_git(['rev-parse', revision]).rstrip()
self._check_call_git(['checkout', '--force', '--quiet', revision])
else:
branches, active = self._branches()
« 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