hg push aborts with "push includes obsolete changeset" warning, but hg evolve says there's nothing to fix

Diab Jerius djerius at cfa.harvard.edu
Mon Mar 9 21:11:43 UTC 2020


Hey Manuel!

On Sat, Mar 7, 2020 at 4:34 AM Manuel Jacob <me at manueljacob.de> wrote:
>
> Hi Diab!
>
> On 2020-03-07 06:08, Diab Jerius wrote:
> > Mercurial 5.3, evolve 9.30, topic 0.18.0
> >
> > I've been doing some histediting of a repository which has resulted in
> > an
> > obsolete branch with a bookmark:
>
> I’m not entirely sure what’s the behavior with histedit and bookmarks,
> but in my experience the bookmarks are usually moved properly. Can you
> find a minimal reproducible example that shows a case where the bookmark
> is not moved?


It was a rather convoluted session of condensing things into a
coherent narrative for eventual upstream submission. Retracing my
steps might be difficult.  I wonder if there's enough metadata stored
via evolve to actually rewind things?


> Independent of that, you may want to consider moving away from
> bookmarks.

[...]
>
> If you’re using bookmarks because you push to a Git server,


 This, exactly.  Github seems to require a 'master' bookmark, while
GitLab usually (sometimes?) doesn't.

>
> you may find a patch I’ve sent to hg-git useful. It allows to flexibly configure
> which changesets should get git refs. The documentation is not really
> existing at the moment, but you can look at the test
> (https://foss.heptapod.net/mercurial/hg-git/merge_requests/8/diffs?commit_id=c53e3cce0418bd9f3216c72c5b4d878657708309#6af25606bfd4c7217ddbb5a602fab0c84988a0fa).


I'll take a look, thanks.

[...]

>
> In your specific case, the problem should have been fixed by moving the
> bookmark. A general workaround is to explicitly push (with -r) only the
> specific changeset you want to push.
>
> It is a funny coincidence that after months of being annoyed by that
> bug, I wrote a WIP patch a few hours before your email.
> (https://foss.heptapod.net/octobus/mercurial-devel/merge_requests/27)


Cool.

Thanks for the info,

 I've got another repo which has determinedly rebuked my attempts to
evolve it into a clean state.  I'll have to find a way of making that
public.

Diab



More information about the Mercurial mailing list