Bug 82651 - Fix cvsdb glob search, TODO index file contents

git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1365 6955db30-a419-402b-8a0d-67ecbb4d7f56
remotes/github/custis
vfilippov 2011-09-07 23:13:12 +00:00 committed by Vitaliy Filippov
parent e8f25d9c7b
commit 361a00ff13
2 changed files with 9 additions and 5 deletions

View File

@ -184,6 +184,10 @@ class SvnRev:
['-b', '-B'])
diff_fp = diffobj.get_pipe()
plus, minus = _get_diff_counts(diff_fp)
# TODO Indexing file contents
# For binary files: svn.fs.contents_changed(root1, path1, root2, path2)
# Temp file with contents is at: diffobj.tempfile2
# Apache Tika server may even be at another host!
# CustIS Bug 50473: a workaround for svnlib behaviour in file movements (FILE1 -> FILE2 + FILE1 -> null)
if change.base_path:

View File

@ -14,7 +14,6 @@ import os
import sys
import string
import time
import fnmatch
import re
import vclib
@ -397,10 +396,11 @@ class CheckinDatabase:
if not re.match(r'(\*|\?|\[.*\])', data):
match = "="
else:
# use fnmatch to translate the glob into a regexp
data = fnmatch.translate(data)
match = " REGEXP "
if data[0] != '^': data = '^' + data
data = data.replace('%', '\\%')
data = data.replace('_', '\\_')
data = data.replace('*', '%')
data = data.replace('?', '_')
match = " LIKE "
elif query_entry.match == "regex":
match = " REGEXP "
elif query_entry.match == "notregex":