mirror of
https://git.codelinaro.org/clo/tools/repo.git
synced 2025-06-17 00:13:17 +08:00
Add branch support to repo upload
This commit adds a --br=<branch> option to repo upload. repo currently examines every non-published branch. This is problematic for my workflow. I have many branches in my kernel tree. Many of these branches are based off of upstream remotes (I have many remotes) and will never be uploaded (they'll get sent upstream as a patch). Having repo scan these branches adds to my upload processing time and clutters the branch selection buffer. I've also seen repo get confused when one of my branches is 1000s of commits different from m/master. Change-Id: I68fa18951ea59ba373277b57ffcaf8cddd7e7a40
This commit is contained in:
@ -791,7 +791,7 @@ class Project(object):
|
||||
if R_HEADS + n not in heads:
|
||||
self.bare_git.DeleteRef(name, id)
|
||||
|
||||
def GetUploadableBranches(self):
|
||||
def GetUploadableBranches(self, selected_branch=None):
|
||||
"""List any branches which can be uploaded for review.
|
||||
"""
|
||||
heads = {}
|
||||
@ -807,6 +807,8 @@ class Project(object):
|
||||
for branch, id in heads.iteritems():
|
||||
if branch in pubed and pubed[branch] == id:
|
||||
continue
|
||||
if selected_branch and branch != selected_branch:
|
||||
continue
|
||||
|
||||
rb = self.GetUploadableBranch(branch)
|
||||
if rb:
|
||||
|
Reference in New Issue
Block a user