gerrit/gerrit-sshd
Dave Borowitz 040c39bcb3 Fix auto-adding reviewers during push
When we converted ReceiveCommits to use BatchUpdate's parallel
functionality in I40545a4d, we lost the automatic request scope
propagation. This was mostly fine, with the notable exception of:
 - pushing a new patch set of an existing change, and
 - pushing multiple changes so work is in a background thread, and
 - mentioning a user in a footer (Signed-Off-By, etc.), and
 - not including an email address in that footer, and
 - not having the account index enabled.

This would cause AccountResolver to try to call its
Provider<ReviewDb>, which fails because it's not in request scope.

Fix this by passing a ReviewDb into AccountResolver methods. That was
the easy part; the hard part was figuring out how to write a test case
that triggered this. Since the account index is now enabled by
default, this means putting a test-only hack into LuceneIndexModule
to support disabling a specific index. (This could also be useful for
other tests, since we currently don't exercise the non-index
fallbacks.)

Change-Id: I7231be3ea4660c9ee27f09994706b39ee622488a
2016-08-15 09:58:14 +09:00
..
src Fix auto-adding reviewers during push 2016-08-15 09:58:14 +09:00
BUCK Buck: Remove jgit cell 2016-04-20 22:02:49 +02:00
BUILD Implement Bazel build 2016-06-14 21:12:02 +02:00