Uncommitted changes and merge

Giorgos Keramidas keramida at ceid.upatras.gr
Thu Sep 6 06:53:25 CDT 2007


On 2007-09-06 13:16, Peter Arrenbrecht <peter.arrenbrecht at gmail.com> wrote:
>> Yes.
>
> That was a bit short. Care to elaborate? I have the same woes
> as Lars, and so far mq has not solved my problems. In
> particular, it seems to not handle binary files.

Binary files can be handled ok by MQ if you set it up to use
--git style patches.  For example, here's a snippet from the
~/.hgrc file on my laptop:

    [defaults]
    qnew =  --git
    qrefresh = --git
    email = --git

> And I think it is difficult to untangle a bunch of changes into
> disparate patches after the fact. So when you get carried away
> changing unrelated stuff, mq does not help, I think.

It's not very difficult, but it could be easier.

If you have a local patch which touches:

    foo/bar
    foo/baz
    blah/whatever

You can split the patch in two parts with:

    hg qpush patchname
    hg qref -I foo/baz
    hg qnew -fm 'second patch part' patch2

The "-I" option of "hg qrefresh" refreshes the patch to include
*only* the files you specified with the filename pattern
following it, and you can use as many of them as needed.

    hg qref -I foo/baz blah
    hg qnew -fm 'second patch part'

It may not be as easy to split patches ``per-hunk'', however :(

> "hg record" looks more like a viable solution to me, but alas
> it is only slated for release in 0.9.5.

Indeed :-)



More information about the Mercurial mailing list