Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 15587:809d5d30e377
localrepo: rename _postrelease to _afterlock
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 30 Nov 2011 15:36:55 -0600 |
parents | 98ec09582f72 |
children | 632f4be4d1f3 |
comparison
equal
deleted
inserted
replaced
15586:98ec09582f72 | 15587:809d5d30e377 |
---|---|
910 releasefn, desc=desc) | 910 releasefn, desc=desc) |
911 if acquirefn: | 911 if acquirefn: |
912 acquirefn() | 912 acquirefn() |
913 return l | 913 return l |
914 | 914 |
915 def _postrelease(self, callback): | 915 def _afterlock(self, callback): |
916 """add a callback to the current repository lock. | 916 """add a callback to the current repository lock. |
917 | 917 |
918 The callback will be executed on lock release.""" | 918 The callback will be executed on lock release.""" |
919 l = self._lockref and self._lockref() | 919 l = self._lockref and self._lockref() |
920 assert l is not None | 920 assert l is not None |
2009 source=srctype, url=url) | 2009 source=srctype, url=url) |
2010 | 2010 |
2011 for n in added: | 2011 for n in added: |
2012 self.hook("incoming", node=hex(n), source=srctype, | 2012 self.hook("incoming", node=hex(n), source=srctype, |
2013 url=url) | 2013 url=url) |
2014 self._postrelease(runhooks) | 2014 self._afterlock(runhooks) |
2015 | 2015 |
2016 finally: | 2016 finally: |
2017 tr.release() | 2017 tr.release() |
2018 # never return 0 here: | 2018 # never return 0 here: |
2019 if dh < 0: | 2019 if dh < 0: |