• 
      

    Fix issues enabling extensions containing copy/pasted settings.

    Review Request #6054 — Created July 3, 2014 and submitted — Latest diff uploaded

    Information

    Djblets
    release-0.8.x
    c9e57e2...

    Reviewers

    When enabling an extension and installing its media, we work with a lock
    to ensure that two processes aren't attempting to install media at the
    same time. We then remove the lock file. This happens until the old
    stored version in settings matches up with the current version of the
    extension.

    Where this falls apart is if an administrator copy/pastes a settings
    dictionary from one server (say, a test server) into a disabled
    extension's settings in the database editor, and then tries to enable
    it. The versions will match up, but the extension won't be installed
    yet, so we'll go through the locking phase. However, since the versions
    match, we don't actually create a lock, and then we blow up trying to
    remove it.

    If the extension's data is not yet installed, its old version (if any)
    is not to be trusted. Treat it like a fresh install.

    I hit this a little while back when copying/pasting a settings dictionary
    from one devserver to another. This fix prevented the problem from
    happening.

    Unit tests pass. They fail before this fix with the same error I hit before.