We had a strange problem this weekend. I develop on Windows 7, my co-worker uses Ubuntu. After he upgraded his Ubuntu and got a more recent version of Mercurial he could no longer download the repository. The problem was that Ubuntu hg was choking on a file that had once been a Windows symlink.
Some internet browsing reveals that
If
- A Windows symlink is replaced with real file OR
- A real file is replaced with a Windows symlink
Then Unix hg may sometimes break.
The solution was for the Windows user to “hg remove” the problem file and push to the repository.
Mercurial tip: If working in a mixed enviroment then avoid putting Windows symlinks under source control. If you do, then remember to remove them before replacing them with a physical file and subsequently hg add(ing) it.
I offer FogBugz and Kiln training here.
It wasn’t the Ubuntu upgrade, or the new version of hg, that caused the problem.
It is based on the (rather lame) Windows implementation of symbolic links.
I daresay Windows can mess on its own stuff in the same circumstances, but I can’t be bothered to find out.
The general consensus seems to be not to let mercurial try to deal with Windows symlinks.