Export to GitHub

django-rcsfield - issue #8
Git backend seems to have trouble with the latest version of git-python?
Posted on Dec 16, 2008 by
Happy Horse
Looking at the fetch function in gitcore.py -
http://code.google.com/p/django-rcsfield/source/browse/trunk/rcsfield/backends/gitcore.py#45
def fetch(self, key, rev):
"""
fetch revision ``rev`` of entity identified by ``key``.
"""
repo = Repo(self.repo_path)
try:
return repo.tree/key.data
except:
...
Rev
is not used ... and this will hit the except clause everytime
returning '' ...
Here is a quick hack fix:
def fetch(self, key, rev):
"""
fetch revision ``rev`` of entity identified by ``key``.
"""
repo = Repo(self.repo_path)
try:
bits = key.split('/')
tree = repo.tree(rev)
for bit in bits:
tree = tree/bit
else:
return tree.data
except:
return ''
Comment #1
Posted on Dec 17, 2008 by Happy PandaHi bishanty,
thanks for reporting this issue, we will have a look at it asap.
arne
Comment #2
Posted on Dec 17, 2008 by Swift Panda(No comment was entered for this change.)
Comment #3
Posted on Mar 3, 2009 by Swift PandaFixed in r69
Status: Fixed
Labels:
Type-Defect
Priority-High