Skip to content
Snippets Groups Projects
Commit a75dd826 authored by Sushil Khanchi's avatar Sushil Khanchi :koala:
Browse files

commit: add some newlines for clarity

parent b00c161e
No related branches found
No related tags found
1 merge request!60CommitService: add gitaly comparison tests for FindCommits
......@@ -331,9 +331,10 @@
# XXX: raise error if one of the path given is an empty string
if pats:
pats = list(map(lambda p: repo.root + b'/' + p, pats))
opts = parse_find_commits_request_opts(request, repo)
if request.revision and not opts[b'rev'][0]:
logger.debug(
"FindCommits revision %r could not be found",
request.revision)
return FindCommitsResponse()
......@@ -334,9 +335,10 @@
opts = parse_find_commits_request_opts(request, repo)
if request.revision and not opts[b'rev'][0]:
logger.debug(
"FindCommits revision %r could not be found",
request.revision)
return FindCommitsResponse()
if util.versiontuple(n=2) <= (5, 5): # hg<=5.5
if request.follow and opts.get(b'rev'):
# Mercurial 5.5: 'follow' option of `hg log` doesn't work
......@@ -354,6 +356,7 @@
revs = repo.revs(b"sort(%ld, topo)", revs)
if request.all:
revs = repo.revs(b"reverse(%ld)", revs)
for chunk in chunked(revs):
yield FindCommitsResponse(
commits=(message.commit(repo[rev]) for rev in chunk))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment