projectkudu/kudu — pull request #948 by mtian (2014-01-07 17:03:20+00:00)
Title: Fixes #634: Clears git locks when the deployment lock is acquired.

Fixes #634: Clears git locks when the deployment lock is acquired.

Added ClearLock() when DeploymentLock is acquired to prevent deadlock in more scenarios.

For example, the current scenario will return an error:
1. Run Kudu. Assume $SITE_DIR$ is .../kudu/apps//site/wwwroot
2. touch $SITE_DIR$/.git/index.lock
3. curl -X PUT --data " cool page" %KUDU_URL%/scmvfs/qqq.txt

The idea is that index.lock may be left over from a previous failed git operation, which can be cleared for users.