Lock repository when working with it

done