Mercurial > hgsubversion
comparison tests/test_push_command.py @ 1508:5441a9d1fd50
test_push_command: avoid letting interface name in IPv6 address
Subversion isn't a fan.
| author | Augie Fackler <raf@durin42.com> |
|---|---|
| date | Mon, 29 May 2017 12:50:55 -0400 |
| parents | debba0fa822e |
| children | 1122a90e329a |
comparison
equal
deleted
inserted
replaced
| 1507:debba0fa822e | 1508:5441a9d1fd50 |
|---|---|
| 155 self.host = selected[4][0] | 155 self.host = selected[4][0] |
| 156 | 156 |
| 157 # If we're connecting via IPv6 the need to put brackets around the | 157 # If we're connecting via IPv6 the need to put brackets around the |
| 158 # hostname in the URL. | 158 # hostname in the URL. |
| 159 ipv6 = selected[0] == socket.AF_INET6 | 159 ipv6 = selected[0] == socket.AF_INET6 |
| 160 | |
| 161 # Ditch any interface information since that's not helpful in | |
| 162 # a URL | |
| 163 if ipv6 and ':' in self.host and '%' in self.host: | |
| 164 self.host = self.host.rsplit('%', 1)[0] | |
| 165 | |
| 160 urlfmt = 'svn://[%s]:%d/%s' if ipv6 else 'svn://%s:%d/%s' | 166 urlfmt = 'svn://[%s]:%d/%s' if ipv6 else 'svn://%s:%d/%s' |
| 161 | 167 |
| 162 args = ['svnserve', '--daemon', '--foreground', | 168 args = ['svnserve', '--daemon', '--foreground', |
| 163 '--listen-port=%d' % self.port, | 169 '--listen-port=%d' % self.port, |
| 164 '--listen-host=%s' % self.host, | 170 '--listen-host=%s' % self.host, |
