James Moger
2011-07-20 dd6f08950e36694d9757adc84ed6805620d0c032
refs
author James Moger <james.moger@gitblit.com>
Wednesday, July 20, 2011 21:06 -0400
committer James Moger <james.moger@gitblit.com>
Wednesday, July 20, 2011 21:06 -0400
commitdd6f08950e36694d9757adc84ed6805620d0c032
tree 5b154f313150d7ff05048c8d2df46dbbccd2f62f tree | zip | gz
parent 230632f582e7f1647cf15bc3ebd6148cb9af43c0 view | diff
Fixed rename and delete repository (issue-10)

This was due to use of the FileResolver which caches repository objects.
Calling close() on a cached repository instance would decrement a
counter, but the repository would never really close and release all its
resources because the FileResolver "held" the first count/reference so
the object and refs databases were never closed.

The solution was to use reflection to determine the actual "useCnt" of
the repository and then call close() that number of times. In practice,
the "useCnt" is probably always 2, and that is the default value in case
reflection fails.

1 files modified
41 ■■■■■ changed files
src/com/gitblit/GitBlit.java 41 ●●●●● diff | view | raw | blame | history