##// END OF EJS Templates
Merge with crew-stable
Bryan O'Sullivan -
r9199:fb5562af merge default
parent child Browse files
Show More
@@ -6,7 +6,7 b''
6 # This software may be used and distributed according to the terms of the
6 # This software may be used and distributed according to the terms of the
7 # GNU General Public License version 2, incorporated herein by reference.
7 # GNU General Public License version 2, incorporated herein by reference.
8
8
9 import os, time
9 import os, re, time
10 from mercurial.i18n import _
10 from mercurial.i18n import _
11 from mercurial import ui, hg, util, templater
11 from mercurial import ui, hg, util, templater
12 from mercurial import error, encoding
12 from mercurial import error, encoding
@@ -225,7 +225,9 b' class hgwebdir(object):'
225 parts.insert(0, req.env['PATH_INFO'].rstrip('/'))
225 parts.insert(0, req.env['PATH_INFO'].rstrip('/'))
226 if req.env['SCRIPT_NAME']:
226 if req.env['SCRIPT_NAME']:
227 parts.insert(0, req.env['SCRIPT_NAME'])
227 parts.insert(0, req.env['SCRIPT_NAME'])
228 url = ('/'.join(parts).replace("//", "/")) + '/'
228 m = re.match('((?:https?://)?)(.*)', '/'.join(parts))
229 # squish repeated slashes out of the path component
230 url = m.group(1) + re.sub('/+', '/', m.group(2)) + '/'
229
231
230 # update time with local timezone
232 # update time with local timezone
231 try:
233 try:
@@ -88,7 +88,8 b' cat > collections.conf <<EOF'
88 $root=$root
88 $root=$root
89 EOF
89 EOF
90
90
91 hg serve -p $HGPORT2 -d --pid-file=hg.pid --webdir-conf collections.conf \
91 hg serve --config web.baseurl=http://hg.example.com:8080/ -p $HGPORT2 -d \
92 --pid-file=hg.pid --webdir-conf collections.conf \
92 -A access-collections.log -E error-collections.log
93 -A access-collections.log -E error-collections.log
93 cat hg.pid >> $DAEMON_PIDS
94 cat hg.pid >> $DAEMON_PIDS
94
95
@@ -311,10 +311,10 b' d'
311 200 Script output follows
311 200 Script output follows
312
312
313
313
314 /a/
314 http://hg.example.com:8080/a/
315 /a/.hg/patches/
315 http://hg.example.com:8080/a/.hg/patches/
316 /b/
316 http://hg.example.com:8080/b/
317 /c/
317 http://hg.example.com:8080/c/
318
318
319 200 Script output follows
319 200 Script output follows
320
320
General Comments 0
You need to be logged in to leave comments. Login now