##// END OF EJS Templates
tests: new test for hg diff of a subdirectory only
tests: new test for hg diff of a subdirectory only

File last commit:

r2879:66eff835 default
r2879:66eff835 default
Show More
test-diff-subdir
27 lines | 559 B | text/plain | TextLexer
Giorgos Keramidas
tests: new test for hg diff of a subdirectory only
r2879 #!/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/"