D8264: gitlog: implement __iter__ on changelog
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Sat Mar 7 22:45:27 UTC 2020
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
This allows `hg phase --force --draft -r .` to work, for example.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D8264
AFFECTED FILES
hgext/git/gitlog.py
CHANGE DETAILS
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
To: durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list