view bin/url @ 4600:c61591186709

<fizzie> revert
author HackBot
date Sun, 20 Apr 2014 08:04:24 +0000
parents f3f75edfba05
children 30c35498e6b8
line wrap: on
line source

#!/usr/bin/env python
import sys, re, urllib
if len(sys.argv) <= 1:
    print "http://codu.org/projects/hackbot/fshg/"
else:
    f = re.sub(r"^/+hackenv/", "", sys.argv[1])
    if f.startswith("/"):
        sys.exit("File is outside hg repository.")
    else:
        print ("http://codu.org/projects/hackbot/fshg/index.cgi/file/tip/" +
            urllib.quote(f))