Revert of git_cl: Add the ability to set the description. (patchset #3 id:40001 of https://codereview.chromium.org/1922133006/ )
Reason for revert:
splitlines man
Original issue's description:
> git_cl: Add the ability to set the description.
>
> BUG=607359
>
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=300357
TBR=iannucci@chromium.org,tandrii@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=607359
Review-Url: https://codereview.chromium.org/1935633002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300360 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/git_cl.py b/git_cl.py
index b0c42f4..bf94913 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -3279,8 +3279,6 @@
"""Brings up the editor for the current CL's description."""
parser.add_option('-d', '--display', action='store_true',
help='Display the description instead of opening an editor')
- parser.add_option('-n', '--new-description',
- help='New description to set for this issue (- for stdin)')
_add_codereview_select_options(parser)
auth.add_auth_options(parser)
@@ -3304,20 +3302,10 @@
if not cl.GetIssue():
DieWithError('This branch has no associated changelist.')
description = ChangeDescription(cl.GetDescription())
-
if options.display:
print description.description
return 0
-
- if options.new_description:
- text = options.new_description
- if text == '-':
- text = '\n'.join(sys.stdin.splitlines())
-
- description.set_description(text)
- else:
- description.prompt()
-
+ description.prompt()
if cl.GetDescription() != description.description:
cl.UpdateDescription(description.description)
return 0