Mercurial > repo
view bin/url @ 4598:1bc67ded06c4
<oerjan> mv paste.2 bin/paste; rm paste.1
author | HackBot |
---|---|
date | Sun, 20 Apr 2014 00:49:11 +0000 |
parents | 54ff46129c36 |
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))