git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Han-Wen Nienhuys <hanwen@xs4all.nl>
Cc: git@vger.kernel.org
Subject: Re: darcs2git.py - convert darcs repository using gfi
Date: Sun, 11 Feb 2007 20:14:01 -0500	[thread overview]
Message-ID: <20070212011401.GK31488@spearce.org> (raw)
In-Reply-To: <eqoaf7$loq$1@sea.gmane.org>

Han-Wen Nienhuys <hanwen@xs4all.nl> 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.

  reply	other threads:[~2007-02-12  1:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-11 23:56 darcs2git.py - convert darcs repository using gfi Han-Wen Nienhuys
2007-02-12  1:14 ` Shawn O. Pearce [this message]
2007-02-13 22:42   ` Han-Wen Nienhuys
2007-02-18 12:45   ` git-fast-export ? Han-Wen Nienhuys
2007-02-19  8:25     ` Shawn O. Pearce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070212011401.GK31488@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=hanwen@xs4all.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).