aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/comment.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-11-30 06:26:49 -0500
committerW. Trevor King <wking@drexel.edu>2009-11-30 06:26:49 -0500
commitc1fc4595171fa6eec802eb65a0fde0b53878a077 (patch)
treef3e1979513ce130288e4069e551643dd8b39fef3 /libbe/comment.py
parent19cea054def7997bb13ecc77269b7b612f658d16 (diff)
downloadbugseverywhere-c1fc4595171fa6eec802eb65a0fde0b53878a077.tar.gz
Avoid redundant Comment.alt_ids
Diffstat (limited to 'libbe/comment.py')
-rw-r--r--libbe/comment.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/libbe/comment.py b/libbe/comment.py
index 9502adf..c5f1cc9 100644
--- a/libbe/comment.py
+++ b/libbe/comment.py
@@ -366,7 +366,7 @@ class Comment(Tree, settings_object.SavedSettingsObject):
elif verbose == True:
print >> sys.stderr, 'Ignoring unknown tag %s in %s' \
% (child.tag, comment.tag)
- if self.alt_id == None:
+ if uuid != self.uuid and self.alt_id == None:
self.explicit_attrs.append('alt_id')
self.alt_id = uuid
if body != None:
@@ -437,6 +437,8 @@ class Comment(Tree, settings_object.SavedSettingsObject):
raise ValueError, \
'Merge would change %s "%s"->"%s" for comment %s' \
% (attr, old, new, self.uuid)
+ if self.alt_id == self.uuid:
+ self.alt_id = None
for estr in other.extra_strings:
if not estr in self.extra_strings:
if accept_extra_strings == True: