Prevent extension reload loops when altering extension state on load.

Review Request #7297 — Created May 12, 2015 and submitted — Latest diff uploaded

Information

Djblets
release-0.8.x
b12b603...

Reviewers

During extension loading and initialization, it's possible for an
operation to bump the synchronization generation number, which would
cause another extension load on the next HTTP request, eventually
spiraling out of control. This would happen for any extensions with
dependencies or when saving extension settings on initialization, as
each enable/disable/settings save operation would try to bump the
number.

We now have a flag set when loading extensions, which will block any
attempts to bump the number. The result is that any load operation will
retain its previous number, preventing these load loops.

Unit tests failed before this, but succeeded after.