Git development
 help / color / mirror / Atom feed
From: Juliusz Chroboczek <Juliusz.Chroboczek@pps.jussieu.fr>
To: darcs-devel@darcs.net
Cc: Git Mailing List <git@vger.kernel.org>
Subject: A darcs that can pull from git
Date: Mon, 25 Apr 2005 00:32:18 +0200	[thread overview]
Message-ID: <7ipswjbybx.fsf@lanthane.pps.jussieu.fr> (raw)

I've just finished putting together a hack for darcs to allow it to
pull from Git repositories.  You'll find the patch (Darcs patch, not
diff patch) on

  http://www.pps.jussieu.fr/~jch/software/files/darcs-git-20050424.darcs

You should get yourself a copy of darcs-unstable, then apply this
patch:

  $ darcs get http://www.abridgegame.org/repos/darcs-unstable darcs-git
  $ cd darcs-git
  $ darcs apply darcs-git-20050424.darcs
  $ make darcs

If you get merge conflicts, try using a version of the darcs-unstable
tree from 18.04.2005, which is what I started with.

A minor problem: there's something broken with the build procedure;
you'll probably need to manually do a ``make Context.hs'' followed
with ``make darcs'' when the build breaks.

After you build darcs-git, you should be able to do something like

  $ cd ..
  $ mkdir a
  $ cd a
  $ darcs initialize
  $ ../darcs-git/darcs pull /usr/local/src/git-pasky-0.4
  $ darcs changes

This version can *pull* from git, but it cannot push; in other words,
the only way to export your data from Darcs back to git is to use diff
and patch.

Please be aware that this is just a proof-of-concept prototype.  David
and the rest of the Central Committee haven't looked at this code yet;
it is quite likely that future versions of Darcs will generate
completely different patches from git repositories.  It is also likely
that THIS CODE WILL EAT YOUR DATA.

The major issue is that we generate no patch dependencies.  If you try
to cherry-pick from repositories generated with this version, you'd
better know what you're doing.

David, could you please have a look at the patches

  Sun Apr 24 16:50:02 CEST 2005  Juliusz Chroboczek <jch@pps.jussieu.fr>
    * First cut at remodularising repo access.

  Sun Apr 24 16:01:32 CEST 2005  Juliusz Chroboczek <jch@pps.jussieu.fr>
    * Change Repository to DarcsRepo.

and tell me whether this sort of restructuring is okay with you.

(David, I'm not claiming that this scheme is better than the ``tagging
like crazy'' scheme that you outlined; I'm only trying to prove that
my scheme is workable.)

Right now, I'm taking a Git commit and manually generating a Darcs
patch id from that, which is a bad idea.  A better way would be to get
Darcs to deal with arbitrarily shaped patch ids; a patch that
originates with git would get the git patch id, while a patch that
comes from Darcs would retain its patch id even when pushed to git.
David, you had some objections to that; any chance we could discuss
the issue?

This is slow.  There are a few obvious improvements to make to the
performance, but I'd rather first implement whatsnew, diff and apply,
and fix the problem with patch dependencies.  (Whatsnew is where git's
performance is actually likely to be better than Darcs, but it will
require some abstracting of ``Slurpy'' in order to make that
effective.)  Unfortunately, I don't expect to have hacking time before
next week-end.


Enjoy,

                                        Juliusz Chroboczek

             reply	other threads:[~2005-04-24 22:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-24 22:32 Juliusz Chroboczek [this message]
2005-04-25 13:31 ` A darcs that can pull from git David Roundy
2005-04-25 15:12   ` Juliusz Chroboczek
2005-04-26  0:55     ` Linus Torvalds
2005-04-26 11:06     ` David Roundy
2005-04-26 12:34       ` Petr Baudis
2005-04-26 12:47         ` [darcs-devel] " David Roundy

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=7ipswjbybx.fsf@lanthane.pps.jussieu.fr \
    --to=juliusz.chroboczek@pps.jussieu.fr \
    --cc=darcs-devel@darcs.net \
    --cc=git@vger.kernel.org \
    /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