comparison tests/test-mq-merge.t @ 12375:02990e22150b

tests: require regexes in unified tests to be marked with " (re)" Consider this test: $ hg glog --template '{rev}:{node|short} "{desc}"\n' @ 2:20c4f79fd7ac "3" | | o 1:38f24201dcab "2" |/ o 0:2a18120dc1c9 "1" Because each line beginning with "|" can be compiled as a regular expression (equivalent to ".*|"), they will match any output. Similarly: $ echo foo The blank output line can be compiled as a regular expression and will also match any output. With this patch, none of the above output lines will be matched as regular expressions. A line must end in " (re)" in order to be matched as one. Lines are still matched literally first, so the following will pass: $ echo 'foo (re)' foo (re)
author Brodie Rao <brodie@bitheap.org>
date Wed, 22 Sep 2010 16:06:00 -0500
parents 5163e3c8aa52
children 97ffc68f71d3
comparison
equal deleted inserted replaced
12374:4e7dd28db0dd 12375:02990e22150b
30 $ hg qrefresh -m "rm a" 30 $ hg qrefresh -m "rm a"
31 31
32 Save the patch queue so we can merge it later: 32 Save the patch queue so we can merge it later:
33 33
34 $ hg qsave -c -e 34 $ hg qsave -c -e
35 copy .*/t/\.hg/patches to .*/t/\.hg/patches\.1 35 copy .*/t/\.hg/patches to .*/t/\.hg/patches\.1 (re)
36 $ checkundo 36 $ checkundo
37 37
38 Update b and commit in an "update" changeset: 38 Update b and commit in an "update" changeset:
39 39
40 $ hg up -C init 40 $ hg up -C init
50 $ hg manifest 50 $ hg manifest
51 a 51 a
52 b 52 b
53 53
54 $ hg qpush -a -m 54 $ hg qpush -a -m
55 merging with queue at: .*/t/\.hg/patches\.1 55 merging with queue at: .*/t/\.hg/patches\.1 (re)
56 applying rm_a 56 applying rm_a
57 now at: rm_a 57 now at: rm_a
58 58
59 $ checkundo 59 $ checkundo
60 $ hg manifest 60 $ hg manifest
89 $ hg qnew -d '0 0' -f -e patcha2 89 $ hg qnew -d '0 0' -f -e patcha2
90 90
91 Create the reference queue: 91 Create the reference queue:
92 92
93 $ hg qsave -c -e -n refqueue 93 $ hg qsave -c -e -n refqueue
94 copy .*/t2/\.hg/patches to .*/t2/\.hg/refqueue 94 copy .*/t2/\.hg/patches to .*/t2/\.hg/refqueue (re)
95 $ hg up -C 1 95 $ hg up -C 1
96 1 files updated, 0 files merged, 1 files removed, 0 files unresolved 96 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
97 97
98 Merge: 98 Merge:
99 99
100 $ HGMERGE=internal:other hg qpush -a -m -n refqueue 100 $ HGMERGE=internal:other hg qpush -a -m -n refqueue
101 merging with queue at: .*/t2/\.hg/refqueue 101 merging with queue at: .*/t2/\.hg/refqueue (re)
102 applying patcha 102 applying patcha
103 patching file a 103 patching file a
104 Hunk #1 FAILED at 0 104 Hunk #1 FAILED at 0
105 1 out of 1 hunks FAILED -- saving rejects to file a.rej 105 1 out of 1 hunks FAILED -- saving rejects to file a.rej
106 patch failed, unable to continue (try -v) 106 patch failed, unable to continue (try -v)
136 136
137 Check patcha2 is still a regular patch: 137 Check patcha2 is still a regular patch:
138 138
139 $ cat .hg/patches/patcha2 139 $ cat .hg/patches/patcha2
140 # HG changeset patch 140 # HG changeset patch
141 # Parent ........................................ 141 # Parent ........................................ (re)
142 # Date 0 0 142 # Date 0 0
143 143
144 diff -r ............ -r ............ a 144 diff -r ............ -r ............ a (re)
145 --- a/a 145 --- a/a
146 +++ b/a 146 +++ b/a
147 @@ -1,2 +1,3 @@ 147 @@ -1,2 +1,3 @@
148 a 148 a
149 c 149 c