annotate tests/test-mq.t @ 12298:f254204d8b8d

tests: unify test-rename-merge1
author Adrian Buehlmann <adrian@cadifra.com>
date Tue, 14 Sep 2010 13:43:05 +0200
parents 0096f21c01dc
children 4134686b83e1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1 $ checkundo()
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
2 > {
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
3 > if [ -f .hg/store/undo ]; then
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
4 > echo ".hg/store/undo still exists after $1"
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
5 > fi
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
6 > }
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
7
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
8 $ echo "[extensions]" >> $HGRCPATH
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
9 $ echo "mq=" >> $HGRCPATH
2848
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
10
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
11 $ echo "[mq]" >> $HGRCPATH
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
12 $ echo "plain=true" >> $HGRCPATH
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
13
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
14
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
15 help
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
16
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
17 $ hg help mq
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
18 mq extension - manage a stack of patches
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
19
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
20 This extension lets you work with a stack of patches in a Mercurial
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
21 repository. It manages two stacks of patches - all known patches, and applied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
22 patches (subset of known patches).
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
23
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
24 Known patches are represented as patch files in the .hg/patches directory.
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
25 Applied patches are both patch files and changesets.
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
26
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
27 Common tasks (use "hg help command" for more details):
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
28
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
29 create new patch qnew
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
30 import existing patch qimport
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
31
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
32 print patch series qseries
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
33 print applied patches qapplied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
34
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
35 add known patch to applied stack qpush
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
36 remove patch from applied stack qpop
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
37 refresh contents of top applied patch qrefresh
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
38
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
39 By default, mq will automatically use git patches when required to avoid
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
40 losing file mode changes, copy records, binary files or empty files creations
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
41 or deletions. This behaviour can be configured with:
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
42
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
43 [mq]
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
44 git = auto/keep/yes/no
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
45
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
46 If set to 'keep', mq will obey the [diff] section configuration while
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
47 preserving existing git patches upon qrefresh. If set to 'yes' or 'no', mq
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
48 will override the [diff] section and always generate git or regular patches,
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
49 possibly losing data in the second case.
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
50
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
51 You will by default be managing a patch queue named "patches". You can create
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
52 other, independent patch queues with the "hg qqueue" command.
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
53
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
54 list of commands:
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
55
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
56 qapplied print the patches already applied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
57 qclone clone main and patch repository at same time
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
58 qdelete remove patches from queue
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
59 qdiff diff of the current patch and subsequent modifications
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
60 qfinish move applied patches into repository history
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
61 qfold fold the named patches into the current patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
62 qgoto push or pop patches until named patch is at top of stack
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
63 qguard set or print guards for a patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
64 qheader print the header of the topmost or specified patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
65 qimport import a patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
66 qnew create a new patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
67 qnext print the name of the next patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
68 qpop pop the current patch off the stack
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
69 qprev print the name of the previous patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
70 qpush push the next patch onto the stack
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
71 qqueue manage multiple patch queues
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
72 qrefresh update the current patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
73 qrename rename a patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
74 qselect set or print guarded patches to push
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
75 qseries print the entire series file
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
76 qtop print the name of the current patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
77 qunapplied print the patches not yet applied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
78 strip strip changesets and all their descendants from the repository
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
79
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
80 use "hg -v help mq" to show aliases and global options
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
81
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
82 $ hg init a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
83 $ cd a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
84 $ echo a > a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
85 $ hg ci -Ama
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
86 adding a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
87
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
88 $ hg clone . ../k
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
89 updating to branch default
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
90 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
91
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
92 $ mkdir b
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
93 $ echo z > b/z
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
94 $ hg ci -Ama
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
95 adding b/z
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
96
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
97
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
98 qinit
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
99
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
100 $ hg qinit
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
101
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
102 $ cd ..
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
103 $ hg init b
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
104
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
105
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
106 -R qinit
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
107
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
108 $ hg -R b qinit
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
109
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
110 $ hg init c
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
111
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
112
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
113 qinit -c
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
114
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
115 $ hg --cwd c qinit -c
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
116 $ hg -R c/.hg/patches st
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
117 A .hgignore
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
118 A series
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
119
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
120
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
121 qinit; qinit -c
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
122
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
123 $ hg init d
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
124 $ cd d
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
125 $ hg qinit
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
126 $ hg qinit -c
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
127
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
128 qinit -c should create both files if they don't exist
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
129
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
130 $ cat .hg/patches/.hgignore
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
131 ^\.hg
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
132 ^\.mq
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
133 syntax: glob
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
134 status
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
135 guards
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
136 $ cat .hg/patches/series
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
137 $ hg qinit -c
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
138 abort: repository .* already exists!
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
139 $ cd ..
11555
d8d0fc3988ca color/progress: subclass ui instead of using wrapfunction (issue2096)
Brodie Rao <brodie@bitheap.org>
parents: 11327
diff changeset
140
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
141 $ echo '% qinit; <stuff>; qinit -c'
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
142 % qinit; <stuff>; qinit -c
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
143 $ hg init e
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
144 $ cd e
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
145 $ hg qnew A
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
146 $ checkundo qnew
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
147 $ echo foo > foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
148 $ hg add foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
149 $ hg qrefresh
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
150 $ hg qnew B
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
151 $ echo >> foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
152 $ hg qrefresh
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
153 $ echo status >> .hg/patches/.hgignore
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
154 $ echo bleh >> .hg/patches/.hgignore
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
155 $ hg qinit -c
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
156 adding .hg/patches/A
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
157 adding .hg/patches/B
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
158 $ hg -R .hg/patches status
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
159 A .hgignore
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
160 A A
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
161 A B
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
162 A series
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
163
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
164 qinit -c shouldn't touch these files if they already exist
10691
a778a367c20b mq: fix init with nonexistent or non-local repository
Cédric Duval <cedricduval@free.fr>
parents: 10397
diff changeset
165
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
166 $ cat .hg/patches/.hgignore
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
167 status
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
168 bleh
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
169 $ cat .hg/patches/series
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
170 A
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
171 B
10710
47fbbc4845ff mq: test for init --mq with a destination argument
Cédric Duval <cedricduval@free.fr>
parents: 10691
diff changeset
172
12036
31f02288bbc4 mq: extend support for the --mq argument to extension commands
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11907
diff changeset
173 add an untracked file
31f02288bbc4 mq: extend support for the --mq argument to extension commands
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11907
diff changeset
174
31f02288bbc4 mq: extend support for the --mq argument to extension commands
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11907
diff changeset
175 $ echo >> .hg/patches/flaf
31f02288bbc4 mq: extend support for the --mq argument to extension commands
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11907
diff changeset
176
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
177 status --mq with color (issue2096)
10691
a778a367c20b mq: fix init with nonexistent or non-local repository
Cédric Duval <cedricduval@free.fr>
parents: 10397
diff changeset
178
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
179 $ hg status --mq --config extensions.color= --color=always
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
180 A .hgignore
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
181 A A
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
182 A B
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
183 A series
12036
31f02288bbc4 mq: extend support for the --mq argument to extension commands
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11907
diff changeset
184 ? flaf
31f02288bbc4 mq: extend support for the --mq argument to extension commands
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11907
diff changeset
185
31f02288bbc4 mq: extend support for the --mq argument to extension commands
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11907
diff changeset
186 try the --mq option on a command provided by an extension
31f02288bbc4 mq: extend support for the --mq argument to extension commands
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11907
diff changeset
187
31f02288bbc4 mq: extend support for the --mq argument to extension commands
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11907
diff changeset
188 $ hg purge --mq --verbose --config extensions.purge=
31f02288bbc4 mq: extend support for the --mq argument to extension commands
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11907
diff changeset
189 Removing file flaf
31f02288bbc4 mq: extend support for the --mq argument to extension commands
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11907
diff changeset
190
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
191 $ cd ..
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
192
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
193 init --mq without repo
10691
a778a367c20b mq: fix init with nonexistent or non-local repository
Cédric Duval <cedricduval@free.fr>
parents: 10397
diff changeset
194
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
195 $ mkdir f
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
196 $ cd f
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
197 $ hg init --mq
12070
fddacca3202e Merge with stable
Martin Geisler <mg@lazybytes.net>
parents: 12036
diff changeset
198 abort: there is no Mercurial repository here (.hg not found)
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
199 $ cd ..
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
200
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
201 init --mq with repo path
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
202
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
203 $ hg init g
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
204 $ hg init --mq g
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
205 $ test -d g/.hg/patches/.hg && echo "ok" || echo "failed"
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
206 ok
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
207
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
208 init --mq with nonexistent directory
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
209
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
210 $ hg init --mq nonexistentdir
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
211 abort: repository nonexistentdir not found!
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
212
11715
4f9dfb54c8b5 qpush --move: move the right patch even with comment lines
Gilles Moris <gilles.moris@free.fr>
parents: 11555
diff changeset
213
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
214 init --mq with bundle (non "local")
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
215
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
216 $ hg -R a bundle --all a.bundle >/dev/null
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
217 $ hg init --mq a.bundle
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
218 abort: only a local queue repository may be initialized
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
219
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
220 $ cd a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
221
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
222 $ hg qnew -m 'foo bar' test.patch
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
223
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
224 $ echo '# comment' > .hg/patches/series.tmp
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
225 $ echo >> .hg/patches/series.tmp # empty line
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
226 $ cat .hg/patches/series >> .hg/patches/series.tmp
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
227 $ mv .hg/patches/series.tmp .hg/patches/series
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
228
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
229
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
230 qrefresh
4173
7307d2e98b32 fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4090
diff changeset
231
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
232 $ echo a >> a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
233 $ hg qrefresh
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
234 $ cat .hg/patches/test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
235 foo bar
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
236
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
237 diff -r [a-f0-9]* a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
238 --- a/a\t(?P<date>.*)
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
239 \+\+\+ b/a\t(?P<date2>.*)
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
240 @@ -1,1 +1,2 @@
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
241 a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
242 +a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
243
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
244 empty qrefresh
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
245
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
246 $ hg qrefresh -X a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
247
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
248 revision:
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
249
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
250 $ hg diff -r -2 -r -1
4173
7307d2e98b32 fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4090
diff changeset
251
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
252 patch:
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
253
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
254 $ cat .hg/patches/test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
255 foo bar
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
256
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
257
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
258 working dir diff:
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
259
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
260 $ hg diff --nodates -q
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
261 --- a/a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
262 +++ b/a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
263 @@ -1,1 +1,2 @@
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
264 a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
265 +a
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
266
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
267 restore things
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
268
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
269 $ hg qrefresh
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
270 $ checkundo qrefresh
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
271
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
272
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
273 qpop
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
274
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
275 $ hg qpop
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
276 popping test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
277 patch queue now empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
278 $ checkundo qpop
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
279
9151
f528d1a93491 tags: implement persistent tag caching (issue548).
Greg Ward <greg-hg@gerg.ca>
parents: 8167
diff changeset
280
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
281 qpush with dump of tag cache
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
282 Dump the tag cache to ensure that it has exactly one head after qpush.
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
283
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
284 $ rm -f .hg/tags.cache
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
285 $ hg tags > /dev/null
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
286
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
287 .hg/tags.cache (pre qpush):
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
288
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
289 $ cat .hg/tags.cache
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
290 1 [\da-f]{40}
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
291
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
292 $ hg qpush
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
293 applying test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
294 now at: test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
295 $ hg tags > /dev/null
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
296
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
297 .hg/tags.cache (post qpush):
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
298
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
299 $ cat .hg/tags.cache
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
300 2 [\da-f]{40}
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
301
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
302 $ checkundo qpush
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
303 $ cd ..
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
304
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
305
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
306 pop/push outside repo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
307 $ hg -R a qpop
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
308 popping test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
309 patch queue now empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
310 $ hg -R a qpush
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
311 applying test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
312 now at: test.patch
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
313
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
314 $ cd a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
315 $ hg qnew test2.patch
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
316
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
317 qrefresh in subdir
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
318
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
319 $ cd b
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
320 $ echo a > a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
321 $ hg add a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
322 $ hg qrefresh
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
323
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
324 pop/push -a in subdir
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
325
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
326 $ hg qpop -a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
327 popping test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
328 popping test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
329 patch queue now empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
330 $ hg --traceback qpush -a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
331 applying test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
332 applying test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
333 now at: test2.patch
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
334
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
335
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
336 setting columns & formatted tests truncating (issue1912)
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
337
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
338 $ COLUMNS=4 hg qseries --config ui.formatted=true
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
339 test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
340 test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
341 $ COLUMNS=20 hg qseries --config ui.formatted=true -vs
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
342 0 A test.patch: f...
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
343 1 A test2.patch:
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
344 $ hg qpop
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
345 popping test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
346 now at: test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
347 $ hg qseries -vs
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
348 0 A test.patch: foo bar
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
349 1 U test2.patch:
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
350 $ hg sum | grep mq
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
351 mq: 1 applied, 1 unapplied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
352 $ hg qpush
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
353 applying test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
354 now at: test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
355 $ hg sum | grep mq
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
356 mq: 2 applied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
357 $ hg qapplied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
358 test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
359 test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
360 $ hg qtop
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
361 test2.patch
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
362
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
363
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
364 prev
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
365
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
366 $ hg qapp -1
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
367 test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
368
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
369 next
9439
f2acc0c00bec Backed out premature qprev/qnext removal
Matt Mackall <mpm@selenic.com>
parents: 9365
diff changeset
370
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
371 $ hg qunapp -1
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
372 all patches applied
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
373
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
374 $ hg qpop
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
375 popping test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
376 now at: test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
377
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
378 commit should fail
9364
c7c2dd7524dd mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 9151
diff changeset
379
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
380 $ hg commit
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
381 abort: cannot commit over an applied mq patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
382
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
383 push should fail
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
384
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
385 $ hg push ../../k
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
386 pushing to ../../k
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
387 abort: source has mq patches applied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
388
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
389
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
390 import should fail
2846
b8d587cfa3bb mq: test commit in repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2843
diff changeset
391
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
392 $ hg st .
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
393 $ echo foo >> ../a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
394 $ hg diff > ../../import.diff
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
395 $ hg revert --no-backup ../a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
396 $ hg import ../../import.diff
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
397 abort: cannot import over an applied patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
398 $ hg st
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
399
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
400 import --no-commit should succeed
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
401
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
402 $ hg import --no-commit ../../import.diff
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
403 applying ../../import.diff
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
404 $ hg st
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
405 M a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
406 $ hg revert --no-backup ../a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
407
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
408
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
409 qunapplied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
410
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
411 $ hg qunapplied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
412 test2.patch
2848
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
413
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
414
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
415 qpush/qpop with index
7142
88f1b8081f1c Prevent import over an applied patch (closes issue795)
Brendan Cully <brendan@kublai.com>
parents: 7048
diff changeset
416
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
417 $ hg qnew test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
418 $ echo 1b > 1b
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
419 $ hg add 1b
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
420 $ hg qrefresh
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
421 $ hg qpush 2
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
422 applying test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
423 now at: test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
424 $ hg qpop 0
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
425 popping test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
426 popping test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
427 now at: test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
428 $ hg qpush test.patch+1
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
429 applying test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
430 now at: test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
431 $ hg qpush test.patch+2
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
432 applying test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
433 now at: test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
434 $ hg qpop test2.patch-1
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
435 popping test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
436 now at: test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
437 $ hg qpop test2.patch-2
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
438 popping test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
439 now at: test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
440 $ hg qpush test1b.patch+1
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
441 applying test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
442 applying test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
443 now at: test2.patch
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
444
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
445
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
446 qpush --move
3081
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
447
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
448 $ hg qpop -a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
449 popping test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
450 popping test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
451 popping test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
452 patch queue now empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
453 $ hg qguard test1b.patch -- -negguard
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
454 $ hg qguard test2.patch -- +posguard
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
455 $ hg qpush --move test2.patch # can't move guarded patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
456 cannot push 'test2.patch' - guarded by ['+posguard']
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
457 $ hg qselect posguard
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
458 number of unguarded, unapplied patches has changed from 2 to 3
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
459 $ hg qpush --move test2.patch # move to front
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
460 applying test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
461 now at: test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
462 $ hg qpush --move test1b.patch # negative guard unselected
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
463 applying test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
464 now at: test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
465 $ hg qpush --move test.patch # noop move
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
466 applying test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
467 now at: test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
468 $ hg qseries -v
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
469 0 A test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
470 1 A test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
471 2 A test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
472 $ hg qpop -a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
473 popping test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
474 popping test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
475 popping test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
476 patch queue now empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
477
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
478 cleaning up
11064
590b1d6ef50b mq: qpush --move, reorder patch series and apply only the patch
Mads Kiilerich <mads@kiilerich.com>
parents: 10710
diff changeset
479
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
480 $ hg qselect --none
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
481 guards deactivated
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
482 number of unguarded, unapplied patches has changed from 3 to 2
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
483 $ hg qguard --none test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
484 $ hg qguard --none test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
485 $ hg qpush --move test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
486 applying test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
487 now at: test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
488 $ hg qpush --move test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
489 applying test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
490 now at: test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
491 $ hg qpush --move bogus # nonexistent patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
492 abort: patch bogus not in series
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
493 $ hg qpush --move # no patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
494 abort: please specify the patch to move
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
495 $ hg qpush --move test.patch # already applied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
496 abort: cannot push to a previous patch: test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
497 $ hg qpush
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
498 applying test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
499 now at: test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
500
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
501
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
502 series after move
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
503
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
504 $ cat `hg root`/.hg/patches/series
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
505 test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
506 test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
507 test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
508 # comment
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
509
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
510
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
511
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
512 pop, qapplied, qunapplied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
513
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
514 $ hg qseries -v
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
515 0 A test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
516 1 A test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
517 2 A test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
518
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
519 qapplied -1 test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
520
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
521 $ hg qapplied -1 test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
522 only one patch applied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
523
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
524 qapplied -1 test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
525
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
526 $ hg qapplied -1 test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
527 test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
528
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
529 qapplied -1 test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
530
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
531 $ hg qapplied -1 test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
532 test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
533
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
534 qapplied -1
11715
4f9dfb54c8b5 qpush --move: move the right patch even with comment lines
Gilles Moris <gilles.moris@free.fr>
parents: 11555
diff changeset
535
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
536 $ hg qapplied -1
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
537 test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
538
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
539 qapplied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
540
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
541 $ hg qapplied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
542 test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
543 test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
544 test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
545
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
546 qapplied test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
547
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
548 $ hg qapplied test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
549 test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
550 test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
551
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
552 qunapplied -1
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
553
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
554 $ hg qunapplied -1
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
555 all patches applied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
556
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
557 qunapplied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
558
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
559 $ hg qunapplied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
560
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
561 popping
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
562
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
563 $ hg qpop
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
564 popping test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
565 now at: test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
566
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
567 qunapplied -1
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
568
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
569 $ hg qunapplied -1
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
570 test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
571
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
572 qunapplied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
573
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
574 $ hg qunapplied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
575 test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
576
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
577 qunapplied test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
578
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
579 $ hg qunapplied test2.patch
9364
c7c2dd7524dd mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 9151
diff changeset
580
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
581 qunapplied -1 test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
582
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
583 $ hg qunapplied -1 test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
584 all patches applied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
585
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
586 popping -a
2848
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
587
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
588 $ hg qpop -a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
589 popping test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
590 popping test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
591 patch queue now empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
592
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
593 qapplied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
594
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
595 $ hg qapplied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
596
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
597 qapplied -1
4101
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
598
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
599 $ hg qapplied -1
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
600 no patches applied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
601 $ hg qpush
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
602 applying test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
603 now at: test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
604
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
605
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
606 push should succeed
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
607
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
608 $ hg qpop -a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
609 popping test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
610 patch queue now empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
611 $ hg push ../../k
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
612 pushing to ../../k
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
613 searching for changes
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
614 adding changesets
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
615 adding manifests
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
616 adding file changes
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
617 added 1 changesets with 1 changes to 1 files
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
618
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
619
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
620 qpush/qpop error codes
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
621
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
622 $ errorcode()
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
623 > {
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
624 > hg "$@" && echo " $@ succeeds" || echo " $@ fails"
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
625 > }
4101
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
626
e2ed92f4c0f7 add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4096
diff changeset
627
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
628 we want to start with some patches applied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
629
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
630 $ hg qpush -a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
631 applying test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
632 applying test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
633 applying test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
634 now at: test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
635
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
636 % pops all patches and succeeds
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
637
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
638 $ errorcode qpop -a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
639 popping test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
640 popping test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
641 popping test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
642 patch queue now empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
643 qpop -a succeeds
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
644
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
645 % does nothing and succeeds
2934
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
646
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
647 $ errorcode qpop -a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
648 no patches applied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
649 qpop -a succeeds
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
650
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
651 % fails - nothing else to pop
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
652
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
653 $ errorcode qpop
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
654 no patches applied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
655 qpop fails
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
656
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
657 % pushes a patch and succeeds
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
658
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
659 $ errorcode qpush
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
660 applying test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
661 now at: test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
662 qpush succeeds
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
663
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
664 % pops a patch and succeeds
6472
8c4cd80afd3e mq: add --force option to strip
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
665
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
666 $ errorcode qpop
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
667 popping test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
668 patch queue now empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
669 qpop succeeds
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
670
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
671 % pushes up to test1b.patch and succeeds
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
672
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
673 $ errorcode qpush test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
674 applying test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
675 applying test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
676 now at: test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
677 qpush test1b.patch succeeds
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
678
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
679 % does nothing and succeeds
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
680
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
681 $ errorcode qpush test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
682 qpush: test1b.patch is already at the top
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
683 qpush test1b.patch succeeds
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
684
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
685 % does nothing and succeeds
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
686
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
687 $ errorcode qpop test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
688 qpop: test1b.patch is already at the top
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
689 qpop test1b.patch succeeds
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
690
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
691 % fails - can't push to this patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
692
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
693 $ errorcode qpush test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
694 abort: cannot push to a previous patch: test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
695 qpush test.patch fails
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
696
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
697 % fails - can't pop to this patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
698
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
699 $ errorcode qpop test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
700 abort: patch test2.patch is not applied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
701 qpop test2.patch fails
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
702
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
703 % pops up to test.patch and succeeds
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
704
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
705 $ errorcode qpop test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
706 popping test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
707 now at: test.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
708 qpop test.patch succeeds
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
709
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
710 % pushes all patches and succeeds
3027
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
711
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
712 $ errorcode qpush -a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
713 applying test1b.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
714 applying test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
715 now at: test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
716 qpush -a succeeds
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
717
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
718 % does nothing and succeeds
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
719
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
720 $ errorcode qpush -a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
721 all patches are currently applied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
722 qpush -a succeeds
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
723
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
724 % fails - nothing else to push
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
725
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
726 $ errorcode qpush
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
727 patch series already fully applied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
728 qpush fails
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
729
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
730 % does nothing and succeeds
3334
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
731
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
732 $ errorcode qpush test2.patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
733 qpush: test2.patch is already at the top
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
734 qpush test2.patch succeeds
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
735
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
736
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
737
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
738 strip
4219
6cb5be6bd70f mq: add qparent tag (first parent of qbase)
Brendan Cully <brendan@kublai.com>
parents: 4182
diff changeset
739
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
740 $ cd ../../b
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
741 $ echo x>x
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
742 $ hg ci -Ama
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
743 adding x
11907
863567a1364f tests: use regular expressions instead of helpers
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11894
diff changeset
744 $ hg strip tip
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
745 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
11907
863567a1364f tests: use regular expressions instead of helpers
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11894
diff changeset
746 saved backup bundle to .*
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
747 $ hg unbundle .hg/strip-backup/*
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
748 adding changesets
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
749 adding manifests
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
750 adding file changes
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
751 added 1 changesets with 1 changes to 1 files
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
752 (run 'hg update' to get a working copy)
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
753
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
754
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
755 strip with local changes, should complain
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
756
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
757 $ hg up
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
758 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
759 $ echo y>y
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
760 $ hg add y
11907
863567a1364f tests: use regular expressions instead of helpers
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11894
diff changeset
761 $ hg strip tip
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
762 abort: local changes found
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
763
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
764 --force strip with local changes
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
765
11907
863567a1364f tests: use regular expressions instead of helpers
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11894
diff changeset
766 $ hg strip -f tip
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
767 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
11907
863567a1364f tests: use regular expressions instead of helpers
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11894
diff changeset
768 saved backup bundle to .*
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
769
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
770
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
771 cd b; hg qrefresh
2934
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
772
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
773 $ hg init refresh
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
774 $ cd refresh
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
775 $ echo a > a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
776 $ hg ci -Ama
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
777 adding a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
778 $ hg qnew -mfoo foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
779 $ echo a >> a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
780 $ hg qrefresh
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
781 $ mkdir b
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
782 $ cd b
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
783 $ echo f > f
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
784 $ hg add f
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
785 $ hg qrefresh
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
786 $ cat ../.hg/patches/foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
787 foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
788
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
789 diff -r cb9a9f314b8b a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
790 --- a/a\t(?P<date>.*)
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
791 \+\+\+ b/a\t(?P<date>.*)
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
792 @@ -1,1 +1,2 @@
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
793 a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
794 +a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
795 diff -r cb9a9f314b8b b/f
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
796 --- /dev/null\t(?P<date>.*)
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
797 \+\+\+ b/b/f\t(?P<date>.*)
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
798 @@ -0,0 +1,1 @@
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
799 +f
2934
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
800
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
801 hg qrefresh .
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
802
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
803 $ hg qrefresh .
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
804 $ cat ../.hg/patches/foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
805 foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
806
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
807 diff -r cb9a9f314b8b b/f
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
808 --- /dev/null\t(?P<date>.*)
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
809 \+\+\+ b/b/f\t(?P<date>.*)
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
810 @@ -0,0 +1,1 @@
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
811 +f
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
812 $ hg status
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
813 M a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
814
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
815
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
816 qpush failure
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
817
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
818 $ cd ..
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
819 $ hg qrefresh
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
820 $ hg qnew -mbar bar
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
821 $ echo foo > foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
822 $ echo bar > bar
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
823 $ hg add foo bar
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
824 $ hg qrefresh
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
825 $ hg qpop -a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
826 popping bar
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
827 popping foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
828 patch queue now empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
829 $ echo bar > foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
830 $ hg qpush -a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
831 applying foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
832 applying bar
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
833 file foo already exists
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
834 1 out of 1 hunks FAILED -- saving rejects to file foo.rej
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
835 patch failed, unable to continue (try -v)
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
836 patch failed, rejects left in working dir
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
837 errors during apply, please fix and refresh bar
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
838 $ hg st
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
839 ? foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
840 ? foo.rej
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
841
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
842
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
843 mq tags
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
844
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
845 $ hg log --template '{rev} {tags}\n' -r qparent:qtip
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
846 0 qparent
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
847 1 foo qbase
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
848 2 bar qtip tip
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
849
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
850
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
851 bad node in status
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
852
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
853 $ hg qpop
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
854 popping bar
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
855 now at: foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
856 $ hg strip -qn tip
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
857 $ hg tip
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
858 changeset: 0:cb9a9f314b8b
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
859 tag: tip
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
860 user: test
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
861 date: Thu Jan 01 00:00:00 1970 +0000
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
862 summary: a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
863
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
864 $ hg branches
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
865 default 0:cb9a9f314b8b
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
866 $ hg qpop
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
867 no patches applied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
868
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
869 $ cat >>$HGRCPATH <<EOF
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
870 > [diff]
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
871 > git = True
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
872 > EOF
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
873 $ cd ..
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
874 $ hg init git
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
875 $ cd git
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
876 $ hg qinit
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
877
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
878 $ hg qnew -m'new file' new
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
879 $ echo foo > new
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
880 $ chmod +x new
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
881 $ hg add new
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
882 $ hg qrefresh
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
883 $ cat .hg/patches/new
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
884 new file
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
885
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
886 diff --git a/new b/new
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
887 new file mode 100755
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
888 --- /dev/null
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
889 +++ b/new
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
890 @@ -0,0 +1,1 @@
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
891 +foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
892
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
893 $ hg qnew -m'copy file' copy
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
894 $ hg cp new copy
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
895 $ hg qrefresh
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
896 $ cat .hg/patches/copy
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
897 copy file
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
898
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
899 diff --git a/new b/copy
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
900 copy from new
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
901 copy to copy
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
902
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
903 $ hg qpop
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
904 popping copy
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
905 now at: new
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
906 $ hg qpush
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
907 applying copy
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
908 now at: copy
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
909 $ hg qdiff
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
910 diff --git a/new b/copy
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
911 copy from new
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
912 copy to copy
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
913 $ cat >>$HGRCPATH <<EOF
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
914 > [diff]
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
915 > git = False
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
916 > EOF
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
917 $ hg qdiff --git
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
918 diff --git a/new b/copy
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
919 copy from new
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
920 copy to copy
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
921 $ cd ..
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
922
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
923
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
924 test file addition in slow path
4065
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
925
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
926 $ hg init slow
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
927 $ cd slow
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
928 $ hg qinit
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
929 $ echo foo > foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
930 $ hg add foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
931 $ hg ci -m 'add foo'
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
932 $ hg qnew bar
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
933 $ echo bar > bar
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
934 $ hg add bar
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
935 $ hg mv foo baz
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
936 $ hg qrefresh --git
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
937 $ hg up -C 0
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
938 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
939 $ echo >> foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
940 $ hg ci -m 'change foo'
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
941 created new head
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
942 $ hg up -C 1
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
943 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
12101
0096f21c01dc tests: remove useless grep -v in test-mq.t
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12070
diff changeset
944 $ hg qrefresh --git
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
945 $ cat .hg/patches/bar
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
946 diff --git a/bar b/bar
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
947 new file mode 100644
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
948 --- /dev/null
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
949 +++ b/bar
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
950 @@ -0,0 +1,1 @@
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
951 +bar
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
952 diff --git a/foo b/baz
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
953 rename from foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
954 rename to baz
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
955 $ hg log -v --template '{rev} {file_copies}\n' -r .
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
956 2 baz (foo)
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
957 $ hg qrefresh --git
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
958 $ cat .hg/patches/bar
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
959 diff --git a/bar b/bar
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
960 new file mode 100644
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
961 --- /dev/null
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
962 +++ b/bar
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
963 @@ -0,0 +1,1 @@
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
964 +bar
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
965 diff --git a/foo b/baz
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
966 rename from foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
967 rename to baz
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
968 $ hg log -v --template '{rev} {file_copies}\n' -r .
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
969 2 baz (foo)
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
970 $ hg qrefresh
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
971 $ grep 'diff --git' .hg/patches/bar
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
972 diff --git a/bar b/bar
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
973 diff --git a/foo b/baz
5026
48ebd6a83994 Test qnew --git
Patrick Mezard <pmezard@gmail.com>
parents: 4890
diff changeset
974
48ebd6a83994 Test qnew --git
Patrick Mezard <pmezard@gmail.com>
parents: 4890
diff changeset
975
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
976 test file move chains in the slow path
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
977
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
978 $ hg up -C 1
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
979 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
980 $ echo >> foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
981 $ hg ci -m 'change foo again'
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
982 $ hg up -C 2
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
983 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
984 $ hg mv bar quux
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
985 $ hg mv baz bleh
12101
0096f21c01dc tests: remove useless grep -v in test-mq.t
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12070
diff changeset
986 $ hg qrefresh --git
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
987 $ cat .hg/patches/bar
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
988 diff --git a/foo b/bleh
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
989 rename from foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
990 rename to bleh
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
991 diff --git a/quux b/quux
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
992 new file mode 100644
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
993 --- /dev/null
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
994 +++ b/quux
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
995 @@ -0,0 +1,1 @@
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
996 +bar
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
997 $ hg log -v --template '{rev} {file_copies}\n' -r .
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
998 3 bleh (foo)
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
999 $ hg mv quux fred
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1000 $ hg mv bleh barney
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1001 $ hg qrefresh --git
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1002 $ cat .hg/patches/bar
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1003 diff --git a/foo b/barney
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1004 rename from foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1005 rename to barney
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1006 diff --git a/fred b/fred
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1007 new file mode 100644
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1008 --- /dev/null
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1009 +++ b/fred
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1010 @@ -0,0 +1,1 @@
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1011 +bar
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1012 $ hg log -v --template '{rev} {file_copies}\n' -r .
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1013 3 barney (foo)
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1014
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1015
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1016 refresh omitting an added file
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1017
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1018 $ hg qnew baz
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1019 $ echo newfile > newfile
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1020 $ hg add newfile
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1021 $ hg qrefresh
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1022 $ hg st -A newfile
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1023 C newfile
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1024 $ hg qrefresh -X newfile
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1025 $ hg st -A newfile
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1026 A newfile
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1027 $ hg revert newfile
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1028 $ rm newfile
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1029 $ hg qpop
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1030 popping baz
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1031 now at: bar
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1032 $ hg qdel baz
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1033
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1034
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1035 create a git patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1036
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1037 $ echo a > alexander
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1038 $ hg add alexander
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1039 $ hg qnew -f --git addalexander
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1040 $ grep diff .hg/patches/addalexander
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1041 diff --git a/alexander b/alexander
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1042
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1043
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1044 create a git binary patch
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1045
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1046 $ cat > writebin.py <<EOF
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1047 > import sys
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1048 > path = sys.argv[1]
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1049 > open(path, 'wb').write('BIN\x00ARY')
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1050 > EOF
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1051 $ python writebin.py bucephalus
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1052
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1053 $ python "$TESTDIR/md5sum.py" bucephalus
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1054 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1055 $ hg add bucephalus
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1056 $ hg qnew -f --git addbucephalus
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1057 $ grep diff .hg/patches/addbucephalus
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1058 diff --git a/bucephalus b/bucephalus
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1059
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1060
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1061 check binary patches can be popped and pushed
4065
8ee983e3d461 fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3700
diff changeset
1062
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1063 $ hg qpop
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1064 popping addbucephalus
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1065 now at: addalexander
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1066 $ test -f bucephalus && echo % bucephalus should not be there
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1067 $ hg qpush
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1068 applying addbucephalus
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1069 now at: addbucephalus
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1070 $ test -f bucephalus || echo % bucephalus should be there
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1071 $ python "$TESTDIR/md5sum.py" bucephalus
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1072 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
4862
cba10652a901 mq: improve qclone error handling when patch directory is not a repository.
Brendan Cully <brendan@kublai.com>
parents: 4219
diff changeset
1073
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1074
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1075
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1076 strip again
4862
cba10652a901 mq: improve qclone error handling when patch directory is not a repository.
Brendan Cully <brendan@kublai.com>
parents: 4219
diff changeset
1077
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1078 $ cd ..
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1079 $ hg init strip
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1080 $ cd strip
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1081 $ touch foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1082 $ hg add foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1083 $ hg ci -m 'add foo'
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1084 $ echo >> foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1085 $ hg ci -m 'change foo 1'
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1086 $ hg up -C 0
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1087 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1088 $ echo 1 >> foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1089 $ hg ci -m 'change foo 2'
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1090 created new head
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1091 $ HGMERGE=true hg merge
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1092 merging foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1093 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1094 (branch merge, don't forget to commit)
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1095 $ hg ci -m merge
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1096 $ hg log
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1097 changeset: 3:99615015637b
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1098 tag: tip
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1099 parent: 2:20cbbe65cff7
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1100 parent: 1:d2871fc282d4
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1101 user: test
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1102 date: Thu Jan 01 00:00:00 1970 +0000
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1103 summary: merge
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1104
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1105 changeset: 2:20cbbe65cff7
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1106 parent: 0:53245c60e682
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1107 user: test
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1108 date: Thu Jan 01 00:00:00 1970 +0000
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1109 summary: change foo 2
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1110
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1111 changeset: 1:d2871fc282d4
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1112 user: test
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1113 date: Thu Jan 01 00:00:00 1970 +0000
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1114 summary: change foo 1
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1115
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1116 changeset: 0:53245c60e682
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1117 user: test
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1118 date: Thu Jan 01 00:00:00 1970 +0000
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1119 summary: add foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1120
11907
863567a1364f tests: use regular expressions instead of helpers
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11894
diff changeset
1121 $ hg strip 1
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1122 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
11907
863567a1364f tests: use regular expressions instead of helpers
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11894
diff changeset
1123 saved backup bundle to .*
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1124 $ checkundo strip
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1125 $ hg log
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1126 changeset: 1:20cbbe65cff7
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1127 tag: tip
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1128 user: test
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1129 date: Thu Jan 01 00:00:00 1970 +0000
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1130 summary: change foo 2
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1131
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1132 changeset: 0:53245c60e682
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1133 user: test
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1134 date: Thu Jan 01 00:00:00 1970 +0000
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1135 summary: add foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1136
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1137 $ cd ..
4090
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
1138
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1139
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1140 qclone
4090
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
1141
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1142 $ qlog()
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1143 > {
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1144 > echo 'main repo:'
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1145 > hg log --template ' rev {rev}: {desc}\n'
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1146 > echo 'patch repo:'
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1147 > hg -R .hg/patches log --template ' rev {rev}: {desc}\n'
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1148 > }
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1149 $ hg init qclonesource
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1150 $ cd qclonesource
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1151 $ echo foo > foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1152 $ hg add foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1153 $ hg ci -m 'add foo'
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1154 $ hg qinit
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1155 $ hg qnew patch1
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1156 $ echo bar >> foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1157 $ hg qrefresh -m 'change foo'
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1158 $ cd ..
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1159
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1160
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1161 repo with unversioned patch dir
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1162
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1163 $ hg qclone qclonesource failure
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1164 abort: versioned patch repository not found (see init --mq)
4090
785ad8cd1d31 qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4065
diff changeset
1165
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1166 $ cd qclonesource
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1167 $ hg qinit -c
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1168 adding .hg/patches/patch1
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1169 $ hg qci -m checkpoint
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1170 $ qlog
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1171 main repo:
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1172 rev 1: change foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1173 rev 0: add foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1174 patch repo:
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1175 rev 0: checkpoint
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1176 $ cd ..
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1177
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1178
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1179 repo with patches applied
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1180
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1181 $ hg qclone qclonesource qclonedest
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1182 updating to branch default
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1183 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1184 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1185 $ cd qclonedest
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1186 $ qlog
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1187 main repo:
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1188 rev 0: add foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1189 patch repo:
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1190 rev 0: checkpoint
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1191 $ cd ..
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1192
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1193
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1194 repo with patches unapplied
6554
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
1195
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1196 $ cd qclonesource
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1197 $ hg qpop -a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1198 popping patch1
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1199 patch queue now empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1200 $ qlog
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1201 main repo:
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1202 rev 0: add foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1203 patch repo:
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1204 rev 0: checkpoint
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1205 $ cd ..
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1206 $ hg qclone qclonesource qclonedest2
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1207 updating to branch default
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1208 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1209 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1210 $ cd qclonedest2
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1211 $ qlog
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1212 main repo:
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1213 rev 0: add foo
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1214 patch repo:
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1215 rev 0: checkpoint
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1216 $ cd ..
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1217
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1218
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1219 test applying on an empty file (issue 1033)
6554
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
1220
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1221 $ hg init empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1222 $ cd empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1223 $ touch a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1224 $ hg ci -Am addempty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1225 adding a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1226 $ echo a > a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1227 $ hg qnew -f -e changea
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1228 $ hg qpop
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1229 popping changea
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1230 patch queue now empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1231 $ hg qpush
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1232 applying changea
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1233 now at: changea
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1234 $ cd ..
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1235
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1236
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1237 test qpush with --force, issue1087
6554
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
1238
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1239 $ hg init forcepush
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1240 $ cd forcepush
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1241 $ echo hello > hello.txt
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1242 $ echo bye > bye.txt
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1243 $ hg ci -Ama
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1244 adding bye.txt
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1245 adding hello.txt
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1246 $ hg qnew -d '0 0' empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1247 $ hg qpop
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1248 popping empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1249 patch queue now empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1250 $ echo world >> hello.txt
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1251
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1252
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1253 qpush should fail, local changes
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1254
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1255 $ hg qpush
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1256 abort: local changes found, refresh first
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1257
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1258
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1259 apply force, should not discard changes with empty patch
6554
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
1260
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1261 $ hg qpush -f
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1262 applying empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1263 patch empty is empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1264 now at: empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1265 $ hg diff --config diff.nodates=True
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1266 diff -r bf5fc3f07a0a hello.txt
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1267 --- a/hello.txt
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1268 +++ b/hello.txt
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1269 @@ -1,1 +1,2 @@
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1270 hello
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1271 +world
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1272 $ hg qdiff --config diff.nodates=True
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1273 diff -r 9ecee4f634e3 hello.txt
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1274 --- a/hello.txt
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1275 +++ b/hello.txt
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1276 @@ -1,1 +1,2 @@
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1277 hello
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1278 +world
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1279 $ hg log -l1 -p
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1280 changeset: 1:bf5fc3f07a0a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1281 tag: empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1282 tag: qbase
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1283 tag: qtip
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1284 tag: tip
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1285 user: test
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1286 date: Thu Jan 01 00:00:00 1970 +0000
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1287 summary: imported patch empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1288
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1289
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1290 $ hg qref -d '0 0'
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1291 $ hg qpop
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1292 popping empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1293 patch queue now empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1294 $ echo universe >> hello.txt
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1295 $ echo universe >> bye.txt
6554
3182602fa1fb mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6280
diff changeset
1296
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1297
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1298 qpush should fail, local changes
7621
6d891df43a5f mq: allow qpop if popped revisions are not working dir parents
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 7296
diff changeset
1299
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1300 $ hg qpush
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1301 abort: local changes found, refresh first
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1302
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1303
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1304 apply force, should discard changes in hello, but not bye
10048
46de82e50790 mq: qpop: remove added files before re-adding removed files
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9874
diff changeset
1305
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1306 $ hg qpush -f
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1307 applying empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1308 now at: empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1309 $ hg st
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1310 M bye.txt
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1311 $ hg diff --config diff.nodates=True
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1312 diff -r ba252371dbc1 bye.txt
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1313 --- a/bye.txt
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1314 +++ b/bye.txt
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1315 @@ -1,1 +1,2 @@
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1316 bye
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1317 +universe
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1318 $ hg qdiff --config diff.nodates=True
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1319 diff -r 9ecee4f634e3 bye.txt
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1320 --- a/bye.txt
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1321 +++ b/bye.txt
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1322 @@ -1,1 +1,2 @@
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1323 bye
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1324 +universe
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1325 diff -r 9ecee4f634e3 hello.txt
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1326 --- a/hello.txt
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1327 +++ b/hello.txt
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1328 @@ -1,1 +1,3 @@
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1329 hello
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1330 +world
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1331 +universe
10048
46de82e50790 mq: qpop: remove added files before re-adding removed files
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9874
diff changeset
1332
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1333
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1334 test popping revisions not in working dir ancestry
10048
46de82e50790 mq: qpop: remove added files before re-adding removed files
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9874
diff changeset
1335
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1336 $ hg qseries -v
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1337 0 A empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1338 $ hg up qparent
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1339 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1340 $ hg qpop
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1341 popping empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1342 patch queue now empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1343
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1344 $ cd ..
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1345 $ hg init deletion-order
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1346 $ cd deletion-order
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1347
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1348 $ touch a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1349 $ hg ci -Aqm0
10048
46de82e50790 mq: qpop: remove added files before re-adding removed files
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9874
diff changeset
1350
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1351 $ hg qnew rename-dir
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1352 $ hg rm a
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1353 $ hg qrefresh
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1354
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1355 $ mkdir a b
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1356 $ touch a/a b/b
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1357 $ hg add -q a b
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1358 $ hg qrefresh
10048
46de82e50790 mq: qpop: remove added files before re-adding removed files
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9874
diff changeset
1359
11894
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1360
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1361 test popping must remove files added in subdirectories first
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1362
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1363 $ hg qpop
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1364 popping rename-dir
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1365 patch queue now empty
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1366 $ cd ..
a15936ac7ec5 tests: unify test-mq
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11715
diff changeset
1367