annotate tests/test-mq @ 4096:49237d6ae97d

merge with crew-stable
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Fri, 16 Feb 2007 05:27:37 -0200
parents 165abe554c80 785ad8cd1d31
children e2ed92f4c0f7
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
4071
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
43 echo '% qinit; qinit -c'
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
44 hg init d
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
45 cd d
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
46 hg qinit
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
47 hg qinit -c
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
48 # qinit -c should create both files if they don't exist
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
49 echo ' .hgignore:'
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
50 cat .hg/patches/.hgignore
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
51 echo ' series:'
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
52 cat .hg/patches/series
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
53 hg qinit -c 2>&1 | sed -e 's/repository.*already/repository already/'
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
54 cd ..
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
55
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
56 echo '% qinit; <stuff>; qinit -c'
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
57 hg init e
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
58 cd e
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
59 hg qnew A
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
60 echo foo > foo
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
61 hg add foo
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
62 hg qrefresh
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
63 hg qnew B
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
64 echo >> foo
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
65 hg qrefresh
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
66 echo status >> .hg/patches/.hgignore
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
67 echo bleh >> .hg/patches/.hgignore
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
68 hg qinit -c
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
69 hg -R .hg/patches status
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
70 # qinit -c shouldn't touch these files if they already exist
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
71 echo ' .hgignore:'
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
72 cat .hg/patches/.hgignore
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
73 echo ' series:'
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
74 cat .hg/patches/series
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
75 cd ..
165abe554c80 mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
76
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
77 cd a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
78
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
79 echo % qnew -m
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
80
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
81 hg qnew -m 'foo bar' test.patch
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
82 cat .hg/patches/test.patch
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
83
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
84 echo % qrefresh
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
85
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
86 echo a >> a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
87 hg qrefresh
2843
0b9ac7dfcf56 Fix some tests for portability.
Danek Duvall <danek.duvall@sun.com>
parents: 2729
diff changeset
88 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
89 -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
90 -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
91
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
92 echo % qpop
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
93
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
94 hg qpop
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
95
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
96 echo % qpush
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
97
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
98 hg qpush
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 cd ..
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
101
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
102 echo % pop/push outside repo
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
103
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
104 hg -R a qpop
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
105 hg -R a qpush
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
106
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
107 cd a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
108 hg qnew test2.patch
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
109
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
110 echo % qrefresh in subdir
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 cd b
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
113 echo a > a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
114 hg add a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
115 hg qrefresh
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
116
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
117 echo % pop/push -a in subdir
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
118
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
119 hg qpop -a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
120 hg --traceback qpush -a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
121
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
122 echo % qseries
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
123 hg qseries
3681
05d877dfd33d fix qseries -v when there are unapplied patches
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3464
diff changeset
124 hg qpop
05d877dfd33d fix qseries -v when there are unapplied patches
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3464
diff changeset
125 hg qseries -vs
05d877dfd33d fix qseries -v when there are unapplied patches
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3464
diff changeset
126 hg qpush
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
127
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
128 echo % qapplied
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
129 hg qapplied
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
130
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
131 echo % qtop
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
132 hg qtop
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
133
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
134 echo % qprev
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
135 hg qprev
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
136
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
137 echo % qnext
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
138 hg qnext
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
139
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
140 echo % pop, qnext, qprev, qapplied
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
141 hg qpop
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
142 hg qnext
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
143 hg qprev
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
144 hg qapplied
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
145
2846
b8d587cfa3bb mq: test commit in repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2843
diff changeset
146 echo % commit should fail
b8d587cfa3bb mq: test commit in repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2843
diff changeset
147 hg commit
b8d587cfa3bb mq: test commit in repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2843
diff changeset
148
2848
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
149 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
150 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
151
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
152 echo % qunapplied
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
153 hg qunapplied
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
154
3081
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
155 echo % qpush/qpop with index
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
156 hg qnew test1b.patch
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
157 echo 1b > 1b
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
158 hg add 1b
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
159 hg qrefresh
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
160 hg qpush 2
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
161 hg qpop 0
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
162 hg qpush test.patch+1
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
163 hg qpush test.patch+2
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
164 hg qpop test2.patch-1
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
165 hg qpop test2.patch-2
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
166 hg qpush test1b.patch+1
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
167
2848
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
168 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
169 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
170 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
171
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
172 echo % strip
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
173 cd ../../b
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
174 echo x>x
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
175 hg ci -Ama
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
176 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
177 hg unbundle .hg/strip-backup/*
2934
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
178
3027
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
179 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
180 hg init refresh
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
181 cd refresh
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
182 echo a > a
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
183 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
184 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
185 echo a >> a
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
186 hg qrefresh
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
187 mkdir b
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
188 cd b
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
189 echo f > f
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
190 hg add f
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
191 hg qrefresh
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
192 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
193 -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
194 echo % hg qrefresh .
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
195 hg qrefresh .
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
196 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
197 -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
198 hg status
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
199
3334
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
200 echo % qpush failure
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
201 cd ..
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
202 hg qrefresh
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
203 hg qnew -mbar bar
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
204 echo foo > foo
3464
ba3a96750de0 mq: test case for issue399
Brendan Cully <brendan@kublai.com>
parents: 3334
diff changeset
205 echo bar > bar
ba3a96750de0 mq: test case for issue399
Brendan Cully <brendan@kublai.com>
parents: 3334
diff changeset
206 hg add foo bar
3334
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
207 hg qrefresh
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
208 hg qpop -a
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
209 echo bar > foo
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
210 hg qpush -a
3464
ba3a96750de0 mq: test case for issue399
Brendan Cully <brendan@kublai.com>
parents: 3334
diff changeset
211 hg st
3334
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
212
2990
61fcd9fac434 Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2935
diff changeset
213 cat >>$HGRCPATH <<EOF
2934
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
214 [diff]
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
215 git = True
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
216 EOF
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
217 cd ..
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
218 hg init git
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
219 cd git
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
220 hg qinit
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
221
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
222 hg qnew -m'new file' new
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
223 echo foo > new
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
224 chmod +x new
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
225 hg add new
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
226 hg qrefresh
2935
1c66aad252f9 sed portability fixes
Brendan Cully <brendan@kublai.com>
parents: 2934
diff changeset
227 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
1c66aad252f9 sed portability fixes
Brendan Cully <brendan@kublai.com>
parents: 2934
diff changeset
228 -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
229
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
230 hg qnew -m'copy file' copy
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
231 hg cp new copy
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
232 hg qrefresh
2935
1c66aad252f9 sed portability fixes
Brendan Cully <brendan@kublai.com>
parents: 2934
diff changeset
233 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
1c66aad252f9 sed portability fixes
Brendan Cully <brendan@kublai.com>
parents: 2934
diff changeset
234 -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
235
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
236 hg qpop
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
237 hg qpush
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
238 hg qdiff
3697
da262f35fbc8 add --git option to qdiff
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3681
diff changeset
239 cat >>$HGRCPATH <<EOF
da262f35fbc8 add --git option to qdiff
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3681
diff changeset
240 [diff]
da262f35fbc8 add --git option to qdiff
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3681
diff changeset
241 git = False
da262f35fbc8 add --git option to qdiff
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3681
diff changeset
242 EOF
da262f35fbc8 add --git option to qdiff
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3681
diff changeset
243 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
244
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 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
246 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
247 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
248 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
249 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
250 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
251 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
252 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
253 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
254 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
255 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
256 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
257 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
258 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
259 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
260 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
261 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
262 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
263 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
264 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
265 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
266 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
267
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
268 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
269 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
270 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
271 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
272 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
273 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
274 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
275 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
276 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
277 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
278 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
279 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
280 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
281 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
282 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
283
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
284 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
285 cd ..
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
286 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
287 cd strip
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
288 touch foo
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
289 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
290 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
291 echo >> foo
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
292 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
293 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
294 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
295 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
296 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
297 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
298 hg log
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
299 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
300 hg log
4090
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
301 cd ..
4065
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
302
4090
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
303 echo '% qclone'
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
304 qlog()
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
305 {
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
306 echo 'main repo:'
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
307 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
308 echo 'patch repo:'
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
309 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
310 }
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
311 hg init qclonesource
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
312 cd qclonesource
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
313 echo foo > foo
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
314 hg add foo
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
315 hg ci -m 'add foo'
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
316 hg qinit -c
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
317 hg qnew patch1
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
318 echo bar >> foo
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
319 hg qrefresh -m 'change foo'
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
320 hg qci -m checkpoint
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
321 qlog
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
322 cd ..
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
323
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
324 # repo with patches applied
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
325 hg qclone qclonesource qclonedest
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
326 cd qclonedest
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
327 qlog
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
328 cd ..
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
329
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
330 # repo with patches unapplied
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
331 cd qclonesource
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
332 hg qpop -a
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
333 qlog
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
334 cd ..
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
335 hg qclone qclonesource qclonedest2
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
336 cd qclonedest2
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
337 qlog
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
338 cd ..
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
339