summaryrefslogtreecommitdiff
path: root/tools/mergetools.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/mergetools.py')
-rw-r--r--tools/mergetools.py31
1 files changed, 0 insertions, 31 deletions
diff --git a/tools/mergetools.py b/tools/mergetools.py
index d5d5f75..1334186 100644
--- a/tools/mergetools.py
+++ b/tools/mergetools.py
@@ -484,25 +484,6 @@ def flock_ex_or_fail(path):
return False
return True
-def flock_ex_wait(path):
- fd = os.open(path, os.O_CREAT)
- logging.debug("waiting for exclusive lock on %s (%s)", fd, path)
- fcntl.flock(fd, fcntl.LOCK_EX)
- logging.debug("taken exclusive lock on %s", fd)
- return fd
-
-def flock_sh_wait(path):
- fd = os.open(path, os.O_CREAT)
- logging.debug("waiting for shared lock on %s (%s)", fd, path)
- fcntl.flock(fd, fcntl.LOCK_SH)
- logging.debug("taken shared lock on %s", fd)
- return fd
-
-def flock_release(fd):
- logging.debug("releasing lock on %s", fd)
- fcntl.flock(fd, fcntl.LOCK_UN)
- os.close(fd)
-
def terminate_child_procs():
for p in multiprocessing.active_children():
#print >>sys.stderr, "DEBUG: terminating pid", p.pid
@@ -522,12 +503,6 @@ class FileDB:
return read_chain(self.path, key)
def add(self, key, value):
return write_chain(key, value, self.path)
- def lock_sh(self):
- self.lockfile = flock_sh_wait(self.path + "/.lock")
- def lock_ex(self):
- self.lockfile = flock_ex_wait(self.path + "/.lock")
- def release_lock(self):
- flock_release(self.lockfile)
def commit(self):
pass
@@ -538,12 +513,6 @@ class PermDB:
return permdb.getvalue(self.permdbobj, key)
def add(self, key, value):
return permdb.addvalue(self.permdbobj, key, value)
- def lock_sh(self):
- assert False # NYI
- def lock_ex(self):
- assert False # NYI
- def release_lock(self):
- assert False # NYI
def commit(self):
permdb.committree(self.permdbobj)