def find_tags(self):
valid_tags = []<EOL>listing = self.context.capture('<STR_LIT>', '<STR_LIT>')<EOL>for line in listing.splitlines():<EOL><INDENT>tokens = line.split()<EOL>if len(tokens) == <NUM_LIT:2> and tokens[<NUM_LIT:1>] != '<STR_LIT:?>':<EOL><INDENT>valid_tags.append(tokens[<NUM_LIT:0>])<EOL><DEDENT><DEDENT>listing = self.context.capture('<STR_LIT>', '<STR_LIT>', '<STR_LIT>')<EOL>for line in listing.splitlines():<EOL><INDENT>tokens = line.split()<EOL>if len(tokens) == <NUM_LIT:2> and tokens[<NUM_LIT:0>] in valid_tags:<EOL><INDENT>tag, revision_id = tokens<EOL>yield Revision(<EOL>repository=self,<EOL>revision_id=tokens[<NUM_LIT:1>],<EOL>tag=tokens[<NUM_LIT:0>],<EOL>)<EOL><DEDENT><DEDENT>
Find information about the tags in the repository.

.. note:: The ``bzr tags`` command reports tags pointing to
          non-existing revisions as ``?`` but doesn't provide revision
          ids. We can get the revision ids using the ``bzr tags
          --show-ids`` command but this command doesn't mark tags
          pointing to non-existing revisions. We combine the output of
          both because we want all the information.