[PATCH v2 03/18] remote-bzr: fix order of locking in CustomTree
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- May 1, 2013, 01:09 UTC
- Message-ID
- <1367370610-14250-4-git-send-email-felipe.contreras@gmail.com>
- In-Reply-To
- <1367370610-14250-1-git-send-email-felipe.contreras@gmail.com>
It doesn't seem to make any difference, but revision_tree() requires a lock.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> --- contrib/remote-helpers/git-remote-bzr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr index 91b5cda..b428244 100755 --- a/contrib/remote-helpers/git-remote-bzr +++ b/contrib/remote-helpers/git-remote-bzr @@ -389,8 +389,8 @@ class CustomTree(): def copy_tree(revid): files = files_cache[revid] = {} - tree = repo.repository.revision_tree(revid) repo.lock_read() + tree = repo.repository.revision_tree(revid) try: for path, entry in tree.iter_entries_by_dir(): files[path] = entry.file_id
-- 1.8.3.rc0.399.gc96a135