Index: apply_issue.py |
diff --git a/apply_issue.py b/apply_issue.py |
index 506df4c8cf8863c282175d7938d49f87e355d0fa..91fe2f7f509a427b183600ab8f9949eb55fafc05 100755 |
--- a/apply_issue.py |
+++ b/apply_issue.py |
@@ -85,6 +85,8 @@ |
parser.add_option('-f', '--force', action='store_true', |
help='Really run apply_issue, even if .update.flag ' |
'is detected.') |
+ parser.add_option('-b', '--base_ref', help='Base git ref to patch on top of, ' |
+ 'used for verification.') |
parser.add_option('--whitelist', action='append', default=[], |
help='Patch only specified file(s).') |
parser.add_option('--blacklist', action='append', default=[], |
@@ -203,7 +205,8 @@ |
if scm_type == 'svn': |
scm_obj = checkout.SvnCheckout(full_dir, None, None, None, None) |
elif scm_type == 'git': |
- scm_obj = checkout.GitCheckout(full_dir, None, None, None, None) |
+ scm_obj = checkout.GitCheckout(full_dir, None, None, None, None, |
+ base_ref=options.base_ref,) |
elif scm_type == None: |
scm_obj = checkout.RawCheckout(full_dir, None, None) |
else: |
@@ -220,7 +223,10 @@ |
print('\nApplying the patch.') |
try: |
- scm_obj.apply_patch(patchset, verbose=True) |
+ scm_obj.apply_patch( |
+ patchset, verbose=True, |
+ email=properties.get('owner_email', 'chrome-bot@chromium.org'), |
+ name=properties.get('owner', 'chrome-bot')) |
except checkout.PatchApplicationFailed, e: |
print(str(e)) |
print('CWD=%s' % os.getcwd()) |