##// END OF EJS Templates
filemerge: be more strict when detecting conflict markers, add `|` markers...
Kyle Lippincott -
r48753:053dd53a stable
parent child Browse files
Show More
@@ -1212,9 +1212,13 b' def _onfilemergefailure(ui):'
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 )
General Comments 0
You need to be logged in to leave comments. Login now