[PATCH] add type selection to merge
Martin Pool
mbp at sourcefrog.net
Fri Jul 29 19:52:00 BST 2005
On 29 Jul 2005, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:
> Building on my previous patches, this patch adds the ability to select
> the type of merge on the commandline.
Could you please put up a branch with all of these so I can see them
together?
> There's a bit of a conflict here, in that ideally the usage message
> would include the supported merge types. But since the usage message is
> the doctext, it would be hard to instantiate the class without importing
> merge. I guess we could do something like:
>
> class cmd_merge:
> def _get_doctext(self)
>
> __doc__ = property(_get_doctext)
>
> That looks pretty gross to me.
I don't know if even that will work, because there's no self instance
at that point.
What was we should probably do is make the Command.__init__ function
not run the command, but just construct the object. That should clean
up ExternalCommand too. Then the command can have a help() method
which by default returns the docstring but can do something more
complex for commands that depend on dynamically loaded features.
> Also, what happend to bzr $COMMAND --help? It seems the only way to get
> a usage message right now is bzr help $COMMAND.
I think that (and --version) was broken by the master_options stuff.
I have (imo) cleaned that up so that only --no-plugins, --profile and
--builtin are handled specially. These ones must occur before the
command and before any other options, because the affect how the rest
of the line will be affected. That allows us to have plugins that use
nonstandard options without them needing to modify global tables.
--
Martin
More information about the bazaar
mailing list