summaryrefslogtreecommitdiffstats
path: root/project.py
diff options
context:
space:
mode:
authorMandeep Singh Baines <msb@google.com>2011-05-26 10:34:11 -0700
committerMandeep Singh Baines <msb@google.com>2011-05-26 10:49:39 -0700
commitd6c93a28ca8cb079f473f749d805dcff97990225 (patch)
tree21cd307899c2a5d1e59df9929d63651ac2ba1da1 /project.py
parentd572a13021b0430eddf83e9caedc9d5add693c62 (diff)
downloadgit-repo-d6c93a28ca8cb079f473f749d805dcff97990225.tar.gz
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
Diffstat (limited to 'project.py')
-rw-r--r--project.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/project.py b/project.py
index 6252bd68..e5dbf25e 100644
--- a/project.py
+++ b/project.py
@@ -791,7 +791,7 @@ class Project(object):
791 if R_HEADS + n not in heads: 791 if R_HEADS + n not in heads:
792 self.bare_git.DeleteRef(name, id) 792 self.bare_git.DeleteRef(name, id)
793 793
794 def GetUploadableBranches(self): 794 def GetUploadableBranches(self, selected_branch=None):
795 """List any branches which can be uploaded for review. 795 """List any branches which can be uploaded for review.
796 """ 796 """
797 heads = {} 797 heads = {}
@@ -807,6 +807,8 @@ class Project(object):
807 for branch, id in heads.iteritems(): 807 for branch, id in heads.iteritems():
808 if branch in pubed and pubed[branch] == id: 808 if branch in pubed and pubed[branch] == id:
809 continue 809 continue
810 if selected_branch and branch != selected_branch:
811 continue
810 812
811 rb = self.GetUploadableBranch(branch) 813 rb = self.GetUploadableBranch(branch)
812 if rb: 814 if rb: