← Back to team overview

dulwich-users team mailing list archive

Re: Dulwich Pull/Push command?

 

Nevermind about my previous email, I feel dumb. I wasn't actually
initializing GitClient. My code I have now is,

import os
from dulwich import *

path = "myrepo"
if not os.path.exists(path):
        os.makedirs(path)
if not os.path.exists(os.path.join(path, ".git")):
     r = repo.Repo.init(path)
else:
    r = os.path.join(path, ".git")
cl = client.GitClient(True,0,0)
uri = client.get_transport_and_path("git://
github.com/Shelnutt2/apptester.git")
client.GitClient.fetch(cl, uri, r)


Which now I am getting the error:
s.shelnutt@funtoo-64 ~/wine-dev/git-test $ python git-test.py
Traceback (most recent call last):
  File "git-test.py", line 15, in <module>
    client.GitClient.fetch(cl, uri, r)
  File "/home/s.shelnutt/wine-dev/git-test/dulwich/client.py", line 188, in
fetch
    determine_wants = target.object_store.determine_wants_all
AttributeError: 'str' object has no attribute 'object_store'

I've tried to google object_store but I can't really find any references to
it, so I'm not really sure what the error is, or how to go about fixing it.
I know that it is trying to store/change the attribute which it's saying it
doesn't have. But I am not sure how to go about adding attributes to
variables?

Thanks,

Seth Shelnutt

Follow ups

References