tests/test-diff-subdir
author Vadim Gelfer <vadim.gelfer@gmail.com>
Sun, 13 Aug 2006 15:03:48 -0700
changeset 2880 51b8d1ca7820
parent 2879 66eff8355168
child 3199 096f1c73cdc3
permissions -rwxr-xr-x
make test-diff-subdir executable.

#!/bin/sh

hg init

mkdir alpha
touch alpha/one
mkdir beta
touch beta/two

hg add alpha/one beta/two
hg ci -m "start" -d "1000000 0"

echo 1 > alpha/one
echo 2 > beta/two

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

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

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