Bug 1225179 - rbt post + git-svn: CRITICAL: object of type 'NoneType' has no len().
Summary: rbt post + git-svn: CRITICAL: object of type 'NoneType' has no len().
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: RBTools
Version: el6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Stephen Gallagher
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-26 18:39 UTC by Corey Halpin
Modified: 2015-06-29 18:40 UTC (History)
3 users (show)

Fixed In Version: RBTools-0.7.4-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-09 14:59:56 UTC


Attachments (Terms of Use)

Description Corey Halpin 2015-05-26 18:39:49 UTC
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):

  NA

How reproducible:

  Always

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
Linux-2.6.32-504.12.2.el6.x86_64-x86_64-with-centos-6.6-Final
>>> 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 https://int.scout.wisc.edu/reviewboard/api/
>>> Making HTTP GET request to
https://int.scout.wisc.edu/reviewboard/api/repositories/
>>> Cached response for HTTP GET
https://int.scout.wisc.edu/reviewboard/api/repositories/ expired and
was modified
>>> Making HTTP GET request to
https://int.scout.wisc.edu/reviewboard/api/repositories/1/info/
>>> Cached response for HTTP GET
https://int.scout.wisc.edu/reviewboard/api/repositories/1/info/
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
refs/remotes/git-svn
>>> 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/main.py",
line 133, in main
    command.run_from_argv([RB_MAIN, command_name] + args)
  File
"/usr/lib/python2.6/site-packages/rbtools/commands/__init__.py", line
555, in run_from_argv
    exit_code = self.main(*args) or 0
  File "/usr/lib/python2.6/site-packages/rbtools/commands/post.py",
line 639, in main
    extra_args=extra_args)
  File "/usr/lib/python2.6/site-packages/rbtools/clients/git.py", line
448, in diff
    exclude_patterns)
  File "/usr/lib/python2.6/site-packages/rbtools/clients/git.py", line
552, in make_diff
    results_unicode=False)
  File "/usr/lib/python2.6/site-packages/rbtools/utils/process.py",
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

Produces:
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: bay.uchicago.edu
 * elrepo: mirror.symnds.com
 * epel: mirror.steadfast.net
 * extras: mirrors.tripadvisor.com
 * updates: mirror.nexcess.net
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         : http://git-scm.com/
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/git.py from
  git_cmd = [self.git, '-c', 'core.quotepath=false'] 
to
  git_cmd = [self.git]

resolves the issue.

Comment 1 Stephen Gallagher 2015-05-26 19:00:55 UTC
That may reduce the impact of the issue, but it would reintroduce other issues. Bugs would appear if any path in a diff includes characters greater than 0x80.

I'm raising this issue with RBTools upstream: https://code.google.com/p/reviewboard/issues/detail?id=3876

Comment 2 Fedora Update System 2015-05-29 16:14:02 UTC
RBTools-0.7.3-1.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/RBTools-0.7.3-1.el7

Comment 3 Fedora Update System 2015-05-29 16:14:08 UTC
RBTools-0.7.3-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/RBTools-0.7.3-1.el6

Comment 4 Fedora Update System 2015-05-29 16:14:15 UTC
RBTools-0.7.3-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/RBTools-0.7.3-1.fc20

Comment 5 Fedora Update System 2015-05-29 16:14:21 UTC
RBTools-0.7.3-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/RBTools-0.7.3-1.fc22

Comment 6 Fedora Update System 2015-05-29 16:14:27 UTC
RBTools-0.7.3-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/RBTools-0.7.3-1.fc21

Comment 7 Fedora Update System 2015-05-29 21:45:33 UTC
Package RBTools-0.7.3-1.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing RBTools-0.7.3-1.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-6448/RBTools-0.7.3-1.el6
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2015-06-09 14:59:56 UTC
RBTools-0.7.3-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2015-06-09 15:06:53 UTC
RBTools-0.7.3-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2015-06-09 15:21:52 UTC
RBTools-0.7.3-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2015-06-11 18:14:54 UTC
RBTools-0.7.4-1.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/RBTools-0.7.4-1.el7

Comment 12 Fedora Update System 2015-06-11 18:16:04 UTC
RBTools-0.7.4-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/RBTools-0.7.4-1.el6

Comment 13 Fedora Update System 2015-06-11 18:16:10 UTC
RBTools-0.7.4-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/RBTools-0.7.4-1.fc21

Comment 14 Fedora Update System 2015-06-11 18:16:23 UTC
RBTools-0.7.4-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/RBTools-0.7.4-1.fc20

Comment 15 Fedora Update System 2015-06-11 18:18:36 UTC
RBTools-0.7.4-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/RBTools-0.7.4-1.fc22

Comment 16 Fedora Update System 2015-06-24 15:55:25 UTC
RBTools-0.7.4-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2015-06-24 15:57:02 UTC
RBTools-0.7.4-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2015-06-24 16:01:44 UTC
RBTools-0.7.4-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2015-06-29 18:39:54 UTC
RBTools-0.7.4-1.el7 has been pushed to the Fedora EPEL 7 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Update System 2015-06-29 18:40:30 UTC
RBTools-0.7.4-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.