[PATCH 4 of 6 DEFAULT] subrepo: add support for locking working directory data
David M. Carr
david at carrclan.us
Sat Jan 14 15:00:19 UTC 2012
# HG changeset patch
# User David M. Carr <david at carrclan.us>
# Date 1326511283 18000
# Node ID 97f8b28771e6ad077e58b6536d207e79516b61ac
# Parent 935cb6220e4757e98f74a8941d3859afa4fa3b6f
subrepo: add support for locking working directory data
In order for some commands (such as remove) to better support subrepos,
there needs to be a way to lock the working directory data. This
change adds a mechanism to do so. It is currently only supported by
hg subrepos.
diff -r 935cb6220e47 -r 97f8b28771e6 mercurial/subrepo.py
--- a/mercurial/subrepo.py Fri Jan 13 21:33:14 2012 -0500
+++ b/mercurial/subrepo.py Fri Jan 13 22:21:23 2012 -0500
@@ -360,6 +360,13 @@
'''
pass
+ def wlock(self, wait=True):
+ '''
+ Obtain the wlock for the subrepo, if applicable. If not supported,
+ will return None.
+ '''
+ return None
+
def forget(self, files):
pass
@@ -561,6 +568,9 @@
ctx = self._repo[None]
return ctx.walk(match)
+ def wlock(self, wait=True):
+ return self._repo.wlock(wait)
+
def forget(self, files):
ctx = self._repo[None]
ctx.forget(files)
More information about the Mercurial-devel
mailing list