[PATCH stable] revlog: use "True" instead of "1" as while condition
Siddharth Agarwal
sid at less-broken.com
Sat Jun 14 12:02:29 CDT 2014
On 06/13/2014 09:41 PM, pierre-yves.david at ens-lyon.org wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at fb.com>
> # Date 1402720754 25200
> # Fri Jun 13 21:39:14 2014 -0700
> # Branch stable
> # Node ID 825652c7451f155c0b9987d59a92bda5a3fe8b84
> # Parent f13728d59c0e146060649986041af35ec7b3f8c9
> revlog: use "True" instead of "1" as while condition
>
> Check-code says hi.
Looks like mpm just fixed this independently.
>
> diff --git a/mercurial/revlog.py b/mercurial/revlog.py
> --- a/mercurial/revlog.py
> +++ b/mercurial/revlog.py
> @@ -917,11 +917,11 @@ class revlog(object):
> l = []
> ladd = l.append
>
> # preload the cache
> try:
> - while 1:
> + while True:
> # ensure that the cache doesn't change out from under us
> _cache = self._chunkcache
> self._chunkraw(revs[0], revs[-1])
> if _cache == self._chunkcache:
> break
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list