Commit 2a13d4f4 authored by dyen@chromium.org's avatar dyen@chromium.org

Correct remote URL when uploading from a repo cloned from a git_cache.

R=bradnelson@google.com, hinoka@chromium.org
BUG=None

Review URL: https://codereview.chromium.org/335723002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@276858 0039d316-1c4b-4281-b951-d872f2087c98
parent 6895317a
......@@ -658,7 +658,14 @@ or verify this branch is set up to track another (via the --track argument to
Returns None if there is no remote.
"""
remote, _ = self.GetRemoteBranch()
return RunGit(['config', 'remote.%s.url' % remote], error_ok=True).strip()
url = RunGit(['config', 'remote.%s.url' % remote], error_ok=True).strip()
# If URL is pointing to a local directory, it is probably a git cache.
if os.path.isdir(url):
url = RunGit(['config', 'remote.%s.url' % remote],
error_ok=True,
cwd=url).strip()
return url
def GetIssue(self):
"""Returns the issue number as a int or None if not set."""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment