Remove an entry from the Chromium DEPS file at the specified path.
(path, entry)
| 378 | |
| 379 | |
| 380 | def remove_deps_entry(path, entry): |
| 381 | """ Remove an entry from the Chromium DEPS file at the specified path. """ |
| 382 | msg('Updating DEPS file: %s' % path) |
| 383 | if not options.dryrun: |
| 384 | # Read the DEPS file. |
| 385 | fp = open(path, 'r') |
| 386 | lines = fp.readlines() |
| 387 | fp.close() |
| 388 | |
| 389 | # Write the DEPS file. |
| 390 | # Each entry takes 2 lines. Skip both lines if found. |
| 391 | fp = open(path, 'w') |
| 392 | skip_next = False |
| 393 | for line in lines: |
| 394 | if skip_next: |
| 395 | skip_next = False |
| 396 | continue |
| 397 | elif line.find(entry) >= 0: |
| 398 | skip_next = True |
| 399 | continue |
| 400 | fp.write(line) |
| 401 | fp.close() |
| 402 | |
| 403 | |
| 404 | def apply_deps_patch(): |
no test coverage detected