How to work with multiple reviewboards, or specify which .reviewboardrc to use

26 views
Skip to first unread message

Jean-Christian Imbeault

unread,
Dec 4, 2019, 7:53:19 PM12/4/19
to Review Board Community
My company has multiple reviewboard instances. Each review board is for one specific part of the code base, another.

On my development box I of course have the whole code tree. When I want to post a change to reviewboard though how can I specify which reviewboard instance I want to post to?

Currently I have multiple .reviewboardrc-xxx files and I manually copy the necessary one to .reviewboardrc.

I was hoping there was a better way of doing this?

Thanks!

David Trowbridge

unread,
Dec 4, 2019, 7:57:05 PM12/4/19
to revie...@googlegroups.com
You can commit .reviewboardrc files to your source tree. RBTools will navigate up the directory hierarchy until it finds one (and then also use any from your home directory). I’d put files in each section of your codebase which define REVIEWBOARD_URL and REPOSITORY as appropriate.

David



--
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/521e95b9-6755-4421-88ef-a48f46d7b8f8%40googlegroups.com.

Jean-Christian Imbeault

unread,
Dec 4, 2019, 8:24:44 PM12/4/19
to Review Board Community
Hi David and thanks for the reply.

> You can commit .reviewboardrc files to your source tree

Thanks for offering this solution. Unfortunately this will require buy-in from all users/managers. RB was tacked onto an already existing and imperfect source control process in a haphazard way at my organization. Adding .reviewboardrc files in the source tree might break things for some users or automated processes. I will suggest it though.

> RBTools will navigate up the directory hierarchy until it finds one

I was hoping that RBTools could be make to navigate my local workspace instead? That way I can place the .reviewboardrc files locally and not affect anyone else. I've tried this, but it looks like only the ~/.reviewboardrc is used.

From what I can tell we are using RBTools 0.6.2, but perhaps my fine organization has bastardized it somehow.



Jean-Christian Imbeault

unread,
Dec 4, 2019, 10:07:54 PM12/4/19
to Review Board Community
I though that .reviewboardrc files in the current directory took precedence over files higher up the path, but it looks like I've got it backwards.

So if you have a $HOME/.reviewboardrc, it will override whatever settings you might have in ./.reviewboardrc

A comment in the source code helped me figure this out:

In /filesystem.py:

def get_config_paths():
    """Return the paths to each .reviewboardrc influencing the cwd.

    A list of paths to .reviewboardrc files will be returned, where
    each subsequent list entry should take precedence over the previous.
    i.e. configuration found in files further down the list will take
    precedence.
    """
    config_paths = []
    for path in walk_parents(os.getcwd()):
        filename = os.path.join(path, CONFIG_FILE)
        if os.path.exists(filename):
            config_paths.insert(0, filename)

    filename = os.path.join(get_home_path(), CONFIG_FILE)
    if os.path.exists(filename):
        config_paths.append(filename)

    return config_paths

David Trowbridge

unread,
Dec 9, 2019, 6:39:59 PM12/9/19
to reviewboard
In general, the current directory overrides ones higher up in the path. $HOME/.reviewboardrc is a special case that can override anything, even the one in the repo.

David

--
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.

Jean-Christian Imbeault

unread,
Dec 9, 2019, 7:05:17 PM12/9/19
to Review Board Community
On Tuesday, December 10, 2019 at 8:39:59 AM UTC+9, David Trowbridge wrote:
In general, the current directory overrides ones higher up in the path. $HOME/.reviewboardrc is a special case that can override anything, even the one in the repo.

Thanks for clarifying David, much appreciated.

Maybe this could be added to the reviewboard documentation at https://www.reviewboard.org/docs/rbtools/dev/rbt/configuration/repositories/

Jc 
 
Reply all
Reply to author
Forward
0 new messages