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-67ecbb4d7f56remotes/github/custis
parent
e8f25d9c7b
commit
361a00ff13
|
@ -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:
|
||||
|
|
10
lib/cvsdb.py
10
lib/cvsdb.py
|
@ -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":
|
||||
|
|
Loading…
Reference in New Issue