/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

Viewing changes to breezy/cmd_version_info.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
"""Commands for generating snapshot information about a bzr tree."""
 
17
"""Commands for generating snapshot information about a brz tree."""
18
18
 
19
19
from __future__ import absolute_import
20
20
 
21
 
from bzrlib.lazy_import import lazy_import
 
21
from .lazy_import import lazy_import
22
22
 
23
23
lazy_import(globals(), """
24
 
from bzrlib import (
 
24
from breezy import (
25
25
    branch,
26
26
    errors,
27
27
    version_info_formats,
28
28
    workingtree,
29
29
    )
30
 
from bzrlib.i18n import gettext
 
30
from breezy.i18n import gettext
31
31
""")
32
32
 
33
 
from bzrlib.commands import Command
34
 
from bzrlib.option import Option, RegistryOption
 
33
from .commands import Command
 
34
from .option import Option, RegistryOption
35
35
 
36
36
 
37
37
def _parse_version_info_format(format):
58
58
 
59
59
    For example::
60
60
 
61
 
      bzr version-info --custom \\
 
61
      brz version-info --custom \\
62
62
        --template="#define VERSION_INFO \\"Project 1.2.3 (r{revno})\\"\\n"
63
63
 
64
64
    will produce a C header file with formatted string containing the
76
76
    takes_options = [RegistryOption('format',
77
77
                            'Select the output format.',
78
78
                            value_switches=True,
79
 
                            lazy_registry=('bzrlib.version_info_formats',
 
79
                            lazy_registry=('breezy.version_info_formats',
80
80
                                           'format_registry')),
81
81
                     Option('all', help='Include all possible information.'),
82
82
                     Option('check-clean', help='Check if tree is clean.'),
98
98
 
99
99
        if revision and len(revision) > 1:
100
100
            raise errors.BzrCommandError(
101
 
                gettext('bzr version-info --revision takes exactly'
 
101
                gettext('brz version-info --revision takes exactly'
102
102
                        ' one revision specifier'))
103
103
 
104
104
        if location is None: