Windows long path experimenting report

Jesse Glick jesse.glick at
Thu Jun 26 20:13:35 CDT 2008

Peter Arrenbrecht wrote:
> Proposal:
> [...] fall back on a hashing scheme. [...]
> def encode(path):
> 	ubar = ubarencode(path)
> 	if len(ubar) > repo.maxstorepathlen:
> 		return hashencode(ubar)
> 	return ubar
> def hashencode(path):
> 	return 'hashed/' + path[:10] + md5.md5(path).hexdigest()

You need to do some more work, since currently serving the repo tries to 
iterate over storage files and this assumes a reversible encoding.

For a working patch to play with:

Doesn't apply cleanly against current sources, but probably easy enough 
to fix up.

More information about the Mercurial-devel mailing list