Skip to content

Commit 7bb3480

Browse files
authored
support non-ascii chars in hgrev (#582)
* support non-ascii chars in hgrev Let the utf-8 flow! * reduce lifetime of hgrev processes to alay memory leak for now
1 parent da30457 commit 7bb3480

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

salt/hg/config/hg.apache.conf.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
# A lightweight standin for revision app to maintain support for /lookup
4848
WSGIDaemonProcess hgrev user=hg group=hg \
49-
threads=2 processes=4 maximum-requests=1000 \
49+
threads=1 processes=6 maximum-requests=100 \
5050
display-name=hgrev
5151
# The Location hack ensures the lookup app is run within
5252
# this process group

salt/hg/files/hg/src/hgrev.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def __init__(self, verbose=False):
1717
def successful_response(self, response, contents):
1818
headers = [("Content-Type", "text/plain")]
1919
response("200 OK", headers)
20-
return [contents.encode()]
20+
return [contents]
2121

2222
def failed_response(self, response, detail=""):
2323
headers = [("Content-Type", "text/plain")]
@@ -46,7 +46,7 @@ def __call__(self, env, response):
4646
command,
4747
cwd=hg_repo,
4848
capture_output=True,
49-
text=True,
49+
text=False,
5050
shell=False,
5151
check=True
5252
)

0 commit comments

Comments
 (0)