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

Unified Diff: git_cl.py

Issue 15650014: Add --private option to git_cl.py (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools/
Patch Set: Created 7 years, 7 months 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/git_cl_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cl.py
===================================================================
--- git_cl.py (revision 201976)
+++ git_cl.py (working copy)
@@ -367,6 +367,9 @@
def GetDefaultCCList(self):
return self._GetConfig('rietveld.cc', error_ok=True)
+ def GetDefaultPrivateFlag(self):
+ return self._GetConfig('rietveld.private', error_ok=True)
+
def GetIsGerrit(self):
"""Return true if this repo is assosiated with gerrit code review system."""
if self.is_gerrit is None:
@@ -807,6 +810,8 @@
RunGit(['config', 'rietveld.' + name, new_val])
SetProperty(settings.GetDefaultCCList(), 'CC list', 'cc', False)
+ SetProperty(settings.GetDefaultPrivateFlag(),
+ 'Private flag (rietveld only)', 'private', False)
SetProperty(settings.GetTreeStatusUrl(error_ok=True), 'Tree status URL',
'tree-status-url', False)
SetProperty(settings.GetViewVCUrl(), 'ViewVC URL', 'viewvc-url', True)
@@ -944,6 +949,7 @@
# Only server setting is required. Other settings can be absent.
# In that case, we ignore errors raised during option deletion attempt.
SetProperty('cc', 'CC_LIST', unset_error_ok=True)
+ SetProperty('private', 'PRIVATE', unset_error_ok=True)
SetProperty('tree-status-url', 'STATUS', unset_error_ok=True)
SetProperty('viewvc-url', 'VIEW_VC', unset_error_ok=True)
@@ -1271,6 +1277,9 @@
if cc:
upload_args.extend(['--cc', cc])
+ if options.private or settings.GetDefaultPrivateFlag() == "True":
+ upload_args.append('--private')
+
upload_args.extend(['--git_similarity', str(options.similarity)])
if not options.find_copies:
upload_args.extend(['--git_no_find_copies'])
@@ -1353,6 +1362,8 @@
help="Emulate Subversion's auto properties feature.")
parser.add_option('-c', '--use-commit-queue', action='store_true',
help='tell the commit queue to commit this patchset')
+ parser.add_option('--private', action='store_true',
+ help='set the review private (rietveld only)')
parser.add_option('--target_branch',
help='When uploading to gerrit, remote branch to '
'use for CL. Default: master')
« no previous file with comments | « no previous file | tests/git_cl_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698