/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
0.64.334 by Jelmer Vernooij
Remove old FSF address. Thanks Dan Callaghan.
14
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
0.64.1 by Ian Clatworthy
1st cut: gfi parser + --info processing method
15
0.64.81 by Ian Clatworthy
'bzr help fastimport' now provides useful help
16
r"""FastImport Plugin
17
=================
18
0.93.12 by Ian Clatworthy
NEWS item and doco tweaks
19
The fastimport plugin provides stream-based importing and exporting of
20
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
21
multiple VCS tools, fastimport/export can be useful for complex branch
0.77.1 by Ian Clatworthy
initial cut at fast-import-filter
22
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
23
Source it.
24
25
The normal import recipe is::
26
0.93.12 by Ian Clatworthy
NEWS item and doco tweaks
27
  front-end > project.fi
0.64.211 by Ian Clatworthy
implicitly uncompress if a fast-import source ends in .gz
28
  bzr fast-import project.fi project.bzr
29
30
In either case, if you wish to save disk space, project.fi can be
31
compressed to gzip format after it is generated like this::
32
33
  (generate project.fi)
34
  gzip project.fi
35
  bzr fast-import project.fi.gz project.bzr
0.93.12 by Ian Clatworthy
NEWS item and doco tweaks
36
37
The list of known front-ends and their status is documented on
0.136.2 by Jelmer Vernooij
remove more references to fast-export-from-*.
38
http://bazaar-vcs.org/BzrFastImport/FrontEnds.
0.93.12 by Ian Clatworthy
NEWS item and doco tweaks
39
40
Once a fast-import dump file is created, it can be imported into a
41
Bazaar repository using the fast-import command. If required, you can
42
manipulate the stream first using the fast-import-filter command.
43
This is useful for creating a repository with just part of a project
44
or for removing large old binaries (say) from history that are no longer
45
valuable to retain. For further details on importing, manipulating and
46
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
47
48
  bzr help fast-import
0.77.1 by Ian Clatworthy
initial cut at fast-import-filter
49
  bzr help fast-import-filter
0.64.81 by Ian Clatworthy
'bzr help fastimport' now provides useful help
50
  bzr help fast-import-info
0.64.111 by Ian Clatworthy
rename fast-import-filter to fast-import-query
51
  bzr help fast-import-query
0.64.81 by Ian Clatworthy
'bzr help fastimport' now provides useful help
52
0.93.12 by Ian Clatworthy
NEWS item and doco tweaks
53
Finally, you may wish to generate a fast-import dump file from a Bazaar
54
repository. The fast-export command is provided for that purpose.
55
0.64.81 by Ian Clatworthy
'bzr help fastimport' now provides useful help
56
To report bugs or publish enhancements, visit the bzr-fastimport project
57
page on Launchpad, https://launchpad.net/bzr-fastimport.
58
"""
0.64.1 by Ian Clatworthy
1st cut: gfi parser + --info processing method
59
0.64.343 by Jelmer Vernooij
Use absolute_import.
60
from __future__ import absolute_import
61
62
from bzrlib.plugins.fastimport.info import (
0.64.306 by Jelmer Vernooij
Add info file with single version tuple.
63
    bzr_plugin_version as version_info,
64
    )
0.64.126 by Ian Clatworthy
ensure version appears in bzr plugins output (Alexander Belchenko)
65
0.64.286 by Jelmer Vernooij
Move command implementations into a separate cmds module.
66
from bzrlib.commands import plugin_cmds
0.64.1 by Ian Clatworthy
1st cut: gfi parser + --info processing method
67
68
0.123.13 by Jelmer Vernooij
Check for availability of fastimport before running tests.
69
def load_fastimport():
70
    """Load the fastimport module or raise an appropriate exception."""
71
    try:
72
        import fastimport
73
    except ImportError, e:
74
        from bzrlib.errors import DependencyNotPresent
0.64.300 by Jelmer Vernooij
Clarify installation requirements for python-fastimport.
75
        raise DependencyNotPresent("fastimport",
0.130.1 by Martin Ueding
fixed typo in 'fasimport'
76
            "bzr-fastimport requires the fastimport python module")
0.123.13 by Jelmer Vernooij
Check for availability of fastimport before running tests.
77
78
0.64.1 by Ian Clatworthy
1st cut: gfi parser + --info processing method
79
def test_suite():
0.64.344 by Jelmer Vernooij
Fix import.
80
    from bzrlib.plugins.fastimport import tests
0.64.1 by Ian Clatworthy
1st cut: gfi parser + --info processing method
81
    return tests.test_suite()
82
83
0.64.286 by Jelmer Vernooij
Move command implementations into a separate cmds module.
84
for name in [
85
        "fast_import",
86
        "fast_import_filter",
87
        "fast_import_info",
88
        "fast_import_query",
89
        "fast_export",
90
        ]:
91
    plugin_cmds.register_lazy("cmd_%s" % name, [], "bzrlib.plugins.fastimport.cmds")