annotate tests/test-mq-qnew @ 9622:9d1a480ca6ea

gendoc: fix synopsis The synopsis is used as an inline literal when generating the manpage. There should not be any whitespace on the inside of the quotation marks in inline literals. Commands with an empty synopsis (such as tags) produces ``tags `` as synopsis, which triggers a warning.
author Martin Geisler <mg@lazybytes.net>
date Tue, 20 Oct 2009 22:42:49 +0200
parents bd6deb7525f4
children f16ec85f125c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2711
ca97be5babf8 mq: do not allow to qnew a patch twice
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
1 #!/bin/sh
ca97be5babf8 mq: do not allow to qnew a patch twice
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
2
2990
61fcd9fac434 Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2714
diff changeset
3 echo "[extensions]" >> $HGRCPATH
61fcd9fac434 Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2714
diff changeset
4 echo "mq=" >> $HGRCPATH
2711
ca97be5babf8 mq: do not allow to qnew a patch twice
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
5
7296
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
6 hg init mq
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
7 cd mq
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
8
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
9 echo a > a
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
10 hg ci -Ama
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
11
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
12 echo '% qnew should refuse bad patch names'
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
13 hg qnew series
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
14 hg qnew status
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
15 hg qnew guards
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
16 hg qnew .hgignore
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
17
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
18 hg qinit -c
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
19
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
20 echo '% qnew with uncommitted changes'
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
21 echo a > somefile
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
22 hg add somefile
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
23 hg qnew uncommitted.patch
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
24 hg st
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
25 hg qseries
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
26 hg revert --no-backup somefile
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
27 rm somefile
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
28
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
29 echo '% qnew implies add'
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
30 hg qnew test.patch
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
31 hg -R .hg/patches st
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
32
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
33 echo '% qnew missing'
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
34 hg qnew missing.patch missing
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
35
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
36 echo '% qnew -m'
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
37 hg qnew -m 'foo bar' mtest.patch
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
38 cat .hg/patches/mtest.patch
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
39
695383442347 mq: put qnew tests into own file, fold in qnew-twice
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
40 echo '% qnew twice'
2711
ca97be5babf8 mq: do not allow to qnew a patch twice
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
41 hg qnew first.patch
ca97be5babf8 mq: do not allow to qnew a patch twice
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
42 hg qnew first.patch
ca97be5babf8 mq: do not allow to qnew a patch twice
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
43
ca97be5babf8 mq: do not allow to qnew a patch twice
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
44 touch ../first.patch
ca97be5babf8 mq: do not allow to qnew a patch twice
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
45 hg qimport ../first.patch
2714
85070b784896 Fix test-mq-qnew-twice exit code and output.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2711
diff changeset
46
7297
bd6deb7525f4 mq: use cmdutil.matchfiles instead of match for qnew -f.
Brendan Cully <brendan@kublai.com>
parents: 7296
diff changeset
47 echo '% qnew -f from a subdirectory'
bd6deb7525f4 mq: use cmdutil.matchfiles instead of match for qnew -f.
Brendan Cully <brendan@kublai.com>
parents: 7296
diff changeset
48 hg qpop -a
bd6deb7525f4 mq: use cmdutil.matchfiles instead of match for qnew -f.
Brendan Cully <brendan@kublai.com>
parents: 7296
diff changeset
49 mkdir d
bd6deb7525f4 mq: use cmdutil.matchfiles instead of match for qnew -f.
Brendan Cully <brendan@kublai.com>
parents: 7296
diff changeset
50 cd d
bd6deb7525f4 mq: use cmdutil.matchfiles instead of match for qnew -f.
Brendan Cully <brendan@kublai.com>
parents: 7296
diff changeset
51 echo b > b
bd6deb7525f4 mq: use cmdutil.matchfiles instead of match for qnew -f.
Brendan Cully <brendan@kublai.com>
parents: 7296
diff changeset
52 hg ci -Am t
bd6deb7525f4 mq: use cmdutil.matchfiles instead of match for qnew -f.
Brendan Cully <brendan@kublai.com>
parents: 7296
diff changeset
53 echo b >> b
bd6deb7525f4 mq: use cmdutil.matchfiles instead of match for qnew -f.
Brendan Cully <brendan@kublai.com>
parents: 7296
diff changeset
54 hg st
bd6deb7525f4 mq: use cmdutil.matchfiles instead of match for qnew -f.
Brendan Cully <brendan@kublai.com>
parents: 7296
diff changeset
55 hg qnew -g -f p
bd6deb7525f4 mq: use cmdutil.matchfiles instead of match for qnew -f.
Brendan Cully <brendan@kublai.com>
parents: 7296
diff changeset
56 cat ../.hg/patches/p