Mercurial > hg
annotate tests/test-mq-qrefresh-replace-log-message @ 5380:a5a7f7fd5554
convert_git: add --filemap support
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Thu, 04 Oct 2007 23:21:37 -0300 |
parents | 448eb46d4d84 |
children |
rev | line source |
---|---|
2694
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
1 #!/bin/sh |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
2 |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
3 # Environement setup for MQ |
2990
61fcd9fac434
Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2843
diff
changeset
|
4 echo "[extensions]" >> $HGRCPATH |
61fcd9fac434
Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2843
diff
changeset
|
5 echo "mq=" >> $HGRCPATH |
2694
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
6 |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
7 #Repo init |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
8 hg init |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
9 hg qinit |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
10 |
5334
448eb46d4d84
mq: fix qrefresh -e with no patches applied
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4659
diff
changeset
|
11 echo ======================= |
448eb46d4d84
mq: fix qrefresh -e with no patches applied
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4659
diff
changeset
|
12 echo "Should fail if no patches applied" |
448eb46d4d84
mq: fix qrefresh -e with no patches applied
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4659
diff
changeset
|
13 hg qrefresh |
448eb46d4d84
mq: fix qrefresh -e with no patches applied
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4659
diff
changeset
|
14 hg qrefresh -e |
448eb46d4d84
mq: fix qrefresh -e with no patches applied
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4659
diff
changeset
|
15 |
2694
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
16 hg qnew -m "First commit message" first-patch |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
17 echo aaaa > file |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
18 hg add file |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
19 hg qrefresh |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
20 echo ======================= |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
21 echo "Should display 'First commit message'" |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
22 hg log -l1 -v | sed -n '/description/,$p' |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
23 echo |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
24 |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
25 # Testing changing message with -m |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
26 echo bbbb > file |
4659
7a7d4937272b
Kill trailing spaces
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2990
diff
changeset
|
27 hg qrefresh -m "Second commit message" |
2694
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
28 echo ======================= |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
29 echo "Should display 'Second commit message'" |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
30 hg log -l1 -v | sed -n '/description/,$p' |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
31 echo |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
32 |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
33 |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
34 # Testing changing message with -l |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
35 echo "Third commit message" > logfile |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
36 echo " This is the 3rd log message" >> logfile |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
37 echo bbbb > file |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
38 hg qrefresh -l logfile |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
39 echo ======================= |
2843
0b9ac7dfcf56
Fix some tests for portability.
Danek Duvall <danek.duvall@sun.com>
parents:
2715
diff
changeset
|
40 printf "Should display 'Third commit message\\\n This is the 3rd log message'\n" |
2694
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
41 hg log -l1 -v | sed -n '/description/,$p' |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
42 echo |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
43 |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
44 # Testing changing message with -l- |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
45 hg qnew -m "First commit message" second-patch |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
46 echo aaaa > file2 |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
47 hg add file2 |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
48 echo bbbb > file2 |
4659
7a7d4937272b
Kill trailing spaces
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2990
diff
changeset
|
49 (echo "Fifth commit message" |
2694
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
50 echo " This is the 5th log message" >> logfile) |\ |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
51 hg qrefresh -l- |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
52 echo ======================= |
2843
0b9ac7dfcf56
Fix some tests for portability.
Danek Duvall <danek.duvall@sun.com>
parents:
2715
diff
changeset
|
53 printf "Should display 'Fifth commit message\\\n This is the 5th log message'\n" |
2694
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
54 hg log -l1 -v | sed -n '/description/,$p' |
0fb28dbf0dc7
MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff
changeset
|
55 echo |