It's been a while but I still have this problem.
I looked into bzr-git/fetch.py and experimented a bit
I tried to following which is based on the fetch_objects method of fetch.py
from dulwich.repo import Repo
from dulwich.client import HttpGitClient
from dulwich.repo import Repo
ref_changes = {}
def determine_wants(heads):
old_refs = dict([(k, (v, None)) for (k, v) in heads.iteritems()])
new_refs = old_refs
ref_changes.update(new_refs)
return [sha1 for (sha1, bzr_revid) in new_refs.itervalues()]
It's been a while but I still have this problem.
I looked into bzr-git/fetch.py and experimented a bit
I tried to following which is based on the fetch_objects method of fetch.py
from dulwich.repo import Repo
from dulwich.client import HttpGitClient
from dulwich.repo import Repo
ref_changes = {} wants(heads) : changes. update( new_refs) itervalues( )]
def determine_
old_refs = dict([(k, (v, None)) for (k, v) in heads.iteritems()])
new_refs = old_refs
ref_
return [sha1 for (sha1, bzr_revid) in new_refs.
def process(text):
print text
repo = Repo('django-csp') /github. com/fmarier/ django- csp.git'
url = 'https:/
client = HttpGitClient(url)
localrepo = Repo('django- csp\\.git' ) get_graph_ walker( ) object_ store.add_ pack() fetch_pack( url,
determine_ wants, graphwalker, f.write,
process)
graphwalker = localrepo.
f, commit = localrepo.
refs = client.
commit()
But I still get the same error(s).
Can somebody tell my what's the right/a working way to fetch remote packs and commit them to the local repository?