view tests/test-hgweb-removed @ 11532:f3732ab1149f

setup.py: Adjustments to make setup.py run in py3k. In py3k, subprocess.Popen.communicate's output are bytes objects. String literals are Unicode objects. Thus, when a bytes object startswith method is called, with string literals, it fails. What this patch does is: * Convert the string (unicode in py3k) literals to bytes objects; * As "bytes" is not a builtin in python < 2.6, it defines a "b" helper function that merely returns its argument, as suggested by Antoine Pitrou.
author Renato Cunha <renatoc@gmail.com>
date Fri, 02 Jul 2010 16:21:34 -0300
parents cb93eee1fbcd
children
line wrap: on
line source

#!/bin/sh

echo % setting up repo
hg init test
cd test
echo a > a
hg ci -Ama
hg rm a
hg ci -mdel

echo % set up hgweb
hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
cat hg.pid >> $DAEMON_PIDS

echo % revision
"$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/tip'

echo % diff removed file
"$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a'