Commit 6f2df634 authored by Remi Rampin's avatar Remi Rampin
Browse files

Check non-primitive files match upstream

Before validating changed files, check whether any non-primitive file
has been changed. If they have, fail validation immediately with an
informative message telling you to update your branch.

Without this check, the validator will try to validate those files and
fail with non-obvious message about that file being invalid, which is
confusing to the user if he didn't even touch that file (it changed
parent 18a80ae9
......@@ -1044,6 +1044,9 @@ else:
if arguments.devel:
files_changed = filter_for_devel(files_changed)
if any(not os.path.relpath(file_path).startswith('v') for file_path in file_changed):
raise ValidationError("There are non-primitive file changes between your branch and upstream. If you have not authored those changes, you need to update your branch with upstream.")
error_count = 0
installations = collections.defaultdict(list)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment