Showing posts with label mercurial. Show all posts
Showing posts with label mercurial. Show all posts

Thursday, February 26, 2009

Mercurial "case-folding collision" More Explanation on the fix

I've run into this error now a few times. What happens is you rename a file, changing only the case of one or more characters in the file name. This causes confusion. Now you can read here and here about the fix to this problem. I'm going to give a little more info on how to make this work, just because it might not be crystal clear reading those two sources.

You got this error either by checking out the project, or pulling changesets into your project and trying the 'update' command. So run these commands:

hg debugsetparents <revision>

The revision should be the one you are attempting to update to.

hg debugrebuildstate

now you want to remove all the files in error, you can use 'hg manifest tip' to check for the files in error. I've had more than one before after doing numerous renames that camel cased a number of files. use:

hg rm -A <filename>

to remove files, you can list multiple files to delete using spaces between each.

Once you've removed the files you should commit the changes:

hg ci -m "Fixed case problems"

Then do a clean check out the tip revision:

hg co -C tip

thats it, hope this helps to shed a little extra light on the process.

Thursday, February 19, 2009

Maven and Mercurial: tips on performing a release

If you are using Maven 2 and have a project in source control via Mercurial then you might need this tip. If you do a 'mvn release:prepare' then Maven will try and push the changes and will need auth. Use the sys properties -Dusername= -Dpassword=' to get authenticated. I don't think this is very secure because the properties seem to be plaintext, but eh what can you do?