changeset 4586:dd7f566433be

<oerjan> fetch http://oerjan.nvg.org/url
author HackBot
date Sat, 19 Apr 2014 23:50:25 +0000
parents ae62c111913c
children 6df398684375
files url
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/url	Sat Apr 19 23:50:25 2014 +0000
@@ -0,0 +1,11 @@
+#!/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))