Support main as default branch
R=apolito@google.com
Change-Id: Ic338c698b8eb8d2e04fc1ef23ae4b13cae08b80f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2404701
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
diff --git a/gerrit_util.py b/gerrit_util.py
index 61604a3..0077f5f 100644
--- a/gerrit_util.py
+++ b/gerrit_util.py
@@ -706,6 +706,15 @@
return ReadHttpJsonResponse(conn)
+def MoveChange(host, change, destination_branch):
+ """Move a Gerrit change to different destination branch."""
+ path = 'changes/%s/move' % change
+ body = {'destination_branch': destination_branch}
+ conn = CreateHttpConn(host, path, reqtype='POST', body=body)
+ return ReadHttpJsonResponse(conn)
+
+
+
def RestoreChange(host, change, msg=''):
"""Restores a previously abandoned change."""
path = 'changes/%s/restore' % change