# HG changeset patch # User Benoit Boissinot # Date 2010-04-19 18:30:31 # Node ID 6f26ce7ae17586a803b3bee7e1380020ac92632a # Parent 898d68468df2170bb420522c72c7cdeab4eb69c4 filectx: _fileid isn't normalized, use _filenode instead _fileid can be anything the lookup accepts (hex(node), node, rev, etc.), we should use something stable for comparisons (like _filenode). diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -276,14 +276,14 @@ class filectx(object): def __hash__(self): try: - return hash((self._path, self._fileid)) + return hash((self._path, self._filenode)) except AttributeError: return id(self) def __eq__(self, other): try: return (self._path == other._path - and self._fileid == other._fileid) + and self._filenode == other._filenode) except AttributeError: return False