how to ammend a changeset and push
Dan Villiom Podlaski Christiansen
danchr at gmail.com
Mon Nov 18 19:01:33 UTC 2024
On 18/11/2024 19.30, Uwe Brauer wrote:
>>>> "DVPC" == Dan Villiom Podlaski Christiansen <danchr at gmail.com> writes:
>> You really should look into the `evolve` extension; not only is it
>> pretty awesome in itself, but it also simplifies editing history when
>> using hg-git a good deal.
>
> Oh I do use that extension quite intensively mainly because of topics!
> The problem I described was also present when I enabled evolve.
In that case, it sounds like a bug. If the commit still exists in
Mercurial, you shouldn't get that error. 1.2.0b1 may improve on that,
though…
>> You can also simply enable `obsolete` support locally, I believe; it
>> should have the same effect:
>> [experimental]
>> evolution = yes
> ok this setting I did not know, thanks
>
>
>> In the default setup, any history modification consists of adding new
>> commits and stripping the old ones. There's nothing telling hg-git of
>> this fact, so you have to invoke `hg git-cleanup` after each
>> modification.
> Ok good to know, but in order to push, I had to use the force option, which make me shudder.
One of the challanges with hg-git is that you have to understand two
version control systems. Using `--force` with hg-git should be
equivalent to using `--force-with-lease` with Git, so the push will
still be rejected if you haven't pulled the latest changes. But it's
necessary to update any branch in a non-linear fashion, i.e. if you
modified history.
- Dan
More information about the Mercurial
mailing list