Question about qrefresh

John Peberdy john at peberdy.ca
Tue Aug 2 11:44:22 CDT 2011


On Tue, Jul 5, 2011 at 3:38 AM, Idan Kamara <idankk86 at gmail.com> wrote:
> On Tue, Jul 5, 2011 at 6:28 AM, John Peberdy <john at peberdy.ca> wrote:
> >
> > Hi,
> >
> > Say I do the following
> > - I have a mq patch with changes in files f1 and f2
> > - I make changes in the working dir to both files,
> > - I'd like to add the change only in f1 to the patch leaving f2 dirty (but not removing the original change from the patch).
> >
> > Is there a way this can be done with mq? If not would this use case be something Mercurial would want to support?
> See this thread from a few months ago: http://markmail.org/thread/oygxcdxd7kkjughb
> In short: you can't, but with a few more key strokes and the record extension, `qrefresh -i` will achieve the same end result.

I ended up solving this in MercurialEclipse by having commit-amend do
the following

before:
qimport, qrefresh, qfinish

in upcoming 1.9:
qimport (a), qnew (changes selected for amending) (b), qnew (changes
not selected for amending) (c), qpop to (a), qfold (a) and (b), qpush
(c), strip -k and qdel (c)

This means amend is a bit slower but if there's an error it makes it
easy to recover either automatically or with user intervention because
everything's just a mq patch.


In the future ideally MercurialEclipse will use the command server to
speed this up. My impression of the command server (as shipped in 1.9)
is that its state is only valid for operations don't change history
and so would need to be restarted for example after a qpush. Is this
correct or can the command server be used for this now?

Thanks


More information about the Mercurial-devel mailing list