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