equal
deleted
inserted
replaced
1210 _haltmerge() |
1210 _haltmerge() |
1211 # default action is 'continue', in which case we neither prompt nor halt |
1211 # default action is 'continue', in which case we neither prompt nor halt |
1212 |
1212 |
1213 |
1213 |
1214 def hasconflictmarkers(data): |
1214 def hasconflictmarkers(data): |
|
1215 # Detect lines starting with a string of 7 identical characters from the |
|
1216 # subset Mercurial uses for conflict markers, followed by either the end of |
|
1217 # line or a space and some text. Note that using [<>=+|-]{7} would detect |
|
1218 # `<><><><><` as a conflict marker, which we don't want. |
1215 return bool( |
1219 return bool( |
1216 re.search( |
1220 re.search( |
1217 br"^(<<<<<<<.*|=======.*|------- .*|\+\+\+\+\+\+\+ .*|>>>>>>>.*)$", |
1221 br"^([<>=+|-])\1{6}( .*)$", |
1218 data, |
1222 data, |
1219 re.MULTILINE, |
1223 re.MULTILINE, |
1220 ) |
1224 ) |
1221 ) |
1225 ) |
1222 |
1226 |