Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Unified Diff: ppapi/generators/idl_outfile.py

Issue 849283003: PPAPI generator: Ignore more date-only changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/generators/idl_outfile.py
diff --git a/ppapi/generators/idl_outfile.py b/ppapi/generators/idl_outfile.py
index 053cf3ea05b95e549a7ee80075904c3638d55546..f6a16275ccecb89e2d5e08c5b766a81190c18d3f 100755
--- a/ppapi/generators/idl_outfile.py
+++ b/ppapi/generators/idl_outfile.py
@@ -54,6 +54,7 @@ class IDLOutFile(object):
curwords = curline.split()
oldwords = oldline.split()
+ # It wasn't a perfect match. Check for changes we should ignore.
# Unmatched lines must be the same length
if len(curwords) != len(oldwords):
return False
@@ -67,16 +68,19 @@ class IDLOutFile(object):
if len(curwords) > 4 and curwords[1] == 'Copyright':
if curwords[4:] == oldwords[4:]: continue
- # Ignore changes to auto generation timestamp when line unwrapped
+ # Ignore changes to auto generation timestamp.
# // From FILENAME.idl modified DAY MON DATE TIME YEAR.
# /* From FILENAME.idl modified DAY MON DATE TIME YEAR. */
- if len(curwords) > 8 and curwords[1] == 'From':
+ # The line may be wrapped, so first deal with the first "From" line.
+ if curwords[1] == 'From':
if curwords[0:4] == oldwords[0:4]: continue
# Ignore changes to auto generation timestamp when line is wrapped
- # * modified DAY MON DATE TIME YEAR.
- if len(curwords) > 6 and curwords[1] == 'modified':
- continue
+ if index > 0:
+ two_line_oldwords = oldlines[index - 1].split() + oldwords[1:]
+ two_line_curwords = curlines[index - 1].split() + curwords[1:]
+ if len(two_line_curwords) > 8 and two_line_curwords[1] == 'From':
+ if two_line_curwords[0:4] == two_line_oldwords[0:4]: continue
return False
return True
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698