annotate tests/test-mq @ 7142:88f1b8081f1c

Prevent import over an applied patch (closes issue795)
author Brendan Cully <brendan@kublai.com>
date Sat, 18 Oct 2008 13:22:29 -0700
parents 25961e53a07f
children b420ef2c812b
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
5527
0b3f910dfd17 mq: really remove undo after a qpush (and after a strip)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5294
diff changeset
3 checkundo()
0b3f910dfd17 mq: really remove undo after a qpush (and after a strip)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5294
diff changeset
4 {
0b3f910dfd17 mq: really remove undo after a qpush (and after a strip)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5294
diff changeset
5 if [ -f .hg/store/undo ]; then
0b3f910dfd17 mq: really remove undo after a qpush (and after a strip)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5294
diff changeset
6 echo ".hg/store/undo still exists after $1"
0b3f910dfd17 mq: really remove undo after a qpush (and after a strip)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5294
diff changeset
7 fi
0b3f910dfd17 mq: really remove undo after a qpush (and after a strip)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5294
diff changeset
8 }
0b3f910dfd17 mq: really remove undo after a qpush (and after a strip)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5294
diff changeset
9
2990
61fcd9fac434 Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2935
diff changeset
10 echo "[extensions]" >> $HGRCPATH
61fcd9fac434 Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2935
diff changeset
11 echo "mq=" >> $HGRCPATH
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
12
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
13 echo % help
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
14 hg help mq
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
15
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
16 hg init a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
17 cd a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
18 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
19 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
20
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
21 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
22
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
23 mkdir b
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
24 echo z > b/z
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
25 hg ci -Ama
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 % 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 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 cd ..
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
32 hg init b
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
33
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
34 echo % -R qinit
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
35
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
36 hg -R b qinit
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 hg init c
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 echo % qinit -c
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
41
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
42 hg --cwd c qinit -c
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
43 hg -R c/.hg/patches st
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
44
5981
ca2af0c81c9a mq: don't allow patches with some reserved names
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5979
diff changeset
45 echo % qnew should refuse bad patch names
ca2af0c81c9a mq: don't allow patches with some reserved names
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5979
diff changeset
46 hg -R c qnew series
ca2af0c81c9a mq: don't allow patches with some reserved names
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5979
diff changeset
47 hg -R c qnew status
ca2af0c81c9a mq: don't allow patches with some reserved names
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5979
diff changeset
48 hg -R c qnew guards
ca2af0c81c9a mq: don't allow patches with some reserved names
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5979
diff changeset
49 hg -R c qnew .hgignore
ca2af0c81c9a mq: don't allow patches with some reserved names
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5979
diff changeset
50
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
51 echo % qnew implies add
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
52
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
53 hg -R c qnew test.patch
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
54 hg -R c/.hg/patches st
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
55
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
56 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
57 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
58 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
59 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
60 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
61 # 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
62 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
63 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
64 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
65 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
66 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
67 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
68
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 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
70 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
71 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
72 hg qnew A
5527
0b3f910dfd17 mq: really remove undo after a qpush (and after a strip)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5294
diff changeset
73 checkundo qnew
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
74 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
75 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
76 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
77 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
78 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
79 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
80 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
81 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
82 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
83 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
84 # 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
85 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
86 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
87 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
88 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
89 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
90
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
91 cd a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
92
5534
61c230f81068 mq: avoid qnew committing everything on invalid paths (issue 803)
Patrick Mezard <pmezard@gmail.com>
parents: 5527
diff changeset
93 echo a > somefile
61c230f81068 mq: avoid qnew committing everything on invalid paths (issue 803)
Patrick Mezard <pmezard@gmail.com>
parents: 5527
diff changeset
94 hg add somefile
61c230f81068 mq: avoid qnew committing everything on invalid paths (issue 803)
Patrick Mezard <pmezard@gmail.com>
parents: 5527
diff changeset
95
61c230f81068 mq: avoid qnew committing everything on invalid paths (issue 803)
Patrick Mezard <pmezard@gmail.com>
parents: 5527
diff changeset
96 echo % qnew with uncommitted changes
61c230f81068 mq: avoid qnew committing everything on invalid paths (issue 803)
Patrick Mezard <pmezard@gmail.com>
parents: 5527
diff changeset
97
61c230f81068 mq: avoid qnew committing everything on invalid paths (issue 803)
Patrick Mezard <pmezard@gmail.com>
parents: 5527
diff changeset
98 hg qnew uncommitted.patch
61c230f81068 mq: avoid qnew committing everything on invalid paths (issue 803)
Patrick Mezard <pmezard@gmail.com>
parents: 5527
diff changeset
99 hg st
61c230f81068 mq: avoid qnew committing everything on invalid paths (issue 803)
Patrick Mezard <pmezard@gmail.com>
parents: 5527
diff changeset
100 hg qseries
61c230f81068 mq: avoid qnew committing everything on invalid paths (issue 803)
Patrick Mezard <pmezard@gmail.com>
parents: 5527
diff changeset
101
61c230f81068 mq: avoid qnew committing everything on invalid paths (issue 803)
Patrick Mezard <pmezard@gmail.com>
parents: 5527
diff changeset
102 echo '% qnew with uncommitted changes and missing file (issue 803)'
61c230f81068 mq: avoid qnew committing everything on invalid paths (issue 803)
Patrick Mezard <pmezard@gmail.com>
parents: 5527
diff changeset
103
61c230f81068 mq: avoid qnew committing everything on invalid paths (issue 803)
Patrick Mezard <pmezard@gmail.com>
parents: 5527
diff changeset
104 hg qnew issue803.patch someotherfile 2>&1 | \
61c230f81068 mq: avoid qnew committing everything on invalid paths (issue 803)
Patrick Mezard <pmezard@gmail.com>
parents: 5527
diff changeset
105 sed -e 's/someotherfile:.*/someotherfile: No such file or directory/'
61c230f81068 mq: avoid qnew committing everything on invalid paths (issue 803)
Patrick Mezard <pmezard@gmail.com>
parents: 5527
diff changeset
106 hg st
61c230f81068 mq: avoid qnew committing everything on invalid paths (issue 803)
Patrick Mezard <pmezard@gmail.com>
parents: 5527
diff changeset
107 hg qseries
61c230f81068 mq: avoid qnew committing everything on invalid paths (issue 803)
Patrick Mezard <pmezard@gmail.com>
parents: 5527
diff changeset
108 hg qpop -f
61c230f81068 mq: avoid qnew committing everything on invalid paths (issue 803)
Patrick Mezard <pmezard@gmail.com>
parents: 5527
diff changeset
109 hg qdel issue803.patch
61c230f81068 mq: avoid qnew committing everything on invalid paths (issue 803)
Patrick Mezard <pmezard@gmail.com>
parents: 5527
diff changeset
110
61c230f81068 mq: avoid qnew committing everything on invalid paths (issue 803)
Patrick Mezard <pmezard@gmail.com>
parents: 5527
diff changeset
111 hg revert --no-backup somefile
61c230f81068 mq: avoid qnew committing everything on invalid paths (issue 803)
Patrick Mezard <pmezard@gmail.com>
parents: 5527
diff changeset
112 rm somefile
61c230f81068 mq: avoid qnew committing everything on invalid paths (issue 803)
Patrick Mezard <pmezard@gmail.com>
parents: 5527
diff changeset
113
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
114 echo % qnew -m
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
115
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
116 hg qnew -m 'foo bar' test.patch
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
117 cat .hg/patches/test.patch
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 echo % qrefresh
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
120
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
121 echo a >> a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
122 hg qrefresh
2843
0b9ac7dfcf56 Fix some tests for portability.
Danek Duvall <danek.duvall@sun.com>
parents: 2729
diff changeset
123 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
124 -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
125 -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
126
4173
7307d2e98b32 fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4090
diff changeset
127 echo % empty qrefresh
7307d2e98b32 fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4090
diff changeset
128
7307d2e98b32 fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4090
diff changeset
129 hg qrefresh -X a
7307d2e98b32 fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4090
diff changeset
130 echo 'revision:'
7307d2e98b32 fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4090
diff changeset
131 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
132 echo 'patch:'
7307d2e98b32 fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4090
diff changeset
133 cat .hg/patches/test.patch
7307d2e98b32 fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4090
diff changeset
134 echo 'working dir diff:'
7307d2e98b32 fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4090
diff changeset
135 hg diff --nodates -q
7307d2e98b32 fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4090
diff changeset
136 # restore things
7307d2e98b32 fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4090
diff changeset
137 hg qrefresh
5527
0b3f910dfd17 mq: really remove undo after a qpush (and after a strip)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5294
diff changeset
138 checkundo qrefresh
4173
7307d2e98b32 fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4090
diff changeset
139
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
140 echo % qpop
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
141
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
142 hg qpop
5527
0b3f910dfd17 mq: really remove undo after a qpush (and after a strip)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5294
diff changeset
143 checkundo qpop
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
144
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
145 echo % qpush
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
146
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
147 hg qpush
5527
0b3f910dfd17 mq: really remove undo after a qpush (and after a strip)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5294
diff changeset
148 checkundo qpush
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
149
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
150 cd ..
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
151
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
152 echo % pop/push outside repo
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
153
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
154 hg -R a qpop
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
155 hg -R a qpush
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
156
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
157 cd a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
158 hg qnew test2.patch
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
159
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
160 echo % qrefresh in subdir
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
161
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
162 cd b
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
163 echo a > a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
164 hg add a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
165 hg qrefresh
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
166
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
167 echo % pop/push -a in subdir
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
168
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
169 hg qpop -a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
170 hg --traceback qpush -a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
171
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
172 echo % qseries
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
173 hg qseries
3681
05d877dfd33d fix qseries -v when there are unapplied patches
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3464
diff changeset
174 hg qpop
05d877dfd33d fix qseries -v when there are unapplied patches
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3464
diff changeset
175 hg qseries -vs
05d877dfd33d fix qseries -v when there are unapplied patches
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3464
diff changeset
176 hg qpush
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
177
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
178 echo % qapplied
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
179 hg qapplied
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
180
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
181 echo % qtop
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
182 hg qtop
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
183
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
184 echo % qprev
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
185 hg qprev
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
186
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
187 echo % qnext
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
188 hg qnext
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
189
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
190 echo % pop, qnext, qprev, qapplied
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
191 hg qpop
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
192 hg qnext
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
193 hg qprev
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
194 hg qapplied
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
195
2846
b8d587cfa3bb mq: test commit in repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2843
diff changeset
196 echo % commit should fail
b8d587cfa3bb mq: test commit in repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2843
diff changeset
197 hg commit
b8d587cfa3bb mq: test commit in repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2843
diff changeset
198
2848
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
199 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
200 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
201
7142
88f1b8081f1c Prevent import over an applied patch (closes issue795)
Brendan Cully <brendan@kublai.com>
parents: 7048
diff changeset
202 echo % import should fail
88f1b8081f1c Prevent import over an applied patch (closes issue795)
Brendan Cully <brendan@kublai.com>
parents: 7048
diff changeset
203 hg st .
88f1b8081f1c Prevent import over an applied patch (closes issue795)
Brendan Cully <brendan@kublai.com>
parents: 7048
diff changeset
204 echo foo >> ../a
88f1b8081f1c Prevent import over an applied patch (closes issue795)
Brendan Cully <brendan@kublai.com>
parents: 7048
diff changeset
205 hg diff > ../../import.diff
88f1b8081f1c Prevent import over an applied patch (closes issue795)
Brendan Cully <brendan@kublai.com>
parents: 7048
diff changeset
206 hg revert --no-backup ../a
88f1b8081f1c Prevent import over an applied patch (closes issue795)
Brendan Cully <brendan@kublai.com>
parents: 7048
diff changeset
207 hg import ../../import.diff
88f1b8081f1c Prevent import over an applied patch (closes issue795)
Brendan Cully <brendan@kublai.com>
parents: 7048
diff changeset
208 hg st
88f1b8081f1c Prevent import over an applied patch (closes issue795)
Brendan Cully <brendan@kublai.com>
parents: 7048
diff changeset
209
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
210 echo % qunapplied
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
211 hg qunapplied
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
212
3081
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
213 echo % qpush/qpop with index
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
214 hg qnew test1b.patch
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
215 echo 1b > 1b
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
216 hg add 1b
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
217 hg qrefresh
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
218 hg qpush 2
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
219 hg qpop 0
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
220 hg qpush test.patch+1
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
221 hg qpush test.patch+2
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
222 hg qpop test2.patch-1
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
223 hg qpop test2.patch-2
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
224 hg qpush test1b.patch+1
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
225
2848
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
226 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
227 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
228 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
229
4101
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
230 echo % qpush/qpop error codes
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
231 errorcode()
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
232 {
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
233 hg "$@" && echo " $@ succeeds" || echo " $@ fails"
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
234 }
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
235
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
236 # we want to start with some patches applied
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
237 hg qpush -a
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
238 echo " % pops all patches and succeeds"
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
239 errorcode qpop -a
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
240 echo " % does nothing and succeeds"
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
241 errorcode qpop -a
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
242 echo " % fails - nothing else to pop"
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
243 errorcode qpop
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
244 echo " % pushes a patch and succeeds"
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
245 errorcode qpush
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
246 echo " % pops a patch and succeeds"
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
247 errorcode qpop
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
248 echo " % pushes up to test1b.patch and succeeds"
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
249 errorcode qpush test1b.patch
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
250 echo " % does nothing and succeeds"
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
251 errorcode qpush test1b.patch
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
252 echo " % does nothing and succeeds"
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
253 errorcode qpop test1b.patch
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
254 echo " % fails - can't push to this patch"
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
255 errorcode qpush test.patch
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
256 echo " % fails - can't pop to this patch"
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
257 errorcode qpop test2.patch
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
258 echo " % pops up to test.patch and succeeds"
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
259 errorcode qpop test.patch
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
260 echo " % pushes all patches and succeeds"
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
261 errorcode qpush -a
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
262 echo " % does nothing and succeeds"
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
263 errorcode qpush -a
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
264 echo " % fails - nothing else to push"
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
265 errorcode qpush
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
266 echo " % does nothing and succeeds"
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
267 errorcode qpush test2.patch
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
268
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
269
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
270 echo % strip
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
271 cd ../../b
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
272 echo x>x
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
273 hg ci -Ama
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
274 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
275 hg unbundle .hg/strip-backup/*
2934
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
276
6472
8c4cd80afd3e mq: add --force option to strip
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
277 echo % strip with local changes, should complain
8c4cd80afd3e mq: add --force option to strip
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
278 hg up
8c4cd80afd3e mq: add --force option to strip
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
279 echo y>y
8c4cd80afd3e mq: add --force option to strip
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
280 hg add y
8c4cd80afd3e mq: add --force option to strip
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
281 hg strip tip | sed 's/\(saving bundle to \).*/\1/'
8c4cd80afd3e mq: add --force option to strip
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
282 echo % --force strip with local changes
8c4cd80afd3e mq: add --force option to strip
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
283 hg strip -f tip 2>&1 | sed 's/\(saving bundle to \).*/\1/'
8c4cd80afd3e mq: add --force option to strip
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
284
3027
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
285 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
286 hg init refresh
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
287 cd refresh
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
288 echo a > a
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
289 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
290 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
291 echo a >> a
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
292 hg qrefresh
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
293 mkdir b
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
294 cd b
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
295 echo f > f
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
296 hg add f
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
297 hg qrefresh
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
298 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
299 -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
300 echo % hg qrefresh .
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
301 hg qrefresh .
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
302 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
303 -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
304 hg status
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
305
3334
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
306 echo % qpush failure
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
307 cd ..
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
308 hg qrefresh
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
309 hg qnew -mbar bar
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
310 echo foo > foo
3464
ba3a96750de0 mq: test case for issue399
Brendan Cully <brendan@kublai.com>
parents: 3334
diff changeset
311 echo bar > bar
ba3a96750de0 mq: test case for issue399
Brendan Cully <brendan@kublai.com>
parents: 3334
diff changeset
312 hg add foo bar
3334
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
313 hg qrefresh
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
314 hg qpop -a
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
315 echo bar > foo
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
316 hg qpush -a
3464
ba3a96750de0 mq: test case for issue399
Brendan Cully <brendan@kublai.com>
parents: 3334
diff changeset
317 hg st
3334
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
318
4219
6cb5be6bd70f mq: add qparent tag (first parent of qbase)
Brendan Cully <brendan@kublai.com>
parents: 4182
diff changeset
319 echo % mq tags
6cb5be6bd70f mq: add qparent tag (first parent of qbase)
Brendan Cully <brendan@kublai.com>
parents: 4182
diff changeset
320 hg log --template '{rev} {tags}\n' -r qparent:qtip
6cb5be6bd70f mq: add qparent tag (first parent of qbase)
Brendan Cully <brendan@kublai.com>
parents: 4182
diff changeset
321
5979
b4858eb4b58f mqrepo: don't abort if the status file has an unknown node
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5534
diff changeset
322 echo % bad node in status
b4858eb4b58f mqrepo: don't abort if the status file has an unknown node
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5534
diff changeset
323 hg qpop
b4858eb4b58f mqrepo: don't abort if the status file has an unknown node
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5534
diff changeset
324 hg strip -qn tip
b4858eb4b58f mqrepo: don't abort if the status file has an unknown node
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5534
diff changeset
325 hg tip 2>&1 | sed -e 's/unknown node .*/unknown node/'
b4858eb4b58f mqrepo: don't abort if the status file has an unknown node
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5534
diff changeset
326 hg branches 2>&1 | sed -e 's/unknown node .*/unknown node/'
b4858eb4b58f mqrepo: don't abort if the status file has an unknown node
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5534
diff changeset
327 hg qpop
b4858eb4b58f mqrepo: don't abort if the status file has an unknown node
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5534
diff changeset
328
2990
61fcd9fac434 Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2935
diff changeset
329 cat >>$HGRCPATH <<EOF
2934
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
330 [diff]
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
331 git = True
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
332 EOF
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
333 cd ..
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
334 hg init git
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
335 cd git
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
336 hg qinit
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
337
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
338 hg qnew -m'new file' new
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
339 echo foo > new
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
340 chmod +x new
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
341 hg add new
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
342 hg qrefresh
2935
1c66aad252f9 sed portability fixes
Brendan Cully <brendan@kublai.com>
parents: 2934
diff changeset
343 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
1c66aad252f9 sed portability fixes
Brendan Cully <brendan@kublai.com>
parents: 2934
diff changeset
344 -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
345
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
346 hg qnew -m'copy file' copy
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
347 hg cp new copy
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
348 hg qrefresh
2935
1c66aad252f9 sed portability fixes
Brendan Cully <brendan@kublai.com>
parents: 2934
diff changeset
349 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
1c66aad252f9 sed portability fixes
Brendan Cully <brendan@kublai.com>
parents: 2934
diff changeset
350 -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
351
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
352 hg qpop
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
353 hg qpush
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
354 hg qdiff
3697
da262f35fbc8 add --git option to qdiff
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3681
diff changeset
355 cat >>$HGRCPATH <<EOF
da262f35fbc8 add --git option to qdiff
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3681
diff changeset
356 [diff]
da262f35fbc8 add --git option to qdiff
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3681
diff changeset
357 git = False
da262f35fbc8 add --git option to qdiff
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3681
diff changeset
358 EOF
da262f35fbc8 add --git option to qdiff
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3681
diff changeset
359 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
360
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
361 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
362 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
363 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
364 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
365 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
366 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
367 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
368 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
369 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
370 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
371 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
372 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
373 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
374 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
375 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
376 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
377 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
378 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
379 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
380 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
381 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
382 hg log -vC --template '{rev} {file_copies%filecopy}\n' -r .
4890
bbdcacf7cef8 mq: autodetect an existing git patch during qrefresh (issue 491)
Bryan O'Sullivan <bos@serpentine.com>
parents: 4862
diff changeset
383 hg qrefresh
bbdcacf7cef8 mq: autodetect an existing git patch during qrefresh (issue 491)
Bryan O'Sullivan <bos@serpentine.com>
parents: 4862
diff changeset
384 grep 'diff --git' .hg/patches/bar
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
385
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
386 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
387 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
388 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
389 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
390 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
391 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
392 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
393 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
394 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
395 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
396 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
397 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
398 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
399 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
400 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
401
5294
e14118f92730 mq: fix regression in 6fd953d5faea
Brendan Cully <brendan@kublai.com>
parents: 5148
diff changeset
402 echo % refresh omitting an added file
e14118f92730 mq: fix regression in 6fd953d5faea
Brendan Cully <brendan@kublai.com>
parents: 5148
diff changeset
403 hg qnew baz
e14118f92730 mq: fix regression in 6fd953d5faea
Brendan Cully <brendan@kublai.com>
parents: 5148
diff changeset
404 echo newfile > newfile
e14118f92730 mq: fix regression in 6fd953d5faea
Brendan Cully <brendan@kublai.com>
parents: 5148
diff changeset
405 hg add newfile
e14118f92730 mq: fix regression in 6fd953d5faea
Brendan Cully <brendan@kublai.com>
parents: 5148
diff changeset
406 hg qrefresh
e14118f92730 mq: fix regression in 6fd953d5faea
Brendan Cully <brendan@kublai.com>
parents: 5148
diff changeset
407 hg st -A newfile
e14118f92730 mq: fix regression in 6fd953d5faea
Brendan Cully <brendan@kublai.com>
parents: 5148
diff changeset
408 hg qrefresh -X newfile
e14118f92730 mq: fix regression in 6fd953d5faea
Brendan Cully <brendan@kublai.com>
parents: 5148
diff changeset
409 hg st -A newfile
e14118f92730 mq: fix regression in 6fd953d5faea
Brendan Cully <brendan@kublai.com>
parents: 5148
diff changeset
410 hg revert newfile
e14118f92730 mq: fix regression in 6fd953d5faea
Brendan Cully <brendan@kublai.com>
parents: 5148
diff changeset
411 rm newfile
e14118f92730 mq: fix regression in 6fd953d5faea
Brendan Cully <brendan@kublai.com>
parents: 5148
diff changeset
412 hg qpop
e14118f92730 mq: fix regression in 6fd953d5faea
Brendan Cully <brendan@kublai.com>
parents: 5148
diff changeset
413 hg qdel baz
e14118f92730 mq: fix regression in 6fd953d5faea
Brendan Cully <brendan@kublai.com>
parents: 5148
diff changeset
414
5026
48ebd6a83994 Test qnew --git
Patrick Mezard <pmezard@gmail.com>
parents: 4890
diff changeset
415 echo % create a git patch
48ebd6a83994 Test qnew --git
Patrick Mezard <pmezard@gmail.com>
parents: 4890
diff changeset
416 echo a > alexander
48ebd6a83994 Test qnew --git
Patrick Mezard <pmezard@gmail.com>
parents: 4890
diff changeset
417 hg add alexander
48ebd6a83994 Test qnew --git
Patrick Mezard <pmezard@gmail.com>
parents: 4890
diff changeset
418 hg qnew -f --git addalexander
5027
17d71a79a257 Fix bashism and remove useless use of cat.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 5026
diff changeset
419 grep diff .hg/patches/addalexander
5026
48ebd6a83994 Test qnew --git
Patrick Mezard <pmezard@gmail.com>
parents: 4890
diff changeset
420
48ebd6a83994 Test qnew --git
Patrick Mezard <pmezard@gmail.com>
parents: 4890
diff changeset
421 echo % create a git binary patch
48ebd6a83994 Test qnew --git
Patrick Mezard <pmezard@gmail.com>
parents: 4890
diff changeset
422 cat > writebin.py <<EOF
48ebd6a83994 Test qnew --git
Patrick Mezard <pmezard@gmail.com>
parents: 4890
diff changeset
423 import sys
48ebd6a83994 Test qnew --git
Patrick Mezard <pmezard@gmail.com>
parents: 4890
diff changeset
424 path = sys.argv[1]
48ebd6a83994 Test qnew --git
Patrick Mezard <pmezard@gmail.com>
parents: 4890
diff changeset
425 open(path, 'wb').write('BIN\x00ARY')
48ebd6a83994 Test qnew --git
Patrick Mezard <pmezard@gmail.com>
parents: 4890
diff changeset
426 EOF
48ebd6a83994 Test qnew --git
Patrick Mezard <pmezard@gmail.com>
parents: 4890
diff changeset
427 python writebin.py bucephalus
48ebd6a83994 Test qnew --git
Patrick Mezard <pmezard@gmail.com>
parents: 4890
diff changeset
428
48ebd6a83994 Test qnew --git
Patrick Mezard <pmezard@gmail.com>
parents: 4890
diff changeset
429 python "$TESTDIR/md5sum.py" bucephalus
48ebd6a83994 Test qnew --git
Patrick Mezard <pmezard@gmail.com>
parents: 4890
diff changeset
430 hg add bucephalus
48ebd6a83994 Test qnew --git
Patrick Mezard <pmezard@gmail.com>
parents: 4890
diff changeset
431 hg qnew -f --git addbucephalus
5027
17d71a79a257 Fix bashism and remove useless use of cat.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 5026
diff changeset
432 grep diff .hg/patches/addbucephalus
5026
48ebd6a83994 Test qnew --git
Patrick Mezard <pmezard@gmail.com>
parents: 4890
diff changeset
433
48ebd6a83994 Test qnew --git
Patrick Mezard <pmezard@gmail.com>
parents: 4890
diff changeset
434 echo % check binary patches can be popped and pushed
48ebd6a83994 Test qnew --git
Patrick Mezard <pmezard@gmail.com>
parents: 4890
diff changeset
435 hg qpop
5027
17d71a79a257 Fix bashism and remove useless use of cat.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 5026
diff changeset
436 test -f bucephalus && echo % bucephalus should not be there
5026
48ebd6a83994 Test qnew --git
Patrick Mezard <pmezard@gmail.com>
parents: 4890
diff changeset
437 hg qpush
48ebd6a83994 Test qnew --git
Patrick Mezard <pmezard@gmail.com>
parents: 4890
diff changeset
438 test -f bucephalus || echo % bucephalus should be there
48ebd6a83994 Test qnew --git
Patrick Mezard <pmezard@gmail.com>
parents: 4890
diff changeset
439 python "$TESTDIR/md5sum.py" bucephalus
48ebd6a83994 Test qnew --git
Patrick Mezard <pmezard@gmail.com>
parents: 4890
diff changeset
440
48ebd6a83994 Test qnew --git
Patrick Mezard <pmezard@gmail.com>
parents: 4890
diff changeset
441
4065
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
442 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
443 cd ..
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
444 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
445 cd strip
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
446 touch foo
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
447 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
448 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
449 echo >> foo
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
450 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
451 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
452 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
453 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
454 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
455 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
456 hg log
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
457 hg strip 1 2>&1 | sed 's/\(saving bundle to \).*/\1/'
5527
0b3f910dfd17 mq: really remove undo after a qpush (and after a strip)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5294
diff changeset
458 checkundo strip
4065
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
459 hg log
4090
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
460 cd ..
4065
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
461
4090
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
462 echo '% qclone'
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
463 qlog()
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
464 {
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
465 echo 'main repo:'
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
466 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
467 echo 'patch repo:'
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
468 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
469 }
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
470 hg init qclonesource
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
471 cd qclonesource
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
472 echo foo > foo
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
473 hg add foo
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
474 hg ci -m 'add foo'
4862
cba10652a901 mq: improve qclone error handling when patch directory is not a repository.
Brendan Cully <brendan@kublai.com>
parents: 4219
diff changeset
475 hg qinit
4090
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
476 hg qnew patch1
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
477 echo bar >> foo
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
478 hg qrefresh -m 'change foo'
4862
cba10652a901 mq: improve qclone error handling when patch directory is not a repository.
Brendan Cully <brendan@kublai.com>
parents: 4219
diff changeset
479 cd ..
cba10652a901 mq: improve qclone error handling when patch directory is not a repository.
Brendan Cully <brendan@kublai.com>
parents: 4219
diff changeset
480
cba10652a901 mq: improve qclone error handling when patch directory is not a repository.
Brendan Cully <brendan@kublai.com>
parents: 4219
diff changeset
481 # repo with unversioned patch dir
cba10652a901 mq: improve qclone error handling when patch directory is not a repository.
Brendan Cully <brendan@kublai.com>
parents: 4219
diff changeset
482 hg qclone qclonesource failure
cba10652a901 mq: improve qclone error handling when patch directory is not a repository.
Brendan Cully <brendan@kublai.com>
parents: 4219
diff changeset
483
cba10652a901 mq: improve qclone error handling when patch directory is not a repository.
Brendan Cully <brendan@kublai.com>
parents: 4219
diff changeset
484 cd qclonesource
cba10652a901 mq: improve qclone error handling when patch directory is not a repository.
Brendan Cully <brendan@kublai.com>
parents: 4219
diff changeset
485 hg qinit -c
4090
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
486 hg qci -m checkpoint
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
487 qlog
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
488 cd ..
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
489
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
490 # repo with patches applied
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
491 hg qclone qclonesource qclonedest
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
492 cd qclonedest
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
493 qlog
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
494 cd ..
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
495
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
496 # repo with patches unapplied
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
497 cd qclonesource
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
498 hg qpop -a
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
499 qlog
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
500 cd ..
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
501 hg qclone qclonesource qclonedest2
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
502 cd qclonedest2
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
503 qlog
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
504 cd ..
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
505
6280
9db24a36d182 patch: check filename is /dev/null for creation or deletion (issue 1033)
Patrick Mezard <pmezard@gmail.com>
parents: 5981
diff changeset
506 echo % 'test applying on an empty file (issue 1033)'
9db24a36d182 patch: check filename is /dev/null for creation or deletion (issue 1033)
Patrick Mezard <pmezard@gmail.com>
parents: 5981
diff changeset
507 hg init empty
9db24a36d182 patch: check filename is /dev/null for creation or deletion (issue 1033)
Patrick Mezard <pmezard@gmail.com>
parents: 5981
diff changeset
508 cd empty
9db24a36d182 patch: check filename is /dev/null for creation or deletion (issue 1033)
Patrick Mezard <pmezard@gmail.com>
parents: 5981
diff changeset
509 touch a
9db24a36d182 patch: check filename is /dev/null for creation or deletion (issue 1033)
Patrick Mezard <pmezard@gmail.com>
parents: 5981
diff changeset
510 hg ci -Am addempty
9db24a36d182 patch: check filename is /dev/null for creation or deletion (issue 1033)
Patrick Mezard <pmezard@gmail.com>
parents: 5981
diff changeset
511 echo a > a
9db24a36d182 patch: check filename is /dev/null for creation or deletion (issue 1033)
Patrick Mezard <pmezard@gmail.com>
parents: 5981
diff changeset
512 hg qnew -f -e changea
9db24a36d182 patch: check filename is /dev/null for creation or deletion (issue 1033)
Patrick Mezard <pmezard@gmail.com>
parents: 5981
diff changeset
513 hg qpop
9db24a36d182 patch: check filename is /dev/null for creation or deletion (issue 1033)
Patrick Mezard <pmezard@gmail.com>
parents: 5981
diff changeset
514 hg qpush
9db24a36d182 patch: check filename is /dev/null for creation or deletion (issue 1033)
Patrick Mezard <pmezard@gmail.com>
parents: 5981
diff changeset
515 cd ..
6554
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
516
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
517 echo % test qpush with --force, issue1087
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
518 hg init forcepush
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
519 cd forcepush
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
520 echo hello > hello.txt
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
521 echo bye > bye.txt
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
522 hg ci -Ama
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
523 hg qnew -d '0 0' empty
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
524 hg qpop
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
525 echo world >> hello.txt
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
526
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
527 echo % qpush should fail, local changes
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
528 hg qpush
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
529
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
530 echo % apply force, should not discard changes with empty patch
7042
0ada66dcc259 tests: fix reported patch tool name in test-mq
Mads Kiilerich <mads@kiilerich.com>
parents: 6554
diff changeset
531 hg qpush -f 2>&1 | sed 's,^.*/patch,patch,g'
6554
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
532 hg diff --config diff.nodates=True
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
533 hg qdiff --config diff.nodates=True
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
534 hg log -l1 -p
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
535 hg qref -d '0 0'
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
536 hg qpop
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
537 echo universe >> hello.txt
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
538 echo universe >> bye.txt
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
539
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
540 echo % qpush should fail, local changes
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
541 hg qpush
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
542
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
543 echo % apply force, should discard changes in hello, but not bye
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
544 hg qpush -f
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
545 hg st
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
546 hg diff --config diff.nodates=True
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
547 hg qdiff --config diff.nodates=True