Mercurial > hg > hg-git
diff hggit/__init__.py @ 1026:e7a8a5710257
wlock: use non-context-manager form to restore older hg support
author | Kevin Bullock <kbullock@ringworld.org> |
---|---|
date | Mon, 24 Jul 2017 15:07:44 -0500 |
parents | 78959c8e5e60 |
children | 620a1095f3a9 |
line wrap: on
line diff
--- a/hggit/__init__.py +++ b/hggit/__init__.py @@ -270,9 +270,12 @@ gitsha, hgsha = line.strip().split(' ', 1) if hgsha in repo: new_map.append('%s %s\n' % (gitsha, hgsha)) - with repo.wlock(): + wlock = repo.wlock() + try: f = repo.vfs(GitHandler.map_file, 'wb') map(f.write, new_map) + finally: + wlock.release() ui.status(_('git commit map cleaned\n')) def findcommonoutgoing(orig, repo, other, *args, **kwargs):