Changed bug settings:
status: open -> closed
>>> if bd.vcs.versioned == True:
- ... execute(["--subscribe", "DIR:mod", "--uuids", original],
+ ... execute(["--subscribe", "%(bugdir_id)s:mod", "--uuids", original],
... manipulate_encodings=False)
... else:
... print "a"
...
UsageError: This directory is not revision-controlled.
>>> bd.cleanup()
- """
+ """ % {'bugdir_id':diff.BUGDIR_ID}
parser = get_parser()
options, args = parser.parse_args(args)
cmdutil.default_complete(options, args, parser)
servers = options.servers.split(",")
types = options.types.split(",")
- if len(args) == 0 or args[0] == "DIR": # directory-wide subscriptions
+ if len(args) == 0 or args[0] == diff.BUGDIR_ID: # directory-wide subscriptions
type_root = diff.BUGDIR_TYPE_ALL
entity = bd
entity_name = "bug directory"
Returns a dict of dicts:
subscribers[user][id] = types
where id is either a bug.uuid (in the case of a bug subscription)
- or "DIR" (in the case of a bugdir subscription).
+ or "%(bugdir_id)s" (in the case of a bugdir subscription).
Only checks bugs that are currently in memory, so you might want
to call bugdir.load_all_bugs() first.
>>> a.extra_strings = subscribe(a.extra_strings, "John Doe <j@doe.com>",
... [diff.BUG_TYPE_ALL], ["a.com"], diff.BUG_TYPE_ALL)
>>> subscribers = get_bugdir_subscribers(bd, "a.com")
- >>> subscribers["Jane Doe <J@doe.com>"]["DIR"]
+ >>> subscribers["Jane Doe <J@doe.com>"]["%(bugdir_id)s"]
[<SubscriptionType: new>]
- >>> subscribers["John Doe <j@doe.com>"]["DIR"]
+ >>> subscribers["John Doe <j@doe.com>"]["%(bugdir_id)s"]
[<SubscriptionType: all>]
>>> subscribers["John Doe <j@doe.com>"]["a"]
[<SubscriptionType: all>]
>>> get_bugdir_subscribers(bd, "b.net")
- {'Jane Doe <J@doe.com>': {'DIR': [<SubscriptionType: new>]}}
+ {'Jane Doe <J@doe.com>': {'%(bugdir_id)s': [<SubscriptionType: new>]}}
>>> bd.cleanup()
- """
+ """ % {'bugdir_id':diff.BUGDIR_ID}
subscribers = {}
for sub in get_subscribers(bugdir.extra_strings, diff.BUGDIR_TYPE_ALL,
server, diff.BUGDIR_TYPE_ALL,