浏览代码

gerrit_util: move changes: enable keep_all_votes

The default move behavior resets all non-blocking labels (including
Code-Review) which is not generally what we want.  Preserve them.

Change-Id: I9c49582b4147e27d3ed6a439a610c9c667d7aa7e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2586110
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Mike Frysinger 4 年之前
父节点
当前提交
f1c7d0dd2d
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      gerrit_util.py

+ 2 - 1
gerrit_util.py

@@ -714,7 +714,8 @@ def AbandonChange(host, change, msg=''):
 def MoveChange(host, change, destination_branch):
   """Move a Gerrit change to different destination branch."""
   path = 'changes/%s/move' % change
-  body = {'destination_branch': destination_branch}
+  body = {'destination_branch': destination_branch,
+          'keep_all_votes': True}
   conn = CreateHttpConn(host, path, reqtype='POST', body=body)
   return ReadHttpJsonResponse(conn)