##// END OF EJS Templates
py3kcompat: added a "compatibility layer" for py3k...
py3kcompat: added a "compatibility layer" for py3k This patch adds some ugly constructs. The first of them is bytesformatter, a function that formats strings like when '%' is called. The main motivation for this function is py3k's strange behavior: >>> 'foo %s' % b'bar' "foo b'bar'" >>> b'foo %s' % b'bar' Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unsupported operand type(s) for %: 'bytes' and 'bytes' >>> b'foo %s' % 'bar' Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unsupported operand type(s) for %: 'bytes' and 'str' In other words, if we can't format bytes with bytes, and recall that all mercurial strings will be converted by a fixer, then things will break badly if we don't take a similar approach. The other addition with this patch is that the os.environ dictionary is monkeypatched to have bytes items. Hopefully this won't be needed in the future, as python 3.2 might get a os.environb dictionary that holds bytes items.

File last commit:

r10595:47f9868d stable
r11748:37a70a78 default
Show More
Readme.html
37 lines | 1.8 KiB | text/html | HtmlLexer
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!-- This is the second screen displayed during the install. -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #000fed}
span.s1 {text-decoration: underline}
span.s2 {font: 12.0px Courier}
</style>
</head>
<body>
<p class="p1"><b>Before you install</b></p>
<p class="p2"><br></p>
<p class="p3">This is an OS X 10.6 version of Mercurial that depends on the default Python 2.6 installation.</p>
<p class="p2"><br></p>
<p class="p1"><b>After you install</b></p>
<p class="p2"><br></p>
<p class="p3">This package installs the <span class="s2">hg</span> executable in <span class="s2">/usr/local/bin</span> and the Mercurial files in <span class="s2">/Library/Python/2.6/site-packages/mercurial.</span></p>
<p class="p2"><br></p>
<p class="p1"><b>Documentation</b></p>
<p class="p2"><br></p>
<p class="p3">Visit the <a href="http://mercurial.selenic.com/">Mercurial web site and wiki</a></p>
<p class="p2"><br></p>
<p class="p3">There's also a free book, <a href="http://hgbook.red-bean.com/">Distributed revision control with Mercurial</a></p>
<p class="p2"><br></p>
<p class="p1"><b>Reporting problems</b></p>
<p class="p2"><br></p>
<p class="p3">If you run into any problems, please file a bug online:</p>
<p class="p3"><a href="http://mercurial.selenic.com/bts/">http://mercurial.selenic.com/bts/</a></p>
</body>
</html>