Always set issue for branch, not just when newbranch is passed.

Bug: 1410392
Change-Id: Ib9842a4924a6df486dc8b0ee37e673286139f62a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4196054
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
changes/54/4196054/3
Joanna Wang 2 years ago committed by LUCI CQ
parent 44e9bee34f
commit c023a6302f

@ -2489,9 +2489,9 @@ class Changelist(object):
RunGit(['fetch', fetch_info['url'], fetch_info['ref']]) RunGit(['fetch', fetch_info['url'], fetch_info['ref']])
# If we have created a new branch then do the "set issue" immediately in # Set issue immediately in case the cherry-pick fails, which happens
# case the cherry-pick fails, which happens when resolving conflicts. # when resolving conflicts.
if newbranch: if self.GetBranch():
self.SetIssue(parsed_issue_arg.issue) self.SetIssue(parsed_issue_arg.issue)
if force: if force:
@ -2511,7 +2511,6 @@ class Changelist(object):
'If you want to do that, use "git cl patch --force" instead.') 'If you want to do that, use "git cl patch --force" instead.')
if self.GetBranch(): if self.GetBranch():
self.SetIssue(parsed_issue_arg.issue)
self.SetPatchset(patchset) self.SetPatchset(patchset)
fetched_hash = scm.GIT.ResolveCommit(settings.GetRoot(), 'FETCH_HEAD') fetched_hash = scm.GIT.ResolveCommit(settings.GetRoot(), 'FETCH_HEAD')
self._GitSetBranchConfigValue(LAST_UPLOAD_HASH_CONFIG_KEY, fetched_hash) self._GitSetBranchConfigValue(LAST_UPLOAD_HASH_CONFIG_KEY, fetched_hash)

Loading…
Cancel
Save