3218: rbt can only post from client root when using perforce

erik*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Feb. 3, 2014
What version are you running?

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

What steps will reproduce the problem?
1. cd into your perforce client, but in a directory deeper than the root
2. create a change list
3. try to post with rbt post

What is the expected output? What do you see instead?
The review should post, instead you get:
ERROR:root:No supported repository could be accessed at the supplied url.

What operating system are you using? What browser?
Ubuntu 12.04

Please provide any additional information below.
Misuse of os.path.pathsep vs. os.path.sep
#1 david
  • +PendingReview
  • +Component-RBTools
  • +david
#2 erik*****@gmai***** (Google Code) (Is this you? Claim this profile.)
  • +
    Description: rbt can only post from client root when using perforce
     post-review and rbt don't detect that you are in a perforce client
     correctly due to incorrect use of os.path.pathsep
    Bug: https://code.google.com/p/reviewboard/issues/detail?id=3218
    Forwarded: no
    Reviewed-By: erik.lattimore@sonos.com
    Last-Update: 2014-02-03
    --- rbtools-0.5.6.orig/rbtools/clients/perforce.py
    +++ rbtools-0.5.6/rbtools/clients/perforce.py
    @@ -174,8 +174,8 @@ class PerforceClient(SCMClient):
             if client_root is None:
                 return None
    -        norm_cwd = os.path.realpath(os.getcwd()) + os.path.pathsep
    -        norm_client_root = os.path.realpath(client_root) + os.path.pathsep
    +        norm_cwd = os.path.realpath(os.getcwd()) + os.path.sep
    +        norm_client_root = os.path.realpath(client_root) + os.path.sep
             # Don't accept the repository if the current directory is outside the
             # root of the Perforce client.
#3 david
Fixed in release-0.5.x (cc602ce). We'll get an 0.5.7 release out shortly.
  • -PendingReview
#4 quanah.gi*********@gmai***** (Google Code) (Is this you? Claim this profile.)
I see the announcement for 0.5.7 is out for this fix, but this release does not actually show up anywhere?


Not via easy_install
Not on the website http://downloads.reviewboard.org/releases/RBTools/0.5/