| 1 |
$ echo "[extensions]" >> $HGRCPATH |
| 2 |
$ echo "mq=" >> $HGRCPATH |
| 3 |
|
| 4 |
$ hg init a |
| 5 |
$ cd a |
| 6 |
|
| 7 |
$ echo 'base' > base |
| 8 |
$ hg ci -Ambase -d '1 0' |
| 9 |
adding base |
| 10 |
|
| 11 |
$ hg qnew -d '1 0' pa |
| 12 |
$ hg qnew -d '1 0' pb |
| 13 |
$ hg qnew -d '1 0' pc |
| 14 |
|
| 15 |
$ hg qdel |
| 16 |
abort: qdelete requires at least one revision or patch name |
| 17 |
[255] |
| 18 |
|
| 19 |
$ hg qdel pc |
| 20 |
abort: cannot delete applied patch pc |
| 21 |
[255] |
| 22 |
|
| 23 |
$ hg qpop |
| 24 |
popping pc |
| 25 |
now at: pb |
| 26 |
|
| 27 |
Delete the same patch twice in one command (issue2427) |
| 28 |
|
| 29 |
$ hg qdel pc pc |
| 30 |
|
| 31 |
$ hg qseries |
| 32 |
pa |
| 33 |
pb |
| 34 |
|
| 35 |
$ ls .hg/patches |
| 36 |
pa |
| 37 |
pb |
| 38 |
series |
| 39 |
status |
| 40 |
|
| 41 |
$ hg qpop |
| 42 |
popping pb |
| 43 |
now at: pa |
| 44 |
|
| 45 |
$ hg qdel -k 1 |
| 46 |
|
| 47 |
$ ls .hg/patches |
| 48 |
pa |
| 49 |
pb |
| 50 |
series |
| 51 |
status |
| 52 |
|
| 53 |
$ hg qdel -r pa |
| 54 |
patch pa finalized without changeset message |
| 55 |
|
| 56 |
$ hg qapplied |
| 57 |
|
| 58 |
$ hg log --template '{rev} {desc}\n' |
| 59 |
1 [mq]: pa |
| 60 |
0 base |
| 61 |
|
| 62 |
$ hg qnew pd |
| 63 |
$ hg qnew pe |
| 64 |
$ hg qnew pf |
| 65 |
|
| 66 |
$ hg qdel -r pe |
| 67 |
abort: cannot delete revision 3 above applied patches |
| 68 |
[255] |
| 69 |
|
| 70 |
$ hg qdel -r qbase:pe |
| 71 |
patch pd finalized without changeset message |
| 72 |
patch pe finalized without changeset message |
| 73 |
|
| 74 |
$ hg qapplied |
| 75 |
pf |
| 76 |
|
| 77 |
$ hg log --template '{rev} {desc}\n' |
| 78 |
4 [mq]: pf |
| 79 |
3 [mq]: pe |
| 80 |
2 [mq]: pd |
| 81 |
1 [mq]: pa |
| 82 |
0 base |
| 83 |
|
| 84 |
$ cd .. |
| 85 |
|
| 86 |
$ hg init b |
| 87 |
$ cd b |
| 88 |
|
| 89 |
$ echo 'base' > base |
| 90 |
$ hg ci -Ambase -d '1 0' |
| 91 |
adding base |
| 92 |
|
| 93 |
$ hg qfinish |
| 94 |
abort: no revisions specified |
| 95 |
[255] |
| 96 |
|
| 97 |
$ hg qfinish -a |
| 98 |
no patches applied |
| 99 |
|
| 100 |
$ hg qnew -d '1 0' pa |
| 101 |
$ hg qnew -d '1 0' pb |
| 102 |
$ hg qnew pc # XXX fails to apply by /usr/bin/patch if we put a date |
| 103 |
|
| 104 |
$ hg qfinish 0 |
| 105 |
abort: revision 0 is not managed |
| 106 |
[255] |
| 107 |
|
| 108 |
$ hg qfinish pb |
| 109 |
abort: cannot delete revision 2 above applied patches |
| 110 |
[255] |
| 111 |
|
| 112 |
$ hg qpop |
| 113 |
popping pc |
| 114 |
now at: pb |
| 115 |
|
| 116 |
$ hg qfinish -a pc |
| 117 |
abort: unknown revision 'pc' |
| 118 |
[10] |
| 119 |
|
| 120 |
$ hg qpush |
| 121 |
applying pc |
| 122 |
patch pc is empty |
| 123 |
now at: pc |
| 124 |
|
| 125 |
$ hg qfinish qbase:pb |
| 126 |
patch pa finalized without changeset message |
| 127 |
patch pb finalized without changeset message |
| 128 |
|
| 129 |
$ hg qapplied |
| 130 |
pc |
| 131 |
|
| 132 |
$ hg log --template '{rev} {desc}\n' |
| 133 |
3 imported patch pc |
| 134 |
2 [mq]: pb |
| 135 |
1 [mq]: pa |
| 136 |
0 base |
| 137 |
|
| 138 |
$ hg qfinish -a pc |
| 139 |
patch pc finalized without changeset message |
| 140 |
|
| 141 |
$ hg qapplied |
| 142 |
|
| 143 |
$ hg log --template '{rev} {desc}\n' |
| 144 |
3 imported patch pc |
| 145 |
2 [mq]: pb |
| 146 |
1 [mq]: pa |
| 147 |
0 base |
| 148 |
|
| 149 |
$ ls .hg/patches |
| 150 |
series |
| 151 |
status |
| 152 |
|
| 153 |
qdel -k X && hg qimp -e X used to trigger spurious output with versioned queues |
| 154 |
|
| 155 |
$ hg init --mq |
| 156 |
$ hg qimport -r 3 |
| 157 |
$ hg qpop |
| 158 |
popping imported_patch_pc |
| 159 |
patch queue now empty |
| 160 |
$ hg qdel -k imported_patch_pc |
| 161 |
$ hg qimp -e imported_patch_pc |
| 162 |
adding imported_patch_pc to series file |
| 163 |
$ hg qfinish -a |
| 164 |
no patches applied |
| 165 |
|
| 166 |
|
| 167 |
resilience to inconsistency: qfinish -a with applied patches not in series |
| 168 |
|
| 169 |
$ hg qser |
| 170 |
imported_patch_pc |
| 171 |
$ hg qapplied |
| 172 |
$ hg qpush |
| 173 |
applying imported_patch_pc |
| 174 |
patch imported_patch_pc is empty |
| 175 |
now at: imported_patch_pc |
| 176 |
$ echo next >> base |
| 177 |
$ hg qrefresh -d '1 0' |
| 178 |
$ echo > .hg/patches/series # remove 3.diff from series to confuse mq |
| 179 |
$ hg qfinish -a |
| 180 |
revision 47dfa8501675 refers to unknown patches: imported_patch_pc |
| 181 |
|
| 182 |
more complex state 'both known and unknown patches |
| 183 |
|
| 184 |
$ echo hip >> base |
| 185 |
$ hg qnew -f -d '1 0' -m 4 4.diff |
| 186 |
$ echo hop >> base |
| 187 |
$ hg qnew -f -d '1 0' -m 5 5.diff |
| 188 |
$ echo > .hg/patches/series # remove 4.diff and 5.diff from series to confuse mq |
| 189 |
$ echo hup >> base |
| 190 |
$ hg qnew -f -d '1 0' -m 6 6.diff |
| 191 |
$ echo pup > base |
| 192 |
$ hg qfinish -a |
| 193 |
warning: uncommitted changes in the working directory |
| 194 |
revision 2b1c98802260 refers to unknown patches: 5.diff |
| 195 |
revision 33a6861311c0 refers to unknown patches: 4.diff |
| 196 |
|
| 197 |
$ cd .. |