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/+/2128679
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
changes/79/2128679/3
Edward Lesmes 5 years ago committed by LUCI CQ
parent 71417ad5d3
commit a680c23e78

@ -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 + ':']) !=

Loading…
Cancel
Save