summaryrefslogtreecommitdiff
path: root/trunk/ACE/bin/PythonACE/fuzz/no_conflict_markers.py
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/ACE/bin/PythonACE/fuzz/no_conflict_markers.py')
-rw-r--r--trunk/ACE/bin/PythonACE/fuzz/no_conflict_markers.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/trunk/ACE/bin/PythonACE/fuzz/no_conflict_markers.py b/trunk/ACE/bin/PythonACE/fuzz/no_conflict_markers.py
new file mode 100644
index 00000000000..62066b42333
--- /dev/null
+++ b/trunk/ACE/bin/PythonACE/fuzz/no_conflict_markers.py
@@ -0,0 +1,20 @@
+""" Checks that the file does not contain SVN conflict markers """
+
+
+type_list = ["*"]
+
+from sys import stderr
+import re
+
+regex = re.compile ("^<<<<<<< \.|>>>>>>> \.r|^=======$", re.MULTILINE)
+begin_exclude = re.compile ("FUZZ\: disable conflict_marker_check")
+end_exclude = re.compile ("FUZZ\: enable conflict_marker_check")
+
+error_message = ": error: contains a SVN conflict marker. Please resolve the conflict before committing.\n"
+
+from _generic_handler import generic_handler
+
+def handler (file_name, file_content):
+ return generic_handler (regex, begin_exclude, end_exclude, error_message, file_name, file_content)
+
+