annotate tests/test-mq-qpush-exact.t @ 13033:026053f691a4

mq: add an '-e/--exact' option to qpush This patch adds an '--exact/-e' option to qpush that will try to push the patches in the correct location in the DAG. Specifying this option does the following: * If --move is specified, abort. It makes no sense to move a patch to the front of the queue and try to apply it to its parent, because its parent is one of the patches we just moved it in front of! * If patches are already applied, abort. We don't want patch changesets scattered throughout the DAG. * If local changes are present, abort unless --force is used, as usual. * Find the first patch we're going to push (if we're pushing multiple patches with a target or --all). * If that patch doesn't have a parent, abort, obviously. * If the parent doesn't exist in the repo, abort. Something is wrong. * Update to the parent, then continue pushing the patches as normal.
author Steve Losh <steve@stevelosh.com>
date Wed, 17 Nov 2010 21:18:44 -0500
parents
children 31ec4d7eb63f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13033
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
1 $ echo "[extensions]" >> $HGRCPATH
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
2 $ echo "mq=" >> $HGRCPATH
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
3 $ echo "graphlog=" >> $HGRCPATH
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
4
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
5 make a test repository that looks like this:
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
6
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
7 o 2:28bc7b1afd6a
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
8 |
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
9 | @ 1:d7fe2034f71b
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
10 |/
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
11 o 0/62ecad8b70e5
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
12
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
13 $ hg init r0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
14 $ cd r0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
15 $ touch f0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
16 $ hg ci -m0 -Aq
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
17 $ touch f1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
18 $ hg ci -m1 -Aq
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
19
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
20 $ hg update 0 -q
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
21 $ touch f2
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
22 $ hg ci -m2 -Aq
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
23 $ hg update 1 -q
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
24
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
25 make some patches with a parent: 1:d7fe2034f71b -> p0 -> p1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
26
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
27 $ echo cp0 >> fp0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
28 $ hg add fp0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
29 $ hg qnew p0 -d "0 0"
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
30
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
31 $ echo cp1 >> fp1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
32 $ hg add fp1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
33 $ hg qnew p1 -d "0 0"
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
34
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
35 $ hg qpop -aq
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
36 patch queue now empty
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
37
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
38 qpush --exact when at the parent
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
39
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
40 $ hg update 1 -q
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
41 $ hg qpush -e
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
42 applying p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
43 now at: p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
44 $ hg parents -qr qbase
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
45 1:d7fe2034f71b
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
46 $ hg qpop -aq
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
47 patch queue now empty
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
48
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
49 $ hg qpush -e p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
50 applying p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
51 now at: p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
52 $ hg parents -qr qbase
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
53 1:d7fe2034f71b
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
54 $ hg qpop -aq
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
55 patch queue now empty
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
56
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
57 $ hg qpush -e p1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
58 applying p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
59 applying p1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
60 now at: p1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
61 $ hg parents -qr qbase
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
62 1:d7fe2034f71b
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
63 $ hg qpop -aq
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
64 patch queue now empty
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
65
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
66 $ hg qpush -ea
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
67 applying p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
68 applying p1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
69 now at: p1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
70 $ hg parents -qr qbase
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
71 1:d7fe2034f71b
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
72 $ hg qpop -aq
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
73 patch queue now empty
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
74
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
75 qpush --exact when at another rev
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
76
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
77 $ hg update 0 -q
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
78 $ hg qpush -e
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
79 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
80 applying p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
81 now at: p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
82 $ hg parents -qr qbase
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
83 1:d7fe2034f71b
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
84 $ hg qpop -aq
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
85 patch queue now empty
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
86
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
87 $ hg update 0 -q
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
88 $ hg qpush -e p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
89 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
90 applying p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
91 now at: p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
92 $ hg parents -qr qbase
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
93 1:d7fe2034f71b
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
94 $ hg qpop -aq
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
95 patch queue now empty
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
96
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
97 $ hg update 0 -q
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
98 $ hg qpush -e p1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
99 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
100 applying p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
101 applying p1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
102 now at: p1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
103 $ hg parents -qr qbase
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
104 1:d7fe2034f71b
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
105 $ hg qpop -aq
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
106 patch queue now empty
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
107
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
108 $ hg update 0 -q
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
109 $ hg qpush -ea
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
110 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
111 applying p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
112 applying p1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
113 now at: p1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
114 $ hg parents -qr qbase
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
115 1:d7fe2034f71b
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
116 $ hg qpop -aq
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
117 patch queue now empty
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
118
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
119 qpush --exact while crossing branches
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
120
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
121 $ hg update 2 -q
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
122 $ hg qpush -e
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
123 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
124 applying p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
125 now at: p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
126 $ hg parents -qr qbase
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
127 1:d7fe2034f71b
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
128 $ hg qpop -aq
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
129 patch queue now empty
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
130
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
131 $ hg update 2 -q
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
132 $ hg qpush -e p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
133 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
134 applying p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
135 now at: p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
136 $ hg parents -qr qbase
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
137 1:d7fe2034f71b
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
138 $ hg qpop -aq
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
139 patch queue now empty
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
140
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
141 $ hg update 2 -q
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
142 $ hg qpush -e p1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
143 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
144 applying p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
145 applying p1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
146 now at: p1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
147 $ hg parents -qr qbase
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
148 1:d7fe2034f71b
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
149 $ hg qpop -aq
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
150 patch queue now empty
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
151
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
152 $ hg update 2 -q
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
153 $ hg qpush -ea
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
154 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
155 applying p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
156 applying p1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
157 now at: p1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
158 $ hg parents -qr qbase
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
159 1:d7fe2034f71b
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
160 $ hg qpop -aq
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
161 patch queue now empty
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
162
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
163 qpush --exact --force with changes to an unpatched file
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
164
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
165 $ hg update 1 -q
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
166 $ echo c0 >> f0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
167 $ hg qpush -e
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
168 abort: local changes found, refresh first
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
169 [255]
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
170 $ hg qpush -ef
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
171 applying p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
172 now at: p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
173 $ cat f0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
174 c0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
175 $ rm f0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
176 $ touch f0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
177 $ hg qpop -aq
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
178 patch queue now empty
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
179
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
180 $ hg update 1 -q
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
181 $ echo c0 >> f0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
182 $ hg qpush -e p1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
183 abort: local changes found, refresh first
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
184 [255]
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
185 $ hg qpush -e p1 -f
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
186 applying p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
187 applying p1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
188 now at: p1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
189 $ cat f0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
190 c0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
191 $ rm f0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
192 $ touch f0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
193 $ hg qpop -aq
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
194 patch queue now empty
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
195
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
196 qpush --exact --force with changes to a patched file
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
197
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
198 $ hg update 1 -q
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
199 $ echo cp0-bad >> fp0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
200 $ hg add fp0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
201 $ hg qpush -e
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
202 abort: local changes found, refresh first
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
203 [255]
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
204 $ hg qpush -ef
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
205 applying p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
206 file fp0 already exists
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
207 1 out of 1 hunks FAILED -- saving rejects to file fp0.rej
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
208 patch failed, unable to continue (try -v)
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
209 patch failed, rejects left in working dir
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
210 errors during apply, please fix and refresh p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
211 [2]
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
212 $ cat fp0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
213 cp0-bad
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
214 $ cat fp0.rej
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
215 --- fp0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
216 +++ fp0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
217 @@ -0,0 +1,1 @@
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
218 +cp0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
219 $ hg qpop -aqf
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
220 patch queue now empty
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
221 $ rm fp0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
222 $ rm fp0.rej
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
223
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
224 $ hg update 1 -q
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
225 $ echo cp1-bad >> fp1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
226 $ hg add fp1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
227 $ hg qpush -e p1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
228 abort: local changes found, refresh first
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
229 [255]
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
230 $ hg qpush -e p1 -f
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
231 applying p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
232 applying p1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
233 file fp1 already exists
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
234 1 out of 1 hunks FAILED -- saving rejects to file fp1.rej
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
235 patch failed, unable to continue (try -v)
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
236 patch failed, rejects left in working dir
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
237 errors during apply, please fix and refresh p1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
238 [2]
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
239 $ cat fp1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
240 cp1-bad
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
241 $ cat fp1.rej
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
242 --- fp1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
243 +++ fp1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
244 @@ -0,0 +1,1 @@
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
245 +cp1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
246 $ hg qpop -aqf
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
247 patch queue now empty
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
248 $ rm fp1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
249 $ rm fp1.rej
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
250
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
251 qpush --exact when already at a patch
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
252
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
253 $ hg update 1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
254 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
255 $ hg qpush -e p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
256 applying p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
257 now at: p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
258 $ hg qpush -e p1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
259 abort: cannot push --exact with applied patches
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
260 [255]
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
261 $ hg qpop -aq
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
262 patch queue now empty
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
263
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
264 qpush --exact --move should fail
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
265
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
266 $ hg qpush -e --move p1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
267 abort: cannot use --exact and --move together
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
268 [255]
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
269
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
270 qpush --exact a patch without a parent recorded
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
271
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
272 $ hg qpush -q
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
273 now at: p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
274 $ grep -v '# Parent' .hg/patches/p0 > p0.new
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
275 $ mv p0.new .hg/patches/p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
276 $ hg qpop -aq
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
277 patch queue now empty
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
278 $ hg qpush -e
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
279 abort: p0 does not have a parent recorded
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
280 [255]
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
281 $ hg qpush -e p0
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
282 abort: p0 does not have a parent recorded
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
283 [255]
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
284 $ hg qpush -e p1
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
285 abort: p0 does not have a parent recorded
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
286 [255]
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
287 $ hg qpush -ea
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
288 abort: p0 does not have a parent recorded
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
289 [255]
026053f691a4 mq: add an '-e/--exact' option to qpush
Steve Losh <steve@stevelosh.com>
parents:
diff changeset
290