evolve: take changes to one file out of a changeset
Sean Farley
sean.michael.farley at gmail.com
Thu Jan 24 18:37:22 UTC 2013
On Thu, Jan 24, 2013 at 12:16 PM, Greg Ward <greg at gerg.ca> wrote:
> Hi folks --
>
> I've been playing with the evolve extension recently as an alternative
> to MQ. I'm fairly impressed so far, but here's one problem I can't
> figure out cleanly: if I accidentally commit too many files, I can't
> use "hg amend" to remove one of them from the changeset, restoring its
> changes to the working dir.
>
> Here's how I would do it with MQ:
>
> $ hg status
> M a
> M b
> $ hg qnew -m"modify a" a.patch
> [oops! I didn't mean to commit b as well!]
> $ hg qref -X b
> $ hg status
> M b
>
> Now let's try the same thing with evolve:
>
> $ hg status
> M a
> M b
> $ hg commit -m"modify a"
> [oops! I didn't mean to commit b as well!]
> $ hg amend -X b
> abort: no updates found
> $ hg amend a
> abort: no updates found
> $ hg amend -I a
> abort: no updates found
>
> Darn. I have to do it the hard way:
>
> $ hg diff -c . b > patch
> $ patch -R -p1 < patch
> patching file b
> $ hg amend
> $ patch -p1 < patch
> patching file b
> $ hg st
> M b
>
> Yuck. Is this the only option with evolve for this use case?
>
> (Oh yeah: I'm using Mercurial 2.4.2+8-7648b87e76db because evolve
> doesn't work with 2.5rc. ;-( evolve.py is from changeset f727ebe6ffd5,
> current stable, in https://bitbucket.org/marmoute/mutable-history.)
Not an answer to your original question, but the default branch of
mutable-history works with 2.5rc … so you can use that?
More information about the Mercurial
mailing list