It's calling repo.last_commit_ids 85 times. For a full refresh starting at the first commit, it shouldn't ever call it as it should be able to get all the info it needs from the DiffInfoDocs (assuming that data is correct, but this is a relatively fresh fork).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
allura:cj/5879 forgehg:cj/5879 (just an already passing test)
Turns out that GitRepository.all_commit_ids was not returning the commit IDs in the expected order. Specifically, the last commit returned was not the repo root (first commit), which means that refresh_last_commits was starting in the middle of the commit history and having to build a lot of historical data that would not be necessary if it were processing them in order.
Of course, this only happens when there is a branch that gets returned after master from repo._git.heads so it wasn't showing up on sandboxes.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I pushed a bunch of test fixes back to forgehg:cj/5879. Have a look at those and make sure I didn't do anything dumb. There are still 3 failing tests that need to be addressed - I'll let you handle those. :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Against a fork of Allura, 100 commit limit, with --clean: https://sourceforge.net/p/allura/pastebin/515436be0594ca1899ef0fb1/ (~50 minutes)
It's calling
repo.last_commit_ids
85 times. For a full refresh starting at the first commit, it shouldn't ever call it as it should be able to get all the info it needs from theDiffInfoDoc
s (assuming that data is correct, but this is a relatively fresh fork).Same task run on my sandbox: https://sourceforge.net/p/allura/pastebin/515448cc9095470ae7e5614c/
I can only assume that the diff data is bad in production, but I thought this was a relatively recent refresh.
allura:cj/5879
forgehg:cj/5879
(just an already passing test)Turns out that
GitRepository.all_commit_ids
was not returning the commit IDs in the expected order. Specifically, the last commit returned was not the repo root (first commit), which means thatrefresh_last_commits
was starting in the middle of the commit history and having to build a lot of historical data that would not be necessary if it were processing them in order.Of course, this only happens when there is a branch that gets returned after master from
repo._git.heads
so it wasn't showing up on sandboxes.A couple of tests failing due to new commit in test repo
I pushed a bunch of test fixes back to forgehg:cj/5879. Have a look at those and make sure I didn't do anything dumb. There are still 3 failing tests that need to be addressed - I'll let you handle those. :)
Fixed the one remaining failing test and merged