mq: use ui.fin when importing patch from '-'
authorIdan Kamara <idankk86@gmail.com>
Wed, 08 Jun 2011 14:54:52 +0300
changeset 14636 b98063487a6f
parent 14635 217b7d83afc3
child 14637 5e9d691229d5
mq: use ui.fin when importing patch from '-'
hgext/mq.py
--- a/hgext/mq.py	Wed Jun 08 14:54:52 2011 +0300
+++ b/hgext/mq.py	Wed Jun 08 14:54:52 2011 +0300
@@ -48,7 +48,7 @@
 from mercurial import commands, cmdutil, hg, scmutil, util, revset
 from mercurial import repair, extensions, url, error
 from mercurial import patch as patchmod
-import os, sys, re, errno, shutil
+import os, re, errno, shutil
 
 commands.norepo += " qclone"
 
@@ -1831,7 +1831,7 @@
                 self.checkpatchname(patchname, force)
                 try:
                     if filename == '-':
-                        text = sys.stdin.read()
+                        text = self.ui.fin.read()
                     else:
                         fp = url.open(self.ui, filename)
                         text = fp.read()