##// END OF EJS Templates
url: add trailing slashes to URLs with hostnames that don't have one...
Brodie Rao -
r13815:d066d8d6 default
parent child Browse files
Show More
@@ -156,7 +156,7 b' class url(object):'
156 >>> str(url('http://localhost:80/'))
156 >>> str(url('http://localhost:80/'))
157 'http://localhost:80/'
157 'http://localhost:80/'
158 >>> str(url('http://localhost:80'))
158 >>> str(url('http://localhost:80'))
159 'http://localhost:80'
159 'http://localhost:80/'
160 >>> str(url('bundle:foo'))
160 >>> str(url('bundle:foo'))
161 'bundle:foo'
161 'bundle:foo'
162 >>> str(url('path'))
162 >>> str(url('path'))
@@ -185,8 +185,7 b' class url(object):'
185 s += self.host
185 s += self.host
186 if self.port:
186 if self.port:
187 s += ':' + urllib.quote(self.port)
187 s += ':' + urllib.quote(self.port)
188 if ((self.host and self.path is not None) or
188 if self.host:
189 (self.host and self.query or self.fragment)):
190 s += '/'
189 s += '/'
191 if self.path:
190 if self.path:
192 s += urllib.quote(self.path, safe=self._safepchars)
191 s += urllib.quote(self.path, safe=self._safepchars)
@@ -30,7 +30,7 b''
30 $ echo bar >> b/foo
30 $ echo bar >> b/foo
31 $ hg -R b ci -m bar
31 $ hg -R b ci -m bar
32 $ hg --encoding utf-8 -R b push
32 $ hg --encoding utf-8 -R b push
33 pushing to http://localhost:$HGPORT1
33 pushing to http://localhost:$HGPORT1/
34 searching for changes
34 searching for changes
35 remote: adding changesets
35 remote: adding changesets
36 remote: adding manifests
36 remote: adding manifests
@@ -26,7 +26,7 b' check that {1} syntax works'
26 $ hg incoming --debug parts://localhost
26 $ hg incoming --debug parts://localhost
27 using http://localhost:$HGPORT/
27 using http://localhost:$HGPORT/
28 sending capabilities command
28 sending capabilities command
29 comparing with parts://localhost
29 comparing with parts://localhost/
30 sending heads command
30 sending heads command
31 searching for changes
31 searching for changes
32 sending known command
32 sending known command
General Comments 0
You need to be logged in to leave comments. Login now