context: use asserts for ignored and clean exceptions
authorMatt Mackall <mpm@selenic.com>
Tue, 04 May 2010 15:52:42 -0500
changeset 11100 83968ae4aaf2
parent 11099 a68bd3b7c040
child 11101 502474839293
context: use asserts for ignored and clean exceptions
mercurial/context.py
--- a/mercurial/context.py	Tue May 04 15:02:55 2010 -0500
+++ b/mercurial/context.py	Tue May 04 15:52:42 2010 -0500
@@ -680,12 +680,10 @@
     def unknown(self):
         return self._status[4]
     def ignored(self):
-        if self._ignored is None:
-            raise util.Abort(_("Ignored files requested without prior query\n"))
+        assert self._ignored is not None  # must call status first
         return self._ignored
     def clean(self):
-        if self._clean is None:
-            raise util.Abort(_("Clean files requested without prior query\n"))
+        assert self._clean is not None  # must call status first
         return self._clean
     def branch(self):
         return self._extra['branch']