I've attempted to replicate your scenario and the following appears to work 
for me.

>From the MyRepo directory, execute rbt post -I MyNewLib/ 10:50


On Monday, January 4, 2016 at 8:57:42 AM UTC-5, Carel Combrink wrote:
>
> Hi,
>
> I have an issue when creating a code review for files added in a new 
> folder, from within the folder.
>
> Due to our setup and processes, we have a subversion repository that 
> contains many different libraries. 
>
> Say I add a new library and commit changes as I develop the library, for 
> backup purposes. The new library is not yet live and sometimes not even 
> compiling. When the library is at a point where it can be reviewed) , I 
> need to submit it for code review for the rest of the team to look at the 
> code. Most often the libraries are small enough that this is doable. 
>
> So I have the following structure before starting my library with revision 
> numbers given:
> - MyRepo     (r10)
>     - Lib1   (r10)
>     - Lib2   (r05)
>
> I then add my library with a few initial files (r11) and commit code as I 
> develop, now that I want to put up a review I have:
> - MyRepo        (r50)
>      - Lib1     (r20)
>      - Lib2     (r30)
>      - MyNewLib (r50)
>
> I only want to put up the code in MyNewLib for review, all changes 
> including the initial files in r11 up to all changes in r50.
>
> So my initial assumption was to go into MyNewLib in command line and do:
> MyRepo/MyNewLib$ rbt post r11:50
> But I do not get the files added with the first commit, only the changes 
> between r11 up to r50. 
>
> Next I tried:
> MyRepo/MyNewLib$ rbt post --debug r0:50
> Gives the following traceback:
> >>> ...
>
> >>> Running: svn --non-interactive log --xml -r r0 -l 1
> >>> Command exited with rc 1: ['svn', '--non-interactive', u'log', u
> '--xml', u'-r', u'r0', u'-l', u'1']
> <?xml version="1.0" encoding="UTF-8"?>
> <log>
> ---
> Traceback (most recent call last):
>   File "/usr/local/bin/rbt", line 9, in <module>
>     load_entry_point('RBTools==0.7.5', 'console_scripts', 'rbt')()
>   File 
> "/usr/local/lib/python2.7/dist-packages/RBTools-0.7.5-py2.7.egg/rbtools/commands/main.py"
> , line 133, in main
>     command.run_from_argv([RB_MAIN, command_name] + args)
>   File 
> "/usr/local/lib/python2.7/dist-packages/RBTools-0.7.5-py2.7.egg/rbtools/commands/__init__.py"
> , line 622, in run_from_argv
>     exit_code = self.main(*args) or 0
>   File 
> "/usr/local/lib/python2.7/dist-packages/RBTools-0.7.5-py2.7.egg/rbtools/commands/post.py"
> , line 678, in main
>     self.revisions = get_revisions(self.tool, self.cmd_args)
>   File 
> "/usr/local/lib/python2.7/dist-packages/RBTools-0.7.5-py2.7.egg/rbtools/utils/review_request.py"
> , line 75, in get_revisions
>     revisions = tool.parse_revision_spec(cmd_args)
>   File 
> "/usr/local/lib/python2.7/dist-packages/RBTools-0.7.5-py2.7.egg/rbtools/clients/svn.py"
> , line 192, in parse_revision_spec
>     'Could not parse specified revisions: %s' % revisions)
> rbtools.clients.errors.InvalidRevisionSpecError: Could not parse 
> specified revisions: [u'r0', u'50']
>
> Probably since there is no real r0 in MyNewLib which is confirmed with
> MyRepo/MyNewLib$ svn --non-interactive log --xml -r r0 -l 1
> Gives:
> <?xml version="1.0" encoding="UTF-8"?>
> <log>
> svn: E195012: Unable to find repository location for 
> 'svn+ssh://<server>/MyRepo/MyNewLib' 
> in revision 0
>
> On the other hand
> MyRepo/MyNewLib$ svn diff -r0:50
> Gives the correct diff for what I am interested in.
>  
> If I try to post the review one folder up (in MyRepo) all changes in lib1 
> and lib2 end up in the review, which is not what I want. 
>
> Is there a way to handle this use case using Review Board command line 
> tool?
>
> If not, how can I use the output of "svn diff -r0:50"  to be the input 
> into the "rbt" command line tool?
> MyRepo/MyNewLib$ svn diff -r0:50 | rbt post --debug --diff-filename=- 
> --server 
> http://<rb-server-ip>:<port>/ --username <username> --password <password> 
> --repository MyRepo 
> gives the following error:
> >>> 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 "/usr/local/bin/rbt", line 9, in <module>
>     load_entry_point('RBTools==0.7.5', 'console_scripts', 'rbt')()
>   File 
> "/usr/local/lib/python2.7/dist-packages/RBTools-0.7.5-py2.7.egg/rbtools/commands/main.py",
>  
> line 133, in main
>     command.run_from_argv([RB_MAIN, command_name] + args)
>   File 
> "/usr/local/lib/python2.7/dist-packages/RBTools-0.7.5-py2.7.egg/rbtools/commands/__init__.py",
>  
> line 622, in run_from_argv
>     exit_code = self.main(*args) or 0
>   File 
> "/usr/local/lib/python2.7/dist-packages/RBTools-0.7.5-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)
>
> Regards,
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to