Commit a680c23e authored by Edward Lesmes's avatar Edward Lesmes Committed by LUCI CQ

git-cl: Fix checking if parent branch has been uploaded.

The old behavior was to set parent from the gerritsquashhash of the
parent branch, but now it's trying to set it from the gerritsquashhash
of the current branch (which doesn't exist yet).

As a result it's always saying `Upload upstream branch ... first`

Change-Id: I035ed128f46a49d09d563ea589e9ca9eb7b87db9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2128679Reviewed-by: 's avatarJosip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
parent 71417ad5
......@@ -2349,7 +2349,8 @@ class Changelist(object):
# the tree hash of the parent branch. The upside is less likely bogus
# requests to reupload parent change just because it's uploadhash is
# missing, yet the downside likely exists, too (albeit unknown to me yet).
parent = self._GitGetBranchConfigValue('gerritsquashhash', '')
parent = scm.GIT.GetBranchConfig(
settings.GetRoot(), upstream_branch_name, 'gerritsquashhash')
# Verify that the upstream branch has been uploaded too, otherwise
# Gerrit will create additional CLs when uploading.
if not parent or (RunGitSilent(['rev-parse', upstream_branch + ':']) !=
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment