summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@gmx.de>2022-02-17 16:31:46 +0100
committerOswald Buddenhagen <oswald.buddenhagen@gmx.de>2022-03-01 11:31:58 +0000
commitc4d197e48965c03348891ee1af415222641482af (patch)
treea7ae2ded3acc37a3bc766472e23bcbb06ced46bd
parentbd91da8bd10cdaade641ccd73fbe88c0e7f48d3a (diff)
downloadqtrepotools-c4d197e48965c03348891ee1af415222641482af.tar.gz
gpush: add support for setting topic on unmodified changes
gerrit supports this since v3.2. Change-Id: Iad03e3c1392ee2d9b2575e9311c5224c19770f25 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-rwxr-xr-xbin/git-gpush8
1 files changed, 5 insertions, 3 deletions
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);
}
}