How to setup mercurial with reviewboard ? access rights, etc.

1,187 views
Skip to first unread message

Diego Garcia

unread,
Jan 30, 2012, 1:43:04 PM1/30/12
to reviewboard
Hi guys I've setup reviewboard with postgresql, apache on a fedora 16,
its working nice.

I've performed every step of how to docs available on rb site. but
when I get to the page New Review the repository list is empty.

My apache log reports an access error. Here it is:
cat /etc/httpd/logs/error_log

[Mon Jan 30 16:04:37 2012] [error] ERROR:root:Error loading SCMTool
for repository Libs (ID 1): [Errno 13] Permission denied
[Mon Jan 30 16:04:37 2012] [error] Traceback (most recent call last):
[Mon Jan 30 16:04:37 2012] [error] File "/usr/lib/python2.7/site-
packages/reviewboard/reviews/forms.py", line 132, in __init__
[Mon Jan 30 16:04:37 2012] [error] self.field_mapping[repo.id] =
repo.get_scmtool().get_fields()
[Mon Jan 30 16:04:37 2012] [error] File "/usr/lib/python2.7/site-
packages/reviewboard/scmtools/models.py", line 122, in get_scmtool
[Mon Jan 30 16:04:37 2012] [error] return cls(self)
[Mon Jan 30 16:04:37 2012] [error] File "/usr/lib/python2.7/site-
packages/reviewboard/scmtools/hg.py", line 29, in __init__
[Mon Jan 30 16:04:37 2012] [error] self.client =
HgClient(repository.path, repository.local_site)
[Mon Jan 30 16:04:37 2012] [error] File "/usr/lib/python2.7/site-
packages/reviewboard/scmtools/hg.py", line 245, in __init__
[Mon Jan 30 16:04:37 2012] [error] self.repo =
hg.repository(hg_ui, path=repoPath)
[Mon Jan 30 16:04:37 2012] [error] File "/usr/lib/python2.7/site-
packages/mercurial/hg.py", line 93, in repository
[Mon Jan 30 16:04:37 2012] [error] repo =
_peerlookup(path).instance(ui, path, create)
[Mon Jan 30 16:04:37 2012] [error] File "/usr/lib/python2.7/site-
packages/mercurial/localrepo.py", line 1988, in instance
[Mon Jan 30 16:04:37 2012] [error] return localrepository(ui,
util.urllocalpath(path), create)
[Mon Jan 30 16:04:37 2012] [error] File "/usr/lib/python2.7/site-
packages/mercurial/localrepo.py", line 40, in __init__
[Mon Jan 30 16:04:37 2012] [error]
self.ui.readconfig(self.join("hgrc"), self.root)
[Mon Jan 30 16:04:37 2012] [error] File "/usr/lib/python2.7/site-
packages/mercurial/ui.py", line 78, in readconfig
[Mon Jan 30 16:04:37 2012] [error] trusted = sections or trust or
self._is_trusted(fp, filename)
[Mon Jan 30 16:04:37 2012] [error] File "/usr/lib/python2.7/site-
packages/mercurial/ui.py", line 50, in _is_trusted
[Mon Jan 30 16:04:37 2012] [error] st = util.fstat(fp)
[Mon Jan 30 16:04:37 2012] [error] File "/usr/lib/python2.7/site-
packages/mercurial/util.py", line 540, in fstat
[Mon Jan 30 16:04:37 2012] [error] return os.fstat(fp.fileno())
[Mon Jan 30 16:04:37 2012] [error] OSError: [Errno 13] Permission
denied

I think its something related to the hgrc but I couldnt figure it out.
I've chowned my repo path to apache user but this keep goin.

So when I try to post an review from tortoisehg I get the error:

C:\SomeProject\>hg postreview
postreview plugin, version 4.1.0
changesets:
8:8e45757e42ee "Corrigido - Erro de merge [notAChange]"

reviewboard: http://192.168.1.30/

username: someuser
password: **********
Looking for '192.168.1.30 /' cookie in C:\Users\Diego\AppData\Roaming
\.post-revi
ew-cookies.txt
Cookie file loaded, but no cookie for this server
abort: HTTP Error: NOT FOUND (None)

Any tips what an I missing ?

Regards,
Diego Garcia

Gilles Moris

unread,
Feb 1, 2012, 1:48:31 AM2/1/12
to revie...@googlegroups.com, Diego Garcia
On Monday 30 January 2012 07:43:04 pm Diego Garcia wrote:
> I think its something related to the hgrc but I couldnt figure it out.
> I've chowned my repo path to apache user but this keep goin.

You may also look at the access to ~apache/.hgrc

Regards.
Gilles.

Diego Garcia

unread,
Feb 1, 2012, 6:02:28 PM2/1/12
to reviewboard
Hi Gilles I've figured out, it was the permissions at the repository
folders that must be 775 and it must be chown to root:apache now it
works.

Just one thing when using with one of my repository that has a
subrepository the follow error happens when trying to post a review

---------------------------
Review Board
---------------------------
Erro
---------------------------
postreview plugin, version 4.1.0

http authorization required
realm: Mercurial repository
user: dmgarcia
searching for changes changesets: 619:1ea53908f9e3 "Change description
at repo"

reviewboard: http://rbaddress

username: dmgarcia
password: **********

aborted: HTTP Error: FORBIDDEN (None)
---------------------------
OK
---------------------------

I think reviewboard is not passing the auth to the subrepository then
it fails.

Any tips ?

Regards,
Diego Garcia.

http://www.dmgarcia.com.br
http://unitonedev.blogspot.com

Gilles Moris

unread,
Feb 2, 2012, 1:17:44 AM2/2/12
to revie...@googlegroups.com, Diego Garcia

I don't know if the Mercurial-ReviewBoard plugin knows how to handle
subrepositories, but probably not. As I am not using subrepos, I've never met
this kind of problem.

Regards.
Gilles.

Reply all
Reply to author
Forward
0 new messages