D5174: py3: make sure we pass sysstr in sqlite3.connect()

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Tue Oct 23 07:39:48 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG3b782669561d: py3: make sure we pass sysstr in sqlite3.connect() (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5174?vs=12293&id=12314

REVISION DETAIL
  https://phab.mercurial-scm.org/D5174

AFFECTED FILES
  hgext/sqlitestore.py

CHANGE DETAILS

diff --git a/hgext/sqlitestore.py b/hgext/sqlitestore.py
--- a/hgext/sqlitestore.py
+++ b/hgext/sqlitestore.py
@@ -63,6 +63,7 @@
 from mercurial import (
     ancestor,
     dagop,
+    encoding,
     error,
     extensions,
     localrepo,
@@ -1020,7 +1021,7 @@
 def makedb(path):
     """Construct a database handle for a database at path."""
 
-    db = sqlite3.connect(path)
+    db = sqlite3.connect(encoding.strfromlocal(path))
     db.text_factory = bytes
 
     res = db.execute(r'PRAGMA user_version').fetchone()[0]



To: pulkit, #hg-reviewers
Cc: yuja, mercurial-devel


More information about the Mercurial-devel mailing list