Re: darcs2git.py - convert darcs repository using gfi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Han-Wen Nienhuys <hanwen@xxxxxxxxx> wrote:
> The python script attached is a try at providing a sane
> conversion from Darcs to GIT.  It tries to map darcs conflict
> resolutions onto git branch merges.

Impressive.
 
> Regarding GFI, it's a breeze to work with; my compliments to its
> author.

Hey, thanks!  ;-)

> My only gripe is the need to specify a branch for each commit.
> Darcs uses changeset based storage. It doesn't really have branches,
> but it does record divergent changes and merges of resulting
> conflicts.  Hence, it's not clear which refs/head/BRANCH should be
> used when creating a commit object.

Just make something up.  Or don't use refs/heads, instead use your
own directory e.g. refs/patches/.  Then you can delete the entire
directory when you are done importing.

> So, my feature request: please make the "commit" command always accept
> a "from" command

This restriction was a safety valve.  fast-import itself would be
OK if I permitted a from all of the time.  A bug in cvs2svn caused
multiple froms to be emitted for the same branch, and that wasn't
correct, so fast-import crashed on it rather than silently accepting
the data corruption.

Its actually one of those things that is nice to remove, as its 3
lines of code that just need to be deleted.  ;-)

> and make the "refs" argument optional.

This is harder than it sounds.  fast-import internally is built
around the assumption of a branch, which has a name, and which lives
in the branch LRU.  With the "from" command restriction lifted
you can just import every single commit onto the same hardcoded
branch name (e.g. DARCS_HEAD) then delete it when you are done
(e.g. rm .git/DARCS_HEAD).  That's basically the same thing as an
optional ref argument.

-- 
Shawn.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]