> +        if not opts.get('no_commit'):
> +            lock = repo.lock()
> +            tr = repo.transaction('import')
> +            dsguard = util.nullcontextmanager()
> +        else:
> +            lock = util.nullcontextmanager()
> +            tr = util.nullcontextmanager()
> +            dsguard = dirstateguard.dirstateguard(repo, 'import')
> +        with lock, tr, dsguard:

Doesn't it leave a stale `lock` if `repo.transaction()` raises exception?
_______________________________________________
Mercurial-devel mailing list
[email protected]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to