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

New issue 2877 by post-review no longer supports git 1.6

* NOTE: For customer support, please post to                     *
*                             *
*                                                                *
*       Do not post confidential information in this bug report. *
*       If you need immediate support, please contact            *
*                             *

What version are you running?

 RBTools 0.4.2

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


What steps will reproduce the problem?
1. run post-review in a git repository on a system with git 1.6
2. see stacktrace

What is the expected output? What do you see instead?

A review should be posted, but instead you see:

$ post-review -n -d
RBTools 0.4.2
Python 2.6.8 (unknown, May 29 2012, 22:30:44)
[GCC 4.3.4 [gcc-4_3-branch revision 152973]]
Running on Linux-
Home = XXXX
Current Directory = XXXX
Checking the repository type. Errors shown below are mostly harmless.
DEBUG:root:Checking for a CVS repository...
DEBUG:root:Checking for a ClearCase repository...
DEBUG:root:Checking for a Git repository...
DEBUG:root:Running: git rev-parse --git-dir
DEBUG:root:Running: git config core.bare
DEBUG:root:Running: git rev-parse --show-toplevel
Traceback (most recent call last):
  File "/usr/local/bin/post-review", line 9, in <module>
    load_entry_point('RBTools==0.4.2', 'console_scripts', 'post-review')()
File "/usr/local/lib64/python2.6/site-packages/rbtools/", line 1221, in main
    repository_info, tool = scan_usable_client(options)
File "/usr/local/lib64/python2.6/site-packages/rbtools/clients/", line 157, in scan_usable_client
    repository_info = tool.get_repository_info()
File "/usr/local/lib64/python2.6/site-packages/rbtools/clients/", line 59, in get_repository_info
OSError: [Errno 2] No such file or directory: '/XXXX/--show-toplevel'

What operating system are you using? What browser?


Please provide any additional information below.

The patch to fix submodules with git 1.7 uses:

    git rev-parse --show-toplevel

On git 1.7+ this returns the absolute path of the top level of the repo, but on git 1.6 it returns '--show-toplevel', which post-review tries to use as a directory.

The same effect should be achievable in 1.6 using:

    git_top = execute([self.git, "rev-parse", "--show-cdup"],
    git_top = os.path.abspath(git_top)

That should also work fine on 1.7, but perhaps I'm missing something else that '--show-toplevel' does, in which case maybe this could be used if git-top == '--show-toplevel'?

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

Reply via email to