--- a/hgext/mq.py Sat Oct 18 16:33:10 2008 -0700
+++ b/hgext/mq.py Sat Oct 18 16:40:01 2008 -0700
@@ -34,7 +34,7 @@
from mercurial.repo import RepoError
from mercurial import commands, cmdutil, hg, patch, revlog, util
from mercurial import repair
-import os, sys, re, errno
+import os, sys, re, errno, urllib
commands.norepo += " qclone"
@@ -1499,7 +1499,10 @@
raise util.Abort(_('need --name to import a patch from -'))
text = sys.stdin.read()
else:
- text = file(filename, 'rb').read()
+ if os.path.exists(filename):
+ text = file(filename, 'rb').read()
+ else:
+ text = urllib.urlopen(filename).read()
except IOError:
raise util.Abort(_("unable to read %s") % filename)
if not patchname: