Post review request of committed files in CVS to Review Board

948 Views Asked by At

I am trying to post review request of files i committed in CVS, currently i have two file with their revisions. I have tried almost all possible combinations mentioned @ https://www.reviewboard.org/docs/rbtools/0.7/rbt/commands/post/#posting-paths but none of them worked. Samples are below:

rbt post -d src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java@@1.1.4.27.4.2.12.8.2.3.4.1.4.1:src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java@@1.1.4.27.4.2.12.8.2.3.4.1.4.2 ui/Accounting/AP/Reports/rptCheckReconciliation.jsp@@1.1.4.6.32.1.34.1:ui/Accounting/AP/Reports/rptCheckReconciliation.jsp@@1.1.4.6.32.1.34.1.2.1

rbt post -d src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java#1.1.4.27.4.2.12.8.2.3.4.1.4.1,#1.1.4.27.4.2.12.8.2.3.4.1.4.2 ui/Accounting/AP/Reports/rptCheckReconciliation.jsp#1.1.4.6.32.1.34.1,#1.1.4.6.32.1.34.1.2.1

rbt post -d -I src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java@#1.1.4.27.4.2.12.8.2.3.4.1.4.1,@#1.1.4.27.4.2.12.8.2.3.4.1.4.2 -I ui/Accounting/AP/Reports/rptCheckReconciliation.jsp@#1.1.4.6.32.1.34.1,@#1.1.4.6.32.1.34.1.2.1

rbt post -d src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java@@1.1.4.27.4.2.12.8.2.3.4.1.4.1 src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java@@1.1.4.27.4.2.12.8.2.3.4.1.4.2 ui/Accounting/AP/Reports/rptCheckReconciliation.jsp@@1.1.4.6.32.1.34.1 ui/Accounting/AP/Reports/rptCheckReconciliation.jsp@@1.1.4.6.32.1.34.1.2.1

rbt post -d src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java@#1.1.4.27.4.2.12.8.2.3.4.1.4.1,@#1.1.4.27.4.2.12.8.2.3.4.1.4.2 ui/Accounting/AP/Reports/rptCheckReconciliation.jsp@#1.1.4.6.32.1.34.1,@#1.1.4.6.32.1.34.1.2.1

I am getting either

rbtools.clients.errors.TooManyRevisionsError: Too many revisions specified

error or

rbtools.commands.CommandError: Error validating diff
The specified diff file is empty. (HTTP 400, API Error 219)

I have 2 files, their traces are below:

/home/cvs/src/ns/src/com/sibisoft/northstar/acc/ap/reports/Attic/ApReportUtil.java,v <-- src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java
new revision: 1.1.4.27.4.2.12.8.2.3.4.1.4.2; previous revision: 1.1.4.27.4.2.12.8.2.3.4.1.4.1

/home/cvs/src/ns/ui/Accounting/AP/Reports/Attic/rptCheckReconciliation.jsp,v <-- ui/Accounting/AP/Reports/rptCheckReconciliation.jsp
new revision: 1.1.4.6.32.1.34.1.2.1; previous revision: 1.1.4.6.32.1.34.1

Any help would be really appreciated.

UPDATE: @unreturnedURL: I tried but getting following error.

D:\IntelliJ_workspace\52B7>rbt post -d -I src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java@@1.1.4.27.4.2.12.8.2.3.4.1.4.1:src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java@@1.1.4.27.4.2.12.8.2.3.4.1.4.2
>>> RBTools 0.7.5 alpha 0 (dev)
>>> Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]
>>> Running on Windows-8-6.2.9200
>>> Home = C:\Users\Waqar Ali Khan\AppData\Roaming
>>> Current directory = D:\IntelliJ_workspace\52B7
>>> Checking for a Subversion repository...
>>> Unable to execute "svn help": skipping SVN
>>> Checking for a Git repository...
>>> Running: git rev-parse --git-dir
>>> Command exited with rc 128: ['git', 'rev-parse', '--git-dir']
fatal: Not a git repository (or any of the parent directories): .git
---
>>> Checking for a Mercurial repository...
>>> Unable to execute "hg --help": skipping Mercurial
>>> Checking for a CVS repository...
>>> repository info: Path: CVS-SERVER:/home/cvs/src, Base path: None, Supports changesets: False
>>> Making HTTP GET request to http://example.com/api/
>>> Running: cvs diff -uN src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java@@1.1.4.27.4.2.12.8.2.3.4.1.4.1:src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java@@1.1.4.27.4.2.12.8.2.3.4.1.4.2
>>> Command exited with rc 1: ['cvs', 'diff', '-uN', 'src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java@@1.1.4.27.4.2.12.8.2.3.4.1.4.1:src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java@@1.1.4.27.4.2.12.8.2.3.4.1.4.2']
>>> Making HTTP GET request to http://example.com/api/validation/diffs/
>>> Cached response for HTTP GET http://example.com/api/validation/diffs/ expired and was modified
>>> Making HTTP POST request to http://example.com/api/validation/diffs/
>>> Got API Error 219 (HTTP code 400): The specified diff file is empty.
>>> Error data: {u'stat': u'fail', u'err': {u'msg': u'The specified diff file is empty.', u'code': 219}}
Traceback (most recent call last):
  File "C:\Program Files (x86)\RBTools\bin\..\Python27\Scripts\rbt-script.py", line 8, in <module>
    load_entry_point('RBTools==0.7.5alpha0', 'console_scripts', 'rbt')()
  File "C:\Program Files (x86)\RBTools\Python27\lib\site-packages\rbtools-0.7.5alpha0-py2.7.egg\rbtools\commands\main.py", line 133, in main
    command.run_from_argv([RB_MAIN, command_name] + args)
  File "C:\Program Files (x86)\RBTools\Python27\lib\site-packages\rbtools-0.7.5alpha0-py2.7.egg\rbtools\commands\__init__.py", line 622, in run_from_argv
    exit_code = self.main(*args) or 0
  File "C:\Program Files (x86)\RBTools\Python27\lib\site-packages\rbtools-0.7.5alpha0-py2.7.egg\rbtools\commands\post.py", line 754, in main
    (msg_prefix, e))
rbtools.commands.CommandError: Error validating diff

The specified diff file is empty. (HTTP 400, API Error 219)
1

There are 1 best solutions below

2
On

The link you mentioned is for posting diff for uncommited code for Perforce. Instead try this: https://www.reviewboard.org/docs/rbtools/0.7/rbt/commands/post/#posting-committed-code.

Try posting for a single file with -I option e.g.

rbt post -d -I src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java@@1.1.4.27.4.2.12.8.2.3.4.1.4.1:src/com/sibisoft/northstar/acc/ap/reports/ApReportUtil.java@@1.1.4.27.4.2.12.8.2.3.4.1.4.2

If it does not work, pls post the complete debug log. If it works, try for both files with -I before each revision range.