summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2009-09-09 03:12:40 +0200
committerMiklos Vajna <vmiklos@frugalware.org>2009-09-09 03:12:40 +0200
commit84a1786228541d383ee21087743f7bff5bce95ee (patch)
tree3f40beff51c35b2a3e1e0c61ce84226cae9fc404
parent8f3c6a5acc2c55164dd4101c5ce0efaadc6c9385 (diff)
downloadpython-fastimport-84a1786228541d383ee21087743f7bff5bce95ee.tar.gz
darcs: update d2x for Greg's hg-fastimport
Previously I recommended my fork of http://hg.opensource.lshift.net/hg-fastimport, but that's unmaintained and Greg's hg-fastimport works out of the box with hg 1.3. Update the code, documentation and testcases accordingly.
-rw-r--r--exporters/darcs/README21
-rwxr-xr-xexporters/darcs/d2x2
-rw-r--r--exporters/darcs/t/lib.sh2
-rw-r--r--exporters/darcs/t/test-hg.sh2
-rw-r--r--exporters/darcs/t/testimport-hg.sh1
5 files changed, 12 insertions, 16 deletions
diff --git a/exporters/darcs/README b/exporters/darcs/README
index 4b13e3b..3fc9449 100644
--- a/exporters/darcs/README
+++ b/exporters/darcs/README
@@ -23,13 +23,6 @@ Independent::
Ideally it should work with any fast importer, but actually it has been
tested with git fast-import, bzr fast-import and hg fastimport. (These
are the three fast-import implementations available ATM.)
- +
- hg fastimport needs three patches. While they are not in the upstream,
- you can get it from my repository using
-+
-----
-$ hg clone static-http://frugalware.org/~vmiklos/hg/hg-fastimport
-----
Formats::
It supports the 'darcs-2', 'hashed', and 'old-fashioned-inventory' darcs
@@ -127,16 +120,18 @@ supported by fastimport-0.6 is hg-1.0.x.
Mercurial (Hg) version:
----
$ hg version
-Mercurial Distributed SCM (version 1.2.1)
+Mercurial Distributed SCM (version 1.3)
----
-Strictly speaking this document is a wrong place to talk about enabling
-hg plugins. However...
+Strictly speaking this document is a wrong place to talk about
+configuring hg fastimport. However... you will need something like:
----
-$ cat ~/.hgrc
-[extensions]
-hgext.fastimport=
+$ hg clone http://vc.gerg.ca/hg/pyfastimport
+$ hg clone http://vc.gerg.ca/hg/hg-fastimport
+$ sudo ln -s /path/to/pyfastimport/fastimport /usr/lib/python2.6/site-packages/fastimport
+$ sudo ln -s /path/to/hg-fastimport/hgfastimport /usr/lib/python2.6/site-packages/hgfastimport
+echo -e "[extensions]\nfastimport = /usr/lib/python2.6/site-packages/hgfastimport" > ~/.hgrc
----
and once you installed the plugin correctly, you should have something like:
diff --git a/exporters/darcs/d2x b/exporters/darcs/d2x
index 79e18a3..959cc00 100755
--- a/exporters/darcs/d2x
+++ b/exporters/darcs/d2x
@@ -93,7 +93,7 @@ if [ ! -f $dmark ]; then
hg)
hg init
darcs-fast-export $* $origin | \
- hg fastimport /dev/stdin
+ hg fastimport -
esac
else
case $format in
diff --git a/exporters/darcs/t/lib.sh b/exporters/darcs/t/lib.sh
index e08210e..1529f6f 100644
--- a/exporters/darcs/t/lib.sh
+++ b/exporters/darcs/t/lib.sh
@@ -150,6 +150,7 @@ create_hg()
hg pull ../$1.tmp
hg merge
echo D > file
+ hg resolve -m file
echo "first line
second line
third line" | hg commit -l /dev/stdin
@@ -270,6 +271,7 @@ diff_bzr()
diff_hg()
{
+ hg -R $1.hg update
diff --exclude _darcs --exclude .hg --exclude '*-darcs-backup*' -Nur $1.hg $1
return $?
}
diff --git a/exporters/darcs/t/test-hg.sh b/exporters/darcs/t/test-hg.sh
index ddde37a..95bfc4b 100644
--- a/exporters/darcs/t/test-hg.sh
+++ b/exporters/darcs/t/test-hg.sh
@@ -8,7 +8,7 @@ cd test.hg
hg init
cd ..
if [ "$1" != "--stdout" ]; then
- darcs-fast-export test |(cd test.hg; hg fastimport /dev/stdin)
+ darcs-fast-export test |(cd test.hg; hg fastimport -)
diff_hg test
exit $?
else
diff --git a/exporters/darcs/t/testimport-hg.sh b/exporters/darcs/t/testimport-hg.sh
index 76df76d..7f6d215 100644
--- a/exporters/darcs/t/testimport-hg.sh
+++ b/exporters/darcs/t/testimport-hg.sh
@@ -8,7 +8,6 @@ cd test.darcs
darcs init
cd ..
(cd test; $pypath/bzrlib/plugins/fastimport/exporters/hg-fast-export.py -r .) | (cd test.darcs; darcs-fast-import)
-rm test/{*.orig,hg-export.status}
if [ $? != 0 ]; then
exit 1
fi