~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revisionspec.py

  • Committer: John Arbash Meinel
  • Date: 2005-09-18 18:16:42 UTC
  • mto: (1185.1.27)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: john@arbash-meinel.com-20050918181642-929509099f2cf7e8
Fixed bzr revert with the new RevisionSpec code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
167
167
                              self.spec)
168
168
 
169
169
    def __eq__(self, other):
170
 
        if other is None:
171
 
            if self.spec is None:
172
 
                return True
173
 
            return False
174
 
        if not isinstance(other, RevisionSpec):
175
 
            raise TypeError('Do not know how to compare a RevisionSpec against a %s' % type(other))
176
 
        return self.spec == other.spec
 
170
        if isinstance(other, RevisionSpec):
 
171
            return self.spec == other.spec
 
172
        return other == self.spec
177
173
 
178
174
 
179
175
# private API