git cl patch: when URL matches both codereview systems, choose rietveld.
This is temporary, and will be changed in subsequent CLs. For now,
it suffices to stop relying on pseudo-random dictionary order in tests
and prod.
R=jochen@chromium.org
BUG=706406
Change-Id: I26c467a28bc63b5f81d20fc222a2b6f0511c507f
Reviewed-on: https://chromium-review.googlesource.com/472750
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py
index f5cbb72..4ac7dee 100755
--- a/tests/git_cl_test.py
+++ b/tests/git_cl_test.py
@@ -301,9 +301,10 @@
test('123a', fail=True)
test('ssh://chrome-review.source.com/#/c/123/4/', fail=True)
# Rietveld.
+ test('https://codereview.source.com/www123', fail=True)
+ # Matches both, but we take Rietveld now.
test('https://codereview.source.com/123',
123, None, 'codereview.source.com')
- test('https://codereview.source.com/www123', fail=True)
# Gerrrit.
test('https://chrome-review.source.com/c/123/4',
123, 4, 'chrome-review.source.com')
@@ -2265,7 +2266,7 @@
self.mock(git_cl.Changelist, 'GetDescription', lambda *args: 'foobar')
self.assertEqual(0, git_cl.main([
- 'description', 'https://code.review.org/123123', '-d', '--rietveld']))
+ 'description', '-d', '--rietveld', 'https://code.review.org/123123']))
self.assertEqual('foobar\n', out.getvalue())
def test_StatusFieldOverrideIssueMissingArgs(self):