/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar
0.64.311 by John Arbash Meinel
Quick typo fix from Martin Ueding
1
# Copyright (C) 2008-2011 Canonical Ltd
0.64.1 by Ian Clatworthy
1st cut: gfi parser + --info processing method
2
#
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.
7
#
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.
12
#
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
0.64.81 by Ian Clatworthy
'bzr help fastimport' now provides useful help
17
r"""FastImport Plugin
18
=================
19
0.93.12 by Ian Clatworthy
NEWS item and doco tweaks
20
The fastimport plugin provides stream-based importing and exporting of
21
data into and out of Bazaar. As well as enabling interchange between
0.64.81 by Ian Clatworthy
'bzr help fastimport' now provides useful help
22
multiple VCS tools, fastimport/export can be useful for complex branch
0.77.1 by Ian Clatworthy
initial cut at fast-import-filter
23
operations, e.g. partitioning off part of a code base in order to Open
0.64.81 by Ian Clatworthy
'bzr help fastimport' now provides useful help
24
Source it.
25
26
The normal import recipe is::
27
0.93.12 by Ian Clatworthy
NEWS item and doco tweaks
28
  bzr fast-export-from-xxx SOURCE project.fi
0.95.2 by Ian Clatworthy
update help
29
  bzr fast-import project.fi project.bzr
0.93.12 by Ian Clatworthy
NEWS item and doco tweaks
30
31
If fast-export-from-xxx doesn't exist yet for the tool you're importing
32
from, the alternative recipe is::
33
34
  front-end > project.fi
0.64.211 by Ian Clatworthy
implicitly uncompress if a fast-import source ends in .gz
35
  bzr fast-import project.fi project.bzr
36
37
In either case, if you wish to save disk space, project.fi can be
38
compressed to gzip format after it is generated like this::
39
40
  (generate project.fi)
41
  gzip project.fi
42
  bzr fast-import project.fi.gz project.bzr
0.93.12 by Ian Clatworthy
NEWS item and doco tweaks
43
44
The list of known front-ends and their status is documented on
45
http://bazaar-vcs.org/BzrFastImport/FrontEnds. The fast-export-from-xxx
46
commands provide simplified access to these so that the majority of users
47
can generate a fast-import dump file without needing to study up on all
48
the options - and the best combination of them to use - for the front-end
49
relevant to them. In some cases, a fast-export-from-xxx wrapper will require
50
that certain dependencies are installed so it checks for these before
51
starting. A wrapper may also provide a limited set of options. See the
52
online help for the individual commands for details::
53
0.64.205 by Ian Clatworthy
added fast-export-to-cvs
54
  bzr help fast-export-from-cvs
0.93.12 by Ian Clatworthy
NEWS item and doco tweaks
55
  bzr help fast-export-from-darcs
56
  bzr help fast-export-from-hg
57
  bzr help fast-export-from-git
0.64.270 by Ian Clatworthy
Fix Monotone prefix and command name: mnt -> mtn
58
  bzr help fast-export-from-mtn
0.94.1 by Matt McClure
Adds a fast-export-from-p4 command.
59
  bzr help fast-export-from-p4
0.93.12 by Ian Clatworthy
NEWS item and doco tweaks
60
  bzr help fast-export-from-svn
61
62
Once a fast-import dump file is created, it can be imported into a
63
Bazaar repository using the fast-import command. If required, you can
64
manipulate the stream first using the fast-import-filter command.
65
This is useful for creating a repository with just part of a project
66
or for removing large old binaries (say) from history that are no longer
67
valuable to retain. For further details on importing, manipulating and
68
reporting on fast-import streams, see the online help for the commands::
0.64.81 by Ian Clatworthy
'bzr help fastimport' now provides useful help
69
70
  bzr help fast-import
0.77.1 by Ian Clatworthy
initial cut at fast-import-filter
71
  bzr help fast-import-filter
0.64.81 by Ian Clatworthy
'bzr help fastimport' now provides useful help
72
  bzr help fast-import-info
0.64.111 by Ian Clatworthy
rename fast-import-filter to fast-import-query
73
  bzr help fast-import-query
0.64.81 by Ian Clatworthy
'bzr help fastimport' now provides useful help
74
0.93.12 by Ian Clatworthy
NEWS item and doco tweaks
75
Finally, you may wish to generate a fast-import dump file from a Bazaar
76
repository. The fast-export command is provided for that purpose.
77
0.64.81 by Ian Clatworthy
'bzr help fastimport' now provides useful help
78
To report bugs or publish enhancements, visit the bzr-fastimport project
79
page on Launchpad, https://launchpad.net/bzr-fastimport.
80
"""
0.64.1 by Ian Clatworthy
1st cut: gfi parser + --info processing method
81
0.64.306 by Jelmer Vernooij
Add info file with single version tuple.
82
from info import (
83
    bzr_plugin_version as version_info,
84
    )
0.64.126 by Ian Clatworthy
ensure version appears in bzr plugins output (Alexander Belchenko)
85
0.64.286 by Jelmer Vernooij
Move command implementations into a separate cmds module.
86
from bzrlib.commands import plugin_cmds
0.64.1 by Ian Clatworthy
1st cut: gfi parser + --info processing method
87
88
0.123.13 by Jelmer Vernooij
Check for availability of fastimport before running tests.
89
def load_fastimport():
90
    """Load the fastimport module or raise an appropriate exception."""
91
    try:
92
        import fastimport
93
    except ImportError, e:
94
        from bzrlib.errors import DependencyNotPresent
0.64.300 by Jelmer Vernooij
Clarify installation requirements for python-fastimport.
95
        raise DependencyNotPresent("fastimport",
0.130.1 by Martin Ueding
fixed typo in 'fasimport'
96
            "bzr-fastimport requires the fastimport python module")
0.123.13 by Jelmer Vernooij
Check for availability of fastimport before running tests.
97
98
0.64.1 by Ian Clatworthy
1st cut: gfi parser + --info processing method
99
def test_suite():
100
    import tests
101
    return tests.test_suite()
102
103
0.64.286 by Jelmer Vernooij
Move command implementations into a separate cmds module.
104
for name in [
105
        "fast_import",
106
        "fast_import_filter",
107
        "fast_import_info",
108
        "fast_import_query",
109
        "fast_export",
110
        "fast_export_from_cvs",
111
        "fast_export_from_darcs",
112
        "fast_export_from_hg",
113
        "fast_export_from_git",
114
        "fast_export_from_mtn",
115
        "fast_export_from_p4",
116
        "fast_export_from_svn"
117
        ]:
118
    plugin_cmds.register_lazy("cmd_%s" % name, [], "bzrlib.plugins.fastimport.cmds")