Mercurial > repo
view bin/url @ 4589:54ff46129c36
<fizzie> sed -i -e \'s|\\^/hack|^/+hack|\' bin/url
author | HackBot |
---|---|
date | Sat, 19 Apr 2014 23:55:31 +0000 |
parents | b873f9de779b |
children | f3f75edfba05 |
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))