Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: abp/filters/renderer.py

Issue 29884571: Issue 6945 - Add script to make filter list diffs (Closed) Base URL: https://hg.adblockplus.org/python-abp/
Patch Set: Fix docstring Created Sept. 26, 2018, 6:20 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « abp/filters/diff_script.py ('k') | setup.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: abp/filters/renderer.py
===================================================================
--- a/abp/filters/renderer.py
+++ b/abp/filters/renderer.py
@@ -217,6 +217,9 @@
yield latest.to_string()
for key in set(base_metadata) - set(latest_metadata):
yield '! {}:'.format(base_metadata[key].key)
+ # The removed filters are listed first because, in case a filter is both
+ # removed and added, (and the client processes the diff in order), the
+ # filter will be added.
for rule in base_rules - latest_rules:
yield '- {}'.format(rule)
for rule in latest_rules - base_rules:
« no previous file with comments | « abp/filters/diff_script.py ('k') | setup.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld