CRAFTERCMS-214
Added master repository lock (semaphore) to avoid deadlock.
Merge remote-tracking branch 'origin/CRAFTERCMS-214'