diff --git a/git_cl.py b/git_cl.py index 3ae313ee9..f65f7b216 100755 --- a/git_cl.py +++ b/git_cl.py @@ -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] diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py index 7ed3b2887..15e5cff50 100755 --- a/tests/git_cl_test.py +++ b/tests/git_cl_test.py @@ -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')),