summaryrefslogtreecommitdiffstats
path: root/subcmds/upload.py
diff options
context:
space:
mode:
authorAnthony Russello <arussello@gmail.com>2012-06-01 00:48:22 -0400
committerShawn O. Pearce <sop@google.com>2012-06-05 08:01:29 -0700
commitd666e93ecc1f094774dfc7ba9ab0fd6e1695e976 (patch)
tree7d38d7a867a8d70805d57f483fce2b5c47376073 /subcmds/upload.py
parent3f61950f01bac9a3c40d9a6a95f53b6864153bfa (diff)
downloadgit-repo-d666e93ecc1f094774dfc7ba9ab0fd6e1695e976.tar.gz
repo: Add option review.URL.uploadtopic supportv1.9.2
This patch adds the option to include topic branches by adding the following to a .gitconfig file: uploadtopic = true This option is only read in when the -t option is not already specified at the command line. Change-Id: I0e0eea49438bb4e4a21c2ac5bd498b68b5a9a845
Diffstat (limited to 'subcmds/upload.py')
-rw-r--r--subcmds/upload.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/subcmds/upload.py b/subcmds/upload.py
index 07bd4d81..69efa107 100644
--- a/subcmds/upload.py
+++ b/subcmds/upload.py
@@ -103,6 +103,14 @@ or in the .git/config within the project. For example:
103 autoupload = true 103 autoupload = true
104 autocopy = johndoe@company.com,my-team-alias@company.com 104 autocopy = johndoe@company.com,my-team-alias@company.com
105 105
106review.URL.uploadtopic:
107
108To add a topic branch whenever uploading a commit, you can set a
109per-project or global Git option to do so. If review.URL.uploadtopic
110is set to "true" then repo will assume you always want the equivalent
111of the -t option to the repo command. If unset or set to "false" then
112repo will make use of only the command line option.
113
106References 114References
107---------- 115----------
108 116
@@ -311,6 +319,11 @@ Gerrit Code Review: http://code.google.com/p/gerrit/
311 branch.error = 'User aborted' 319 branch.error = 'User aborted'
312 continue 320 continue
313 321
322 # Check if topic branches should be sent to the server during upload
323 if opt.auto_topic is not True:
324 key = 'review.%s.uploadtopic' % branch.project.remote.review
325 opt.auto_topic = branch.project.config.GetBoolean(key)
326
314 branch.UploadForReview(people, auto_topic=opt.auto_topic) 327 branch.UploadForReview(people, auto_topic=opt.auto_topic)
315 branch.uploaded = True 328 branch.uploaded = True
316 except UploadError, e: 329 except UploadError, e: