Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 3347 by rbt post fails for submitted perforce changelist

*** You must complete this form in its entirety, or your bug report will be
*** For customer support, please post to
*** If you have a patch, please submit it to
*** Do not post confidential information in this bug report!

What version are you running?
RBTools 0.6
Python 2.7.5

What's the URL of the page containing the problem?

What steps will reproduce the problem?
1.rbt post <perforce-changenum>

What is the expected output? What do you see instead?
expected: review created with the files and diffs found in the perforce changelist
instead: error:
Failed to execute command: ['p4', '-G', 'where', '//path/to/file/in/changenum-1/changelist']
Failed to execute command: ['p4', '-G', 'where', '//path/to/file/in/changenum/changelist']

What operating system are you using? What browser?
Windows 7

Please provide any additional information below.

There are two main problems as I see:

First, "rbt post <perforce-changenum>" calls "p4 where //path/to/file" which returns "file(s) not in client view" if current directory of shooting "rbt post" command is not under the root of the perforce workspace mapping the concerned files. This may be worked around by changing directory but only if I have a workspace which maps the files affected in the changelist.

Second "rbt post <perforce-changenum>" calls "p4 filelog //...@<changenum-1>,<changenum>" which includes changes not only from <changenum> changelist but also from <changenum-1> changelist (based to <changenum-2>) which is undesirable here. (As the description of parse_revision_spec in PerforceClient class in is wrongly mentioning "changes in (base, tip]", it is correctly [base,tip]). Later _depot_to_local fails because changenum-1 is usually a change from totally elsewhere in the depot causing problems mentioned above.

For the second I see the solution:
clients/ - class PerforceClient - def parse_revision_spec - n_revs == 1 ... - status == 'submitted' ...:
'base': str(cln-1)
should be
'base': str(cln)

Debug output:

rbt post -d 560826

RBTools 0.6
Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)]
Running on Windows-7-6.1.7601-SP1
Home = C:\Users\acsetri\AppData\Roaming
Current directory = e:\Dev\B315-Rhino
Checking for a Subversion repository...
Unable to execute "svn help": skipping SVN
Checking for a Git repository...
Unable to execute "git --help" or "git.cmd --help": skipping Git
Checking for a Mercurial repository...
Unable to execute "hg --help": skipping Mercurial
Checking for a CVS repository...
Unable to execute "cvs": skipping CVS
Checking for a Perforce repository...
Running: p4 info
Running: diff --version
repository info: Path: ['', ''], Base path: None, Supports changesets: True
Making HTTP GET request to
Making HTTP GET request to
Generating diff for range of submitted changes: 560825 to 560826
//Development/Corbusier/LIB-18/Sources/ArchiCADLibrary/INT/Object Library/1. BASIC LIBRARY/1.1 Furnishing/Appliances/Built-in Ovens.xml - file(s) not in client view.

Failed to execute command: ['p4', '-G', 'where', '//Development/Corbusier/LIB-18/Sources/ArchiCADLibrary/INT/Object Library/1. BASIC LIBRARY/1.1 Furnishing/Appliances/Built-in Ovens.xml']

Traceback (most recent call last):
File "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft\Python Tools for Visual Studio\2.0\", line 76, in exec_file
    exec(code_obj, global_variables)
File "C:\Python27\Lib\site-packages\RBTools-0.6-py2.7.egg\rbtools\commands\", line 151, in <module>
File "C:\Python27\Lib\site-packages\RBTools-0.6-py2.7.egg\rbtools\commands\", line 134, in main
    command.run_from_argv([RB_MAIN, command_name] + args)
File "C:\Python27\lib\site-packages\rbtools-0.6-py2.7.egg\rbtools\commands\", line 422, in run_from_argv
    exit_code = self.main(*args) or 0
File "C:\Python27\lib\site-packages\rbtools-0.6-py2.7.egg\rbtools\commands\", line 729, in main
File "C:\Python27\lib\site-packages\rbtools-0.6-py2.7.egg\rbtools\clients\", line 461, in diff
    base, tip, depot_include_files, local_include_files)
File "C:\Python27\lib\site-packages\rbtools-0.6-py2.7.egg\rbtools\clients\", line 713, in _compute_range_changes
    local_file = self._depot_to_local(depot_file)
File "C:\Python27\lib\site-packages\rbtools-0.6-py2.7.egg\rbtools\clients\", line 1213, in _depot_to_local
    where_output = self.p4.where(depot_path)
File "C:\Python27\lib\site-packages\rbtools-0.6-py2.7.egg\rbtools\clients\", line 92, in where
    return self.run_p4(['where', depot_path], marshalled=True)
File "C:\Python27\lib\site-packages\rbtools-0.6-py2.7.egg\rbtools\clients\", line 136, in run_p4
    die('Failed to execute command: %s\n' % (cmd,))
File "C:\Python27\lib\site-packages\rbtools-0.6-py2.7.egg\rbtools\utils\", line 19, in die
SystemExit: 1
Press any key to continue . . .

You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:

You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To post to this group, send email to
Visit this group at
For more options, visit

Reply via email to