changeset 20394:a817964e7fdf

qimport: allow importing URLs
author Matt Mackall <mpm@selenic.com>
date Fri, 07 Feb 2014 17:54:10 -0600
parents b0638b5b004d
children ab71fb058ebf
files hgext/mq.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/mq.py	Fri Feb 07 15:01:33 2014 -0800
+++ b/hgext/mq.py	Fri Feb 07 17:54:10 2014 -0600
@@ -1986,9 +1986,10 @@
                     raise util.Abort(_('-e is incompatible with import from -'))
                 filename = normname(filename)
                 self.checkreservedname(filename)
-                originpath = self.join(filename)
-                if not os.path.isfile(originpath):
-                    raise util.Abort(_("patch %s does not exist") % filename)
+                if util.url(filename).local():
+                    originpath = self.join(filename)
+                    if not os.path.isfile(originpath):
+                        raise util.Abort(_("patch %s does not exist") % filename)
 
                 if patchname:
                     self.checkpatchname(patchname, force)