Convenient metaedit
Matt Harbison
mharbison72 at gmail.com
Sat Apr 27 18:18:45 UTC 2019
On Sat, 27 Apr 2019 06:56:03 -0400, Friedrich Hagedorn
<friedrich_h at gmx.de> wrote:
> On Sat, Apr 27, 2019 at 02:37:02PM +0530, Faheem Mitha wrote:
>> On Sat, 27 Apr 2019, Friedrich Hagedorn wrote:
> [...]
>> > recent commits. In order to metaedit the changesets with branched
>> > ancestors together with an unclean work directory I need to do the
>> > following steps:
>> >
>> > hg metaedit -r -4
>> > hg shelve
>> > hg hg evolve -aA
>> > hg unshelve
>> >
>> > Is it possible to include the last three steps into metaedit? This
>> would
>> > be really convenient!
>>
>> `hg shelve` is itself quite a complex command, with multiple failure
>> modes.
>> So I don't see how it would be possible to bundle that in there. And
>> yes, I
>> agree that having to shelve/unshelve all the time is a pain, but I
>> don't see
>> a way around it, since a lot of evolve commands want a clean working
>> directory.
>
> OK, maybe a compromise would be to combine only
>
> hg metaedit -r ...
> hg evolve -aA
>
> into metaedit. In this way you can just use metaedit without to know the
> (logical) concept behind the evolve mechanism. Do you think this would
> be possible?
+1 on the overall feature. I vaguely remember talk about auto restacking
a few years ago, but can't find much other than rebase with a rather
complicated revset. So I'm not sure what the status of that is.
The phabricator extension does something very similar to this feature when
it rewrites the commit messages to include the URL to the review. But
it's incomplete, in that it assumes a linear series, and doesn't handle
stabilizing subsequent commits or branches off of the series[1]. I was
working on this recently, but set it aside because I'm not sure what the
behavior should be. It seems to me that both phabricator and metaedit
should carry forward any obsolete and unstable commits in the same state.
IOW, I wouldn't want existing unstable commits to be resolved because of
posting a review or doing a metaedit. But I didn't see an existing
utility method to do this, and maybe it isn't the desired behavior for
other commands.
[1] https://bz.mercurial-scm.org/show_bug.cgi?id=6045
More information about the Evolve-testers
mailing list