author | Andrew Beekhof <beekhof@gmail.com> |
Wed, 11 Jun 2008 14:49:53 +0200 | |
changeset 6659 | bc553c6d1ef9 |
parent 6210 | 942287cb1f57 |
child 8167 | 6c82beaaa11a |
permissions | -rwxr-xr-x |
5933 | 1 |
#!/bin/sh |
2 |
||
3 |
echo "[ui]" >> $HGRCPATH |
|
4 |
echo "interactive=true" >> $HGRCPATH |
|
5 |
echo "[extensions]" >> $HGRCPATH |
|
6 |
echo "record=" >> $HGRCPATH |
|
7 |
||
8 |
echo "% help (no mq, so no qrecord)" |
|
9 |
||
10 |
hg help qrecord |
|
11 |
||
12 |
echo "mq=" >> $HGRCPATH |
|
13 |
||
14 |
echo "% help (mq present)" |
|
15 |
||
16 |
hg help qrecord |
|
17 |
||
18 |
hg init a |
|
19 |
cd a |
|
20 |
||
21 |
echo % base commit |
|
22 |
||
23 |
cat > 1.txt <<EOF |
|
24 |
1 |
|
25 |
2 |
|
26 |
3 |
|
27 |
4 |
|
28 |
5 |
|
29 |
EOF |
|
30 |
cat > 2.txt <<EOF |
|
31 |
a |
|
32 |
b |
|
33 |
c |
|
34 |
d |
|
35 |
e |
|
36 |
f |
|
37 |
EOF |
|
38 |
mkdir dir |
|
39 |
cat > dir/a.txt <<EOF |
|
40 |
hello world |
|
41 |
||
42 |
someone |
|
43 |
up |
|
44 |
there |
|
45 |
loves |
|
46 |
me |
|
47 |
EOF |
|
48 |
||
49 |
hg add 1.txt 2.txt dir/a.txt |
|
50 |
hg commit -d '0 0' -m 'initial checkin' |
|
51 |
||
6210
942287cb1f57
Removed trailing spaces from everything except test output
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5933
diff
changeset
|
52 |
echo % changing files |
5933 | 53 |
|
54 |
sed -e 's/2/2 2/;s/4/4 4/' 1.txt > 1.txt.new |
|
55 |
sed -e 's/b/b b/' 2.txt > 2.txt.new |
|
56 |
sed -e 's/hello world/hello world!/' dir/a.txt > dir/a.txt.new |
|
57 |
||
58 |
mv -f 1.txt.new 1.txt |
|
59 |
mv -f 2.txt.new 2.txt |
|
60 |
mv -f dir/a.txt.new dir/a.txt |
|
61 |
||
62 |
echo % whole diff |
|
63 |
||
64 |
hg diff --nodates |
|
65 |
||
66 |
echo % qrecord a.patch |
|
67 |
||
68 |
hg qrecord -d '0 0' -m aaa a.patch <<EOF |
|
69 |
y |
|
70 |
y |
|
71 |
n |
|
72 |
y |
|
73 |
y |
|
74 |
n |
|
75 |
EOF |
|
76 |
||
77 |
echo |
|
78 |
echo % "after qrecord a.patch 'tip'" |
|
79 |
hg tip -p |
|
80 |
echo |
|
81 |
echo % "after qrecord a.patch 'diff'" |
|
82 |
hg diff --nodates |
|
83 |
||
84 |
echo % qrecord b.patch |
|
85 |
hg qrecord -d '0 0' -m bbb b.patch <<EOF |
|
86 |
y |
|
87 |
y |
|
88 |
y |
|
89 |
y |
|
90 |
EOF |
|
91 |
||
92 |
echo |
|
93 |
echo % "after qrecord b.patch 'tip'" |
|
94 |
hg tip -p |
|
95 |
echo |
|
96 |
echo % "after qrecord b.patch 'diff'" |
|
97 |
hg diff --nodates |
|
98 |
||
99 |
echo |
|
100 |
echo % --- end --- |