[PATCH 00 of 11 RFC] consistent and more reliable URL parsing

Brodie Rao brodie at bitheap.org
Sat Mar 26 01:29:35 CDT 2011


This patch series implements a forgiving but reliable URL parser and
refactors URL manipulation across hg.

The parser is based on RFC 2396, but splits URLs into their
constituent parts primarily by delimiters, placing few restrictions on
the contents of each part.

The first patch adds the url.url class. Further patches progressively
replace manual URL manipulation with url.url in minor areas. The final
patch updates commands like clone, pull, push, etc. to use
url.url. It's the most invasive of the patches, and slightly changes
the behavior of how bundle:// URLs are handled.

The final patch also implements "drive promotion" for URLs on
Windows. This means that url.localpath('file://D:/foo') returns
'D:/foo'.


More information about the Mercurial-devel mailing list