view tests/test-diffdir @ 2161:12e11413ca19

Fix just introduced possible old-http bug My last patch changed httprangereader.read to read only the specified amount of data from the connection, to prevent it from returning more than what was asked. I just realized that this could lead to the connection not being closed. In practice, it looks like the connection is closed just fine, but it's probably safer to read everything and then return only what's necessary.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sun, 30 Apr 2006 18:50:53 +0200
parents 7544700fd931
children
line wrap: on
line source

#!/bin/sh

hg init
touch a
hg add a
hg ci -m "a" -d "1000000 0"

echo 123 > b
hg add b
hg diff | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
              -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"

hg diff -r tip | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
                     -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"

echo foo > a
hg diff | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
              -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"