Mercurial > repo
comparison bin/url @ 4607:c528f5d9ba11
<oerjan> sed -i \'s/hg repository/web-viewable filesystem repository/\' bin/url
author | HackBot |
---|---|
date | Sun, 20 Apr 2014 22:40:23 +0000 |
parents | bee686ce5627 |
children |
comparison
equal
deleted
inserted
replaced
4606:bee686ce5627 | 4607:c528f5d9ba11 |
---|---|
4 print "http://codu.org/projects/hackbot/fshg/" | 4 print "http://codu.org/projects/hackbot/fshg/" |
5 else: | 5 else: |
6 f = os.path.abspath(sys.argv[1]) | 6 f = os.path.abspath(sys.argv[1]) |
7 f = re.sub(r"^/+hackenv/", "", f) | 7 f = re.sub(r"^/+hackenv/", "", f) |
8 if re.match(r"/|\.hg(?:/|$)",f): | 8 if re.match(r"/|\.hg(?:/|$)",f): |
9 sys.exit("File is outside hg repository.") | 9 sys.exit("File is outside web-viewable filesystem repository.") |
10 else: | 10 else: |
11 print ("http://codu.org/projects/hackbot/fshg/index.cgi/file/tip/" + | 11 print ("http://codu.org/projects/hackbot/fshg/index.cgi/file/tip/" + |
12 urllib.quote(f)) | 12 urllib.quote(f)) |