[PATCH 2 of 2] lock: make trylock private
Augie Fackler
raf at durin42.com
Thu Aug 27 10:22:47 CDT 2015
On Mon, Aug 24, 2015 at 05:13:01PM -0500, Matt Mackall wrote:
> # HG changeset patch
> # User Matt Mackall <mpm at selenic.com>
> # Date 1440440770 18000
> # Mon Aug 24 13:26:10 2015 -0500
> # Node ID 38b5f5169be213b9e6187fbf63a8e55e7b1961fd
> # Parent d7b7ac6570ada6329bbe777e40ec61287966eb57
> lock: make trylock private
Looks like a strict improvment, queued these, thanks.
>
> diff -r d7b7ac6570ad -r 38b5f5169be2 mercurial/lock.py
> --- a/mercurial/lock.py Mon Aug 24 13:24:43 2015 -0500
> +++ b/mercurial/lock.py Mon Aug 24 13:26:10 2015 -0500
> @@ -65,7 +65,7 @@
> timeout = self.timeout
> while True:
> try:
> - self.trylock()
> + self._trylock()
> return self.timeout - timeout
> except error.LockHeld as inst:
> if timeout != 0:
> @@ -76,7 +76,7 @@
> raise error.LockHeld(errno.ETIMEDOUT, inst.filename, self.desc,
> inst.locker)
>
> - def trylock(self):
> + def _trylock(self):
> if self.held:
> self.held += 1
> return
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list