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: Dirk Pranke <dpranke@chromium.org>
diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py
index 9c2bdef..ce67b88 100755
--- a/tests/git_cl_test.py
+++ b/tests/git_cl_test.py
@@ -3158,8 +3158,8 @@
(('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())