Shelve extension
Martin Geisler
mg at daimi.au.dk
Mon Feb 23 19:24:04 UTC 2009
Peter Hosey <boredzo at gmail.com> writes:
> On Feb 23, 2009, at 10:41:22, Martin Geisler wrote:
>>> 1. Add some changes to the index.
>>> 2. Go for lunch.
>>> 3. Review the index and working copy.
>>> 4. Find that you missed a change that should be in the index.
>>> 5. Add that.
>>> 6. Refill your coffee/tea/soda/water container.
>>> 7. Commit the index.
>>> 8. Review the working copy.
>>> 9. Add the rest of the changes.
>>> 10. Commit #2.
>>>
>>> I'm certainly not a frequent Git user, but I do think the index is
>>> its
>>> most important contribution to the field of version control.
>>
>> When the changes are in separate files, is this any different from:
>>
>> 1. hg commit -m 'Fixed bug.' foo.c foo.h
>> 2. Go for lunch.
>> 3. Review the last commit and working copy.
>> 4. Find that you missed a change that should be in the last commit.
>> 5. hg revert; hg commit -m 'Fixed bug.' foo.c foo.h bar.c
>> 6. Refill your coffee/tea/soda/water container.
>> 7. -- no need to commit here
>> 8. Review the working copy.
>> 9. Add the rest of the changes.
>> 10. Commit #2.
>
> For one thing, I think you meant rollback. :)
Of course, thanks!
> Other than that, not much. You probably won't have step 9 either.
Okay. It's very seldom that I need to select individual hunks for a
changeset, so it seems that the Git index wont bring anything for me.
> But the key phrase in your example is “when the changes are in
> separate files”. Interactive commit (or add) is for the case when they
> aren't in separate files.
That case is indeed more convoluted with Mercurial. Maybe qrecord should
be used instead of a normal commit, like Bill Barry suggested?
--
Martin Geisler
VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20090223/c625c614/attachment-0001.asc>
More information about the Mercurial
mailing list