changeset 11100:83968ae4aaf2

context: use asserts for ignored and clean exceptions
author Matt Mackall <mpm@selenic.com>
date Tue, 04 May 2010 15:52:42 -0500
parents a68bd3b7c040
children 502474839293
files mercurial/context.py
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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']