User:Sfink/Mercurial: Difference between revisions
Line 40: | Line 40: | ||
* qshow - dump out a selected patch, by name | * qshow - dump out a selected patch, by name | ||
** ...and it looks like this is redundant. Use 'hg export <patch>' | |||
Planned: | Planned: |
Revision as of 21:25, 16 June 2010
qimportbz
- clone http://hg.mozilla.org/users/robarnold_cmu.edu/qimportbz
- put the result into the [extensions] section of your ~/.hgrc
The only documentation I can find says to use it by running
hg qimportbz <bugnum> [options...]
but the version I just pulled does not define a 'qimportbz' command. What does still work is:
hg qimport bz://<bugnum> [options...]
conflicts
qpush creates .rej files with any conflicts.
- Open a .rej file in emacs and do ctrl-c ctrl-c to go to the corresponding source file
- ctrl-c ctrl-a re-attempts the apply (I guess that's useful if you edit the patch's context or something?)
I would like to know my current state with respect to those rejects, so I implemented a "delete-this-file" command in emacs and bound it to Ctrl-C Ctrl-D. That way I can easily nuke the .rej files when I have sucked their guts out.
(defun delete-this-file () "Delete the current buffer's file and close the buffer" (interactive) (if (y-or-n-p "Delete this file and close the buffer?") (progn (delete-file buffer-file-name) (kill-buffer)))) (global-set-key "\C-c\C-d" 'delete-this-file)
This should really be done with a keymap or something, I think. I don't really know elisp.
extensions
I am missing some of the features from Stacked Git, so I'm implementing some of them.
Implemented:
- qshow - dump out a selected patch, by name
- ...and it looks like this is redundant. Use 'hg export <patch>'
Planned:
- sink/float
- stg's pushing/popping behavior. Somehow it felt better in the way you could easily back out of trouble. I'll need to play with it some again.
Right now, I am doing this as a 'mqext' extension that depends on mq already being loaded. I haven't published it anywhere yet. I don't know where the appropriate place is, if there is such a place. (Upstream may be the best place.) I'll probably put it on github or Mozilla's hg repo.