# HG changeset patch # User Jeff Hammel # Date 1354657670 28800 # Node ID e843b7f1f4005ce7c8ecc00c4762a9f1b5501ef3 # Parent f6513032ad2856f65c4619032e7e6806ff8a82f3 fix up depends_on diff -r f6513032ad28 -r e843b7f1f400 bzconsole/api.py --- a/bzconsole/api.py Mon Dec 03 14:56:10 2012 -0800 +++ b/bzconsole/api.py Tue Dec 04 13:47:50 2012 -0800 @@ -79,7 +79,8 @@ return self._request('/bug/%d' % number) def new(self, component, title, product=None, - version=None, description=None, whiteboard=(), cc=(), blocks=()): + version=None, description=None, whiteboard=(), cc=(), + blocks=(), depends_on=()): """file a new bug. username and password must be set""" # sanity check @@ -127,6 +128,11 @@ blocks = [int(i) for i in blocks] request['blocks'] = blocks + # add depends_on, if given + if depends_on: + depends_on = [int(i) for i in depends_on] + request['depends_on'] = depends_on + # get the bug description if not description: description = tmpbuffer() diff -r f6513032ad28 -r e843b7f1f400 bzconsole/main.py --- a/bzconsole/main.py Mon Dec 03 14:56:10 2012 -0800 +++ b/bzconsole/main.py Tue Dec 04 13:47:50 2012 -0800 @@ -19,7 +19,7 @@ if component in dupe: return '>>>DUPLICATE<<<' return 'Component "%s" not found' % component - + buffer = StringIO() print >> buffer, 'Unique:' for key in sorted(unique.keys()):