[merge] add 'make dist' and related things, and documentation to use them
Alexander Belchenko
bialix at ukr.net
Wed Apr 9 05:36:13 BST 2008
Martin Pool пишет:
> * 'make dist' builds a tarball by automating some steps previously
> done manually. This is based on the shell script I've used
> previously.
> * 'version --short' prints just the version, for use by the above, and
> probably useful in other places too.
> * 'make check-dist-tarball' runs checks on the packaged code -- and
> currently fails on Hardy because of
> <https://launchpad.net/bugs/212917>
>
> I'd like to merge this to use it for 1.4
>
>
bb:tweak
=== modified file 'bzrlib/builtins.py'
--- bzrlib/builtins.py 2008-04-04 00:43:07 +0000
+++ bzrlib/builtins.py 2008-04-09 03:01:30 +0000
@@ -2716,11 +2716,17 @@
"""Show version of bzr."""
encoding_type = 'replace'
+ takes_options = [
+ Option("short", help="Print just the version number."),
+ ]
@display_command
- def run(self):
+ def run(self, short=False):
from bzrlib.version import show_version
- show_version(to_file=self.outf)
+ if short:
+ print(bzrlib.version_string)
+ else:
+ show_version(to_file=self.outf)
^-- 'print' still a statement in Python 2.5 and 2.4.
You should use:
self.outf.write(bzrlib.version_string)
or
self.outf.write(bzrlib.version_string + '\n')
if you need LF at the end.
More information about the bazaar
mailing list