mirror of
https://gerrit.googlesource.com/git-repo
synced 2025-01-02 16:14:25 +00:00
repo: Add option review.URL.uploadtopic support
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
This commit is contained in:
parent
3f61950f01
commit
d666e93ecc
@ -103,6 +103,14 @@ or in the .git/config within the project. For example:
|
|||||||
autoupload = true
|
autoupload = true
|
||||||
autocopy = johndoe@company.com,my-team-alias@company.com
|
autocopy = johndoe@company.com,my-team-alias@company.com
|
||||||
|
|
||||||
|
review.URL.uploadtopic:
|
||||||
|
|
||||||
|
To add a topic branch whenever uploading a commit, you can set a
|
||||||
|
per-project or global Git option to do so. If review.URL.uploadtopic
|
||||||
|
is set to "true" then repo will assume you always want the equivalent
|
||||||
|
of the -t option to the repo command. If unset or set to "false" then
|
||||||
|
repo will make use of only the command line option.
|
||||||
|
|
||||||
References
|
References
|
||||||
----------
|
----------
|
||||||
|
|
||||||
@ -311,6 +319,11 @@ Gerrit Code Review: http://code.google.com/p/gerrit/
|
|||||||
branch.error = 'User aborted'
|
branch.error = 'User aborted'
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# Check if topic branches should be sent to the server during upload
|
||||||
|
if opt.auto_topic is not True:
|
||||||
|
key = 'review.%s.uploadtopic' % branch.project.remote.review
|
||||||
|
opt.auto_topic = branch.project.config.GetBoolean(key)
|
||||||
|
|
||||||
branch.UploadForReview(people, auto_topic=opt.auto_topic)
|
branch.UploadForReview(people, auto_topic=opt.auto_topic)
|
||||||
branch.uploaded = True
|
branch.uploaded = True
|
||||||
except UploadError, e:
|
except UploadError, e:
|
||||||
|
Loading…
Reference in New Issue
Block a user