git: 9front

Download patch

ref: a4313f26facb302a3089d98f158ccd248ce734db
parent: 7e19ecfb1108000d8310bb27c8b43b0ba8f3ebb3
author: cinap_lenrek <cinap_lenrek@rei2.9hal>
date: Fri Mar 16 13:47:36 EDT 2012

hgwebfs: make push work

--- a/sys/lib/python/hgext/hgwebfs.py
+++ b/sys/lib/python/hgext/hgwebfs.py
@@ -11,17 +11,14 @@
 			self.dir = mnt+'/'+ctl.readline().rstrip('\n')
 			ctl.seek(0)
 			ctl.write('url '+self.url)
-			m = ''
+			m = 'User-Agent: mercurial/proto-1.0\r\n';
 			for h in req.headers:
 				m += h+': '+req.headers[h]+'\r\n'
-			if len(m) > 0:
-				m = 'headers '+m
-				print m
-				ctl.seek(0)
-				ctl.write(m)
+			ctl.seek(0)
+			ctl.write('headers '+m)
 			if req.has_data():
 				data = req.get_data()
-				post = open(self.dir+'/postdata', 'w', 0);
+				post = open(self.dir+'/postbody', 'w', 0);
 				try:
 					while True:
 						buf = data.read(4096)
--