|
|
@ -87,10 +87,17 @@ def main():
|
|
|
|
'is detected.')
|
|
|
|
'is detected.')
|
|
|
|
parser.add_option('-b', '--base_ref', help='Base git ref to patch on top of, '
|
|
|
|
parser.add_option('-b', '--base_ref', help='Base git ref to patch on top of, '
|
|
|
|
'used for verification.')
|
|
|
|
'used for verification.')
|
|
|
|
|
|
|
|
parser.add_option('--whitelist', action='append', default=[],
|
|
|
|
|
|
|
|
help='Patch only specified file(s).')
|
|
|
|
|
|
|
|
parser.add_option('--blacklist', action='append', default=[],
|
|
|
|
|
|
|
|
help='Don\'t patch specified file(s).')
|
|
|
|
parser.add_option('-d', '--ignore_deps', action='store_true',
|
|
|
|
parser.add_option('-d', '--ignore_deps', action='store_true',
|
|
|
|
help='Don\'t run gclient sync on DEPS changes.')
|
|
|
|
help='Don\'t run gclient sync on DEPS changes.')
|
|
|
|
options, args = parser.parse_args()
|
|
|
|
options, args = parser.parse_args()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if options.whitelist and options.blacklist:
|
|
|
|
|
|
|
|
parser.error('Cannot specify both --whitelist and --blacklist')
|
|
|
|
|
|
|
|
|
|
|
|
if options.password and options.private_key_file:
|
|
|
|
if options.password and options.private_key_file:
|
|
|
|
parser.error('-k and -w options are incompatible')
|
|
|
|
parser.error('-k and -w options are incompatible')
|
|
|
|
if options.email and options.email_file:
|
|
|
|
if options.email and options.email_file:
|
|
|
@ -185,6 +192,12 @@ def main():
|
|
|
|
options.issue, options.patchset,
|
|
|
|
options.issue, options.patchset,
|
|
|
|
options.server, options.issue)
|
|
|
|
options.server, options.issue)
|
|
|
|
return 1
|
|
|
|
return 1
|
|
|
|
|
|
|
|
if options.whitelist:
|
|
|
|
|
|
|
|
patchset.patches = [patch for patch in patchset.patches
|
|
|
|
|
|
|
|
if patch.filename in options.whitelist]
|
|
|
|
|
|
|
|
if options.blacklist:
|
|
|
|
|
|
|
|
patchset.patches = [patch for patch in patchset.patches
|
|
|
|
|
|
|
|
if patch.filename not in options.blacklist]
|
|
|
|
for patch in patchset.patches:
|
|
|
|
for patch in patchset.patches:
|
|
|
|
print(patch)
|
|
|
|
print(patch)
|
|
|
|
full_dir = os.path.abspath(options.root_dir)
|
|
|
|
full_dir = os.path.abspath(options.root_dir)
|
|
|
|