Bug 124910 - Fix indexing file deletions (f**king undocumented swig bindings!!!)

git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1653 6955db30-a419-402b-8a0d-67ecbb4d7f56
remotes/github/custis
vfilippov 2013-05-17 14:30:15 +00:00 committed by Vitaliy Filippov
parent 5d442fac7d
commit 479a5b4506
1 changed files with 6 additions and 4 deletions

View File

@ -278,7 +278,9 @@ class SvnRev:
if change.base_path:
base_root = self._get_root_for_rev(change.base_rev)
if not change.path:
# :( f*cking undocumented python-subversion!
# change.action: modify=0, add=1, delete=2, replace=3
if change.action == 2 or not change.path:
action = 'remove'
elif change.added:
action = 'add'
@ -287,8 +289,8 @@ class SvnRev:
diffobj = svn.fs.FileDiff(base_root and base_root or None,
base_root and change.base_path or None,
change.path and fsroot or None,
change.path and change.path or None,
action != 'remove' and change.path and fsroot or None,
action != 'remove' and change.path and change.path or None,
None,
['-b', '-B'])
diff_fp = diffobj.get_pipe()
@ -306,7 +308,7 @@ class SvnRev:
mime = ''
# need to check if binary file's content changed when copying,
# if not, don't extract it, just get it from previous revision later
if repo.index_content and change.path and (not change.base_path
if repo.index_content and action != 'remove' and change.path and (not change.base_path
or svn.fs.contents_changed(
base_root and base_root or None,
base_root and change.base_path or None,