mercurial/ui.py
changeset 6325 41c77bb8d7f3
parent 6309 7240204121af
child 6333 f477afeb3a0f
--- a/mercurial/ui.py	Thu Mar 20 11:12:35 2008 -0500
+++ b/mercurial/ui.py	Thu Mar 20 11:12:35 2008 -0500
@@ -31,7 +31,6 @@
                  parentui=None):
         self.overlay = None
         self.buffers = []
-        self.pager = None
         if parentui is None:
             # this is the parent of all ui children
             self.parentui = None
@@ -66,15 +65,6 @@
     def __getattr__(self, key):
         return getattr(self.parentui, key)
 
-    def __del__(self):
-        if self.pager:
-            try:
-                self.pager.close()
-            except IOException:
-                # we might get into an broken pipe if the users quit
-                # the pager before we finished io
-                pass
-
     def isatty(self):
         if ui._isatty is None:
             ui._isatty = sys.stdin.isatty()
@@ -381,14 +371,9 @@
         return "".join(self.buffers.pop())
 
     def write(self, *args):
-        """Write to a pager if available, otherwise to stdout"""
         if self.buffers:
             self.buffers[-1].extend([str(a) for a in args])
         else:
-            if self.getpager() and not self.pager:
-                self.pager = os.popen(self.getpager(), "wb")
-                sys.stderr = self.pager
-                sys.stdout = self.pager
             for a in args:
                 sys.stdout.write(str(a))
 
@@ -493,9 +478,3 @@
                 self.config("ui", "editor") or
                 os.environ.get("VISUAL") or
                 os.environ.get("EDITOR", "vi"))
-
-    def getpager(self):
-        '''return a pager'''
-        if sys.stdout.isatty() and self.configbool("ui", "usepager", False):
-            return (self.config("ui", "pager")
-                    or os.environ.get("PAGER"))