How to create SVN repo through python script

28 views
Skip to first unread message

dw l

unread,
Mar 8, 2021, 1:24:18 AM3/8/21
to revie...@googlegroups.com
Hello

As we need to create a lot of SVN repo in reviewboard and the SVN repo creation work in the reviewboard admin UI take a lot of time. Is it possible to create SVN repo by python script or through the RESTful API?

Thanks

BTW, I saw that the python RBTool API seems to support to access the existing repos, is it possible to use RBTool to create new SVN repos?

Christian Hammond

unread,
Mar 30, 2021, 5:11:39 AM3/30/21
to revie...@googlegroups.com
Hi,

It is possible through the repository API, assuming you have a recent version of Review Board installed:


The repository API is pretty specialized, with different arguments depending on what type of repository you're installing, but basically, you'd need to issue a HTTP POST to /api/repositories with the following fields (using multi-part/form-data as the POST body format):

* name (The name of the repository)
* path (The main path to the repository, which Review Board will communicate with)
* tool (You will set this to "Subversion")
* username (The username used to access the repository, if needed)
* password (The password  used to access the repository, if needed)

You can probably leave everything else blank, but it depends on your needs.

If SSH access is used to talk to the repository, make sure you have a SSH key already configured in Review Board and that each repository can be accessed via that key.

Christian

--
Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups "Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/reviewboard/CABT-Jm9mOtLEbHoAXVM5rU33Hg_TDR241z26Bkfzvjchr%3D_ESw%40mail.gmail.com.


--
Christian Hammond
President/CEO of Beanbag
Makers of Review Board

dw l

unread,
Apr 5, 2021, 9:12:04 PM4/5/21
to Review Board Community
Hi, Christian 

Thanks for your detail feedback.
I finally solved my issue by using the selenium python script to create the SVN repo through the web page of reviewboard.
I will try your suggestions to use the RESTful API to see if it works. 

Reply all
Reply to author
Forward
0 new messages