[MERGE] [0.19] preserve old `bundle` UI, add format selection

Alexander Belchenko bialix at ukr.net
Thu Aug 9 09:25:52 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Aaron Bentley пишет:
> Martin Pool wrote:
>> I don't care much about the old implementation; if it was ugly then
>> I'm happy to get rid of it too.  However, I don't think we should just
>> suddenly change the meaning of the command.  People are accustomed to
>> writing 'bzr bundle ../OTHER > FILE" and that should still work.
>> Ideally that can be just syntactic gloss on the current
>> implementation.
> 
> Here is a patch that allows "bundle" to emit the merge directive to
> stdout.
> 
> It also provides a --format option for 'send' and 'bundle', with two
> values: 0.9 and 4.  0.9 will select merge directive format 1, with
> bundle format 0.9 as its bundle.  4 will select merge directive format
> 2, with bundle format 4 as its bundle.  4 is the default.
> 
> I cleaned up a reference to the old "submit" command in "merge-directive".
> 
> I also fixed the per-option help for RegistryOption.from_kwargs.

BB: approve

Aaron,
thank you very much for your efforts. You save my day.

I only want to propose small tweak:

=== modified file bzrlib/builtins.py
- --- bzrlib/builtins.py
+++ bzrlib/builtins.py
@@ -3823,21 +3827,29 @@
         Option('output', short_name='o', help='Write directive to this file.',
                type=unicode),
         'revision',
+        RegistryOption.from_kwargs('format', 'Output format',
+        **{'4': 'Bundle format 4, Merge Directive 2 (default)',
+           '0.9': 'Bundle format 0.9, Merge Directive 1',})
         ]


^-- may be it worth to indent **kwargs here? Like this:

        RegistryOption.from_kwargs('format', 'Output format',
            **{'4': 'Bundle format 4, Merge Directive 2 (default)',
               '0.9': 'Bundle format 0.9, Merge Directive 1',})


[µ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGus+QzYr338mxwCURAtpaAKCNpC4ymW02g+MfgtSjVPMVDZNU1ACdFk2W
X/ZlBPRY0k2TbNN3qOGaTck=
=xcKs
-----END PGP SIGNATURE-----



More information about the bazaar mailing list