annotate tests/test-mq @ 4227:f5b9edf3390b

hgweb.unbundle: call req.httphdr only after the last possible call to bail
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sun, 22 Oct 2006 13:54:43 -0300
parents 7307d2e98b32
children ba51a8225a60
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
1 #!/bin/sh
8ce86d2c9737 mq: add basic tests
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: 2935
diff changeset
3 echo "[extensions]" >> $HGRCPATH
61fcd9fac434 Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2935
diff changeset
4 echo "mq=" >> $HGRCPATH
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
5
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
6 echo % help
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
7 hg help mq
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
8
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
9 hg init a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
10 cd a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
11 echo a > a
2848
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
12 hg ci -Ama
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
13
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
14 hg clone . ../k
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
15
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
16 mkdir b
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
17 echo z > b/z
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
18 hg ci -Ama
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
19
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
20 echo % qinit
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
21
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
22 hg qinit
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
23
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
24 cd ..
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
25 hg init b
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
26
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
27 echo % -R qinit
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
28
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
29 hg -R b qinit
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
30
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
31 hg init c
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
32
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
33 echo % qinit -c
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
34
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
35 hg --cwd c qinit -c
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
36 hg -R c/.hg/patches st
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
37
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
38 echo % qnew implies add
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
39
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
40 hg -R c qnew test.patch
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
41 hg -R c/.hg/patches st
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
42
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
43 cd a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
44
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
45 echo % qnew -m
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
46
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
47 hg qnew -m 'foo bar' test.patch
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
48 cat .hg/patches/test.patch
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
49
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
50 echo % qrefresh
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
51
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
52 echo a >> a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
53 hg qrefresh
2843
0b9ac7dfcf56 Fix some tests for portability.
Danek Duvall <danek.duvall@sun.com>
parents: 2729
diff changeset
54 sed -e "s/^\(diff -r \)\([a-f0-9]* \)/\1 x/" \
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
55 -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
56 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/test.patch
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
57
4173
7307d2e98b32 fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4090
diff changeset
58 echo % empty qrefresh
7307d2e98b32 fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4090
diff changeset
59
7307d2e98b32 fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4090
diff changeset
60 hg qrefresh -X a
7307d2e98b32 fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4090
diff changeset
61 echo 'revision:'
7307d2e98b32 fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4090
diff changeset
62 hg diff -r -2 -r -1
7307d2e98b32 fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4090
diff changeset
63 echo 'patch:'
7307d2e98b32 fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4090
diff changeset
64 cat .hg/patches/test.patch
7307d2e98b32 fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4090
diff changeset
65 echo 'working dir diff:'
7307d2e98b32 fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4090
diff changeset
66 hg diff --nodates -q
7307d2e98b32 fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4090
diff changeset
67 # restore things
7307d2e98b32 fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4090
diff changeset
68 hg qrefresh
7307d2e98b32 fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4090
diff changeset
69
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
70 echo % qpop
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
71
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
72 hg qpop
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
73
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
74 echo % qpush
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
75
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
76 hg qpush
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
77
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
78 cd ..
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
79
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
80 echo % pop/push outside repo
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
81
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
82 hg -R a qpop
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
83 hg -R a qpush
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
84
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
85 cd a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
86 hg qnew test2.patch
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
87
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
88 echo % qrefresh in subdir
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
89
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
90 cd b
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
91 echo a > a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
92 hg add a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
93 hg qrefresh
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
94
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
95 echo % pop/push -a in subdir
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
96
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
97 hg qpop -a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
98 hg --traceback qpush -a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
99
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
100 echo % qseries
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
101 hg qseries
3681
05d877dfd33d fix qseries -v when there are unapplied patches
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3464
diff changeset
102 hg qpop
05d877dfd33d fix qseries -v when there are unapplied patches
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3464
diff changeset
103 hg qseries -vs
05d877dfd33d fix qseries -v when there are unapplied patches
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3464
diff changeset
104 hg qpush
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
105
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
106 echo % qapplied
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
107 hg qapplied
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
108
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
109 echo % qtop
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
110 hg qtop
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
111
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
112 echo % qprev
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
113 hg qprev
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
114
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
115 echo % qnext
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
116 hg qnext
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
117
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
118 echo % pop, qnext, qprev, qapplied
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
119 hg qpop
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
120 hg qnext
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
121 hg qprev
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
122 hg qapplied
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
123
2846
b8d587cfa3bb mq: test commit in repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2843
diff changeset
124 echo % commit should fail
b8d587cfa3bb mq: test commit in repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2843
diff changeset
125 hg commit
b8d587cfa3bb mq: test commit in repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2843
diff changeset
126
2848
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
127 echo % push should fail
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
128 hg push ../../k
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
129
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
130 echo % qunapplied
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
131 hg qunapplied
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
132
3081
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
133 echo % qpush/qpop with index
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
134 hg qnew test1b.patch
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
135 echo 1b > 1b
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
136 hg add 1b
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
137 hg qrefresh
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
138 hg qpush 2
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
139 hg qpop 0
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
140 hg qpush test.patch+1
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
141 hg qpush test.patch+2
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
142 hg qpop test2.patch-1
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
143 hg qpop test2.patch-2
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
144 hg qpush test1b.patch+1
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
145
2848
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
146 echo % push should succeed
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
147 hg qpop -a
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
148 hg push ../../k
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
149
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
150 echo % strip
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
151 cd ../../b
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
152 echo x>x
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
153 hg ci -Ama
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
154 hg strip tip 2>&1 | sed 's/\(saving bundle to \).*/\1/'
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
155 hg unbundle .hg/strip-backup/*
2934
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
156
3027
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
157 echo '% cd b; hg qrefresh'
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
158 hg init refresh
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
159 cd refresh
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
160 echo a > a
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
161 hg ci -Ama -d'0 0'
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
162 hg qnew -mfoo foo
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
163 echo a >> a
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
164 hg qrefresh
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
165 mkdir b
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
166 cd b
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
167 echo f > f
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
168 hg add f
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
169 hg qrefresh
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
170 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
171 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" ../.hg/patches/foo
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
172 echo % hg qrefresh .
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
173 hg qrefresh .
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
174 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
175 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" ../.hg/patches/foo
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
176 hg status
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
177
3334
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
178 echo % qpush failure
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
179 cd ..
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
180 hg qrefresh
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
181 hg qnew -mbar bar
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
182 echo foo > foo
3464
ba3a96750de0 mq: test case for issue399
Brendan Cully <brendan@kublai.com>
parents: 3334
diff changeset
183 echo bar > bar
ba3a96750de0 mq: test case for issue399
Brendan Cully <brendan@kublai.com>
parents: 3334
diff changeset
184 hg add foo bar
3334
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
185 hg qrefresh
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
186 hg qpop -a
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
187 echo bar > foo
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
188 hg qpush -a
3464
ba3a96750de0 mq: test case for issue399
Brendan Cully <brendan@kublai.com>
parents: 3334
diff changeset
189 hg st
3334
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
190
2990
61fcd9fac434 Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2935
diff changeset
191 cat >>$HGRCPATH <<EOF
2934
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
192 [diff]
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
193 git = True
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
194 EOF
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
195 cd ..
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
196 hg init git
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
197 cd git
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
198 hg qinit
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
199
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
200 hg qnew -m'new file' new
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
201 echo foo > new
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
202 chmod +x new
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
203 hg add new
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
204 hg qrefresh
2935
1c66aad252f9 sed portability fixes
Brendan Cully <brendan@kublai.com>
parents: 2934
diff changeset
205 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
1c66aad252f9 sed portability fixes
Brendan Cully <brendan@kublai.com>
parents: 2934
diff changeset
206 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/new
2934
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
207
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
208 hg qnew -m'copy file' copy
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
209 hg cp new copy
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
210 hg qrefresh
2935
1c66aad252f9 sed portability fixes
Brendan Cully <brendan@kublai.com>
parents: 2934
diff changeset
211 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
1c66aad252f9 sed portability fixes
Brendan Cully <brendan@kublai.com>
parents: 2934
diff changeset
212 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/copy
2934
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
213
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
214 hg qpop
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
215 hg qpush
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
216 hg qdiff
3697
da262f35fbc8 add --git option to qdiff
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3681
diff changeset
217 cat >>$HGRCPATH <<EOF
da262f35fbc8 add --git option to qdiff
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3681
diff changeset
218 [diff]
da262f35fbc8 add --git option to qdiff
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3681
diff changeset
219 git = False
da262f35fbc8 add --git option to qdiff
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3681
diff changeset
220 EOF
da262f35fbc8 add --git option to qdiff
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3681
diff changeset
221 hg qdiff --git
3699
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
222
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
223 cd ..
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
224 hg init slow
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
225 cd slow
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
226 hg qinit
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
227 echo foo > foo
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
228 hg add foo
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
229 hg ci -m 'add foo'
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
230 hg qnew bar
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
231 echo bar > bar
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
232 hg add bar
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
233 hg mv foo baz
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
234 hg qrefresh --git
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
235 hg up -C 0
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
236 echo >> foo
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
237 hg ci -m 'change foo'
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
238 hg up -C 1
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
239 hg qrefresh --git 2>&1 | grep -v 'saving bundle'
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
240 cat .hg/patches/bar
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
241 hg log -vC --template '{rev} {file_copies%filecopy}\n' -r .
3700
4c158de5f245 qrefresh: fix handling of copies in the fast path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3699
diff changeset
242 hg qrefresh --git
4c158de5f245 qrefresh: fix handling of copies in the fast path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3699
diff changeset
243 cat .hg/patches/bar
4c158de5f245 qrefresh: fix handling of copies in the fast path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3699
diff changeset
244 hg log -vC --template '{rev} {file_copies%filecopy}\n' -r .
3699
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
245
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
246 echo
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
247 hg up -C 1
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
248 echo >> foo
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
249 hg ci -m 'change foo again'
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
250 hg up -C 2
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
251 hg mv bar quux
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
252 hg mv baz bleh
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
253 hg qrefresh --git 2>&1 | grep -v 'saving bundle'
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
254 cat .hg/patches/bar
4bafcf7aeb32 qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3697
diff changeset
255 hg log -vC --template '{rev} {file_copies%filecopy}\n' -r .
3700
4c158de5f245 qrefresh: fix handling of copies in the fast path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3699
diff changeset
256 hg mv quux fred
4c158de5f245 qrefresh: fix handling of copies in the fast path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3699
diff changeset
257 hg mv bleh barney
4c158de5f245 qrefresh: fix handling of copies in the fast path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3699
diff changeset
258 hg qrefresh --git
4c158de5f245 qrefresh: fix handling of copies in the fast path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3699
diff changeset
259 cat .hg/patches/bar
4c158de5f245 qrefresh: fix handling of copies in the fast path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3699
diff changeset
260 hg log -vC --template '{rev} {file_copies%filecopy}\n' -r .
4065
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
261
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
262 echo '% strip again'
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
263 cd ..
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
264 hg init strip
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
265 cd strip
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
266 touch foo
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
267 hg add foo
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
268 hg ci -m 'add foo' -d '0 0'
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
269 echo >> foo
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
270 hg ci -m 'change foo 1' -d '0 0'
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
271 hg up -C 0
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
272 echo 1 >> foo
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
273 hg ci -m 'change foo 2' -d '0 0'
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
274 HGMERGE=true hg merge
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
275 hg ci -m merge -d '0 0'
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
276 hg log
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
277 hg strip 1 2>&1 | sed 's/\(saving bundle to \).*/\1/'
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
278 hg log
4090
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
279 cd ..
4065
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
280
4090
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
281 echo '% qclone'
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
282 qlog()
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
283 {
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
284 echo 'main repo:'
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
285 hg log --template ' rev {rev}: {desc}\n'
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
286 echo 'patch repo:'
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
287 hg -R .hg/patches log --template ' rev {rev}: {desc}\n'
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
288 }
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
289 hg init qclonesource
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
290 cd qclonesource
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
291 echo foo > foo
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
292 hg add foo
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
293 hg ci -m 'add foo'
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
294 hg qinit -c
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
295 hg qnew patch1
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
296 echo bar >> foo
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
297 hg qrefresh -m 'change foo'
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
298 hg qci -m checkpoint
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
299 qlog
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
300 cd ..
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
301
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
302 # repo with patches applied
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
303 hg qclone qclonesource qclonedest
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
304 cd qclonedest
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
305 qlog
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
306 cd ..
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
307
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
308 # repo with patches unapplied
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
309 cd qclonesource
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
310 hg qpop -a
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
311 qlog
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
312 cd ..
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
313 hg qclone qclonesource qclonedest2
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
314 cd qclonedest2
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
315 qlog
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
316 cd ..
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
317