lp:~gz/hydrazine/trivial_nameerror_find_status_877413

Created by Martin Packman and last modified
Get this branch:
bzr branch lp:~gz/hydrazine/trivial_nameerror_find_status_877413
Only Martin Packman can upload to this branch. If you are Martin Packman please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Martin Packman
Project:
Hydrazine
Status:
Merged

Recent revisions

100. By Martin Packman

Don't refer to find_status when there are no pending mps

99. By Alex Chiang

bugclient: add input validation for 'filter' command, other NamedEnums

Give the NamedEnum() class a new method, 'show_valid()'.

This gives us a standard way to handle error checking if the user
enters an invalid enum.

Harden the 'filter' command so it doesn't puke when you just type it
without any arguments

98. By Martin Packman

Merge requesting of WRITE_PRIVATE access only, and add NEWS

97. By Martin Packman

Merge use of bzr config for email in feed-pqm, and add NEWS

96. By Martin Packman

Merge hiding of proposals with unmerged prerequisites in feed-pqm, and add NEWS

95. By Alex Chiang

bugclient: add 'milestone' command

Allow user to set a milestone for a bugtask.

94. By Alex Chiang

bugclient: fix stacktrace in do_official_tags when there are no tags

Slight refactor of logic to return early if there are no official tags
defined for a pillar. Without this fix, we get the following stack trace:

  Traceback (most recent call last):
    File "./bugclient", line 519, in <module>
      main(sys.argv)
    File "./bugclient", line 515, in main
      cmd.cmdloop()
    File "/usr/lib/python2.7/cmd.py", line 142, in cmdloop
      stop = self.onecmd(line)
    File "./bugclient", line 379, in onecmd
      return cmd.Cmd.onecmd(self, cmdline)
    File "/usr/lib/python2.7/cmd.py", line 219, in onecmd
      return func(arg)
    File "./bugclient", line 233, in do_official_tags
      _show_columnated(tags)
    File "./bugclient", line 465, in _show_columnated
      longest = max(map(len, tags))
  ValueError: max() arg is an empty sequence

93. By Alex Chiang

bugclient: add 'filter' and 'batch' commands

Add a filter for batch operations
examples:
  filter milestone M1 # milestone named 'M1'
  filter status new # all New bugs
  filter tags a b c # tags 'a', 'b', and 'c'
  filter clear # remove all filters

Perform batch operation on current pillar's bugs.
Use the 'filter' command to limit the batch command's scope of bugs.

example:
    filter status new
    batch show # show information on all New bugs
    batch status confirmed # change all New bugs to Confirmed

XXX: there is very little error checking right now. We allow users to
blow off their entire leg.

But it's a good start.

select_new is completely superseded by the functionality of filters
and the batch command, so it is removed.

OLD:
 hydrazine> select_new # select New bugs and wait for user
 hydrazine> next # go to next bug
 hydrazine> next # go to next bug

NEW:
 hydrazine> filter status new # add filter for New bugs
 hydrazine> batch # load bug list and wait for user
 hydrazine> next # go to next bug
 hydrazine> next # go to next bug

92. By Alex Chiang

bugclient: internal new NamedEnum() class to hold status, importance

Create a new, generic enum class, into which we can stuff various
lists of enums, such as launchpad status, importance, etc.

Demonstrate at least one new benefit of the refactorization, viz.
we can give better feedback if the user attempts to pass an invalid
value into do_status() or do_importance(), by displaying the values
we recognize.

It would be better if we could learn these enums directly from
launchpadlib itself, but this class also allows us to define
hydrazine-specific enums in future commits.

91. By Alex Chiang

bugclient: prevent 'next' command from walking off end of task list

Currently, while iterating over the list of new bugs obtained by
the 'select_all' command, the internal implementation of 'next'
walks off the end of the list, causing hydrazine to exit with a
stack trace. Not very friendly.

Add a simple exception handler to prevent this silly thing from
happening.

Prints a new, user-visible string indicating to user that there are
no more bugs in the currently selected list.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:hydrazine
This branch contains Public information 
Everyone can see this information.

Subscribers