Commits

Yuya Nishihara committed c4d4b16

revset: match against valid list of revisions (follows hg 8575f4a2126e)

`range(len(repo))` may be invalid if there are hidden changesets. It will
cause LookupError.

Comments (0)

Files changed (2)

tortoisehg/hgqt/matching.py

         validrevset = False
         try:
             func = revset.match(self.repo.ui, new_rev)
-            rset = [c for c in func(self.repo, range(len(self.repo)))]
+            rset = [c for c in func(self.repo, list(self.repo))]
             if len(rset) > 1:
                 self.rev_to_match_info_lbl.setText(_('Revisions to Match:'))
                 csinfo_set_text(_('Match any of <b><i>%d</i></b> revisions') \

tortoisehg/hgqt/revset.py

             os.chdir(self.repo.root)
             func = revset.match(self.repo.ui, self.text)
             l = []
-            for c in func(self.repo, range(len(self.repo))):
+            for c in func(self.repo, list(self.repo)):
                 l.append(c)
             if len(l):
                 self.showMessage.emit(_('%d matches found') % len(l))