A new commit tool
Steve Borho
steve at ageia.com
Thu Dec 14 20:01:25 UTC 2006
On Wednesday 13 December 2006 7:44 am, Steve Borho wrote:
> I'd like to announce the start of a new commit tool. It's not yet
> functional, but I would like feedback on the interface before I go
> too far down any dead ends.
>
> http://hg.borho.org/qct/
I think the current state of the tool deserves an 0.1 tag. It can now
basically work as advertised. Here's a recent screen-shot:
http://www.borho.org/~steve/qct-snapshot3.png
There's no extension for it yet, so you just run qct in standalone mode
from anywhere inside a mercurial repository. It only looks for files
recursively from the current directory (it uses `hg status .`). The
extension will likely have the default behavior to go to the repo root
before starting the GUI in order to keep `hg qct` consistent with `hg
commit`.
On startup, the keyboard focus is in the commit message window and all
commitable files are listed and initially selected in the file list
window. Hitting tab switches you to the file list where you can
de-select those files you don't wish to commit. The next tab brings
you to the Ok button. The ignore toggle and refresh button work as
expected.
If you try to commit a missing (!) file, qct will `hg rm` it before
commiting it. If you try to commit an unknown (?) or ignored (I) file,
qct will `hg add` it first.
This workflow was designed to mimic the normal flow of `hg commit` and
optimize the most typical use cases (commit all or most of the modified
files). However, I welcome feedback.
Questions:
1) I can't figure out how to add shortcuts for the 'Ok' and 'Cancel'
buttons. None of the PyQt examples seem to work. Anyone have any
ideas? Even when the Ok button has focus, you have to hit [Space] to
trigger it, [Enter] doesn't work.
2) I intend to add buttons in the file list box for 'Revert Selected'
and 'Ignore Selected'. Any other requests?
3) Any ideas on how to get the diffs syntax highlighted?
4) I was unable to figure out a way to directly call into the mercurial
library to get the data I needed. Should this be possible?
5) When I add an extension for this tool, it will have to fork a qct
process at least initially.. so we'll have an hg process forking a qct
process which then forks more hg processes to do all of the underlying
work. This is all in python, can we do better?
--
Steve Borho (steve at ageia.com)
http://www.borho.org/~steve/steveAgeia.asc
Key fingerprint = 3D9C 67D5 F426 4322 075B 0795 C9B2 C3A0 97D0 C090
More information about the Mercurial
mailing list