[PATCH] amend: fix amending rename commit with obsolescence markers

Pierre-Yves David pierre-yves.david at ens-lyon.org
Mon Oct 20 12:51:06 CDT 2014

On 10/20/2014 08:31 AM, Ryan McElroy wrote:
> I don't have an intuition on how to reproduce this without obsolescence markers -- in order to make the changelog and filelog manifests have different topologies, the stripping needs to be avoided, which requires obsolescence, right? I'm happy to be wrong here, and I'll give it more thought to see if I can figure out where this would reproduce otherwise.

You can skip the first amend and use revert to achieve the same 
changelog//filelog topology divergence:

   $ hg init repo
   $ cd repo
   $ touch a0
   $ hg add a0
   $ hg commit -m a0
   $ hg mv a0 a1
   $ hg commit -m a1
   $ hg up 0
   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   $ hg revert --rev 'desc(a1)' --all
   removing a0
   adding a1
   $ hg ci -m 'a1-msg'
   created new head
   $ hg mv a1 a2
   $ hg status --copies --rev 'desc(a0)'
   A a2
   R a0
   $ hg ci --amend
   saved backup bundle to 
   $ hg status --copies --rev 'desc(a0)'
   A a2
   R a0

> I'll update the docstring and move the test in the meantime.

resend was not really necessary since we still have the obsolescence 
bits to solve.

Pierre-Yves David

More information about the Mercurial-devel mailing list