Mercurial: Rename File Where Only the Case Changes

If you’re working on a Windows Developer box and you want to check in a java class rename where ONLY the case changes , you’re going to run into issues.

Problem:

Rename File

  • FROM
    TESTFile.java
  • TO:
    TestFile.java

Commit to Mercurial

Next Person to Pull will have the following issue:

  • File name will be TESTFile.java
  • Java class name will be TestFile
  • Eclipse will complain

Solution: Rename to Temp -> Commit -> rename -> commit again

If you want to stick with the rename.

  1. Rename file to TestFileTemp.java

  2. Commit to Repository

  3. Rename file to TestFile.java

  4. Commit to Repository

  5. Push

It's only fair to share...
Share on FacebookGoogle+Tweet about this on TwitterShare on LinkedIn

Leave a Reply