[PATCH stable] revlog: use "True" instead of "1" as while condition

pierre-yves.david at ens-lyon.org pierre-yves.david at ens-lyon.org
Fri Jun 13 23:41:04 CDT 2014


# 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.

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


More information about the Mercurial-devel mailing list