|
|
|
@ -1338,7 +1338,7 @@ class TestGitCl(TestCase):
|
|
|
|
def _gerrit_upload_calls(cls, description, reviewers, squash,
|
|
|
|
def _gerrit_upload_calls(cls, description, reviewers, squash,
|
|
|
|
squash_mode='default',
|
|
|
|
squash_mode='default',
|
|
|
|
expected_upstream_ref='origin/refs/heads/master',
|
|
|
|
expected_upstream_ref='origin/refs/heads/master',
|
|
|
|
ref_suffix='', notify=False,
|
|
|
|
ref_suffix='', title=None, notify=False,
|
|
|
|
post_amend_description=None, issue=None, cc=None):
|
|
|
|
post_amend_description=None, issue=None, cc=None):
|
|
|
|
if post_amend_description is None:
|
|
|
|
if post_amend_description is None:
|
|
|
|
post_amend_description = description
|
|
|
|
post_amend_description = description
|
|
|
|
@ -1409,6 +1409,18 @@ class TestGitCl(TestCase):
|
|
|
|
expected_upstream_ref + '..' + ref_to_push],), ''),
|
|
|
|
expected_upstream_ref + '..' + ref_to_push],), ''),
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if not title:
|
|
|
|
|
|
|
|
calls += [
|
|
|
|
|
|
|
|
((['git', 'show', '-s', '--format=%s', 'HEAD'],), ''),
|
|
|
|
|
|
|
|
(('Title for patchset []: ',), ''),
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
if ref_suffix:
|
|
|
|
|
|
|
|
ref_suffix += ',m=' + title
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
ref_suffix = '%m=' + title
|
|
|
|
|
|
|
|
|
|
|
|
notify_suffix = 'notify=%s' % ('ALL' if notify else 'NONE')
|
|
|
|
notify_suffix = 'notify=%s' % ('ALL' if notify else 'NONE')
|
|
|
|
if ref_suffix:
|
|
|
|
if ref_suffix:
|
|
|
|
ref_suffix += ',' + notify_suffix
|
|
|
|
ref_suffix += ',' + notify_suffix
|
|
|
|
@ -1462,6 +1474,7 @@ class TestGitCl(TestCase):
|
|
|
|
squash_mode=None,
|
|
|
|
squash_mode=None,
|
|
|
|
expected_upstream_ref='origin/refs/heads/master',
|
|
|
|
expected_upstream_ref='origin/refs/heads/master',
|
|
|
|
ref_suffix='',
|
|
|
|
ref_suffix='',
|
|
|
|
|
|
|
|
title=None,
|
|
|
|
notify=False,
|
|
|
|
notify=False,
|
|
|
|
post_amend_description=None,
|
|
|
|
post_amend_description=None,
|
|
|
|
issue=None,
|
|
|
|
issue=None,
|
|
|
|
@ -1494,7 +1507,7 @@ class TestGitCl(TestCase):
|
|
|
|
description, reviewers, squash,
|
|
|
|
description, reviewers, squash,
|
|
|
|
squash_mode=squash_mode,
|
|
|
|
squash_mode=squash_mode,
|
|
|
|
expected_upstream_ref=expected_upstream_ref,
|
|
|
|
expected_upstream_ref=expected_upstream_ref,
|
|
|
|
ref_suffix=ref_suffix, notify=notify,
|
|
|
|
ref_suffix=ref_suffix, title=title, notify=notify,
|
|
|
|
post_amend_description=post_amend_description,
|
|
|
|
post_amend_description=post_amend_description,
|
|
|
|
issue=issue, cc=cc)
|
|
|
|
issue=issue, cc=cc)
|
|
|
|
# Uncomment when debugging.
|
|
|
|
# Uncomment when debugging.
|
|
|
|
@ -1534,7 +1547,7 @@ class TestGitCl(TestCase):
|
|
|
|
'desc\n\nBUG=\n\nChange-Id: I123456789',
|
|
|
|
'desc\n\nBUG=\n\nChange-Id: I123456789',
|
|
|
|
squash=False,
|
|
|
|
squash=False,
|
|
|
|
squash_mode='override_nosquash',
|
|
|
|
squash_mode='override_nosquash',
|
|
|
|
ref_suffix='%m=Dont_put_bad_chars')
|
|
|
|
title='Dont_put_bad_chars')
|
|
|
|
self.assertIn(
|
|
|
|
self.assertIn(
|
|
|
|
'WARNING: Patchset title may only contain alphanumeric chars '
|
|
|
|
'WARNING: Patchset title may only contain alphanumeric chars '
|
|
|
|
'and spaces. Cleaned up title:\nDont put bad chars\n',
|
|
|
|
'and spaces. Cleaned up title:\nDont put bad chars\n',
|
|
|
|
|