[viewvc-dev] [PATCH] Fix issue #519: "Stack trace while accessing a BDB repository if last commit deleted a file or directory"
vijayaguru guruchave <[email protected]> Tue, 29 Jan 2013 18:36:43 +0530
| Newsgroups | gmane.comp.version-control.cvs.viewcvs.devel |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_3688_1830268489.1359469079805 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, This patch fixes issue #519:"Stack trace while accessing a BDB repository if last commit deleted a file or directory".[1] The patch and log message are attached. [1] http://viewvc.tigris.org/issues/show_bug.cgi?id=519 Thanks & Regards, Vijayaguru P.S: I can't find an answer why we don't get any exception while accessing a FSFS repository of same directory structure. ------------------------------------------------------ http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4251&dsMessageId=3046554 To unsubscribe from this discussion, e-mail: [[email protected]]. ------=_Part_3688_1830268489.1359469079805 Content-Type: text/plain; charset=UTF-8; name=viewvc-issue-519.patch.txt Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=viewvc-issue-519.patch.txt Index: lib/vclib/svn/svn_repos.py =================================================================== --- lib/vclib/svn/svn_repos.py (revision 2826) +++ lib/vclib/svn/svn_repos.py (working copy) @@ -697,13 +697,15 @@ pathtype = self._gettype(self._getpath(parts), rev) if vclib.check_path_access(self, parts, pathtype, rev): found_readable = 1 - copyfrom_path, copyfrom_rev = \ - _get_change_copyinfo(fsroot, path, change) - if copyfrom_path and copyfrom_path != path: - parts = _path_parts(copyfrom_path) - if not vclib.check_path_access(self, parts, pathtype, + if (change.change_kind == fs.path_change_add or + change.change_kind == fs.path_change_replace): + copyfrom_path, copyfrom_rev = \ + _get_change_copyinfo(fsroot, path, change) + if copyfrom_path and copyfrom_path != path: + parts = _path_parts(copyfrom_path) + if not vclib.check_path_access(self, parts, pathtype, copyfrom_rev): - found_unreadable = 1 + found_unreadable = 1 else: found_unreadable = 1 if found_readable and found_unreadable: ------=_Part_3688_1830268489.1359469079805 Content-Type: text/plain; charset=UTF-8; name=viewvc-issue-519.log.txt Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=viewvc-issue-519.log.txt Fix issue #519: "Stack trace while accessing a BDB repository if last commit deleted a file or directory" * lib/vclib/svn/svn_repos.py (_simple_auth_check): Get copyfrom_path and copyfrom_rev of a path only if it is added or replaced. Patch by: Vijayaguru G <vijay{_AT_}collab.net> ------=_Part_3688_1830268489.1359469079805--