Merge lp:~zyga/lava-core/commands-pkg into lp:lava-core
Status: | Merged |
---|---|
Merged at revision: | 11 |
Proposed branch: | lp:~zyga/lava-core/commands-pkg |
Merge into: | lp:lava-core |
Prerequisite: | lp:~zyga/lava-core/utils-interface |
Diff against target: | 0 lines |
To merge this branch: | bzr merge lp:~zyga/lava-core/commands-pkg |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Linaro Validation Team | Pending | ||
Review via email: mp+104974@code.launchpad.net |
Description of the change
This branch adds the essence of lp:lava-tool - fundamental constructs for hierarchical command line interface. Again, the code is copied from the lava-tool branch that is also merged (via bzr join) to the top-level directory of lava-core. It will be removed once we don't need standalone lava-tool project for anything (particularly lava-test).
There are some subtle changes from lava-tool's version of Command that are worth noting, there is a new method, get_description() that supplements get_help() and get_epilog(). This makes the output of --help easier to control as the developer can easily inject text in three places - right before arguments / option section, right after everything else and in any place that lists the description of a particular command in one line (such as --help of the command group it is a part of).
There are small bug fixes but they are not worth backporting to lp:lava-tool, before it goes away, as they only improve usability (again, mainly output of --help) and don't cause any issues today.
I have kept the "main.py" away from this proposal as it has most of the new code and should be reviewed explicitly. Sadly bzr has no `bzr cp` so there is no useful diff. I suggest that you just diff from lava-tool/ directory.
On Mon, 07 May 2012 20:20:25 -0000, Zygmunt Krynicki <email address hidden> wrote: /code.launchpad .net/~zkrynicki /lava-core/ commands- pkg/+merge/ 104974
> Zygmunt Krynicki has proposed merging lp:~zkrynicki/lava-core/commands-pkg into lp:lava-core with lp:~zkrynicki/lava-core/utils-interface as a prerequisite.
>
> Requested reviews:
> Linaro Validation Team (linaro-validation)
>
> For more details, see:
> https:/
>
> This branch adds the essence of lp:lava-tool - fundamental constructs
> for hierarchical command line interface. Again, the code is copied
> from the lava-tool branch that is also merged (via bzr join) to the
> top-level directory of lava-core. It will be removed once we don't
> need standalone lava-tool project for anything (particularly
> lava-test).
>
> There are some subtle changes from lava-tool's version of Command that
> are worth noting, there is a new method, get_description() that
> supplements get_help() and get_epilog(). This makes the output of
> --help easier to control as the developer can easily inject text in
> three places - right before arguments / option section, right after
> everything else and in any place that lists the description of a
> particular command in one line (such as --help of the command group it
> is a part of).
>
> There are small bug fixes but they are not worth backporting to
> lp:lava-tool, before it goes away, as they only improve usability
> (again, mainly output of --help) and don't cause any issues today.
>
> I have kept the "main.py" away from this proposal as it has most of
> the new code and should be reviewed explicitly. Sadly bzr has no `bzr
> cp` so there is no useful diff. I suggest that you just diff from
> lava-tool/ directory.
It seems there has been way too much code motion for this suggestion to commands/ __init_ _.py seems to lava/tool/ command. py, lava/tool/ dispatcher. py and maybe some other stuff? I've
be helpful, unforunately. lava/core/
contain an edited combination of lava-tool/
lava-tool/
basically given up on trying to review this as a diff from existing
code.
> -- /code.launchpad .net/~zkrynicki /lava-core/ commands- pkg/+merge/ 104974 commands' commands/ __init_ _.py' commands/ __init_ _.py 1970-01-01 00:00:00 +0000 commands/ __init_ _.py 2012-05-07 20:19:21 +0000 www.gnu. o...
> https:/
> You are subscribed to branch lp:lava-core.
> === added directory 'lava/core/
> === added file 'lava/core/
> --- lava/core/
> +++ lava/core/
> @@ -0,0 +1,484 @@
> +# Copyright (C) 2011-2012 Linaro Limited
> +#
> +# Author: Zygmunt Krynicki <email address hidden>
> +#
> +# This file is part of lava-core
> +#
> +# lava-core is free software: you can redistribute it and/or modify
> +# it under the terms of the GNU Lesser General Public License version 3
> +# as published by the Free Software Foundation
> +#
> +# lava-core is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU Lesser General Public License
> +# along with lava-core. If not, see <http://