diff options
author | W. Trevor King <wking@drexel.edu> | 2009-07-27 07:18:13 -0400 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-07-27 07:18:13 -0400 |
commit | 159dc9303e10cef81388fb686f79312cc1018c65 (patch) | |
tree | 4924ec024c891631077f37ef1d8c853f17a53c66 /libbe/bug.py | |
parent | 3711c5080619b0decf0ae040a9d244bf3b902c41 (diff) | |
download | bugseverywhere-159dc9303e10cef81388fb686f79312cc1018c65.tar.gz |
Added cmp functions to libbe.comment, and fleshed them out in libbe.bug.
Previous comment comparison had just been the default Tree.__cmp__.
Fleshed out so A == B ensures no meaningful differences between A and B.
Also added first line of comments to new comment output in libbe.diff,
and added a comment/"settings" node and .comment_mod_string() (to
mirror bugdir and bug).
Diffstat (limited to 'libbe/bug.py')
-rw-r--r-- | libbe/bug.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libbe/bug.py b/libbe/bug.py index 3d9cc08..7554318 100644 --- a/libbe/bug.py +++ b/libbe/bug.py @@ -512,8 +512,12 @@ def cmp_attr(bug_1, bug_2, attr, invert=False): return cmp(val_1, val_2) # alphabetical rankings (a < z) +cmp_uuid = lambda bug_1, bug_2 : cmp_attr(bug_1, bug_2, "uuid") cmp_creator = lambda bug_1, bug_2 : cmp_attr(bug_1, bug_2, "creator") cmp_assigned = lambda bug_1, bug_2 : cmp_attr(bug_1, bug_2, "assigned") +cmp_target = lambda bug_1, bug_2 : cmp_attr(bug_1, bug_2, "target") +cmp_reporter = lambda bug_1, bug_2 : cmp_attr(bug_1, bug_2, "reporter") +cmp_summary = lambda bug_1, bug_2 : cmp_attr(bug_1, bug_2, "summary") # chronological rankings (newer < older) cmp_time = lambda bug_1, bug_2 : cmp_attr(bug_1, bug_2, "time", invert=True) @@ -535,7 +539,8 @@ def cmp_comments(bug_1, bug_2): return 0 DEFAULT_CMP_FULL_CMP_LIST = \ - (cmp_status,cmp_severity,cmp_assigned,cmp_time,cmp_creator,cmp_comments) + (cmp_status, cmp_severity, cmp_assigned, cmp_time, cmp_creator, + cmp_reporter, cmp_target, cmp_comments, cmp_summary, cmp_uuid) class BugCompoundComparator (object): def __init__(self, cmp_list=DEFAULT_CMP_FULL_CMP_LIST): |