uprev check: ignore portage-stable & ChangeLog files
We almost never want to manually create a -r# symlink in the
portage-stable overlay, so ignore all changes in that repo.
Also, the ChangeLog files can be safely ignored.
BUG=chromium:254502
TEST=created CLs in portage-stable and made sure they were skipped
Change-Id: I0d9a85b7a39eac022b8828196ac8682d844645ca
Reviewed-on: https://chromium-review.googlesource.com/183091
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/pre-upload.py b/pre-upload.py
index 5320577..b96ca55 100755
--- a/pre-upload.py
+++ b/pre-upload.py
@@ -399,10 +399,19 @@
Returns:
A HookFailure or None.
"""
+ # If this is the portage-stable overlay, then ignore the check. It's rare
+ # that we're doing anything other than importing files from upstream, so
+ # forcing a rev bump makes no sense.
+ whitelist = (
+ 'chromiumos/overlays/portage-stable',
+ )
+ if project in whitelist:
+ return None
+
affected_paths = _get_affected_files(commit, include_deletes=True)
# Don't yell about changes to whitelisted files...
- whitelist = ['Manifest', 'metadata.xml']
+ whitelist = ('ChangeLog', 'Manifest', 'metadata.xml')
affected_paths = [path for path in affected_paths
if os.path.basename(path) not in whitelist]
if not affected_paths: