A while ago back when I was looking log lookups the slow way, I noticed SVN actually gave me the latest revision for each file in the directory list. It seems like this issue still exists too, though it's less of an issue because the faster way works correctly.
Here's a quick script to demonstrate what I was doing:
import anyvcs
import sys
if len(sys.argv) not in (3, 4):
print "Usage:", sys.argv[0], "repo rev [path]"
sys.exit(1)
repo = sys.argv[1]
rev = sys.argv[2]
path = sys.argv[3] if len(sys.argv) == 4 else "/"
cl = anyvcs.open(repo)
for x in cl.ls(rev, path):
msg = cl.log(limit=1, path=x.name)[0].subject
print x.name, "--", msg
and example output on a repo with two files added on two different commits:
EXPECTED
==========
two -- add two
one -- add one
ACTUAL
==========
two -- add two
one -- add two
A while ago back when I was looking log lookups the slow way, I noticed SVN actually gave me the latest revision for each file in the directory list. It seems like this issue still exists too, though it's less of an issue because the faster way works correctly.
Here's a quick script to demonstrate what I was doing:
and example output on a repo with two files added on two different commits: