Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/context.py @ 4815:8808ea7da86b
merge: make test for fast-forward merge stricter (issue619)
don't allow merging with an ancestor
fix != on contexts
add a test
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 05 Jul 2007 13:34:18 -0500 |
parents | 6b2e8cb39583 |
children | e45c5120ca27 |
comparison
equal
deleted
inserted
replaced
4798:452d171a1b39 | 4815:8808ea7da86b |
---|---|
37 def __eq__(self, other): | 37 def __eq__(self, other): |
38 try: | 38 try: |
39 return self._rev == other._rev | 39 return self._rev == other._rev |
40 except AttributeError: | 40 except AttributeError: |
41 return False | 41 return False |
42 | |
43 def __ne__(self, other): | |
44 return not (self == other) | |
42 | 45 |
43 def __nonzero__(self): | 46 def __nonzero__(self): |
44 return self._rev != nullrev | 47 return self._rev != nullrev |
45 | 48 |
46 def __getattr__(self, name): | 49 def __getattr__(self, name): |
183 return (self._path == other._path | 186 return (self._path == other._path |
184 and self._changeid == other._changeid) | 187 and self._changeid == other._changeid) |
185 except AttributeError: | 188 except AttributeError: |
186 return False | 189 return False |
187 | 190 |
191 def __ne__(self, other): | |
192 return not (self == other) | |
193 | |
188 def filectx(self, fileid): | 194 def filectx(self, fileid): |
189 '''opens an arbitrary revision of the file without | 195 '''opens an arbitrary revision of the file without |
190 opening a new filelog''' | 196 opening a new filelog''' |
191 return filectx(self._repo, self._path, fileid=fileid, | 197 return filectx(self._repo, self._path, fileid=fileid, |
192 filelog=self._filelog) | 198 filelog=self._filelog) |