Code review comment for lp:~jkakar/bzr/custom-project-name

Revision history for this message
Jamu Kakar (jkakar) wrote :

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.

« Back to merge proposal