From c4d197e48965c03348891ee1af415222641482af Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 17 Feb 2022 16:31:46 +0100 Subject: gpush: add support for setting topic on unmodified changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gerrit supports this since v3.2. Change-Id: Iad03e3c1392ee2d9b2575e9311c5224c19770f25 Reviewed-by: Tor Arne Vestbø --- bin/git-gpush | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'bin/git-gpush') diff --git a/bin/git-gpush b/bin/git-gpush index 701f536..fcc46aa 100755 --- a/bin/git-gpush +++ b/bin/git-gpush @@ -1864,11 +1864,13 @@ sub update_unpushed($) my $topic_list = $$group{topic_list}; if (@$topic_list) { - # TODO: This can be done with the REST API. state $printed; - print "Warning: Cannot set topic on unmodified commits.\n" - if (!$printed); + print "Setting topic on unmodified commit(s) ...\n" + if (!$quiet && !$printed); $printed = 1; + run_process(FWD_OUTPUT | DRY_RUN, + 'ssh', @gerrit_ssh, 'gerrit', 'set-topic', + '-t', $$group{topic}, map { $$_{key} } @$topic_list); } } -- cgit v1.2.3