changeset 35675:01496e9269f9

win32text: use 'tiprev' when appropriate This is cleaner than the current 'len(repo) - 1' form.
author Boris Feld <boris.feld@octobus.net>
date Wed, 17 Jan 2018 13:02:42 +0100
parents e711906aa42c
children 9c575c22dcf4
files hgext/win32text.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/win32text.py	Wed Jan 17 13:01:38 2018 +0100
+++ b/hgext/win32text.py	Wed Jan 17 13:02:42 2018 +0100
@@ -139,7 +139,7 @@
     # changegroup that contains an unacceptable commit followed later
     # by a commit that fixes the problem.
     tip = repo['tip']
-    for rev in xrange(len(repo) - 1, repo[node].rev() - 1, -1):
+    for rev in xrange(repo.changelog.tiprev(), repo[node].rev() - 1, -1):
         c = repo[rev]
         for f in c.files():
             if f in seen or f not in tip or f not in c: