Global reviewboardrc file?

1,136 views
Skip to first unread message

Isaac Wagner

unread,
Apr 28, 2009, 9:52:32 AM4/28/09
to revie...@googlegroups.com
I used easy_install to install post-review.  I see in the docs that each user can use a .reviewboardrc file in their home directory to customize settings, like REVIEWBOARD_URL.  I've only got one Review Board server and want to globally set the REVIEWBOARD_URL for all users, but don't want to have to hack the post-review script.  On Linux, will post-review look in /etc for a site configuration file?  If not, could this be added?

lepton

unread,
Apr 28, 2009, 10:51:28 AM4/28/09
to revie...@googlegroups.com
Read the code, you will find you can put .reviewboardrc in /home
then everyone can use it.(If all user's home dir is under /home
directory)

Isaac Wagner

unread,
Apr 28, 2009, 10:54:36 AM4/28/09
to revie...@googlegroups.com
The users home directories are all on NFS and I don't have access to add files to the command path for all user on NFS.  I am the admin for the Review Board server and can add files to /etc though.

On a side note: Where is the post-review repository?  I'd like to download the code and submit a patch for this.

Paul Scott

unread,
Apr 28, 2009, 2:54:55 PM4/28/09
to revie...@googlegroups.com
What source control system are you using? There's support in post-review to set the reviewboard url in a property/counter on the source control server for Subversion, Perforce and... one other one.

If support for your SCM isn't there, maybe you could write a patch. ;)

Paul Scott
VMware SCM Team
________________________________________
From: revie...@googlegroups.com [revie...@googlegroups.com] On Behalf Of Isaac Wagner [geeky...@gmail.com]
Sent: Tuesday, April 28, 2009 6:52 AM
To: revie...@googlegroups.com
Subject: Global reviewboardrc file?

Isaac Wagner

unread,
Apr 28, 2009, 3:24:35 PM4/28/09
to revie...@googlegroups.com
We use perforce, but I doubt IT will allow me to globally add a property to the server.

I wouldn't mind writing a patch to implement a global config file.  I'd need a few questions answered first:

1. In Linux the file would go in /etc.  What about Windows?  What should be the default path?

2. I envision the behavior like this:  Read the global file, then merge in the users setting.  If the user overrides something in the global then keep the users settings.  This way the users inherit all the global settings, but can override them as needed/desired.  Is that OK?

3. I would like to change the config file format to be readable by the config parser that comes with Python.  Is that acceptable?  The format I have in mind would be something like this:

[default]
url = http://rb.mysite.com

[http://svn.example.com]
url = http://reviewboard.example.com

[user...@cvs.example.com:/cvsroot/cvs]
url = http://reviewboard.example.com

Let me know what you think.  I can't promise this to be fast (since I should probably try to keep my day job), but it is something that I would find useful and think perhaps others would too.

Christian Hammond

unread,
Apr 28, 2009, 3:58:41 PM4/28/09
to revie...@googlegroups.com
Hi Isaac.

Comments inline.


On Tue, Apr 28, 2009 at 12:24 PM, Isaac Wagner <geeky...@gmail.com> wrote:
We use perforce, but I doubt IT will allow me to globally add a property to the server.

I wouldn't mind writing a patch to implement a global config file.  I'd need a few questions answered first:

1. In Linux the file would go in /etc.  What about Windows?  What should be the default path?

This I don't know, so I'm going to hold off on answering it.

Falling back to something like /etc is probably fine, but in many cases it may not be good enough. It means getting a config file on every developer's system in the right place, and it makes for a maintenance nightmare if you end up, say, creating a second Review Board server and need to update that config file. You'd really want one central place where all clients can look this up. I don't know how to handle this case, and it's orthogonal to falling back on /etc, but it's something we should give some thought to.
 

2. I envision the behavior like this:  Read the global file, then merge in the users setting.  If the user overrides something in the global then keep the users settings.  This way the users inherit all the global settings, but can override them as needed/desired.  Is that OK?

That sounds fine.

 
3. I would like to change the config file format to be readable by the config parser that comes with Python.  Is that acceptable?  The format I have in mind would be something like this:

I'm not sure how comfortable I am with this, because too many people use the existing format, and changing it doesn't offer immediate advantages beyond syntactic sugar. If we did do this, we'd need to keep compatibility with the old format indefinitely.

While it does make sense to have a simplified format, it might be better to hold off until RBTools evolves to the point where we use a config file that can be shared by various tools (as, say, a ~/.rbtoolsrc) instead of the post-review-specific one.
 

[default]
url = http://rb.mysite.com

[http://svn.example.com]
url = http://reviewboard.example.com

[user...@cvs.example.com:/cvsroot/cvs]
url = http://reviewboard.example.com

Let me know what you think.  I can't promise this to be fast (since I should probably try to keep my day job), but it is something that I would find useful and think perhaps others would too.

Understandable :)

Christian

--
Christian Hammond - chi...@chipx86.com
Review Board - http://www.review-board.org
VMware, Inc. - http://www.vmware.com

Reply all
Reply to author
Forward
0 new messages