"hg push" hangs for one minute (exactly one minute)

Ernie Rael errael at raelity.com
Sat Apr 30 15:41:02 UTC 2022


I took another look this morning, there are better/simpler solutions 
using URI filenames, https://www.sqlite.org/uri.html and 
https://www.sqlite.org/c3ref/open.html#urifilenameexamples.

And, one of the sqlite3 vfs is "unix-dotfile" which "uses dot-file 
locking rather than POSIX advisory locks." Wonder how I missed that?

Double the protection: mercurial locking, sqlite3 locking.

-ernie

========================================================


#!/bin/python

import sqlite3

connection = sqlite3.connect('file:/z/play/cache.db?vfs=unix-dotfile')
cur = connection.cursor()
cur.execute('''create table item
   (id integer primary key, itemno text unique)''')

connection.commit()
cur.close()





More information about the Mercurial mailing list