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

Unified Diff: scm.py

Issue 874002: Stop SVNWrapper and GitWrapper from inheriting from scm.SVN and scm.GIT. (Closed)
Patch Set: Created 10 years, 9 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
« gclient.py ('K') | « gclient_scm.py ('k') | tests/gclient_scm_test.py » ('j') | 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 b4553765ae1fa248c85ffe56836e6e8fa336a7cb..313ff783911c5f4b55f8ce4e8ffb91e92396a712 100644
--- a/scm.py
+++ b/scm.py
@@ -221,7 +221,7 @@ class GIT(object):
def GetUpstream(cwd):
"""Gets the current branch's upstream branch."""
remote, upstream_branch = GIT.FetchUpstreamTuple(cwd)
- if remote is not '.':
+ if remote != '.':
upstream_branch = upstream_branch.replace('heads', 'remotes/' + remote)
return upstream_branch
@@ -378,7 +378,7 @@ class SVN(object):
}[args[0]]
compiled_pattern = re.compile(pattern)
# Place an upper limit.
- for i in range(1, 10):
+ for _ in range(1, 10):
previous_list_len = len(file_list)
failure = []
@@ -397,7 +397,7 @@ class SVN(object):
CaptureMatchingLines)
except gclient_utils.Error:
# We enforce that some progress has been made or HTTP 502.
- if ([True for f in failure if '502 Bad Gateway' in f] or
+ if (filter(lambda x: '502 Bad Gateway' in x, failure) or
(len(failure) and len(file_list) > previous_list_len)):
if args[0] == 'checkout':
# An aborted checkout is now an update.
« gclient.py ('K') | « gclient_scm.py ('k') | tests/gclient_scm_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698