diff options
author | W. Trevor King <wking@drexel.edu> | 2009-12-05 04:21:04 -0500 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-12-05 04:21:04 -0500 |
commit | 3cf0394832176a18f658ef3a89521bcccd57cb9e (patch) | |
tree | d6908116da8a86c2ca6aa79879a5cf5093c0e7c9 /becommands | |
parent | fbb8504a6c0438e90b046e44a60608159f4e3f63 (diff) | |
download | bugseverywhere-3cf0394832176a18f658ef3a89521bcccd57cb9e.tar.gz |
More 'DIR'->diff.BUGDIR_ID updates
Diffstat (limited to 'becommands')
-rw-r--r-- | becommands/diff.py | 4 | ||||
-rw-r--r-- | becommands/subscribe.py | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/becommands/diff.py b/becommands/diff.py index e2ff052..2cff537 100644 --- a/becommands/diff.py +++ b/becommands/diff.py @@ -40,7 +40,7 @@ def execute(args, manipulate_encodings=True, restrict_file_access=False): 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" @@ -53,7 +53,7 @@ def execute(args, manipulate_encodings=True, restrict_file_access=False): ... 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) diff --git a/becommands/subscribe.py b/becommands/subscribe.py index 3f4998e..19aac53 100644 --- a/becommands/subscribe.py +++ b/becommands/subscribe.py @@ -91,7 +91,7 @@ def execute(args, manipulate_encodings=True, restrict_file_access=False): 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" @@ -314,7 +314,7 @@ def get_bugdir_subscribers(bugdir, server): 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. @@ -328,16 +328,16 @@ def get_bugdir_subscribers(bugdir, server): >>> 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, |