# HG changeset patch # User Sean Farley # Date 2013-08-15 18:23:06 # Node ID d2936bec530be6f573bad367cd3825e3f6f5d1f8 # Parent d25fdd4c2fd1362e8262f236b47fc81c194315d7 commitablefilectx: move __nonzero__ from workingfilectx diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -1202,6 +1202,9 @@ class commitablefilectx(basefilectx): if ctx: self._changectx = ctx + def __nonzero__(self): + return True + class workingfilectx(commitablefilectx): """A workingfilectx object makes access to data related to a particular file in the working directory convenient.""" @@ -1212,9 +1215,6 @@ class workingfilectx(commitablefilectx): def _changectx(self): return workingctx(self._repo) - def __nonzero__(self): - return True - def data(self): return self._repo.wread(self._path) def renamed(self):