Merge lp:~jkakar/bzr/custom-project-name into lp:bzr
Proposed by
Jamu Kakar
Status: | Work in progress | ||||
---|---|---|---|---|---|
Proposed branch: | lp:~jkakar/bzr/custom-project-name | ||||
Merge into: | lp:bzr | ||||
Diff against target: |
98 lines (+42/-3) 3 files modified
bzrlib/__init__.py (+3/-0) bzrlib/commands.py (+5/-3) bzrlib/tests/test_help.py (+34/-0) |
||||
To merge this branch: | bzr merge lp:~jkakar/bzr/custom-project-name | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Pool | Needs Fixing | ||
John A Meinel | Needs Fixing | ||
Review via email: mp+12267@code.launchpad.net |
To post a comment you must log in.
Unmerged revisions
- 4732. By Jamu Kakar
-
- Merged trunk.
- 4731. By Jamu Kakar
-
- Minor formatting improvements.
- 4730. By Jamu Kakar
-
- Added a test and updated one more spot where 'bzr' was hard-coded.
- 4729. By Jamu Kakar
-
- Removed help variable substitution as it wasn't fully baked.
- Replaced ProgramInfo and related functions with a simple
bzrlib.application_ name attribute, defaulting to 'bzr'. - 4728. By Jamu Kakar
-
- Merged trunk.
- 4727. By Jamu Kakar
-
- Revert changes to cmd_alias docstring.
- 4726. By Jamu Kakar
-
- Merged trunk.
- 4725. By Jamu Kakar
-
- Merged trunk.
- 4724. By Jamu Kakar
-
- Cleanup stylist problems pointed out by jam.
- Use bzrlib.version_ string instead of bzrlib.__version__. - 4723. By Jamu Kakar
-
- Command.
get_help_ variables can be overridden to provide
command-level custom help variables.
The attached branch makes it possible to customize the program name
used when help text is generated. It introduces the following
changes to make this possible:
- bzrlib.commands has a new ProgramInfo class with name and version
attributes. They default to 'bzr' and bzrlib.__version__, but a
new one can be created with custom settings. New get_program_info
and set_program_info functions can be used to manage the currently
registered program information.
- Substitution variables are used when generating help text.
program-name and program-version variables are available by
default, retrieved from registered program information.
- An individual Command can implement a get_help_variables method to
customize or provide variables above and beyond what's built-in.
- Help text that couldn't be fixed using substitution has been fixed
manually.
- The help text for cmd_alias has been updated to use the
program-name variable. It's the only builtin command I've updated
because it's the only command I have immediate plans to reuse in
Commandant. cmd_help and cmd_version might be reusable, but all
three of these commands will need some work to reuse cleanly, and
right now I only have plans to do the work required for cmd_alias.