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

New issue 3876 by rbt post + git-svn: CRITICAL: object of type 'NoneType' has no len()

Copying this bug from EPEL Bugzilla. RHEL/CentOS 6 only ships with git version 1.7.1, which is missing the "-c name=value" option that RBTools uses to ensure that path values with unusual characters are quoted.

It looks like this was added as a side-effect of
"Disable the HTTP cache by default" (commit 03dbc9e3f2e1f8d0cd73c1941d9a5d8ed9c123bf). It doesn't seem to be related to the rest of that patch.

In the short-term, I can patch this back out of the EPEL release of RBTools, but I'm not sure what the correct upstream solution should be here. Without context for this change, I'm not sure how bad the effect would be. Please advise.

==== Red Hat Bugzilla ====

Description of problem:

When attempting to 'rbt post' inside a repository created with 'git svn clone', posting fails and "CRITICAL: object of type 'NoneType' has no len()." is displayed. More detail is given

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. git svn clone a repository that is linked to an RB instance
2. rbt post in the new clone

Actual results:

  CRITICAL: object of type 'NoneType' has no len().

Expected results:

  Successful RB posting.

Additional info:

  Running 'rbt post --debug' produces:

RBTools 0.7.2
Python 2.6.6 (r266:84292, Jan 22 2014, 09:42:36)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]
Running on
Home = /home/cstapleton
Current directory = /home/cstapleton/public_html/2768_CS_MORENEWS/local/interface/ATECentral2
Checking for a Subversion repository...
Running: svn info --non-interactive
Command exited with rc 1: ['svn', 'info', '--non-interactive']
svn: '.' is not a working copy
Checking for a Git repository...
Running: git rev-parse --git-dir
Running: git config core.bare
Running: git rev-parse --show-toplevel
Running: git symbolic-ref -q HEAD
Running: git svn info
Running: git svn rebase -n
repository info: Path: file:///home/svnroot, Base path:
/trunk/AMSER2, Supports changesets: False
Making HTTP GET request to
Making HTTP GET request to
Cached response for HTTP GET expired and
was modified
Making HTTP GET request to
Cached response for HTTP GET
expired and was modified
repository info: Path: file:///home/svnroot, Base path:
/trunk/AMSER2, Supports changesets: False
Running: git rev-parse refs/heads/master
Running: git merge-base 727c08c23a00a1b209f4b1bdd862ced721b21e20
Running: git rev-parse 197babf39f7dcf9e880fdc8a559664f6691d6e65
Running: git status --porcelain --untracked-files=no
Running: git rev-parse --git-dir
Running: git -c core.quotepath=false diff --no-color --no-prefix
-r -u --no-ext-diff 197babf39f7dcf9e880fdc8a559664f6691d6e65..727c08c23a00a1b209f4b1bdd862ced721b21e20
Command exited with rc 129: ['git', '-c', 'core.quotepath=false',
'diff', '--no-color', '--no-prefix', '-r', '-u', '--no-ext-diff', u'197babf39f7dcf9e880fdc8a559664f6691d6e65..727c08c23a00a1b209f4b1bdd862ced721b21e20']
Traceback (most recent call last):
  File "/usr/bin/rbt", line 9, in <module>
    load_entry_point('RBTools==0.7.2', 'console_scripts', 'rbt')()
  File "/usr/lib/python2.6/site-packages/rbtools/commands/",
line 133, in main
    command.run_from_argv([RB_MAIN, command_name] + args)
"/usr/lib/python2.6/site-packages/rbtools/commands/", line
555, in run_from_argv
    exit_code = self.main(*args) or 0
  File "/usr/lib/python2.6/site-packages/rbtools/commands/",
line 639, in main
  File "/usr/lib/python2.6/site-packages/rbtools/clients/", line
448, in diff
  File "/usr/lib/python2.6/site-packages/rbtools/clients/", line
552, in make_diff
  File "/usr/lib/python2.6/site-packages/rbtools/utils/",
line 102, in execute
    if split_lines and len(data) > 0:
TypeError: object of type 'NoneType' has no len()

Manually running
git -c core.quotepath=false diff --no-color --no-prefix
-r -u --no-ext-diff 197babf39f7dcf9e880fdc8a559664f6691d6e65..727c08c23a00a1b209f4b1bdd862ced721b21e20

Unknown option: -c
usage: git [--version] [--exec-path[=GIT_EXEC_PATH]] [--html-path]
           [-p|--paginate|--no-pager] [--no-replace-objects]
           [--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE]
           [--help] COMMAND [ARGS]

The installed git is:

azure:~$ git --version
git version 1.7.1
azure:~$ yum info git
Loaded plugins: changelog, etckeeper, fastestmirror, security
Loading mirror speeds from cached hostfile
 * base:
 * elrepo:
 * epel:
 * extras:
 * updates:
Installed Packages
Name        : git
Arch        : x86_64
Version     : 1.7.1
Release     : 3.el6_4.1
Size        : 15 M
Repo        : installed
From repo   : updates
Summary     : Fast Version Control System
URL         :
License     : GPLv2
Description : Git is a fast, scalable, distributed revision control system with an : unusually rich command set that provides both high-level operations
            : and full access to internals.
: The git rpm installs the core tools with minimal dependencies. To : install all git packages, including tools for integrating with other
            : SCMs, install the git-all meta-package.

From the git release notes, it looks as though the '-c name=value' option was introduced with git 1.7.2 ?

Changing line 477 of /usr/lib/python2.6/site-packages/rbtools/clients/ from
  git_cmd = [self.git, '-c', 'core.quotepath=false']
  git_cmd = [self.git]

resolves the issue.

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