##// END OF EJS Templates
log: duplicate _logrevs() dedicated for walkchangerevs()...
Yuya Nishihara -
r35700:8273c1a4 default
parent child Browse files
Show More
@@ -2032,6 +2032,21 b' def increasingwindows(windowsize=8, size'
2032 2032 if windowsize < sizelimit:
2033 2033 windowsize *= 2
2034 2034
2035 def _walkrevs(repo, opts):
2036 # Default --rev value depends on --follow but --follow behavior
2037 # depends on revisions resolved from --rev...
2038 follow = opts.get('follow') or opts.get('follow_first')
2039 if opts.get('rev'):
2040 revs = scmutil.revrange(repo, opts['rev'])
2041 elif follow and repo.dirstate.p1() == nullid:
2042 revs = smartset.baseset()
2043 elif follow:
2044 revs = repo.revs('reverse(:.)')
2045 else:
2046 revs = smartset.spanset(repo)
2047 revs.reverse()
2048 return revs
2049
2035 2050 class FileWalkError(Exception):
2036 2051 pass
2037 2052
@@ -2186,7 +2201,7 b' def walkchangerevs(repo, match, opts, pr'
2186 2201 function on each context in the window in forward order.'''
2187 2202
2188 2203 follow = opts.get('follow') or opts.get('follow_first')
2189 revs = _logrevs(repo, opts)
2204 revs = _walkrevs(repo, opts)
2190 2205 if not revs:
2191 2206 return []
2192 2207 wanted = set()
General Comments 0
You need to be logged in to leave comments. Login now