dulwich-users team mailing list archive
-
dulwich-users team
-
Mailing list archive
-
Message #00750
Re: Fetch branch
On Mon, Sep 17, 2012 at 08:22:39PM -0700, Mark Mikofski wrote:
> > The fetch function returns them.
> Is there a way to get them without calling fetch?
> What if I have no network connection, so I can't
> connect to the remote? The only thing I can think
> of is to write them to a file when I clone the repo
> the first time.
Right, you would want to store the refs in your local repository as
refs/remotes/REMOTENAME/ref.
Cheers,
Jelmer
> import csv
> with open('dulwich_refs', 'wb') as file:
> writer = csv.writer(file, delimeter=' ')
> for key, value in refs.items():
> writer.writerow([key, value])
> then if I need them later I will have the shas.
> 1. is there a better way?
> 2. this file is modelled after packed_refs file. Is this
> a good format? It seems arbitrary, since I just made
> it up. There is probably a more standard git format,
> like packed_refs, that would be more meaningful, and
> what people expect.
> Thanks again!
> Mark
> _______________________________________________
> Mailing list: https://launchpad.net/~dulwich-users
> Post to : dulwich-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dulwich-users
> More help : https://help.launchpad.net/ListHelp
--
References