Shelve extension
Peter Hosey
boredzo at gmail.com
Mon Feb 23 19:21:03 UTC 2009
On Feb 23, 2009, at 10:57:49, Bill Barry wrote:
> When you put a change in the index, is it still in your working copy?
Yes. They are separate; the add command copies changes from the WC to
the index.
> if so then how is that different than:
> 1. hg qrecord mypatch
I haven't used mq yet, so I have no idea. :)
There is a lot of overlap between their functionality, but they're for
different purposes. The index is for short-term development of your
next commit (just not as short as “you will commit it *right now*”);
mq, as I understand it, is for longer-term iterative development of a
larger patch.
I will say, though, that the index-based procedure to add the missing
change is much simpler than your mq-based procedure:
> 5.fold the additional fix into mypatch (hg qrecord fix, hg shelve,
> hg qpop, hg qpop, hg qfold mypatch fix, hg qpush, hg unshelve)
Git:
git add -i
It will guide you the rest of the way with its interactive prompts,
and each of your answers is only one character.
> Other than that I have no idea where the stuff that is in the index
> is actually at (here I know it is at .hg/patches/mypatch and I can
> share it)?
How Git implements the index is described in Git's manual:
http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#the-index
However, there's a difference between the idea and the implementation.
Don't throw out the idea of the index just because it's implemented
with an opaque file containing a list of references to Git blobs. It's
possible to implement it in a more open way.
More information about the Mercurial
mailing list