equal
deleted
inserted
replaced
61 attr, |
61 attr, |
62 ) |
62 ) |
63 from mercurial import ( |
63 from mercurial import ( |
64 ancestor, |
64 ancestor, |
65 dagop, |
65 dagop, |
|
66 encoding, |
66 error, |
67 error, |
67 extensions, |
68 extensions, |
68 localrepo, |
69 localrepo, |
69 mdiff, |
70 mdiff, |
70 pycompat, |
71 pycompat, |
1018 return db |
1019 return db |
1019 |
1020 |
1020 def makedb(path): |
1021 def makedb(path): |
1021 """Construct a database handle for a database at path.""" |
1022 """Construct a database handle for a database at path.""" |
1022 |
1023 |
1023 db = sqlite3.connect(path) |
1024 db = sqlite3.connect(encoding.strfromlocal(path)) |
1024 db.text_factory = bytes |
1025 db.text_factory = bytes |
1025 |
1026 |
1026 res = db.execute(r'PRAGMA user_version').fetchone()[0] |
1027 res = db.execute(r'PRAGMA user_version').fetchone()[0] |
1027 |
1028 |
1028 # New database. |
1029 # New database. |