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

Unified Diff: git_cl.py

Issue 8745014: Fix git try. git_try.py imports git_cl.py without calling its main. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 1 month 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: git_cl.py
diff --git a/git_cl.py b/git_cl.py
index c0d9c9403e38d9b2f4dd3f937df87e5f456b41b5..387aa9b01ce4c4fe9143fbcb1469fabba1f03a19 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -311,6 +311,10 @@ def ShortBranchName(branch):
class Changelist(object):
def __init__(self, branchref=None):
# Poke settings so we get the "configure your server" message if necessary.
+ global settings
+ if not settings:
+ # Happens when git_cl.py is used as a utility library.
+ settings = Settings()
settings.GetDefaultServerUrl()
self.branchref = branchref
if self.branchref:
« 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