From: W. Trevor King Date: Mon, 30 Nov 2009 11:26:49 +0000 (-0500) Subject: Avoid redundant Comment.alt_ids X-Git-Tag: 1.0.0~59^2~76^2~5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c1fc4595171fa6eec802eb65a0fde0b53878a077;p=be.git Avoid redundant Comment.alt_ids --- 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: