How to use shelf1?
Óscar Fuentes
ofv at wanadoo.es
Thu Dec 3 20:00:17 GMT 2009
John Arbash Meinel <john at arbash-meinel.com> writes:
>> The problems found so far with `shelve' are:
>>
>> 1. It doesn't support viewing the shelved patches. shelve1/shelf1
>> supports that, but with the limitations you mention.
>>
>> 2. It doesn't support specifying the diff hunks to shelve on a
>> non-interactive way. Right now this limits the ability of the Emacs
>> interface to doing `bzr shelve --all', which reduces its convenience
>> quite a bit.
>>
>
> So as an emacs developer, I would assume you tend to edit *in* emacs.
>
> How would you specify the diff hunks in a non-interactive way?
Emacs would show the output of `bzr diff'. Emacs knows how to work with
a diff hunk at a time or with a list of hunks. The user would mark the
hunks he wants to shelve. Then, Emacs builds a file with a format like
this:
filename @@ -94,6 +94,12 @@
otherfile @@ -100,6 +115,12 @@
and is passed to bzr shelve:
bzr shelve -F file-with-hunk-headers
which proceeds to shelve those hunks. If some listed hunk is unknown to
bazaar, it bails out.
> I'll also note that Vincent uses Emacs as his primary editor, and he
> says that emacs diff-mode is his preferred method of handling this sort
> of thing. I don't know if that means he wishes diff-mode could call out
> to shelve, or if he just likes how it handles going between
> "unified-diff" and full-text editing. I'm CCing him, so he can give his
> experience w/ shelve and emacs.
Great.
Another feature that people is asking for is an option for `bzr
unshelve' that does not remove the shelve afterwards. The git people
have `git stash apply' for that. It is very handy sometimes and I guess
that is trivial to implement. Shall I create a feature request for it on
launchpad?
--
Óscar
More information about the bazaar
mailing list