summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/lib/python/hgext/hgwebfs.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/lib/python/hgext/hgwebfs.py b/sys/lib/python/hgext/hgwebfs.py
index ff54ff036..e8eb03cba 100644
--- a/sys/lib/python/hgext/hgwebfs.py
+++ b/sys/lib/python/hgext/hgwebfs.py
@@ -5,9 +5,16 @@ import re
class Webconn:
def __init__(self, mnt, req):
+ if type(req) == str:
+ self.url = req
+ else:
+ self.url = req.get_full_url()
+ if self.url[0:5] == 'file:':
+ self.dir = '/dev/null'
+ self.body = open(self.url[5:], 'r', 0)
+ return
ctl = open(mnt+'/clone', 'r+', 0)
try:
- self.url = req.get_full_url()
self.dir = mnt+'/'+ctl.readline().rstrip('\n')
ctl.seek(0)
ctl.write('url '+self.url)