Quickly
Revision 3 as of 2009-07-03 14:12:49
Clear message
* Here are the commands available (I included the commands you created too):
Out of the project tree command:
- quickly start (NEW one! show some notes about How-to start)
- quickly new <template> <project> (ok, I think you know that one ;))
- quickly quickly <template_origin> <template_dest> (copy target
template in ~/.quickly-data/templates/template_dest)
-> then you can quickly new <template_dest> <project> (it looks at
~/.quickly-data/templates/* for template searching, having a higher
priority than generic templates)
ubuntu-project commands:
- quickly dialog
- quickly edit
- quickly glade
- quickly help
- quickly save
it can also be: quickly save the commit message you wish
(no launchpad interaction in this one)
- quickly release
$ quickly release: use a default commit commentary "quickly
released" and doesn't tag the branch (it will later, retrieve it from
setup.py if it exists)
$ quickly release "release-name": tags the branch with release-name
and add a default commit message
$ quickly release "release-name" whatever you want to write: tags
the branch with release-name and use "whatever you want to write" as
the commit commentary
The first time this command is processed, launchpad credential is
created (bzr is also setup for bzr whoami and bzr launchpad-login,
just keeping existing data if already present) and a target launchpad
project can be chosen. If we stop at whatever stage of the process, we
can retrieve afterwards (for instance, not setupping project can be
done when respawning the command).
This command then, commit and tag the release in bzr (it first
prevent to tag 2 releases with the same name). Finally it pushes and
pulls the branches from/to bzr in
~user_name/project_name/quickly_trunk and open the browser to this
branch page to see changes.
- quickly change-lp-project
Enables to change the launchpad project binding previously setted
up. If not setup, create one (asking for credential, if needed)
* Some miscellaneous features:
- Commands can be launched wherever you want in the current project
tree (subfolders, etc.). The template command creator does not have to
bother with it and can infer that his command is executed from the
root project tree (that is to say that the cleverness is on "quickly"
command itself).
- Hooking method for launching before/after a command: currently, new
use a pre-hook (pre_new in builtins/commands.py) common to all
project. There is no post-hook at the moment but it is supported.
- builtins commands (like quickly start, quickly quickly), available
to every templates
- staging server can be reached in two ways:
export QUICKLY=staging
$ quickly <wathever command using launchpad>
$ quickly<wathever command using launchpad>
(A warning is processed to inform you that you are targetting
staging servers).
if then, you want to reach production launchpad environment:
QUICKLY=
$ quickly<wathever command using launchpad>
or just for one command:
$ quickly --staging <wathever command using launchpad> (--staging
can be put everywhere in the command)
Switching from staging to launchpad production server and the other
way in "quickly release and change-lp-project" is supported.
- Same system for verbose mode (watching warning from glade, for instance):
export QUICKLY=verbose
$ quickly glade
or
$ quickly --verbose glade (--verbose can also be put everywhere in
the command)
- if we want to mix staging AND verbose mode:
export QUICKLY="staging verbose" (no order)
- it is possible to run from within a project another template command
by using -t/--template option
Let's imagine we have a <crazy> command in <template_foo> and we are
in a <ubuntu-project> project.
$ quickly crazy will fail (no crazy command in ubuntu-project
template, nor in builtins command)
$ quickly -t template_foo crazy will works! (as $ quickly crazy -t
template_foo btw)
- we have some generic tools now for binding to launchpad project and
creating/using credential so that template developper's don't become
crazy if they want to use launchpad in their template.
Basically, to setup launchpad credential and bind to a project (or use
it afterwards), the code is:
HERE: import the right thing
# default to looking up lpi integration related to the current dir
pathname = os.path.dirname(sys.argv[0])
builtins_directory = pathname + '/../../builtins/'
if os.path.exists('/usr/share/quickly/builtins'):
builtins_directory = '/usr/share/quickly/builtins'
builtins_directory = os.path.abspath(builtins_directory)
sys.path.append(builtins_directory)
# connect to LP (this create credential if needed, either, retrieve it)
import launchpadaccess
launchpad = launchpadaccess.initialize_lpi()
# get the project (choose and bind to one if not already done)
project = launchpadaccess.get_project(launchpad)
and then, you can play with your launchpad and project objects in your template!
staging stuff is also supported without any extra work ;)
Of course, there are still some work to do (more error handling
bulletproof, explain if ssh-key not added to launchpad or creating one
and try to put into launchpad, and so on.). But I think we are quite
in a good shape for a soon 0.1 release ;)