##// 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:

r10930:230ab9a2 default
r11748:37a70a78 default
Show More
doc.wxs
49 lines | 1.8 KiB | text/plain | TextLexer
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?include guids.wxi ?>
<Fragment>
<ComponentGroup Id="docFolder">
<ComponentRef Id="doc.hg.1.html" />
<ComponentRef Id="doc.hgignore.5.html" />
<ComponentRef Id="doc.hgrc.5.html" />
<ComponentRef Id="doc.style.css" />
</ComponentGroup>
</Fragment>
<Fragment>
<DirectoryRef Id="INSTALLDIR">
<Directory Id="docdir" Name="doc" FileSource="$(var.SourceDir)">
<Component Id="doc.hg.1.html" Guid="$(var.doc.hg.1.html.guid)">
<File Name="hg.1.html" KeyPath="yes">
<Shortcut Id="hg1StartMenu" Directory="ProgramMenuDir"
Name="Mercurial Command Reference"
Icon="hgIcon.ico" IconIndex="0" Advertise="yes"
/>
</File>
</Component>
<Component Id="doc.hgignore.5.html" Guid="$(var.doc.hgignore.5.html.guid)">
<File Name="hgignore.5.html" KeyPath="yes">
<Shortcut Id="hgignore5StartMenu" Directory="ProgramMenuDir"
Name="Mercurial Ignore Files"
Icon="hgIcon.ico" IconIndex="0" Advertise="yes"
/>
</File>
</Component>
<Component Id="doc.hgrc.5.html" Guid="$(var.doc.hgrc.5.html)">
<File Name="hgrc.5.html" KeyPath="yes">
<Shortcut Id="hgrc5StartMenu" Directory="ProgramMenuDir"
Name="Mercurial Configuration Files"
Icon="hgIcon.ico" IconIndex="0" Advertise="yes"
/>
</File>
</Component>
<Component Id="doc.style.css" Guid="$(var.doc.style.css)">
<File Name="style.css" KeyPath="yes" />
</Component>
</Directory>
</DirectoryRef>
</Fragment>
</Wix>