Show More
@@ -1,64 +1,106 b'' | |||||
1 | #!/bin/sh |
|
1 | $ echo '[extensions]' >> $HGRCPATH | |
|
2 | $ echo 'mq =' >> $HGRCPATH | |||
2 |
|
3 | |||
3 | echo '[extensions]' >> $HGRCPATH |
|
4 | $ hg init repo | |
4 | echo 'mq =' >> $HGRCPATH |
|
5 | $ cd repo | |
|
6 | ||||
|
7 | $ echo foo > foo | |||
|
8 | $ hg ci -qAm 'add a file' | |||
|
9 | ||||
|
10 | $ hg qinit | |||
5 |
|
11 | |||
6 | hg init repo |
|
12 | $ hg qnew foo | |
7 | cd repo |
|
13 | $ echo foo >> foo | |
|
14 | $ hg qrefresh -m 'append foo' | |||
8 |
|
15 | |||
9 | echo foo > foo |
|
16 | $ hg qnew bar | |
10 | hg ci -qAm 'add a file' |
|
17 | $ echo bar >> foo | |
|
18 | $ hg qrefresh -m 'append bar' | |||
|
19 | ||||
11 |
|
20 | |||
12 | hg qinit |
|
21 | try to commit on top of a patch | |
|
22 | ||||
|
23 | $ echo quux >> foo | |||
|
24 | $ hg ci -m 'append quux' | |||
|
25 | abort: cannot commit over an applied mq patch | |||
13 |
|
26 | |||
14 | hg qnew foo |
|
27 | ||
15 | echo foo >> foo |
|
28 | cheat a bit... | |
16 | hg qrefresh -m 'append foo' |
|
|||
17 |
|
29 | |||
18 | hg qnew bar |
|
30 | $ mv .hg/patches .hg/patches2 | |
19 | echo bar >> foo |
|
31 | $ hg ci -m 'append quux' | |
20 | hg qrefresh -m 'append bar' |
|
32 | $ mv .hg/patches2 .hg/patches | |
|
33 | ||||
|
34 | ||||
|
35 | qpop/qrefresh on the wrong revision | |||
21 |
|
36 | |||
22 | echo '% try to commit on top of a patch' |
|
37 | $ hg qpop | |
23 | echo quux >> foo |
|
38 | abort: popping would remove a revision not managed by this patch queue | |
24 | hg ci -m 'append quux' |
|
39 | $ hg qpop -n patches 2>&1 | sed -e 's/\(using patch queue:\).*/\1/' | |
|
40 | using patch queue: | |||
|
41 | abort: popping would remove a revision not managed by this patch queue | |||
|
42 | $ hg qrefresh | |||
|
43 | abort: working directory revision is not qtip | |||
25 |
|
44 | |||
26 | # cheat a bit... |
|
45 | $ hg up -C qtip | |
27 | mv .hg/patches .hg/patches2 |
|
46 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
28 | hg ci -m 'append quux' |
|
47 | $ hg qpop | |
29 | mv .hg/patches2 .hg/patches |
|
48 | abort: popping would remove a revision not managed by this patch queue | |
|
49 | $ hg qrefresh | |||
|
50 | abort: cannot refresh a revision with children | |||
|
51 | $ hg tip --template '{rev} {desc}\n' | |||
|
52 | 3 append quux | |||
30 |
|
53 | |||
31 | echo '% qpop/qrefresh on the wrong revision' |
|
|||
32 | hg qpop |
|
|||
33 | hg qpop -n patches 2>&1 | sed -e 's/\(using patch queue:\).*/\1/' |
|
|||
34 | hg qrefresh |
|
|||
35 |
|
54 | |||
36 | hg up -C qtip |
|
55 | qpush warning branchheads | |
37 | echo '% qpop' |
|
|||
38 | hg qpop |
|
|||
39 |
|
||||
40 | echo '% qrefresh' |
|
|||
41 | hg qrefresh |
|
|||
42 |
|
||||
43 | echo '% tip:' |
|
|||
44 | hg tip --template '{rev} {desc}\n' |
|
|||
45 |
|
56 | |||
46 | echo '% qpush warning branchheads' |
|
57 | $ cd .. | |
47 | cd .. |
|
58 | $ hg init branchy | |
48 |
|
|
59 | $ cd branchy | |
49 | cd branchy |
|
60 | $ echo q > q | |
50 | echo q > q |
|
61 | $ hg add q | |
51 | hg add q |
|
62 | $ hg qnew -f qp | |
52 | hg qnew -f qp |
|
63 | $ hg qpop | |
53 | hg qpop |
|
64 | popping qp | |
54 | echo a > a |
|
65 | patch queue now empty | |
55 | hg ci -Ama |
|
66 | $ echo a > a | |
56 | hg up null |
|
67 | $ hg ci -Ama | |
57 | hg branch b |
|
68 | adding a | |
58 | echo c > c |
|
69 | $ hg up null | |
59 | hg ci -Amc |
|
70 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
60 | hg merge default |
|
71 | $ hg branch b | |
61 | hg ci -mmerge |
|
72 | marked working directory as branch b | |
62 | hg up default |
|
73 | $ echo c > c | |
63 | hg log |
|
74 | $ hg ci -Amc | |
64 | hg qpush |
|
75 | adding c | |
|
76 | $ hg merge default | |||
|
77 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
78 | (branch merge, don't forget to commit) | |||
|
79 | $ hg ci -mmerge | |||
|
80 | $ hg up default | |||
|
81 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
82 | $ hg log | |||
|
83 | changeset: 2:65309210bf4e | |||
|
84 | branch: b | |||
|
85 | tag: tip | |||
|
86 | parent: 1:707adb4c8ae1 | |||
|
87 | parent: 0:cb9a9f314b8b | |||
|
88 | user: test | |||
|
89 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
90 | summary: merge | |||
|
91 | ||||
|
92 | changeset: 1:707adb4c8ae1 | |||
|
93 | branch: b | |||
|
94 | parent: -1:000000000000 | |||
|
95 | user: test | |||
|
96 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
97 | summary: c | |||
|
98 | ||||
|
99 | changeset: 0:cb9a9f314b8b | |||
|
100 | user: test | |||
|
101 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
102 | summary: a | |||
|
103 | ||||
|
104 | $ hg qpush | |||
|
105 | applying qp | |||
|
106 | now at: qp |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now