comparison README.txt @ 51:d3ae32b7f282

README: misc updates
author Greg Ward <greg-hg@gerg.ca>
date Fri, 10 Jul 2009 14:12:30 -0400
parents 233040cea97a
children a1558739bd5e
comparison
equal deleted inserted replaced
50:b027552d517b 51:d3ae32b7f282
8 hg-fastimport is a Mercurial extension for importing Git's fast-import 8 hg-fastimport is a Mercurial extension for importing Git's fast-import
9 dumps into Mercurial. fast-import is a file format for representing the 9 dumps into Mercurial. fast-import is a file format for representing the
10 entire history of a version control repository. 10 entire history of a version control repository.
11 11
12 This file format was designed to make it easier to write tools which 12 This file format was designed to make it easier to write tools which
13 converted from foreign VCS repository formats into Git format; such 13 convert from foreign (non-Git) VCS repository formats into Git; such
14 tools exist for CVS, Mercurial, Darcs, and Perforce. 14 tools exist for CVS, Mercurial, Darcs, and Perforce.
15 15
16 However, there's no reason Git should be the only VCS to read 16 However, there's no reason Git should be the only VCS to read
17 git-fast-import files; for example, Bazaar has a fastimport extension 17 git-fast-import files; for example, Bazaar has a fastimport extension
18 similar in scope and aim to hg-fastimport. (In fact, hg-fastimport 18 similar in scope and aim to hg-fastimport. (In fact, hg-fastimport
19 draws heavily on the work done for bzr-fastimport.) 19 draws heavily on the work done for bzr-fastimport.)
20 20
21 If this tool can become an equally effective reader of such files for 21 The goal of hg-fastimport is to make it just as easy to populate a
22 Mercurial, fast-import can become a "lingua franca" for the exchange of 22 Mercurial repository from a fastimport dump as it is for Bazaar or Git.
23 repository histories between revision control tools.
24 23
25 24
26 DEPENDENCIES 25 DEPENDENCIES
27 ------------ 26 ------------
27
28 hg-fastimport requires Mercurial 1.3.
28 29
29 hg-fastimport depends on the pyfastimport library (which was extracted 30 hg-fastimport depends on the pyfastimport library (which was extracted
30 from bzr-fastimport). pyfastimport lives on launchpad.net at 31 from bzr-fastimport). pyfastimport lives on launchpad.net at
31 32
32 https://code.launchpad.net/~gward/bzr-fastimport/reusable 33 https://code.launchpad.net/~gward/bzr-fastimport/reusable
33 34
34 If you have Bazaar on your local machine, you can get the code with 35 Alternately, I maintain a Mercurial mirror of pyfastimport, so you can
36 just use Mercurial to get the code:
35 37
36 bzr branch lp:~gward/bzr-fastimport/reusable pyfastimport 38 hg clone http://vc.gerg.ca/hg/pyfastimport/
37 39
38 (If you know how to get a tarball out of launchpad.net, please let me 40 To make the 'fastimport' package provided by pyfastimport available
39 know. I don't see how to get the pyfastimport code without Bazaar.) 41 to hg-fastimport, you need to add the pyfastimport directory to
42 PYTHONPATH, e.g.
40 43
41 Then make pyfastimport/fastimport available to hg-fastimport, e.g. 44 PYTHONPATH=$HOME/src/pyfastimport
42 45
43 ln -s ../pyfastimport/fastimport . 46 (Yes, this should get simpler in future: right now, both pyfastimport
47 and hg-fastimport are under active development, so things are a bit
48 messy. Bear with me.)
44 49
45 50
46 USAGE 51 USAGE
47 ----- 52 -----
48 53
49 To use hg-fastimport, add a line like 54 To use hg-fastimport, add a line like
50 55
51 fastimport = /path/to/hg-fastimport/hgfastimport 56 fastimport = /path/to/hg-fastimport/hgfastimport
52 57
53 to the [extensions] section of your hgrc. 58 to the [extensions] section of your hgrc. Don't forget to set
59 PYTHONPATH as explained above.
54 60
55 To import into a brand-new Mercurial repository: 61 To import into a brand-new Mercurial repository:
56 62
57 hg init new 63 hg init new
58 hg -R new fastimport FILE... 64 hg -R new fastimport FILE...
66 hg-fastimport uses Mercurial's own testing infrastructure, so you will 72 hg-fastimport uses Mercurial's own testing infrastructure, so you will
67 need a copy of the Mercurial source handy. For example, I keep a clone 73 need a copy of the Mercurial source handy. For example, I keep a clone
68 of Mercurial "crew" in ~/src/hg-crew. To test hg-fastimport: 74 of Mercurial "crew" in ~/src/hg-crew. To test hg-fastimport:
69 75
70 cd tests 76 cd tests
71 ~/src/hg-crew/tests/run-tests.py --with-hg=dummy 77 ~/src/hg-crew/tests/run-tests.py --local
72 78
73 79
74 FURTHER READING 80 FURTHER READING
75 --------------- 81 ---------------
76 82
130 GNU General Public License for more details. 136 GNU General Public License for more details.
131 137
132 You should have received a copy of the GNU General Public License along 138 You should have received a copy of the GNU General Public License along
133 with this program; if not, write to the Free Software Foundation, Inc., 139 with this program; if not, write to the Free Software Foundation, Inc.,
134 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 140 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
135
136