macosmercurialkiln

How to solve a Mercurial case-folding collision?


I use Mercurial as source control with the main repository managed on KILN. At one point in time I changed my iOS project name from WeatherTimeMachine to weathertimemachine. This resulted in a case change of several files and folders:

In the meantime I've added a tag to a revision in KILN... So I now have:

When trying to merge I get the following error message: "Mercurial case-folding collision"

How can I fix this?


Solution

  • I have found some information here: FixingCaseCollisions, but somehow this did not work for me. Here is how I managed to solve this issue:

    Make a copy of your existing repository folder (for safety). For example:

    Fool mercurial into thinking the problematic revision is the current tip:

    Remove the files which are causing the problem (-f is required to force the removal). Here is an example:

    Once all problematic files have been removed, commit the changes

    Then restore mercurial to the proper revision

    After this the merge is possible and the problem is gone.

    And now I can happily resume working with MacHg to manage my Mercurial repository and push my change sets to KILN.