diff --git a/project.py b/project.py index 704680fd..b8147424 100755 --- a/project.py +++ b/project.py @@ -176,6 +176,7 @@ class ReviewableBranch(object): auto_topic=False, draft=False, private=False, + notify=None, wip=False, dest_branch=None, validate_certs=True, @@ -185,6 +186,7 @@ class ReviewableBranch(object): auto_topic=auto_topic, draft=draft, private=private, + notify=notify, wip=wip, dest_branch=dest_branch, validate_certs=validate_certs, @@ -1118,6 +1120,7 @@ class Project(object): auto_topic=False, draft=False, private=False, + notify=None, wip=False, dest_branch=None, validate_certs=True, @@ -1174,6 +1177,8 @@ class Project(object): opts = ['r=%s' % p for p in people[0]] opts += ['cc=%s' % p for p in people[1]] + if notify: + opts += ['notify=' + notify] if private: opts += ['private'] if wip: diff --git a/subcmds/upload.py b/subcmds/upload.py index 02b43b40..acb9d7f0 100644 --- a/subcmds/upload.py +++ b/subcmds/upload.py @@ -150,6 +150,9 @@ Gerrit Code Review: https://www.gerritcodereview.com/ p.add_option('-d', '--draft', action='store_true', dest='draft', default=False, help='If specified, upload as a draft.') + p.add_option('--ne', '--no-emails', + action='store_false', dest='notify', default=True, + help='If specified, do not send emails on upload.') p.add_option('-p', '--private', action='store_true', dest='private', default=False, help='If specified, upload as a private change.') @@ -391,6 +394,7 @@ Gerrit Code Review: https://www.gerritcodereview.com/ auto_topic=opt.auto_topic, draft=opt.draft, private=opt.private, + notify=None if opt.notify else 'NONE', wip=opt.wip, dest_branch=destination, validate_certs=opt.validate_certs,