Can you uninstall subvertpy and install PySVN instead? It might work a lot 
better.

I’m working to shake some bugs out of the subvertpy backend. Given that it’s 
pretty new, it’s also a bit buggy.

Christian

-- 
Christian Hammond - christ...@beanbaginc.com
Review Board - http://www.reviewboard.org
Beanbag, Inc. - http://www.beanbaginc.com

On June 4, 2014 at 10:12:52 AM, Dan Jackson (danjackso...@googlemail.com) wrote:

In addition to this, I added some extra debugging to the get_file() method. 
Printing the SubversionException that's returned from self.client.cat shows:

"Unable to connect to a repository at URL 
'http://dev1:9880/company_name/Product/Code/Trunk/Server/PRODUCTServer/MacServer/NativeMacUsbInterface.cs'"

Hope this helps.

On Wednesday, 4 June 2014 14:30:14 UTC+1, Dan Jackson wrote:
Christian, 

Thanks for your help. I'm running Subvertpy on Lighttpd.

Adding that line to subvert.py and then restarting the server results in the 
following in the ReviewBoard.log:

2014-06-04 13:24:40,067 - INFO -  - repopath = "http://dev1:9880/company_name";, 
path = 
"/PRODUCT/Code/Trunk/Server/PRODUCTServer/MacServer/NativeMacUsbInterface.cs", 
revision= "7134"

Taking those fields, and then running the following on the server:

svn cat 
http://dev1:9880/company_name/PRODUCT/Code/Trunk/Server/PRODUCTServer/MacServer/NativeMacUsbInterface.cs@7134

...cats out the expected contents of the file. 

I'd appreciate any other suggestions you might have.



On Tuesday, 3 June 2014 19:58:08 UTC+1, Christian Hammond wrote:
Hi Dan,

Are you using PySVN on the server, or Subvertpy?

Internally, we're running the equivalent of:

    $ svn cat <base_repo_path><path_from_diff>@7134

It should be possible to run that and get the output.

99 times out of 100, when this happens, it's due to the resulting path being 
invalid. You can sanity-check the path by editing 
reviewboard/scmtools/svn/pysvn.py (if using PySVN, subvert.py otherwise), 
finding the 'get_file' function, and adding this as the first statement:

    logging.info('repopath = "%s", path = "%s", revision = "%s"' % 
(self.repopath, path, revision))

Restart Apache, try again, and see if that looks like what you expect.

Christian

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


On Tue, Jun 3, 2014 at 3:33 AM, Dan Jackson <danjac...@googlemail.com> wrote:
I'm trying to setup ReviewBoard 2.0.1 for the first time. Mostly it seems okay 
- I can get into the administration screen and add users/repos/etc - but I'm 
failing at the last hurdle. I can't get it to integrate properly with our 
Subversion server.

In the "Change Repository" screen, I've picked "Custom Repository", 
"Subversion", and my path is set to the root of the repository. 
("http://dev1:9980/company_name";) I have a valid username and password entered 
(because the SVN server doesn't allow anonymous access.)

RBT setup-repo sees the ReviewBoard repository, and asks if I want to use it (I 
do). It then generates the following .reviewboardrc:

REVIEWBOARD_URL = "http://review.board.com";
REPOSITORY = "CompanyName"

RBT can generate a valid diff (content removed but...)

Index: 
/PRODUCT/Code/Trunk/Server/PRODUCTServer/MacServer/NativeMacUsbInterface.cs
===================================================================
--- /PRODUCT/Code/Trunk/Server/PRODUCTServer/MacServer/NativeMacUsbInterface.cs 
(revision 7134)
+++ /PRODUCT/Code/Trunk/Server/PRODUCTServer/MacServer/NativeMacUsbInterface.cs 
(working copy)
@@ -40,7 +40,7 @@

However, when I run rbt post --debug I get:

>>> RBTools 0.6
>>> Python 2.7.5 (default, Mar  9 2014, 22:15:05)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]
>>> Running on Darwin-13.2.0-x86_64-i386-64bit
>>> Home = /Users/dan
>>> Current directory = /Volumes/Data/Work/PRODUCT/Trunk
>>> Checking for a Subversion repository...
>>> Running: svn info --non-interactive
>>> Running: diff --version
>>> repository info: Path: http://dev1:9880/company_name, Base path: 
>>> /PRODUCT/Code/Trunk, Supports changesets: False
>>> Making HTTP GET request to http://review.board.com/api/
>>> Running: svn info --non-interactive
>>> Running: diff --version
>>> repository info: Path: http://dev1:9880/company_name, Base path: 
>>> /PRODUCT/Code/Trunk, Supports changesets: False
>>> Running: svn status --ignore-externals
>>> Running: svn diff --diff-cmd=diff --notice-ancestry -r BASE
>>> Running: svn info Server/PRODUCTServer/MacServer/NativeMacUsbInterface.cs
>>> Running: svn info Server/PRODUCTServer/MacServer
>>> Running: svn info Server/PRODUCTServer
>>> Running: svn info Server
>>> Running: svn info Server/PRODUCTServer/MacServer/NativeMacUsbInterface.cs
>>> Running: svn info Server/PRODUCTServer/MacServer/NativeMacUsbInterface.cs
>>> Running: svn info Server/PRODUCTServer/MacServer/NativeMacUsbInterface.cs
>>> Making HTTP GET request to http://review.board.com/api/review-requests/
>>> Making HTTP POST request to http://review.board.com/api/review-requests/
>>> Making HTTP GET request to 
>>> http://review.board.com/api/review-requests/23/diffs/
>>> Making HTTP POST request to 
>>> http://review.board.com/api/review-requests/23/diffs/
>>> Got API Error 207 (HTTP code 400): The file was not found in the repository.
>>> Error data: {u'stat': u'fail', u'file': 
>>> u'/PRODUCT/Code/Trunk/Server/PRODUCTServer/MacServer/NativeMacUsbInterface.cs',
>>>  u'err': {u'msg': u'The file was not found in the repository.', u'code': 
>>> 207}, u'revision': u'7134'}
Traceback (most recent call last):
  File "/usr/local/bin/rbt", line 8, in <module>
    load_entry_point('RBTools==0.6', 'console_scripts', 'rbt')()
  File 
"/Library/Python/2.7/site-packages/RBTools-0.6-py2.7.egg/rbtools/commands/main.py",
 line 134, in main
    command.run_from_argv([RB_MAIN, command_name] + args)
  File 
"/Library/Python/2.7/site-packages/RBTools-0.6-py2.7.egg/rbtools/commands/__init__.py",
 line 422, in run_from_argv
    exit_code = self.main(*args) or 0
  File 
"/Library/Python/2.7/site-packages/RBTools-0.6-py2.7.egg/rbtools/commands/post.py",
 line 769, in main
    submit_as=self.options.submit_as)
  File 
"/Library/Python/2.7/site-packages/RBTools-0.6-py2.7.egg/rbtools/commands/post.py",
 line 545, in post_request
    raise CommandError('\n'.join(error_msg))
rbtools.commands.CommandError: Error uploading diff


The file was not found in the repository. (HTTP 400, API Error 207)

Your review request still exists, but the diff is not attached.


The file 
http://dev1:9880/company_name/PRODUCT/Code/Trunk/Server/PRODUCTServer/MacServer/NativeMacUsbInterface.cs
 definitely exists, and using the given credentials, I can access it at that 
path from the ReviewBoard server using the SVN command line client. The 
ReviewBoard log doesn't show any errors, just that it finished parsing the diff.


Can anyone point me in the right direction?
--
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to