Subject: examples/zeitgeist-git.py: get_repo(): IndexError: list index out of range Package: git-buildpackage Version: 0.4.65 Severity: normal Tags: upstream
*** Please type your report below this line ***
Dear Debian folks,
using Gitosis my remote repository URL looks like the following.
$ git config --get remote.origin.url
[email protected]:name-of-repository
As you can see there are no »/« in here. Therefore
def get_repo():
"""Get uri of remote repository and it's name"""
repo = None
uri = subprocess.Popen(['git', 'config', '--get', 'remote.origin.url'],
stdout=subprocess.PIPE).communicate()[0]
if uri:
uri = uri.strip().decode(sys.getfilesystemencoding())
repo = unicode(uri.rsplit('/', 1)[1])
repo = repo.rsplit(u'.git', 1)[0]
return repo, uri
fails in `repo = unicode(uri.rsplit('/', 1)[1])` with the following error
message.
$ git commit
Traceback (most recent call last):
File ".git/hooks/post-commit", line 96, in <module>
main(sys.argv)
File ".git/hooks/post-commit", line 76, in main
repo, origin = get_repo()
File ".git/hooks/post-commit", line 62, in get_repo
repo = unicode(uri.rsplit('/', 1)[1])
IndexError: list index out of range
It would be great if you could fix this problem. I have no knowledge of Python.
Thanks,
Paul
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (x86_64)
Kernel: Linux 2.6.32-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages git-buildpackage depends on:
ii devscripts 2.10.64 scripts to make the life of a Debi
ii git [git-core] 1:1.7.1-1 fast, scalable, distributed revisi
ii git-core 1:1.7.1-1 fast, scalable, distributed revisi
ii python 2.5.4-9 An interactive high-level object-o
ii python-dateutil 1.4.1-3 powerful extensions to the standar
ii python-support 1.0.8 automated rebuilding support for P
Versions of packages git-buildpackage recommends:
ii pristine-tar 1.01 regenerate pristine tarballs
Versions of packages git-buildpackage suggests:
pn git-load-dirs <none> (no description available)
-- no debconf information
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

