~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/cmd_version_info.py

(jameinel) Allow 'bzr serve' to interpret SIGHUP as a graceful shutdown.
 (bug #795025) (John A Meinel)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006 Canonical Ltd
 
1
# Copyright (C) 2005-2011 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
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
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
"""Commands for generating snapshot information about a bzr tree."""
18
18
 
19
19
from bzrlib.lazy_import import lazy_import
 
20
 
20
21
lazy_import(globals(), """
21
22
from bzrlib import (
22
23
    branch,
23
24
    errors,
 
25
    version_info_formats,
24
26
    workingtree,
25
 
    version_info_formats,
26
27
    )
 
28
from bzrlib.i18n import gettext
27
29
""")
 
30
 
28
31
from bzrlib.commands import Command
29
32
from bzrlib.option import Option, RegistryOption
30
33
 
39
42
        return version_info_formats.get_builder(format)
40
43
    except KeyError:
41
44
        formats = version_info_formats.get_builder_formats()
42
 
        raise errors.BzrCommandError('No known version info format %s.'
43
 
                                     ' Supported types are: %s'
44
 
                                     % (format, formats))
 
45
        raise errors.BzrCommandError(gettext('No known version info format {0}.'
 
46
                                     ' Supported types are: {1}').format(
 
47
                                     format, formats))
45
48
 
46
49
 
47
50
class cmd_version_info(Command):
48
 
    """Show version information about this tree.
 
51
    __doc__ = """Show version information about this tree.
49
52
 
50
53
    You can use this command to add information about version into
51
54
    source code of an application. The output can be in one of the