Chromium Code Reviews| Index: git_cl.py |
| diff --git a/git_cl.py b/git_cl.py |
| index 06594f0404ed534b938239da25437cac45089f70..88f2dfac149554793c059e9ec4a65e2b9e69cd41 100755 |
| --- a/git_cl.py |
| +++ b/git_cl.py |
| @@ -635,11 +635,11 @@ or verify this branch is set up to track another (via the --track argument to |
| return True |
| def GetGitBaseUrlFromConfig(self): |
| - """Return the configured base URL from branch.<branchname>.baseurl. |
| + """Return the configured base URL from branch.<branchname>.canonical-url. |
| Returns None if it is not set. |
| """ |
| - return RunGit(['config', 'branch.%s.base-url' % self.GetBranch()], |
| + return RunGit(['config', 'branch.%s.canonical-url' % self.GetBranch()], |
| error_ok=True).strip() |
|
Sergey Berezin
2014/05/13 18:55:22
Let's continue checking .base-url if .canonical-ur
sheyang
2014/05/13 22:01:36
Done.
|
| def GetRemoteUrl(self): |
| @@ -1074,6 +1074,13 @@ def LoadCodereviewSettingsFromFile(fileobj): |
| RunGit(['config', keyvals['PUSH_URL_CONFIG'], |
| keyvals['ORIGIN_URL_CONFIG']]) |
| + if 'CANONICAL_URL' in keyvals: |
| + branchref = RunGit(['symbolic-ref', 'HEAD']).strip() |
| + branch = ShortBranchName(branchref) |
| + RunGit(['config', 'branch.%s.canonical-url' % branch, |
| + keyvals['CANONICAL_URL']], |
| + error_ok=False) |
| + |
| def urlretrieve(source, destination): |
| """urllib is broken for SSL connections via a proxy therefore we |
| @@ -1153,22 +1160,6 @@ def CMDconfig(parser, args): |
| DownloadHooks(True) |
| return 0 |
| - |
| -def CMDbaseurl(parser, args): |
| - """Gets or sets base-url for this branch.""" |
| - branchref = RunGit(['symbolic-ref', 'HEAD']).strip() |
| - branch = ShortBranchName(branchref) |
| - _, args = parser.parse_args(args) |
| - if not args: |
| - print("Current base-url:") |
| - return RunGit(['config', 'branch.%s.base-url' % branch], |
| - error_ok=False).strip() |
| - else: |
| - print("Setting base-url to %s" % args[0]) |
| - return RunGit(['config', 'branch.%s.base-url' % branch, args[0]], |
| - error_ok=False).strip() |
|
Sergey Berezin
2014/05/13 18:55:22
Since you are modifying only chromium at the momen
sheyang
2014/05/13 22:01:36
Done.
|
| - |
| - |
| def CMDstatus(parser, args): |
| """Show status of changelists. |