OLD | NEW |
---|---|
1 # Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 1 # Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
2 # | 2 # |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions | 4 # modification, are permitted provided that the following conditions |
5 # are met: | 5 # are met: |
6 # | 6 # |
7 # 1. Redistributions of source code must retain the above | 7 # 1. Redistributions of source code must retain the above |
8 # copyright notice, this list of conditions and the following | 8 # copyright notice, this list of conditions and the following |
9 # disclaimer. | 9 # disclaimer. |
10 # 2. Redistributions in binary form must reproduce the above | 10 # 2. Redistributions in binary form must reproduce the above |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
223 if not self.options.dry_run and self.import_in_place: | 223 if not self.options.dry_run and self.import_in_place: |
224 _log.info(" pruning %s" % path_base) | 224 _log.info(" pruning %s" % path_base) |
225 self.filesystem.remove(path_full) | 225 self.filesystem.remove(path_full) |
226 continue | 226 continue |
227 else: | 227 else: |
228 continue | 228 continue |
229 # FIXME: This block should really be a separate function, but th e early-continues make that difficult. | 229 # FIXME: This block should really be a separate function, but th e early-continues make that difficult. |
230 | 230 |
231 if filename.startswith('.') or filename.endswith('.pl'): | 231 if filename.startswith('.') or filename.endswith('.pl'): |
232 continue # For some reason the w3c repo contains random per l scripts we don't care about. | 232 continue # For some reason the w3c repo contains random per l scripts we don't care about. |
233 if filename == 'OWNERS': | |
234 continue # These files fail our presubmits | |
qyearsley
2016/06/02 20:59:41
Could add a period at the end of the sentence, for
| |
235 | |
233 | 236 |
234 fullpath = self.filesystem.join(root, filename) | 237 fullpath = self.filesystem.join(root, filename) |
235 | 238 |
236 mimetype = mimetypes.guess_type(fullpath) | 239 mimetype = mimetypes.guess_type(fullpath) |
237 if not 'html' in str(mimetype[0]) and not 'application/xhtml+xml ' in str(mimetype[0]) and not 'application/xml' in str(mimetype[0]): | 240 if not 'html' in str(mimetype[0]) and not 'application/xhtml+xml ' in str(mimetype[0]) and not 'application/xml' in str(mimetype[0]): |
238 copy_list.append({'src': fullpath, 'dest': filename}) | 241 copy_list.append({'src': fullpath, 'dest': filename}) |
239 continue | 242 continue |
240 | 243 |
241 if self.filesystem.basename(root) in DIRS_TO_INCLUDE: | 244 if self.filesystem.basename(root) in DIRS_TO_INCLUDE: |
242 copy_list.append({'src': fullpath, 'dest': filename}) | 245 copy_list.append({'src': fullpath, 'dest': filename}) |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
409 _log.info(' %s: %s', prefixed_property, total_prefixed_properti es[prefixed_property]) | 412 _log.info(' %s: %s', prefixed_property, total_prefixed_properti es[prefixed_property]) |
410 | 413 |
411 def path_too_long(self, source_path): | 414 def path_too_long(self, source_path): |
412 """Checks whether a source path is too long to import. | 415 """Checks whether a source path is too long to import. |
413 | 416 |
414 Args: | 417 Args: |
415 Absolute path of file to be imported. | 418 Absolute path of file to be imported. |
416 """ | 419 """ |
417 path_from_repo_base = os.path.relpath(source_path, self.top_of_repo) | 420 path_from_repo_base = os.path.relpath(source_path, self.top_of_repo) |
418 return len(path_from_repo_base) > MAX_PATH_LENGTH | 421 return len(path_from_repo_base) > MAX_PATH_LENGTH |
OLD | NEW |