vcs 0.4.0 documentation
This module provides foundations for creating, executing and registering terminal commands for vcs. Moreover, ExecutionManager makes it possible for user to create own code (at .vcsrc file).
Class for command execution management.
Executes whole process of parsing and running command.
Returns stripped arguments that would be passed into the command.
Returns command class from the registry for a given cmd.
Parameters: | cmd – command to run (key at the registry) |
---|
Returns commands stored in the registry.
Returns in-memory created module pointing at user’s configuration and extra code/commands. By default tries to create module from VCSRC_PATH.
Runs command.
Parameters: |
|
---|
Prints help text about available commands.
Base command class.
Executes whole process of parsing arguments, running command and trying to catch errors.
Returns options specified at self.option_list.
Returns parser for given prog_name and subcommand.
Parameters: |
|
---|
Returns version of vcs.
This method must be implemented at subclass.
Prints parser’s help.
Parameters: |
|
---|
Runs command for given arguments.
Parameters: | argv – arguments |
---|
Returns how to use command text.
Base repository command.
Accepts extra argument:
Parameters: | repo – repository instance. If not given, repository would be calculated based on current directory. |
---|
Runs pre_process, handle_repo and post_process methods, in that order.
Handles given repository. This method must be implemented at subclass.
This method would be run at the end of handle method. Does nothing by default.
This method would be run at the beginning of handle method. Does nothing by default.
Subclass of RepositoryCommand.
Extra options
Accepts extra argument:
Parameters: | repo – repository instance. If not given, repository would be calculated based on current directory. |
---|
Returns generator of changesets from given repo for given options.
Parameters: | repo – repository instance. Same as self.repo. |
---|
Available options
Returns progress bar instance for a given total number of clicks it should do.
Handles single changeset. Must be implemented at subclass.
Single changeset command. Convenient if command has to operate on single changeset rather than whole generator. For usage i.e. with command that handles node(s) from single changeset.
Extra options
Accepts extra argument:
Parameters: | repo – repository instance. If not given, repository would be calculated based on current directory. |
---|
Returns changeset for given options.
Handles single argument for chosen changeset. Must be implemented at subclass.
Parameters: |
|
---|