Mercurial > hg
comparison tests/test-mq-safety.t @ 11898:7dc8b9e25f19
tests: unify test-mq-safety
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Sun, 15 Aug 2010 22:44:15 +0900 |
parents | tests/test-mq-safety@2e3ec7ef5349 |
children | a57e0762c5ec |
comparison
equal
deleted
inserted
replaced
11897:0e4bbe18ff95 | 11898:7dc8b9e25f19 |
---|---|
1 $ echo '[extensions]' >> $HGRCPATH | |
2 $ echo 'mq =' >> $HGRCPATH | |
3 | |
4 $ hg init repo | |
5 $ cd repo | |
6 | |
7 $ echo foo > foo | |
8 $ hg ci -qAm 'add a file' | |
9 | |
10 $ hg qinit | |
11 | |
12 $ hg qnew foo | |
13 $ echo foo >> foo | |
14 $ hg qrefresh -m 'append foo' | |
15 | |
16 $ hg qnew bar | |
17 $ echo bar >> foo | |
18 $ hg qrefresh -m 'append bar' | |
19 | |
20 | |
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 | |
26 | |
27 | |
28 cheat a bit... | |
29 | |
30 $ mv .hg/patches .hg/patches2 | |
31 $ hg ci -m 'append quux' | |
32 $ mv .hg/patches2 .hg/patches | |
33 | |
34 | |
35 qpop/qrefresh on the wrong revision | |
36 | |
37 $ hg qpop | |
38 abort: popping would remove a revision not managed by this patch queue | |
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 | |
44 | |
45 $ hg up -C qtip | |
46 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
47 $ hg qpop | |
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 | |
53 | |
54 | |
55 qpush warning branchheads | |
56 | |
57 $ cd .. | |
58 $ hg init branchy | |
59 $ cd branchy | |
60 $ echo q > q | |
61 $ hg add q | |
62 $ hg qnew -f qp | |
63 $ hg qpop | |
64 popping qp | |
65 patch queue now empty | |
66 $ echo a > a | |
67 $ hg ci -Ama | |
68 adding a | |
69 $ hg up null | |
70 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
71 $ hg branch b | |
72 marked working directory as branch b | |
73 $ echo c > c | |
74 $ hg ci -Amc | |
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 |