Commit 289b4318 authored by Aaron Gable's avatar Aaron Gable Committed by Commit Bot

git-cl: Parse new change urls containing project paths

Bug: 764848
Change-Id: I639451ad54eb50a405fe44b9a83b00d84ec76578
Reviewed-on: https://chromium-review.googlesource.com/665998Reviewed-by: 's avatarSergey Berezin <sergeyberezin@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
parent 832e0bdf
......@@ -3087,7 +3087,7 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase):
change_desc)
if options.squash:
regex = re.compile(r'remote:\s+https?://[\w\-\.\/]*/(\d+)\s.*')
regex = re.compile(r'remote:\s+https?://[\w\-\.\+\/#]*/(\d+)\s.*')
change_numbers = [m.group(1)
for m in map(regex.match, push_stdout.splitlines())
if m]
......
......@@ -1594,7 +1594,8 @@ class TestGitCl(TestCase):
'remote: Processing changes: new: 1, done\n'
'remote:\n'
'remote: New Changes:\n'
'remote: https://chromium-review.googlesource.com/123456 XXX.\n'
'remote: https://chromium-review.googlesource.com/#/c/foo/+/123456 '
'XXX\n'
'remote:\n'
'To https://chromium.googlesource.com/yyy/zzz\n'
' * [new branch] hhhh -> refs/for/refs/heads/master\n')),
......
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