From 53e29b7522edf4d24bb75d3eeb7b04e047c98f3f Mon Sep 17 00:00:00 2001 From: Steven Walter Date: Wed, 3 Dec 2008 16:02:01 -0500 Subject: [PATCH] workdir: create the lock dir if needed on unlock --- plugins/workdir.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/workdir.py b/plugins/workdir.py index e08b48b..f6c1bec 100644 --- a/plugins/workdir.py +++ b/plugins/workdir.py @@ -14,6 +14,11 @@ class WorkdirPlugin(YapCore): def _unlock_branch(self, branch): repo = get_output('git rev-parse --git-dir')[0] dir = os.path.join(repo, 'yap', 'lock') + try: + os.mkdir(dir) + except OSError: + pass + lockfile = os.path.join(dir, branch.replace('/', '\/')) try: -- 2.11.4.GIT