[PATCH 0 of 2] Path normalization fixes

Dan Villiom Podlaski Christiansen danchr at gmail.com
Sun Jul 26 10:27:58 CDT 2009

These two patches allow Mercurial to gracefully handle path
normalisation on Mac OS X. I split them up per Matt's request, andsent
with ‘patchbomb’; I think the white-space silliness was caused by

Also, I cleaned the code a bit, and added documentation explaining
what all the fuss is for.

2009-07-26  Dan Villiom Podlaski Christiansen  <danchr at gmail.com>

	* mercurial/posix.py, mercurial/windows.py:
	util: add realpath() for getting the 'true' path.

	The function is implemented for Mac OS X using the F_GETPATH fcntl,
	and a basic implementation for Windows is provided as well. On other
	POSIX systems, vanilla os.path.realpath() is used.
	[fd520b42a33e] [realpath.diff]

2009-07-26  Dan Villiom Podlaski Christiansen  <danchr at gmail.com>

	* mercurial/dirstate.py, tests/test-path-normalization, tests/test-
	dirstate: fold paths using the just added util.realpath() function.

	Using the one true canonical path of a directory entry allows
	equivalent paths to be treated gracefully. Equivalent means, in this
	case, differing directory entries resulting in the same, unique file
	system link to a file.
	[c1ed0db61b7b] [realpath-dirstate.diff]

More information about the Mercurial-devel mailing list