rbt post doesn't work if repository url configured in review board is not the root repostitory

706 views
Skip to first unread message

Heng Zhang

unread,
Aug 30, 2017, 11:01:09 AM8/30/17
to reviewboard
my svn repository root url: svn://10.16.28.38/test
repository url configured in RB: svn://10.16.28.38/test/Python2.7.13

I create review request from RB web page is OK, but it is faild when I tried to use rbt post command to create new review quest,
I think rbt post has bug which need to fix.
detailed infomation as shown below:

(virtural_python2.7.13) [zhangheng-pd@dev33 Python]$ rbt --version
RBTools 0.7.10

(virtural_python2.7.13) [zhangheng-pd@dev33 Python]$ svn info
Path: .
Working Copy Root Path: /home/zhangheng-pd/28.38.svnserver/Python
Relative URL: ^/Python-2.7.13/Python
Repository Root: svn://10.16.28.38/test
Repository UUID: 0cfbf187-43c6-4c1e-980d-627b8a51bf26
Revision: 77
Node Kind: directory
Schedule: normal
Last Changed Author: zhangheng-pd
Last Changed Rev: 77
Last Changed Date: 2017-08-16 16:20:38 +0800 (三, 16 8月 2017)

(virtural_python2.7.13) [zhangheng-pd@dev33 Python]$ rbt post -d
>>> RBTools 0.7.10
>>> Python 2.7.13 (default, Jun 13 2017, 18:49:24) 
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)]
>>> Running on Linux-2.6.32-2.0.0.8-6-x86_64-with-centos-6.8-Final
>>> Home = /home/zhangheng-pd
>>> Current directory = /home/zhangheng-pd/28.38.svnserver/Python
>>> Command line: rbt post -d
>>> Running: tf vc help
>>> Checking for a Subversion repository...
>>> Running: svn --non-interactive info
>>> Running: diff --version
>>> Running: svn --non-interactive --version -q
>>> repository info: Path: svn://10.16.28.38/test, Base path: /Python-2.7.13/Python, Supports changesets: False
>>> Making HTTP GET request to http://10.16.28.33/reviews/api/
>>> Cached response for HTTP GET http://10.16.28.33/reviews/api/repositories/?tool=Subversion expired and was modified
>>> Cached response for HTTP GET http://10.16.28.33/reviews/api/repositories/2/info/ expired and was modified
>>> Cached response for HTTP GET http://10.16.28.33/reviews/api/repositories/3/info/ expired and was modified
>>> Cached response for HTTP GET http://10.16.28.33/reviews/api/repositories/4/info/ expired and was modified
>>> Cached response for HTTP GET http://10.16.28.33/reviews/api/repositories/5/info/ expired and was modified
>>> Cached response for HTTP GET http://10.16.28.33/reviews/api/repositories/6/info/ expired and was modified
>>> Got API Error 210 (HTTP code 500): There was an error fetching extended information for this repository.
>>> Error data: {u'stat': u'fail', u'err': {u'msg': u'There was an error fetching extended information for this repository.', u'code': 210}}
>>> Cached response for HTTP GET http://10.16.28.33/reviews/api/repositories/9/info/ expired and was modified
>>> Cached response for HTTP GET http://10.16.28.33/reviews/api/repositories/12/info/ expired and was modified
>>> repository info: Path: svn://10.16.28.38/test/Python-2.7.13, Base path: /Python, Supports changesets: False
>>> Running: svn --non-interactive info
>>> Running: diff --version
>>> Running: svn --non-interactive --version -q
>>> repository info: Path: svn://10.16.28.38/test, Base path: /Python-2.7.13/Python, Supports changesets: False
>>> Running: svn --non-interactive status -q --ignore-externals
>>> Running: svn --non-interactive diff --diff-cmd=diff --notice-ancestry -r BASE
>>> Running: svn --non-interactive info README
>>> Running: svn --non-interactive diff --diff-cmd=diff --notice-ancestry -r BASE --no-diff-deleted
>>> Running: svn --non-interactive info README
>>> Running: svn --non-interactive info README
>>> Running: svn --non-interactive info README
>>> Cached response for HTTP GET http://10.16.28.33/reviews/api/validation/diffs/ expired and was modified
>>> Making HTTP POST request to http://10.16.28.33/reviews/api/validation/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'/Python-2.7.13/Python/README', u'err': {u'msg': u'The file was not found in the repository.', u'code': 207}, u'revision': u'81'}
Traceback (most recent call last):
  File "/home/zhangheng-pd/virtural_python2.7.13/bin/rbt", line 11, in <module>
    sys.exit(main())
  File "/home/zhangheng-pd/virtural_python2.7.13/lib/python2.7/site-packages/rbtools/commands/main.py", line 133, in main
    command.run_from_argv([RB_MAIN, command_name] + args)
  File "/home/zhangheng-pd/virtural_python2.7.13/lib/python2.7/site-packages/rbtools/commands/__init__.py", line 663, in run_from_argv
    exit_code = self.main(*args) or 0
  File "/home/zhangheng-pd/virtural_python2.7.13/lib/python2.7/site-packages/rbtools/commands/post.py", line 812, in main
    (msg_prefix, e))
rbtools.commands.CommandError: Error validating diff

/Python-2.7.13/Python/README: The file was not found in the repository. (HTTP 400, API Error 207)

Christian Hammond

unread,
Aug 30, 2017, 5:58:15 PM8/30/17
to revie...@googlegroups.com
Hi,

This is correct. Review Board must point to the repository, and not a subdirectory within the repository, or it won't be able to correctly compute paths relative to the root. Is there a reason that pointing to the root doesn't work in your case?

Christian

--
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 "reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Christian Hammond
President/CEO of Beanbag
Makers of Review Board

Heng Zhang

unread,
Aug 31, 2017, 10:37:52 PM8/31/17
to reviewboard
Hi Christian:

   many thanks for your reponse so quickly.


在 2017年8月31日星期四 UTC+8上午5:58:15,Christian Hammond写道:
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.

Heng Zhang

unread,
Aug 31, 2017, 10:49:07 PM8/31/17
to reviewboard
Hi Christian:

  my company's SVN configuration is specieal, no one has root repository permission, each one department's code corresponding to one SVN subdirectory, like this:
Repository Root: svn://10.16.28.38/test
department one's repository: svn://10.16.28.38/test/dep1
department two's repository: svn://10.16.28.38/test/dep2
department three's repository: svn://10.16.28.38/test/dep3

so I just can configure 3 repositories for Reveiw Board.

and I fix this issue by modifing your rbt code, and look like it work well in my environment:

I commented out 1 line in rbtools/clients/svn.py:
#diff = self.convert_to_absolute_paths(diff, repository_info)



在 2017年9月1日星期五 UTC+8上午10:37:52,Heng Zhang写道:

tiger...@ahamobile.com

unread,
Jun 20, 2018, 12:05:33 AM6/20/18
to Review Board Community
Christian,

There are cases that the users, in our case third-party, should work (develop and review) only on some subdirectories; so we'd like have reviewboard repositories point to subdirectories of our svn repository.

I tried Heng Zhang's solution but did not work. (Could be cached?) Any suggestion?


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

Rameez Bhimani

unread,
Jul 23, 2021, 5:23:31 PM7/23/21
to Review Board Community
Hello All,
Was there a solution to this problem? I am facing the same issue. The hack of commenting svn.py code works for me. But I can suggest that to my team. 
Reply all
Reply to author
Forward
0 new messages