Patchwork D8264: gitlog: implement __iter__ on changelog

login
register
mail settings
Submitter phabricator
Date March 9, 2020, 10:03 a.m.
Message ID <6cf8b5c4028f0d06ee053e74fe78003c@localhost.localdomain>
Download mbox | patch
Permalink /patch/45630/
State Not Applicable
Headers show

Comments

phabricator - March 9, 2020, 10:03 a.m.
Closed by commit rHG3e5293769f22: gitlog: implement __iter__ on changelog (authored by durin42).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8264?vs=20613&id=20621

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8264/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D8264

AFFECTED FILES
  hgext/git/gitlog.py

CHANGE DETAILS




To: durin42, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/hgext/git/gitlog.py b/hgext/git/gitlog.py
--- a/hgext/git/gitlog.py
+++ b/hgext/git/gitlog.py
@@ -103,6 +103,9 @@ 
         except error.LookupError:
             return False
 
+    def __iter__(self):
+        return iter(pycompat.xrange(len(self)))
+
     @property
     def filteredrevs(self):
         # TODO: we should probably add a refs/hg/ namespace for hidden