From e5c0d5f2f3f7637cad6baca9e33778d0c054195d Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 7 Jul 2009 22:18:56 -0400 Subject: Added new-bug-from-stdin to mirror comments-from-stdin. --- becommands/new.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'becommands/new.py') diff --git a/becommands/new.py b/becommands/new.py index 32e070a..ec28138 100644 --- a/becommands/new.py +++ b/becommands/new.py @@ -45,7 +45,11 @@ def execute(args, test=False): if len(args) != 1: raise cmdutil.UsageError("Please supply a summary message") bd = bugdir.BugDir(from_disk=True, manipulate_encodings=not test) - bug = bd.new_bug(summary=args[0]) + if args[0] == '-': # read summary from stdin + summary = sys.stdin.readline() + else: + summary = args[0] + bug = bd.new_bug(summary=summary.strip()) if options.reporter != None: bug.reporter = options.reporter else: @@ -66,8 +70,9 @@ def get_parser(): return parser longhelp=""" -Create a new bug, with a new ID. The summary specified on the commandline -is a string that describes the bug briefly. +Create a new bug, with a new ID. The summary specified on the +commandline is a string (only one line) that describes the bug briefly +or "-", in which case the string will be read from stdin. """ def help(): -- cgit From f87355fddc2a931e3f984d074a713f4313d5f709 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 11 Jul 2009 07:46:22 -0400 Subject: Adjustments to new versioned_property behavior. Also adjusted libbe/comment.py to move to user-specified alt_ids, rather than uuids. --- becommands/new.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'becommands/new.py') diff --git a/becommands/new.py b/becommands/new.py index ec28138..922b5ed 100644 --- a/becommands/new.py +++ b/becommands/new.py @@ -16,7 +16,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """Create a new bug""" -from libbe import cmdutil, bugdir, settings_object +from libbe import cmdutil, bugdir __desc__ = __doc__ def execute(args, test=False): @@ -36,7 +36,7 @@ def execute(args, test=False): True >>> print bug.severity minor - >>> bug.target == settings_object.EMPTY + >>> bug.target == None True """ parser = get_parser() @@ -56,7 +56,7 @@ def execute(args, test=False): bug.reporter = bug.creator if options.assigned != None: bug.assigned = options.assigned - elif bd.default_assignee != settings_object.EMPTY: + elif bd.default_assignee != None: bug.assigned = bd.default_assignee bd.save() print "Created bug with ID %s" % bd.bug_shortname(bug) -- cgit From a03fea1b2b2eeb95d8ab62c49724bbf0cf631f19 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 11 Jul 2009 08:13:34 -0400 Subject: Removed from copyright blurbs. These didn't work with my update_copyright.sh. I went with Aaron Bentley and Panometrics, Inc. instead of Aaron Bentley and Panometrics, Inc. just because of line length, but I'm open to convincing if people prefer the latter... --- becommands/new.py | 1 - 1 file changed, 1 deletion(-) (limited to 'becommands/new.py') diff --git a/becommands/new.py b/becommands/new.py index 922b5ed..ceb4949 100644 --- a/becommands/new.py +++ b/becommands/new.py @@ -1,6 +1,5 @@ # Copyright (C) 2005-2009 Aaron Bentley and Panometrics, Inc. # W. Trevor King -# # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -- cgit