Unable to get post-review to recognise a P4 repository

754 views
Skip to first unread message

Lee Winder

unread,
Mar 26, 2012, 11:00:49 AM3/26/12
to revie...@googlegroups.com
I'm trying to run post-review within a Perforce workspace without any success.  I believe I've read all the available documentation and spent the day investigating other peoples similar problems with should have helped but don't seem to.  

The main problem seems to be that it doesn't know there is a P4 workspace available and is defaulting to an SVN repository (which then fails because I don't have SVN installed at all).  I'm assuming SVN is the default if it doesn't find any other repository type?

The error I'm getting on every attempt is the following
GNU diff is required for Subversion repositories. Make sure it is installed and in the path.
On Windows, you can install this from: http://gnuwin32.sourceforge.net/packages/diffutils.htm

I've tried various ways to set the P4 properties to give post-review a nudge in the right direction.

Initially I set all environment variables (P4PORT, P4USER, P4CLIENT, P4PASSWD) - something I'm not happy doing as it doesn't scale past working on a single P4 repository, which I'm not doing.

So the process I'm going through 
Browse to folder within a workspace
post-review <my change set no.>

Generates the error 

GNU diff is required for Subversion repositories. Make sure it is installed and in the path.
On Windows, you can install this from: http://gnuwin32.sourceforge.net/packages/diffutils.htm

I've set up a counter to the reviewboard address - does it matter that my address is simply the format http://reviewboard (no trailing .com or anything).
reviewboard.url = http://<my reviewboard address>

My server version is
Server version: P4D/LINUX26X86_64/2011.1/409024 (2012/01/25)

Apparently this may be a problem so I've followed the suggestion here and modified the regex to parse the server version

Still generates the SVN error.

If I remove the environment variables, p4 info still produces the right infomation about my client etc.

So I tried to use .reviewboardrc (setting REPOSITORY, REVIEWBOARD_URL, P4_CLIENT, P4_PASSWD, P4_PORT) in both the folder I was trying to generate the review from and the root of my client workspace but the same error persists.

If I run post-review with the -d flag I get the following output before the error
>>> RBTools 0.4.1
>>> Home = C:\Users\winderl\AppData\Roaming

So I dropped the .reviewboardrc file in C:\Users\winderl\AppData\Roaming, in-case it was looking in there but that didn't help either.

So I finally tried the command line options --p4-client, --p4-passwd and --p4-port.

I don't think you'll be suprised to find out it did the same thing.

So I'm obviously missing something here.  It seems unable to find out there is a P4 repository anywhere

(As an aside, why do I need to specify p4 password, when it's part of the repository on the ReviewBoard server?  Especially as it's specified in clear text in all these cases too)

Am I missing something obvious here or are there any suggestions on how I might get this to work?

Thanks
Lee

Christian Hammond

unread,
Mar 26, 2012, 5:52:26 PM3/26/12
to revie...@googlegroups.com
Hey Lee,

Yeah, it looks like it's seeing Subversion and trying that first, and never even reaching the Perforce attempt.

Basically, post-review will try a number of tools in order to find out what the repository and type is. First one to report a valid repo wins. Sounds like Subversion is doing that.

What happens if you type "svn info" ?

Christian

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


Lee

--
Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to reviewboard...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en

Message has been deleted

Lee Winder

unread,
Mar 27, 2012, 3:16:24 AM3/27/12
to revie...@googlegroups.com
I don't have SVN installed in any form (command line, TortoiseSVN etc.) so 'svn info' just generates what I'd expect.  

'svn' is not recognized as an internal or external command,
operable program or batch file.

The only other VC system I have installed is Hg, and I'm as far away as possible from any other those repositories.  There are no SVN files or files with SVN in their name anywhere in my P4 repository.


Lee

Matthew Waddilove

unread,
Mar 27, 2012, 3:55:09 AM3/27/12
to revie...@googlegroups.com
I think that this is similar to a problem that I've come across, or might be the same tbh. :)
I had all sorts of issues as we're both using a perforce proxy and reviewboard at a remote location so had to do some fiddling to get it all to work, both configuring reviewboard, and poking ssh tunnels to connect to servers.

I ended up with a happily working config, but one of the things that I had to do was to have a .reviewboardrc in the directory tree which contained:
  REPOSITORY='Perforce'
  REVIEWBOARD_URL='http://OurRBServer'
Then on the commandline we can invoke post-review with normal parameters e.g. -o <changelist> and it picks it up from perforce without problem.
It was a fair while ago that I configured it for the team, but I believe that I found that I couldn't correctly force post-review to use perforce just using command line params.


(Having just reviewed the configuration I think that the issue I thought we had with the p4 proxy might have been resolved by updating RB or server side, certainly I can't see any client side config for it. :) )

Matt

Christian Hammond

unread,
Mar 27, 2012, 3:56:53 AM3/27/12
to revie...@googlegroups.com
Hey Lee,

Ah, looks like that error message got copy/pasted for Perforce. So it is likely getting to your Perforce check, but it's not seeing diff.

Specifically, it's running "diff --version" and checking that "GNU diffutils" is in the output. Can you run those steps on your system and see what it says?


Christian

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


Lee Winder

unread,
Mar 27, 2012, 4:28:26 AM3/27/12
to revie...@googlegroups.com
Ah, copy/paste errors, we've all been there - my bad for not rooting around in the source code a bit more :)

I didn't have the the diffutils installed (it's a pretty new PC set up) but now I have, the reviews are being posted as expected, thanks for the assist.

Now I just need to get it set up like I had previously, opening the browser when it's done, short-cut menus etc.

Thanks again!
Lee




On Tuesday, 27 March 2012 08:56:53 UTC+1, Christian Hammond wrote:
Hey Lee,

Christian Hammond

unread,
Mar 27, 2012, 4:52:22 AM3/27/12
to revie...@googlegroups.com
Glad it was that simple! I'll go fix that error :)


Christian

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


Reply all
Reply to author
Forward
0 new messages