I may be extremely dense, but how it this supposed to work?

$ mkdir test
$ cd test
$ /usr/src/darcs-to-git/darcs-to-git virgil:/var/lib/darcs/www.koldfront.dk/
Running: ["darcs", "-v"]
Running: ["darcs", "init"]
Running: ["git-init"]
Initialized empty Git repository in .git/
Running: ["darcs", "changes", "--reverse", "--repodir=virgil:/var/lib/darcs/www.koldfront.dk/", "--xml", "--summary"]

darcs failed: can't set directory to virgil:/var/lib/darcs/www.koldfront.dk/
/usr/src/darcs-to-git/darcs-to-git:47:in `output_of': Failed to run: ["darcs", "changes", "--reverse", "--repodir=virgil:/var/lib/darcs/www.koldfront.dk/", "--xml", "--summary"] (RuntimeError)
from /usr/src/darcs-to-git/darcs-to-git:81:in `read_from_repo'
from /usr/src/darcs-to-git/darcs-to-git:185
$

Okay, maybe getting the DARCSREPO via ssh isn't supported, let me try one via http:

$ /usr/src/darcs-to-git/darcs-to-git http://koldfront.dk/darcs/mosaic-2.7b5/
Running: ["darcs", "-v"]
Running: ["darcs", "init"]
Running: ["git-init"]
Initialized empty Git repository in .git/
Running: ["darcs", "changes", "--reverse", "--repodir=http://koldfront.dk/darcs/mosaic-2.7b5/", "--xml", "--summary"]

darcs failed: can't set directory to http://koldfront.dk/darcs/mosaic-2.7b5/
/usr/src/darcs-to-git/darcs-to-git:47:in `output_of': Failed to run: ["darcs", "changes", "--reverse", "--repodir=http://koldfront.dk/darcs/mosaic-2.7b5/", "--xml", "--summary"] (RuntimeError)
from /usr/src/darcs-to-git/darcs-to-git:81:in `read_from_repo'
from /usr/src/darcs-to-git/darcs-to-git:185
$

No, still no go.

Perhaps "usage: darcs-to-git DARCSREPO" should say "usage: darcs-to-git PATHTOLOCALDIRCONTAININGADARCSREPO"?

Let me try that:

$ darcs get http://koldfront.dk/darcs/mosaic-2.7b5/
Copying patch 9 of 9... done.
Applying patch 9 of 9... done.
Finished getting.
$ mkdir hop
$ cd hop
$ /usr/src/darcs-to-git/darcs-to-git ../mosaic-2.7b5/
Running: ["darcs", "-v"]
Running: ["darcs", "init"]
Running: ["git-init"]
Initialized empty Git repository in .git/
Running: ["darcs", "changes", "--reverse", "--repodir=../mosaic-2.7b5/", "--xml", "--summary"]

[...]

1 files changed, 4 insertions(+), 3 deletions(-)
$

Hey, it worked, cool!

Thanks for creating darcs-to-git and sharing it. May I suggest the attached tiny patch?

Best regards,

Adam.

P.S. As you can see, I'm not that used to git yet...

commit 4f71a3ecc89627f0f0cf1f26f49fa688a46f9666
Author: Adam Sjøgren <asjo@koldfront.dk>
Date: Wed Mar 19 23:22:57 2008 +0100

Hint at the fact that the darcs repository must be a local one.

diff --git a/darcs-to-git b/darcs-to-git
index 75b5323..5659817 100755
--- a/darcs-to-git
+++ b/darcs-to-git
@@ -17,12 +17,12 @@ if [nil, '--help', '-h'].include?(SRCREPO)
STDERR.write(<<-end_usage)
Creates git repositories from darcs repositories

- usage: darcs-to-git DARCSREPO
+ usage: darcs-to-git DARCSREPODIR

1. Create an *empty* directory that will become the new git repository
2. From inside that directory, run this program, passing the location
- of the source darcs repo as a parameter
+ of the local source darcs repo as a parameter

The program will git-init the empty directory, and migrate all patches
in the source darcs repo into commits in that repository.

Reply

The content of this field is kept private and will not be shown publicly.
Captcha
Please show that you are a human visitor (to stop automated spam submissions)
Copy the characters (respecting upper/lower case) from the image.