##// END OF EJS Templates
revlog: don't include trailing nullrev in revlog.revs(stop=len(revlog))...
Martin von Zweigbergk -
r38800:83a505b5 default
parent child Browse files
Show More
@@ -1070,12 +1070,15 b' class revlog(object):'
1070 def revs(self, start=0, stop=None):
1070 def revs(self, start=0, stop=None):
1071 """iterate over all rev in this revlog (from start to stop)"""
1071 """iterate over all rev in this revlog (from start to stop)"""
1072 step = 1
1072 step = 1
1073 length = len(self)
1073 if stop is not None:
1074 if stop is not None:
1074 if start > stop:
1075 if start > stop:
1075 step = -1
1076 step = -1
1076 stop += step
1077 stop += step
1078 if stop > length:
1079 stop = length
1077 else:
1080 else:
1078 stop = len(self)
1081 stop = length
1079 return xrange(start, stop, step)
1082 return xrange(start, stop, step)
1080
1083
1081 @util.propertycache
1084 @util.propertycache
General Comments 0
You need to be logged in to leave comments. Login now