comparison tests/test-mq-qfold @ 8426:2ff17c4de1da

Add tests for qfold
author Patrick Mezard <pmezard@gmail.com>
date Sun, 17 May 2009 19:54:26 +0200
parents
children 296a0b14a686
comparison
equal deleted inserted replaced
8425:73d80d5bf478 8426:2ff17c4de1da
1 #!/bin/sh
2
3 echo "[extensions]" >> $HGRCPATH
4 echo "mq=" >> $HGRCPATH
5
6 filterdiff()
7 {
8 grep -v diff | \
9 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
10 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"
11 }
12
13 echo '% init'
14 hg init repo
15 cd repo
16 echo a > a
17 hg ci -Am adda
18 echo a >> a
19 hg qnew -f p1
20 echo b >> a
21 hg qnew -f p2
22 echo c >> a
23 hg qnew -f p3
24 echo '% fold in the middle of the queue'
25 hg qpop p1
26 hg qdiff | filterdiff
27 hg qfold p2
28 hg qser
29 hg qdiff | filterdiff
30 echo '% fold with local changes'
31 echo d >> a
32 hg qfold p3
33 hg diff -c . | filterdiff
34 cd ..
35
36