Commit 4a60db4c authored by Daniel Bratell's avatar Daniel Bratell Committed by Commit Bot

Correct an error message where branch and url had changed places

With certain git remote problems an error message is emitted that
has the place of the url and the place of the branch wrong.

Example:
Remote "opera" for branch "git@github.com:operasoftware/gn-opera.git"
points to "bratell/no_jumbo_for_s", but it doesn't exist.

Should be:
Remote "opera" for branch "bratell/no_jumbo_for_s" points to
"git@github.com:operasoftware/gn-opera.git", but it doesn't exist.

R=dpranke@chromium.org

Change-Id: I484ac8af226903a49df1f62e837d01c345fb5f02
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1806595
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: 's avatarDirk Pranke <dpranke@chromium.org>
parent 9ccd0577
......@@ -1267,7 +1267,7 @@ class Changelist(object):
if not os.path.isdir(url):
logging.error(
'Remote "%s" for branch "%s" points to "%s", but it doesn\'t exist.',
remote, url, self.GetBranch())
remote, self.GetBranch(), url)
return None
cache_path = url
......
......@@ -3158,8 +3158,8 @@ class TestGitCl(TestCase):
(('os.path.isdir', '/cache/this-dir-doesnt-exist'),
False),
(('logging.error',
'Remote "origin" for branch "/cache/this-dir-doesnt-exist" points to'
' "master", but it doesn\'t exist.'), None),
'Remote "origin" for branch "master" points to'
' "/cache/this-dir-doesnt-exist", but it doesn\'t exist.'), None),
]
cl = git_cl.Changelist(issue=1)
self.assertIsNone(cl.GetRemoteUrl())
......
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