Mercurial > hg
comparison hgext/infinitepush/sqlindexapi.py @ 37234:c1fac3878196
infinitepush: don't force ipv6 while connecting to mysql server
Facebook internally enforces this but looks like we can't force this for pur
users.
Differential Revision: https://phab.mercurial-scm.org/D2992
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sat, 31 Mar 2018 10:13:05 -0700 |
parents | 03ff17a4bf53 |
children | 2372284d9457 |
comparison
equal
deleted
inserted
replaced
37233:912f4f64047f | 37234:c1fac3878196 |
---|---|
58 raise indexapi.indexexception("SQL cursor already open without" | 58 raise indexapi.indexexception("SQL cursor already open without" |
59 " connection") | 59 " connection") |
60 retry = 3 | 60 retry = 3 |
61 while True: | 61 while True: |
62 try: | 62 try: |
63 self.sqlconn = mysql.connector.connect( | 63 self.sqlconn = mysql.connector.connect(**self.sqlargs) |
64 force_ipv6=True, **self.sqlargs) | |
65 | 64 |
66 # Code is copy-pasted from hgsql. Bug fixes need to be | 65 # Code is copy-pasted from hgsql. Bug fixes need to be |
67 # back-ported! | 66 # back-ported! |
68 # The default behavior is to return byte arrays, when we | 67 # The default behavior is to return byte arrays, when we |
69 # need strings. This custom convert returns strings. | 68 # need strings. This custom convert returns strings. |