Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Unified Diff: gcl.py

Issue 434061: gcl: add a new flag '-c' that stands for 'contributor'.... (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools/
Patch Set: following marc comments Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/gcl_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"),
« no previous file with comments | « no previous file | tests/gcl_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698