1 # Copyright (C) 2008-2011 Canonical Ltd
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 The fastimport plugin provides stream-based importing and exporting of
20 data into and out of Bazaar. As well as enabling interchange between
21 multiple VCS tools, fastimport/export can be useful for complex branch
22 operations, e.g. partitioning off part of a code base in order to Open
25 The normal import recipe is::
27 bzr fast-export-from-xxx SOURCE project.fi
28 bzr fast-import project.fi project.bzr
30 If fast-export-from-xxx doesn't exist yet for the tool you're importing
31 from, the alternative recipe is::
33 front-end > project.fi
34 bzr fast-import project.fi project.bzr
36 In either case, if you wish to save disk space, project.fi can be
37 compressed to gzip format after it is generated like this::
41 bzr fast-import project.fi.gz project.bzr
43 The list of known front-ends and their status is documented on
44 http://bazaar-vcs.org/BzrFastImport/FrontEnds. The fast-export-from-xxx
45 commands provide simplified access to these so that the majority of users
46 can generate a fast-import dump file without needing to study up on all
47 the options - and the best combination of them to use - for the front-end
48 relevant to them. In some cases, a fast-export-from-xxx wrapper will require
49 that certain dependencies are installed so it checks for these before
50 starting. A wrapper may also provide a limited set of options. See the
51 online help for the individual commands for details::
53 bzr help fast-export-from-cvs
54 bzr help fast-export-from-darcs
55 bzr help fast-export-from-hg
56 bzr help fast-export-from-git
57 bzr help fast-export-from-mtn
58 bzr help fast-export-from-p4
59 bzr help fast-export-from-svn
61 Once a fast-import dump file is created, it can be imported into a
62 Bazaar repository using the fast-import command. If required, you can
63 manipulate the stream first using the fast-import-filter command.
64 This is useful for creating a repository with just part of a project
65 or for removing large old binaries (say) from history that are no longer
66 valuable to retain. For further details on importing, manipulating and
67 reporting on fast-import streams, see the online help for the commands::
70 bzr help fast-import-filter
71 bzr help fast-import-info
72 bzr help fast-import-query
74 Finally, you may wish to generate a fast-import dump file from a Bazaar
75 repository. The fast-export command is provided for that purpose.
77 To report bugs or publish enhancements, visit the bzr-fastimport project
78 page on Launchpad, https://launchpad.net/bzr-fastimport.
81 from __future__
import absolute_import
83 from bzrlib
.plugins
.fastimport
.info
import (
84 bzr_plugin_version
as version_info
,
87 from bzrlib
.commands
import plugin_cmds
90 def load_fastimport():
91 """Load the fastimport module or raise an appropriate exception."""
94 except ImportError, e
:
95 from bzrlib
.errors
import DependencyNotPresent
96 raise DependencyNotPresent("fastimport",
97 "bzr-fastimport requires the fastimport python module")
102 return tests
.test_suite()
107 "fast_import_filter",
111 "fast_export_from_cvs",
112 "fast_export_from_darcs",
113 "fast_export_from_hg",
114 "fast_export_from_git",
115 "fast_export_from_mtn",
116 "fast_export_from_p4",
117 "fast_export_from_svn"
119 plugin_cmds
.register_lazy("cmd_%s" % name
, [], "bzrlib.plugins.fastimport.cmds")