[Extension] Dirty hack of 'shelve' and 'unshelve' command
Harri Salokorpi
hsalokor at ee.oulu.fi
Thu May 19 21:23:24 BST 2005
On Thursday 19 May 2005 17:12, Erik Bågfors wrote:
> I think this is very useful. But I'd love to also see a "bzr commit
> --interactive" or something like that, that would let the user select
> the hunks he likes to commit.
I understand shelving as putting parts of your local changes into a mystical
place X (i.e. those changes are moved out from working copy temporarily). You
could describe it as partial revert where reverted changes are stored and can
be merged back to working copy.
On the other hand, partial commit is selecting the parts that you want to
commit.
So, IMHO the difference between these two is:
* Partial commit:
- commits selected changes and leaves rest to working copy
- is distributed operation since committed changes are propagated to all who
merge from your branch
* Shelving:
- moves selected changes to a safe place and unmerges them from local copy so
you can do something else. You could, for example. commit a bugfix and then
unshelve your new features back into working copy
- is local operation, your shelved changes are not propagated when someone
merges from you branch
Both can be crudely implemented with some help from external diff tools.
Shelving would probably need the magical place X to store shelved changes.
I think some kind of shelving/partial commit support would be very useful.
There are times when you are making large changes and a minor fix needs to be
done and released. You could do this with separate branch, but sometimes it
is an overkill (large sourcetrees).
-Harri
More information about the bazaar
mailing list