| Index: gcl.py
|
| ===================================================================
|
| --- gcl.py (revision 33161)
|
| +++ gcl.py (working copy)
|
| @@ -7,6 +7,7 @@
|
| changelists."""
|
|
|
| import getpass
|
| +import optparse
|
| import os
|
| import random
|
| import re
|
| @@ -920,6 +921,12 @@
|
|
|
|
|
| def Commit(change_info, args):
|
| + parser = optparse.OptionParser(usage='gcl commit [options]')
|
| + parser.add_option('-c', '--contributor',
|
| + help="external contributor for patch (appended to " +
|
| + "description)")
|
| + (options, args) = parser.parse_args(args)
|
| +
|
| if not change_info.GetFiles():
|
| print "Nothing to commit, changelist is empty."
|
| return
|
| @@ -939,6 +946,8 @@
|
| change_info.description = GetIssueDescription(change_info.issue)
|
|
|
| commit_message = change_info.description.replace('\r\n', '\n')
|
| + if options.contributor:
|
| + commit_message += ('\nPatch from %s' % options.contributor)
|
| if change_info.issue:
|
| commit_message += ('\nReview URL: http://%s/%d' %
|
| (GetCodeReviewSetting("CODE_REVIEW_SERVER"),
|
|
|