##// END OF EJS Templates
hgweb: no i18n in protocol responses
Dirkjan Ochtman -
r6155:ea161d64 default
parent child Browse files
Show More
@@ -123,7 +123,7 b' def unbundle(web, req):'
123 ssl_req = web.configbool('web', 'push_ssl', True)
123 ssl_req = web.configbool('web', 'push_ssl', True)
124 if ssl_req:
124 if ssl_req:
125 if req.env.get('wsgi.url_scheme') != 'https':
125 if req.env.get('wsgi.url_scheme') != 'https':
126 bail(_('ssl required\n'))
126 bail('ssl required\n')
127 return
127 return
128 proto = 'https'
128 proto = 'https'
129 else:
129 else:
@@ -131,7 +131,7 b' def unbundle(web, req):'
131
131
132 # do not allow push unless explicitly allowed
132 # do not allow push unless explicitly allowed
133 if not web.check_perm(req, 'push', False):
133 if not web.check_perm(req, 'push', False):
134 bail(_('push not authorized\n'),
134 bail('push not authorized\n',
135 headers={'status': '401 Unauthorized'})
135 headers={'status': '401 Unauthorized'})
136 return
136 return
137
137
@@ -143,7 +143,7 b' def unbundle(web, req):'
143
143
144 # fail early if possible
144 # fail early if possible
145 if not check_heads():
145 if not check_heads():
146 bail(_('unsynced changes\n'))
146 bail('unsynced changes\n')
147 return
147 return
148
148
149 req.respond(HTTP_OK, HGTYPE)
149 req.respond(HTTP_OK, HGTYPE)
@@ -163,7 +163,7 b' def unbundle(web, req):'
163 try:
163 try:
164 if not check_heads():
164 if not check_heads():
165 req.write('0\n')
165 req.write('0\n')
166 req.write(_('unsynced changes\n'))
166 req.write('unsynced changes\n')
167 return
167 return
168
168
169 fp.seek(0)
169 fp.seek(0)
General Comments 0
You need to be logged in to leave comments. Login now