← Back to team overview

dulwich-users team mailing list archive

Re: Using dulwich for merges and conflict detection

 

Hi,

On Tue, 2011-06-07 at 15:19 +0100, arkaitzj@xxxxxxxxx wrote:
> I am evaluating dulwich for a project I have, I just need to handle a
> local repo where people do commits.
> 
> I want to be able to check if different branches merge cleanly and to
> actually do the merge. I know the software works basically at the data
> model level and i've been able to extract the commits between the
> different refs I need, I just can't find a way of start applying all
> those commits into the base one and see if they succeed or not.

> I've been looking at the exporter/importer for this but haven't been
> able to find a way as things like emit_commit do not actually commit
> anything and I am unable to find how to do it with the text stream
> that comes out of the exporter.
Is there a particular reason you've been looking at the
exporter/importer? Is your initial data in fastimport/fastexport? 

If you have an existing git repository you should be able to open it
with dulwich.repo.Repo and then get whatever objects from it that you
need; you can then just use them in memory without having to write to
the repository.

It should be quite easy to create objects that aren't in a database
using the classes in dulwich.objects. If you do want to use a fastimport
stream to import existing data, you can import into a MemoryObjectStore
as well, which only exists in memory and does not require any data on
disk. 

The main problem I see is that dulwich doesn't have a merge
implementation at the moment; are you using something else for the
merges?

Cheers,

Jelmer

Attachment: signature.asc
Description: This is a digitally signed message part


Follow ups

References