Patchwork [12,of,41] basefilectx: move __ne__ from filectx

login
register
mail settings
Submitter Sean Farley
Date Aug. 12, 2013, 4:27 p.m.
Message ID <41e53a0a440591e57cf9.1376324828@laptop.local>
Download mbox | patch
Permalink /patch/2138/
State Accepted
Commit e5074d82afc994bb4e4652b1f65bf6147474cf5e
Headers show

Comments

Sean Farley - Aug. 12, 2013, 4:27 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1376279380 18000
#      Sun Aug 11 22:49:40 2013 -0500
# Node ID 41e53a0a440591e57cf939938a31f59217ef4084
# Parent  071cc2531b45dae172318a9e2cffc212361d6d13
basefilectx: move __ne__ from filectx

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -472,10 +472,13 @@ 
             return (type(self) == type(other) and self._path == other._path
                     and self._filenode == other._filenode)
         except AttributeError:
             return False
 
+    def __ne__(self, other):
+        return not (self == other)
+
 class filectx(basefilectx):
     """A filecontext object makes access to data related to a particular
        filerevision convenient."""
     def __init__(self, repo, path, changeid=None, fileid=None,
                  filelog=None, changectx=None):
@@ -521,13 +524,10 @@ 
             # Linkrevs have several serious troubles with filtering that are
             # complicated to solve. Proper handling of the issue here should be
             # considered when solving linkrev issue are on the table.
             return changectx(self._repo.unfiltered(), self._changeid)
 
-    def __ne__(self, other):
-        return not (self == other)
-
     def filectx(self, fileid):
         '''opens an arbitrary revision of the file without
         opening a new filelog'''
         return filectx(self._repo, self._path, fileid=fileid,
                        filelog=self._filelog)