From a656e70574e8393c40b3676bd96e07437ffd01ba Mon Sep 17 00:00:00 2001 From: "sheyang@chromium.org" Date: Thu, 15 May 2014 20:43:05 +0000 Subject: [PATCH] Revert of use canonical base URL for projects (https://codereview.chromium.org/271703010/) Reason for revert: CQ rejects all chromium projects because of this change. Original issue's description: > use canonical base URL for projects > > BUG=372645 > R=iannucci@chromium.org, sergeyberezin@chromium.org > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=270460 TBR=iannucci@chromium.org,sergeyberezin@chromium.org NOTREECHECKS=true NOTRY=true BUG=372645 Review URL: https://codereview.chromium.org/287063002 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@270803 0039d316-1c4b-4281-b951-d872f2087c98 --- git_cl.py | 18 +++--------------- tests/git_cl_test.py | 1 - 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/git_cl.py b/git_cl.py index 6e564010d..06594f040 100755 --- a/git_cl.py +++ b/git_cl.py @@ -635,17 +635,12 @@ 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..canonical-url. + """Return the configured base URL from branch..baseurl. Returns None if it is not set. """ - branch = self.GetBranch() - url = RunGit(['config', 'branch.%s.canonical-url' % branch], - error_ok=True).strip() - if not url: - url = RunGit(['config', 'branch.%s.base-url' % branch], - error_ok=True).strip() - return url + return RunGit(['config', 'branch.%s.base-url' % self.GetBranch()], + error_ok=True).strip() def GetRemoteUrl(self): """Return the configured remote URL, e.g. 'git://example.org/foo.git/'. @@ -1079,13 +1074,6 @@ 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 diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py index a6aa2878d..2d204408c 100755 --- a/tests/git_cl_test.py +++ b/tests/git_cl_test.py @@ -204,7 +204,6 @@ class TestGitCl(TestCase): return [ ((['git', 'config', 'core.editor'],), ''), ] + cc_call + private_call + [ - ((['git', 'config', 'branch.master.canonical-url'],), ''), ((['git', 'config', 'branch.master.base-url'],), ''), ((['git', 'config', '--local', '--get-regexp', '^svn-remote\\.'],),