Commit Graph

84 Commits (56c2b61458742e54b871fa0d3ce4ce289748a40a)

Author SHA1 Message Date
Vitaliy Filippov 56c2b61458 Merge with original r2905 2013-07-18 19:13:28 +04:00
vfilippov 5d442fac7d Bug 113586 - Suppress UNSAFE STATEMENT warning
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1628 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:12:24 +04:00
vfilippov 57e1ca8909 Bug 113586 - Suppress UNSAFE STATEMENT warning
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1626 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:12:24 +04:00
vfilippov 8492aa772e Bug 82651 - Limit content length for CALL SNIPPETS
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1609 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:12:24 +04:00
vfilippov b5ac9522cc Bug 82651 - Allow index entries overwrite mode for Sphinx content indexing
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1588 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:12:23 +04:00
vfilippov 24e0a24ca9 Bug 99105 - Exact match on repo using last part of name
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1585 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:12:23 +04:00
vfilippov 0bd2b940f9 Bug 82651
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1452 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:07:05 +04:00
vfilippov 24b979d9e2 Bug 88900 - Force cvs_ondisk_charset
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1451 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:07:05 +04:00
vfilippov fa08478619 Bug 82651 - () -> None
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1446 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:07:04 +04:00
vfilippov 7d15648286 Bug 82651 - Fix for inaccessible repos
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1445 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:07:04 +04:00
vfilippov 76987f0851 Bug 82651 - Retrieve text file contents from SVN when searching (debug)
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1444 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:07:04 +04:00
vfilippov 928bf6f1a6 Bug 82651 - Retrieve text file contents from SVN when searching
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1443 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:07:04 +04:00
vfilippov 4cd52560ac Bug 88267 - Partial rebuild ability for CVS
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1442 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:07:04 +04:00
vfilippov 160233f758 Bug 82651 - Content size limit (4MB Sphinx)
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1401 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:07:02 +04:00
vfilippov 72934bf6cd Bug 82651 - Content size limit (4MB Sphinx), enable snippets setting
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1400 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:07:02 +04:00
vfilippov a564b02d18 Bug 82651 - Store contents for snippet retrieval in MySQL
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1399 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:07:02 +04:00
vfilippov 80ccb26b20 Bug 82651 - Store contents for snippet retrieval in MySQL
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1398 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:07:01 +04:00
vfilippov ecadbf9fd3 Bug 82651 - Remove rest of UTF-8 ugly hacks
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1394 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:07:01 +04:00
vfilippov e363cf19b1 Bug 82651 - Tika&Sphinx&chardet content indexing (done!)
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1388 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:07:00 +04:00
vfilippov 361a00ff13 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
2013-07-18 17:07:00 +04:00
vfilippov 7eb621bcd1 Bug 76690 - Optimize "only svn" / "only cvs"
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1230 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:06:59 +04:00
vfilippov 5de0639a9c Bug 76690 - Check glob match for being really an exact one
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1229 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:06:59 +04:00
vfilippov e17b0dce21 Bug 56474
Honor repository for build_commit


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@518 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:06:55 +04:00
cmpilato b8a7f32fb4 When querying the commits database, explicitly name columns in case
someone has a modified/customized database with additional or
reordered columns.

* lib/cvsdb.py
  (CheckinDatabase.CheckCommit, CheckinDatabase.PurgeRepository):
    Name columns in SELECT statement rather than using '*'.

Patch by: Grant Bremer <gbremer{__AT__}tigris.org>
          (Tweaked by me.)


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2843 8cb11bc2-c004-0410-86c3-e597b4017df7
2013-02-26 16:43:12 +00:00
cmpilato f48add83f7 Bump copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2820 8cb11bc2-c004-0410-86c3-e597b4017df7
2013-01-04 19:01:54 +00:00
cmpilato 9e9b82218c Bump copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2720 8cb11bc2-c004-0410-86c3-e597b4017df7
2012-01-23 17:52:47 +00:00
cmpilato c355d1ce3e Fix issue #486 ("OperationError raised when trying to do a glob search").
Add code to workaround the fact that in Python 2.6,
fnmatch.translate() stopped returning strings that ended with '$'
(which work fine as MySQL regular expressions) and started instead
returning strings that ended with '\Z(?ms)' (which... don't).

* lib/cvsdb.py
  (CheckinDatabase.SQLQueryListString): If the returned regexp ends
    with '\Z(?ms)', replace those characters with a single '$'

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2580 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-06-06 19:57:51 +00:00
cmpilato 02bd4d70db Update some copyright notices.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2569 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-05-17 12:02:28 +00:00
cmpilato 61bcf03fcd Fix (to the degree that I believe is reasonable at this time) issue
#433 ("queries return only partial results").  When a database query
is artificially limited by the 'row_limit' setting, inform the user
that the returned data is incomplete.

* lib/cvsdb.py
  (CheckinDatabase.CreateSQLQueryString): Add 'detect_leftover'
    parameter, used internally to check for a reached query limit.
  (CheckinDatabase.RunQuery): Update call to CreateSQLQueryString(),
    and check for leftover query response rows.  If any are found, set
    the appropriate flag on the query object.
  (CheckinDatabaseQuery.__init__): Set initial values for new
    'executed' and 'limit_reached' members.
  (CheckinDatabaseQuery.SetExecuted,
   CheckinDatabaseQuery.SetLimitReached,
   CheckinDatabaseQuery.GetLimitReached,
   CheckinDatabaseQuery.GetCommitList): New functions.

* lib/viewvc.py
  (view_query): Use query.GetCommitList() now instead of poking into
    the query object directly.  Also, check query.GetLimitReached(),
    reporting the findings through the data dictionary (via a new
    'row_limit_reached' item) to the templates.

* lib/query.py
  (run_query): Use query.GetCommitList() now instead of poking into
    the query object directly.  Now return a 2-tuple of commits and a
    limit-reached flag.
  (main): Update expectations of run_query() call.  Populate
    'row_limit_reached' data dictionary item.

* templates/query_results.ezt,
* templates/query.ezt
  Display a warning if the query results are incomplete.

* templates/docroot/styles.css
  (.vc_warning): New style definition.

* docs/template-authoring-guide.html
  Document the new 'row_limit_reached' template item.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2551 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-04-20 14:50:40 +00:00
cmpilato 1e4c3f92f6 Move a bunch of duplicated statements into a helper function.
While here, add notes to the 'row_limit' and 'rss_row_limit'
configuration option descriptions.

* lib/cvsdb.py
  (CheckinDatabase.GetCommitsTable): New helper.
  (CheckinDatabase.AddCommit, CheckinDatabase.CreateSQLQueryString,
   CheckinDatabase.CheckCommit, CheckinDatabase.sql_delete): Use new
    GetCommitsTable() helper instead of hard-coding the version-specific
    selection of the commits table.

* conf/viewvc.conf.dist
  (row_limit, rss_row_limit): Make it clear what exactly is getting
    limited here.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2550 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-04-20 14:05:16 +00:00
cmpilato df71275a13 Try to make some sense of the various CVSdb-related limitation
mechanisms, namely by removing the largely redundant "global" limit
and allowing the per-query row limit (which already exist, too) to do
its work.

While here, remove a poorly conceived (but thankfully unhighlighted)
mechanism for overriding the administrative limit on database rows
which was accessible via URL CGI params.

* lib/viewvc.py
  (_legal_params): Remove 'limit' as a legal parameter.
  (view_query): No longer allow an undocumented URL parameter to
    override the admin-declared SQL row limit.  That should have never
    been allowed!

* lib/cvsdb.py
  (CheckinDatabase.__init__): Remove 'row_limit' parameter and
    associated self._row_limit member.
  (CheckinDatabase.CreateSQLQueryString): No longer fuss with
    self._row_limit.  Let the individual query carry the row limit.
  (ConnectDatabase): Update call to CheckinDatabase().

* lib/query.py
  (form_to_cvsdb_query): Now accept 'cfg' parameter, and set the
    query's row limit from the configured defaults.
  (run_query): Update call to form_to_cvsdb_query().

* docs/url-reference.html
  Remove reference to the 'limit' parameter.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2547 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-04-19 20:40:04 +00:00
cmpilato a5df176395 Wow. Drop a "general code cleanup" kind of bomb on the codebase. All
of this is aimed at not paying the maintenance price of supporting
Python versions prior to 2.4 any longer, plus a little bit of just
getting dead code out of the way.

* lib/compat.py
  Remove as unused.

* bin/cvsdbadmin,
* bin/loginfo-handler,
* bin/make-database,
* bin/svndbadmin,
* lib/accept.py,
* lib/blame.py,
* lib/cvsdb.py,
* lib/popen.py,
* lib/query.py,
* lib/sapi.py,
* lib/vcauth/forbidden/__init__.py
* lib/vcauth/forbiddenre/__init__.py,
* lib/vcauth/svnauthz/__init__.py,
* lib/vclib/__init__.py,
* lib/vclib/ccvs/blame.py,
* lib/win32popen.py,
* tests/timelog.py
  Replace explicit import and use of the 'string' module with newer constructs.

* bin/standalone.py,
* lib/viewvc.py 
  No longer use 'compat' module.  Replace explicit import and use of
  the 'string' module with newer constructs.

* lib/dbi.py
  Use calender.timegm() instead of compat.timegm().

* lib/vcauth/__init__.py
  Lose unused module imports.

* lib/config.py,
  Replace explicit import and use of the 'string' module with newer
  constructs where possible.  Lose old ConfigParser patch-up code for
  Python 1.5.1.

* lib/vclib/ccvs/ccvs.py
  Replace explicit import and use of the 'string' module with newer
  constructs where possible.  Import _path_join() from bincvs, and use
  it instead of a bunch of copy-and-pasted string join() statements
  throughout.

* lib/vclib/ccvs/__init__.py
  (cvs_strptime): Moved here from the 'compat' module.

* lib/vclib/ccvs/bincvs.py
  (): No longer use 'compat' module.  Replace explicit import and use
    of the 'string' module with newer constructs.
  (_path_join): New, used now instead of a bunch of copy-and-pasted
    string join() statements throughout.

* viewvc-install
  Don't use the 'compat' module any more.

Also, so some rearranging of non-critical bits.

* misc/:              New directory.
* misc/py2html.py:    Moved from 'lib/py2html.py'.
* misc/PyFontify.py:  Moved from 'lib/PyFontify.py'.
* misc/elemx/:        Moved from 'elemx/'.
* misc/tparse/:       Moved from 'tparse/'.
* tools/make-release
  Omit 'misc' directory from releases, too.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2437 8cb11bc2-c004-0410-86c3-e597b4017df7
2010-09-03 16:49:52 +00:00
stas 6a0562d708 Bug 37020
debug


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@185 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-06-16 16:54:14 +00:00
vfilippov 6835e74f20 Merge with ViewVC 1.2-dev http://viewvc.tigris.org/svn/viewvc@2204
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@184 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-06-16 14:11:20 +00:00
cmpilato 1d496a8f51 Make error handling in cvsdb a little more flexible.
* lib/cvsdb.py
  (UnknownRepositoryError, DatabaseVersionError): New Exception classes.
  (CheckinDatabase.Connect): Raise DatabaseVersionError instead of a
    generic Exception.
  (CheckinDatabase.PurgeRepository): Raise UnknownRepositoryError
    instead of a generic Exception.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2194 8cb11bc2-c004-0410-86c3-e597b4017df7
2009-06-08 15:23:16 +00:00
cmpilato f48559766a * lib/cvsdb.py
(CheckinDatabase.PurgeRepository): Don't allow the purge operation
    to actually *create* a "repositories" table entry.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2179 8cb11bc2-c004-0410-86c3-e597b4017df7
2009-05-29 15:09:51 +00:00
cmpilato 546501816b Fix issue #417 - "cvsdbadmin rebuild" fails to record some of the
commit/repository info.

* lib/cvsdb.py
  (CheckinDatabase.PurgeRepository): Clear all the ID caches after
    running a purge operation so that, if the purge is actually part
    of a rebuild, the subsequent update doesn't merely pull IDs from
    the cache (with the side-effect of not readding them to the database).

Reported by: Naran Babhu <naranbabhu{_AT_}tigris.org
             Martin Dessureault <martin{_AT_}austin.rr.com>


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2178 8cb11bc2-c004-0410-86c3-e597b4017df7
2009-05-29 15:08:32 +00:00
svnuser a208ec46ab Bug 37020
Search by revision number


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@165 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-05-21 14:42:39 +00:00
cmpilato 7fd9e405a1 Update copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2107 8cb11bc2-c004-0410-86c3-e597b4017df7
2009-03-18 16:43:33 +00:00
vfilippov 50b67b3ddb Bug 45076
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@126 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-02-11 12:57:01 +00:00
cmpilato 623ab85805 Merge to trunk all changes made on the issue-366-dev branch,
completing issue #366 (cvsdb purge operation is painfully slow).

* lib/cvsdb.py,
* bin/make-database


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2078 8cb11bc2-c004-0410-86c3-e597b4017df7
2009-01-13 18:16:11 +00:00
vfilippov 00f38a1b55 utf8string diffs
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@41 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-04 15:47:45 +00:00
vfilippov a30b597260 check access rights when querying commit database
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@27 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-18 13:36:33 +00:00
vfilippov 822ec29624 bug 37020
fucking encodings


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@22 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-14 14:53:48 +00:00
vfilippov f9b1b8a50c encodings
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@21 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-13 16:51:57 +00:00
vfilippov 712761df3f fast cvsdbadmin
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@17 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-12 18:52:54 +00:00
vfilippov 585580ec57 bug 37020
Ability to connect to MySQL through UNIX socket
diff links in query.py are shown now (moved expand_root_parents to config.py)
full-text comment searches in query and query_form are supported using MySQL FULLTEXT indexes
<select> for repository selection in query


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@5 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-11 14:25:07 +00:00
vfilippov f3aa325419 bug 37020
viewvc 1.1.0-beta1 initial commit


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@4 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-11 14:17:41 +00:00
cmpilato d272630eac Fix issue #360 - Purge functionality can orphan rows in checkins table.
* lib/cvsdb.py
  (CheckinDatabase.sql_delete): Add keep_fkey parameter, used to
    prevent deletion of keys that are still in use in the 'checkins'
    table.
  (CheckinDatabase.PurgeRepository): Pass keep_fkey parameter when
    deleting rows from tables other than 'checkins'.

* bin/cvsdbadmin,
* bin/svndbadmin
  Update script usage messages to indicate that rebuilding includes
  purging.

Patch by: Larry Shatzer (larrys {at} gmail.com)
          (Tweaked by me.)

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1974 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-07-07 13:21:48 +00:00
cmpilato e157f923ed * lib/cvsdb.py
(GetCommitListFromRCSFile): Update call to Repository.itemlog().

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1965 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-06-23 23:50:45 +00:00