[Extension] Dirty hack of 'shelve' and 'unshelve' command

Sean Russell ser-bazaar at ser1.net
Fri May 20 04:42:09 BST 2005


On Thursday 19 May 2005 16:03, Erik Bågfors wrote:
> things to check in. Then a collegue comes in and says "can you change
> this default value to 10 instead of 15".  That's a one line change.
...
> VERY good way to review what you did, What I noticed was that I often
> did more than one thing. So I should really do more than one checkin.
> Darcs makes that easy for me.
>
> I'm not saying that this is a must, but I found it very useful in darcs.

Ok, then *I'm* saying it is a must.

Think of it this way: some SCMs only allow you to check in an entire tree -- 
you can't even choose which files to include or exclude.  Many SCMs allow you 
to commit an entire tree, or just a set of files (CVS, SVN).  Darcs allows 
you to choose which hunks.  What we're talking about is granularity.

And I'll give you (folks) another use case, which you (Erik) alluded to in 
your example.  When I'm, for example, implementing some new feature, I often 
come across little bugs or improvements while I'm working.  Say I notice that 
my API documentation for a method is wrong.  Anyway, if I don't fix it right 
then, I'll forget about it... so I fix it.  But I want to back-port this 
change to another branch, and I want to be able to commit this change and 
maybe tag it and even make an intermediate release.  This sort of change is 
almost always in a file that I'm working on for the feature (that isn't done 
yet).  Without hunk-level commits, cross porting these sorts of fixes is a 
pain in the ass.

What I end up doing with SVN is doing a diff and *manually* editing the patch, 
deleting the parts that I don't want to cross-port.  This really, really 
sucks, and if you want to talk about opportunities for screwing up code, this 
is a perfect example.  With partial commits (AKA hunk-level commits, as in 
Darcs), I can interactively choose hunks; it is convenient and reliable.  In 
the worst case, where the hunks are inextricably interlinked, I'm no worse 
off than if I only have file-level commits; but most of the time, partial 
commits are a killer feature.

-- 
### SER   
### Deutsch|Esperanto|Francaise|Linux|XML|Ruby|Haskell|Java|Aikido
### http://www.ser1.net       jabber.com:ser  ICQ:83578737 
### GPG: http://www.ser1.net/Security/ser_public.gpg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050519/4f9cdede/attachment.pgp 


More information about the bazaar mailing list