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