1
0
mirror of https://github.com/vitalif/viewvc-4intranet synced 2019-04-16 04:14:59 +03:00

Compare commits

...

94 Commits

Author SHA1 Message Date
06bfb6a5fe Record merge with r2243 in git 2013-07-18 17:05:41 +04:00
vfilippov
04d3b88f6a Bug 37020
Merge with r2243 from official SVN


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@268 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-08-20 12:43:52 +00:00
vfilippov
d85d6578da Bug 53107
For Wiki Template:cvs


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@256 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-08-17 14:30:37 +00:00
vfilippov
7a40e1c902 Bug 52230
A fix for potential bug when no Subversion repositories are visible



git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@206 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-07-24 17:35:25 +00:00
stas
c8dbd38e0c Bug 51239
try: except: pass
FUCKING PYDON


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@198 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-07-02 13:46:38 +00:00
stas
82ea92e4a4 Bug 44995
Unicode() string in format_log


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@196 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-07-02 11:22:55 +00:00
vfilippov
be67aab7dc Bug 32155
Fix RSS urls in multi-repository feeds


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@194 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-07-01 10:29:45 +00:00
stas
8ecc076ebc Bug 37020
Fix build_commit access check


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@186 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-06-17 12:13:05 +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
svnuser
4b05147064 Bug 50473
A workaround for line counts when moving


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@178 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-06-15 15:53:35 +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
stas
86c313bcf8 Bug 37020
rss_href


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@163 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-04-10 10:26:29 +00:00
vfilippov
a2e45b4468 Bug 37020
404 not found on log_href's of removed files
More request.roottype ---> my_repos['roottype']


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@157 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-03-31 13:07:48 +00:00
stas
5ed8c4967a Bug 47903
Incorrect exam_rev for SVN deleted files


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@150 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-03-25 18:14:54 +00:00
stas
dbd3e4af59 Bug 46528
Bug 46710
default format


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@134 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-02-16 12:57:47 +00:00
vfilippov
5349a36a18 Bug 46528
Bug 46710
OR in group formats


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@133 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-02-16 12:55:32 +00:00
stas
81df47c357 Bug 46528
strip's


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@132 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-02-16 12:44:38 +00:00
stas
c916450eac Bug 46710
Bug 46528
Debugw


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@131 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-02-16 11:43:17 +00:00
stas
e4ea3a9f85 Bug 46710
Bug 46528
debug cvsntacl authorizer


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@130 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-02-16 11:41:16 +00:00
vfilippov
e6be979387 Bug 46528
By root group check specification


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@128 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-02-13 10:43:39 +00:00
vfilippov
2896c70f26 Bug 46528
New authorizers: grp, union, cvsntacl


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@127 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-02-12 16:37:15 +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
vfilippov
3c7ad9405c Bug 46239
Look in CVS/SVN/All repos link on query results page


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@121 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-02-03 12:19:33 +00:00
vfilippov
ab286694fe Bug 46239
Search only CVS/SVN repositories option


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@119 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-02-02 17:20:11 +00:00
vfilippov
1cf0815b3d Bug 45675
Unsecure patch detection fix for SVN roots


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@108 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-01-27 11:27:05 +00:00
vfilippov
355033b015 Bug 45675 -- debug
!!previous commit also was related to bug 45675


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@100 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-01-15 10:18:33 +00:00
vfilippov
2f99f7b72c Bug 45675 -- better way of diffing added/removed files
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@99 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-01-15 10:00:38 +00:00
vfilippov
e8d7fb16ff Bug 45675
debug


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@98 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-01-15 09:11:40 +00:00
vfilippov
e1cc47c375 Bug 45675: Patches from query results
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@97 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-01-14 14:07:41 +00:00
stas
5a55d3c0cd O_o max context value = 2^25-1 ... workaround for Bug 45200
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@76 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-22 18:13:08 +00:00
vfilippov
00d1ffe3e0 fix
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@75 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-22 18:00:37 +00:00
vfilippov
0d3176a320 bug 45200
'rcsdiff' workaround for fucking cvsnt


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@73 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-19 14:47:24 +00:00
vfilippov
053cc33ffd bug 44943
blame_source ---->> utf8string


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@68 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-16 14:29:30 +00:00
vfilippov
93144b2168 bug 37020
bug 44996
more CVS charset fixes


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@62 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-12 16:19:41 +00:00
vfilippov
c102b6b2a0 utf8string cvs logs
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@61 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-12 12:36:39 +00:00
vfilippov
7cd0e372bb russian filenames in cvs fix
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@60 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-11 16:02:02 +00:00
vfilippov
4e047ae281 bug 44931
s.encode('utf-8') in ezt


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@59 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-11 10:46:42 +00:00
vfilippov
1128625ac3 bug 44887
debug Magic MIME type guessing


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@58 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-10 13:21:37 +00:00
stas
15e2d27b7d xml
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@57 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-10 13:06:59 +00:00
vfilippov
86dcf849e3 debug magic code
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@56 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-10 13:03:55 +00:00
vfilippov
5f66346633 bug 44887
do not annotate binary files


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@55 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-10 12:26:16 +00:00
vfilippov
6586c8e4d7 bug 37020
enc fix


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@54 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-09 18:44:05 +00:00
vfilippov
d34f8f5946 bug 37020
debug


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@53 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-09 16:52:16 +00:00
vfilippov
842f0e712a bug 37020
templates for multi-repos query form


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@52 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-09 16:46:42 +00:00
vfilippov
0ad8ee1554 debug
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@51 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-09 16:46:28 +00:00
vfilippov
0f545ca76b del
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@50 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-09 16:36:37 +00:00
vfilippov
c3f2777a4e bug 37020
multi-root query form


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@49 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-09 16:34:49 +00:00
vfilippov
45c636fd11 bug 37020
no pagesize by default


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@48 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-09 15:18:31 +00:00
vfilippov
2d9276a06d KEY descid
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@47 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-09 14:54:40 +00:00
vfilippov
eb6edef712 cvs logs -----> utf8
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@46 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-09 11:23:21 +00:00
vfilippov
b574b8594d utf8
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@45 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-08 13:00:51 +00:00
vfilippov
3bfb004158 asynchronous SVN update script
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@44 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-08 12:32:42 +00:00
vfilippov
23eea873fa fix a bug in setup cvs hooks script
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@43 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-04 21:51:19 +00:00
vfilippov
9f0557ff85 testing ViewVC hooks
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@42 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-04 21:32:44 +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
3b4f7698af rights
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@40 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-02 14:55:27 +00:00
vfilippov
0114b46db0 fix directory rights
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@39 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-02 14:53:23 +00:00
vfilippov
a0c895b5a6 debug
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@38 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-02 14:46:25 +00:00
vfilippov
e74a8ac42d Apache config via virthost
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@37 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-02 14:15:01 +00:00
vfilippov
d94e658457 cvs_ondisk_charset
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@36 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-02 10:39:18 +00:00
vfilippov
cbcffad79a physical charset
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@35 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-01 18:16:46 +00:00
vfilippov
025eb36df4 multiple repos co CVSROOT
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@34 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-27 15:20:35 +00:00
vfilippov
33a8f2849c CustIS install script, it's done and tested now
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@33 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-26 14:18:40 +00:00
vfilippov
1bbf731b83 setup-svn-hooks
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@32 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-26 14:15:32 +00:00
vfilippov
cd68fb0f79 improved ACL import script
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@31 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-21 17:06:03 +00:00
vfilippov
97e5d91c18 import
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@30 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-18 17:25:26 +00:00
vfilippov
28ba6929af cvsacl
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@29 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-18 17:24:50 +00:00
vfilippov
3187e57026 None
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@28 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-18 13:49:12 +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
1480000938 debug
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@26 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-17 17:04:16 +00:00
vfilippov
bfe175e5cd setup cvs hook script
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@25 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-17 16:19:31 +00:00
vfilippov
2cadb542a2 pygments
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@24 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-14 19:42:47 +00:00
vfilippov
13b23a5696 total plus/minus lines
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@23 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-14 17:57:57 +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
6978ac9e5d merged
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@20 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-13 14:56:58 +00:00
vfilippov
230e2f1700 bug
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@19 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-12 20:17:34 +00:00
vfilippov
899204468b cron reload
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@18 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-12 19:04: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
73eaad686b bug 37020
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@16 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-12 18:48:25 +00:00
vfilippov
6556287ff3 bug 37020
debug


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@15 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-12 18:46:44 +00:00
vfilippov
4b51a62390 bug 37020
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@14 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-12 18:45:01 +00:00
vfilippov
5ea538f50e Pygments from tarball
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@13 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-12 18:26:03 +00:00
vfilippov
521261bb34 bug 37020
automatic hook setup


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@12 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-12 18:14:50 +00:00
vfilippov
9e55dba9f9 bug 37020
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@11 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-12 17:40:19 +00:00
vfilippov
9ac8f10967 bug 37020
http_proxy


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@10 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-12 17:08:12 +00:00
vfilippov
6ef2a85ae9 debug
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@9 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-12 16:42:44 +00:00
vfilippov
1200a15887 bug 37020
config


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@8 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-12 16:39:48 +00:00
vfilippov
0fddc0bb87 Bug 37020
Install script


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@7 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-12 16:12:45 +00:00
vfilippov
28a41fb268 fix pygments
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@6 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-12 16:12:19 +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
vfilippov
9b00bc278f bug 43834
dirs


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@3 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-11 14:12:33 +00:00
237 changed files with 9847 additions and 7484 deletions

46
CHANGES
View File

@@ -1,25 +1,4 @@
Version 1.2.0 (released ??-???-????)
* allow user-configurable cvsgraph display (issue #336)
Version 1.1.2 (released 11-Aug-2009)
* security fix: validate the 'view' parameter to avoid XSS attack
* security fix: avoid printing illegal parameter names and values
* add optional support for character encoding detection (issue #400)
* fix username case handling in svnauthz module (issue #419)
* fix cvsdbadmin/svnadmin rebuild error on missing repos (issue #420)
* don't drop leading blank lines from colorized file contents (issue #422)
* add file.ezt template logic for optionally hiding binary file contents
Version 1.1.1 (released 03-Jun-2009)
* fix broken query form (missing required template variables) (issue #416)
* fix bug in cvsdb which caused rebuild operations to lose data (issue #417)
* fix cvsdb purge/rebuild repos lookup to error on missing repos
* fix misleading file contents view page title
Version 1.1.0 (released 13-May-2009)
Version 1.1.0 (released ??-???-????)
* add support for full content diffs (issue #153)
* make many more data dictionary items available to all views
@@ -33,7 +12,9 @@ Version 1.1.0 (released 13-May-2009)
* add support for query by log message (issues #22, #121)
* fix bug parsing 'svn blame' output with too-long author names (issue #221)
* fix default standalone.py port to be within private IANA range (issue #234)
* add unified configury of allowed views; checkout view disabled by default
* add support for integration with GNU source-highlight (issue #285)
* add unified configury of allowed views
* add support for disabling the checkout view (now the default state)
* add support for ranges of revisions to svndbadmin (issue #224)
* make the query handling more forgiving of malformatted subdirs (issue #244)
* add support for per-root configuration overrides (issue #371)
@@ -55,24 +36,7 @@ Version 1.1.0 (released 13-May-2009)
* show RSS/query links only for roots found in commits database (issue #357)
* recognize Subversion svn:mime-type property values (issue #364)
* hide CVS files when viewing tags/branches on which they don't exist
* allow hiding of errorful entries from the directory view (issue #105)
* fix directory view sorting UI
* tolerate malformed Accept-Language headers (issue #396)
* allow MIME type mapping overrides in ViewVC configuration (issue #401)
* fix exception in rev-sorted remote Subversion directory views (issue #409)
* allow setting of page sizes for log and dir views individually (issue #402)
Version 1.0.9 (released 11-Aug-2009)
* security fix: validate the 'view' parameter to avoid XSS attack
* security fix: avoid printing illegal parameter names and values
Version 1.0.8 (released 05-May-2009)
* fix directory view sorting UI
* tolerate malformed Accept-Language headers (issue #396)
* fix directory log views in revision-less Subversion repositories
* fix exception in rev-sorted remote Subversion directory views (issue #409)
* add support for hiding errorful entries from the directory view (issue #105)
Version 1.0.7 (released 14-Oct-2008)

View File

@@ -139,7 +139,7 @@ installation instructions.
default_root
root_as_url_component
rcs_dir
mime_types_files
mime_types_file
There are some other options that are usually nice to change. See
viewvc.conf for more information. ViewVC provides a working,

View File

@@ -15,7 +15,7 @@
<blockquote>
<p><strong>Copyright &copy; 1999-2009 The ViewCVS Group. All rights
<p><strong>Copyright &copy; 1999-2008 The ViewCVS Group. All rights
reserved.</strong></p>
<p>By using ViewVC, you agree to the terms and conditions set forth
@@ -59,7 +59,6 @@
<li>March 17, 2006 &mdash; software renamed from "ViewCVS"</li>
<li>April 10, 2007 &mdash; copyright years updated</li>
<li>February 22, 2008 &mdash; copyright years updated</li>
<li>March 18, 2009 &mdash; copyright years updated</li>
</ul>
</body>

1
README
View File

@@ -4,3 +4,4 @@ Please read the file INSTALL for more information.
And see windows/README for more information on running ViewVC on
Microsoft Windows.

216
bin/custis-install Executable file
View File

@@ -0,0 +1,216 @@
#!/bin/sh
# ViewVC installation script for CustIS
if [ -f custis-install-config ]; then
. custis-install-config
else
cat >custis-install-config <<EOF
CVS_ASYNC=
SVN_ASYNC=
CVS_USER=www-data
CVS_GROUP=cvs.users
CVSROOTS=
SVNROOT=
SVN_FORBIDDENRE=
DB_HOST=
DB_PORT=
DB_SOCKET=/var/run/mysqld/mysqld.sock
DB=
DB_USER=
DB_PASSWD=
VIEWVC_DIR=
VIEWVC_URI=/
VIEWVC_URI_SLASH=/
VIEWVC_STATIC_URI=/static
http_proxy=
no_proxy=
EOF
echo Empty 'custis-install-config' initialized, please edit it before installation.
exit
fi
if [ ! "$DB" -o ! "$VIEWVC_DIR" ]; then
echo Please set up 'custis-install-config' before installation.
exit
fi
################################################################################
export http_proxy
export no_proxy
DEPS="python libapache2-mod-python rcs diff cvsnt subversion subversion-tools python-setuptools python-subversion python-mysqldb cvsgraph"
echo "*** Installing dependency packages: $DEPS"
apt-get install $DEPS
echo "*** Installing Pygments for Python"
wget http://pypi.python.org/packages/source/P/Pygments/Pygments-0.11.1.tar.gz
tar -zxf Pygments-0.11.1.tar.gz
cd Pygments-0.11.1
python setup.py install
cd ..
echo "*** Installing ViewVC into $VIEWVC_DIR"
if [ ! -e $VIEWVC_DIR/viewvc.conf ]; then
../viewvc-install <<EOF
$VIEWVC_DIR
EOF
fi
echo "*** Writing ViewVC configuration into $VIEWVC_DIR/viewvc.conf"
for CVSROOT in $CVSROOTS; do
if [ "$vccvsroots" ]; then
vccvsroots="$vccvsroots, "
fi
vcrootname=`basename $CVSROOT`
vccvsroots="$vccvsroots$vcrootname: $CVSROOT"
done;
cat >"$VIEWVC_DIR/viewvc.conf" <<EOF
[general]
cvs_roots = $vccvsroots
root_parents = $SVNROOT : svn
cvsnt_exe_path = /usr/bin/cvsnt
mime_types_file = /etc/mime.types
address = Admin address: stas [gav-gav] custis [ru]
kv_files =
languages = en-us, ru-ru
[utilities]
rcs_dir = /usr/bin
cvsnt = /usr/bin/cvsnt
svn = /usr/bin/svn
diff = /usr/bin/diff
cvsgraph = /usr/bin/cvsgraph
[options]
allowed_views = markup, annotate, roots
authorizer = forbiddenre
checkout_magic = 0
cross_copies = 1
cvsgraph_conf = $VIEWVC_DIR/cvsgraph.conf
default_file_view = log
diff_format = h
docroot = $VIEWVC_STATIC_URI
enable_syntax_coloration = 1
generate_etags = 1
hide_attic = 1
hide_cvsroot = 1
hide_errorful_entries = 0
hr_breakable = 1
hr_funout = 0
hr_ignore_keyword_subst = 1
hr_ignore_white = 1
hr_intraline = 0
http_expiration_time = 600
limit_changes = 100
log_sort = date
mangle_email_addresses = 1
root_as_url_component = 1
short_log_len = 80
show_log_in_markup = 1
show_logs = 1
show_subdir_lastmod = 0
sort_by = file
sort_group_dirs = 1
svn_config_dir =
template_dir = templates
use_cvsgraph = 1
use_localtime = 1
use_pagesize = 0
use_rcsparse = 0
use_re_search = 0
[templates]
[cvsdb]
enabled = 1
host = $DB_HOST
socket = $DB_SOCKET
database_name = $DB
user = $DB_USER
passwd = $DB_PASSWD
readonly_user = $DB_USER
readonly_passwd = $DB_PASSWD
[vhosts]
[authz-forbidden]
forbidden =
[authz-forbiddenre]
forbiddenre = $SVN_FORBIDDENRE
[authz-svnauthz]
authzfile =
EOF
echo "*** Initializing database: $DB using $DB_USER@$DB_HOST"
$VIEWVC_DIR/bin/make-database <<EOF
$DB_HOST
$DB_USER
$DB_PASSWD
$DB
EOF
echo "*** Configuring Apache"
cat >/etc/apache2/sites-available/viewvc <<EOF
<VirtualHost *:80>
ServerName viewvc.office.custis.ru
ServerAlias viewvc
ServerAdmin sysadmins@custis.ru
ServerSignature Off
ErrorLog /var/log/apache2/viewvc-error.log
TransferLog /var/log/apache2/viewvc-access.log
LogLevel warn
# ViewVC at $VIEWVC_URI installed at $VIEWVC_DIR
DocumentRoot $VIEWVC_DIR/bin/mod_python
Alias $VIEWVC_STATIC_URI $VIEWVC_DIR/templates/docroot
Alias $VIEWVC_URI $VIEWVC_DIR/bin/mod_python/
<Location ~ ^${VIEWVC_URI_SLASH}*(\?.*)?$>
Options -Indexes
RewriteEngine On
RewriteRule .* ${VIEWVC_URI_SLASH}viewvc.py%{REQUEST_URI} [R,L]
</Location>
<Directory $VIEWVC_DIR/bin/mod_python>
Options +ExecCGI
AddHandler python-program .py
PythonHandler handler
PythonDebug Off
</Directory>
</VirtualHost>
EOF
a2enmod python
a2enmod mod_python
a2enmod rewrite
a2ensite viewvc
echo "*** Restarting Apache"
apache2ctl stop
sleep 1
apache2ctl start
echo "*** Building commit database for CVS"
for CVSROOT in $CVSROOTS; do
$VIEWVC_DIR/bin/cvsdbadmin rebuild $CVSROOT
done;
echo "*** Building commit database for Subversion repositories"
for i in `ls $SVNROOT`; do
if [ -d "$SVNROOT/$i" ]; then
$VIEWVC_DIR/bin/svndbadmin -v rebuild "$SVNROOT/$i"
fi
done;
# setup hooks for CVS
./setup-cvs-hooks "$CVSROOTS" "$VIEWVC_DIR" "$CVS_USER" "$CVS_GROUP" "$CVS_ASYNC"
# setup hooks for Subversion
./setup-svn-hooks "$SVNROOT" "$VIEWVC_DIR" "$SVN_ASYNC"

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python
# -*-python-*-
#
# Copyright (C) 1999-2008 The ViewCVS Group. All Rights Reserved.
@@ -44,17 +44,23 @@ import string
import cvsdb
import viewvc
import vclib.ccvs
from stat import *
def UpdateFile(db, repository, path, update, quiet_level):
def UpdateFile(db, repository, path, update, latest_checkin, quiet_level):
try:
if update:
mtime = os.stat(repository.rcsfile(path, 1))[ST_MTIME]
if mtime < latest_checkin:
return
commit_list = cvsdb.GetUnrecordedCommitList(repository, path, db)
else:
commit_list = cvsdb.GetCommitListFromRCSFile(repository, path)
except cvsdb.error, e:
print '[ERROR] %s' % (e)
return
except vclib.ItemNotFound, e:
return
file = string.join(path, "/")
printing = 0
@@ -77,7 +83,8 @@ def UpdateFile(db, repository, path, update, quiet_level):
print
def RecurseUpdate(db, repository, directory, update, quiet_level):
def RecurseUpdate(db, repository, directory, update, latest_checkin,
quiet_level):
for entry in repository.listdir(directory, None, {}):
path = directory + [entry.name]
@@ -85,11 +92,13 @@ def RecurseUpdate(db, repository, directory, update, quiet_level):
continue
if entry.kind is vclib.DIR:
RecurseUpdate(db, repository, path, update, quiet_level)
RecurseUpdate(db, repository, path, update, latest_checkin,
quiet_level)
continue
if entry.kind is vclib.FILE:
UpdateFile(db, repository, path, update, quiet_level)
UpdateFile(db, repository, path, update, latest_checkin,
quiet_level)
def RootPath(path, quiet_level):
"""Break os path into cvs root path and other parts"""
@@ -187,8 +196,11 @@ if __name__ == '__main__':
if command in ('rebuild', 'update'):
repository = vclib.ccvs.CVSRepository(None, rootpath, None,
cfg.utilities, 0)
latest_checkin = db.GetLatestCheckinTime(repository)
if latest_checkin is None:
command = 'rebuild'
RecurseUpdate(db, repository, path_parts,
command == 'update', quiet_level)
command == 'update', latest_checkin, quiet_level)
except KeyboardInterrupt:
print
print '** break **'

57
bin/cvsnt-import-cvsacl Executable file
View File

@@ -0,0 +1,57 @@
#!/usr/bin/perl
use strict;
my ($type, $path, $branch, $user, $perm);
my $R = ''; # -R for recursive
my $lvl = {
r => 1,
t => 2,
w => 3,
c => 4,
a => 4,
p => 5,
};
while(<>)
{
chomp;
next if /^\s*#/so;
($type, $path, $branch, $user, $perm) = split /:/, $_;
($user, $perm) = split /!/, $user;
next unless $perm;
$perm = [ sort { $lvl->{$b} cmp $lvl->{$a} } split //, $perm ];
$perm = $perm->[0];
if ($perm eq 't')
{
$perm = 'read,tag,nowrite,nocreate,nocontrol';
}
elsif ($perm eq 'r')
{
$perm = 'read,notag,nowrite,nocreate,nocontrol';
}
elsif ($perm eq 'w')
{
$perm = 'read,tag,write,nocreate,nocontrol';
}
elsif ($perm eq 'c' || $perm eq 'a')
{
$perm = 'read,tag,write,create,nocontrol';
}
elsif ($perm eq 'p')
{
$perm = 'read,tag,write,create,control';
}
print "cvs rchacl$R -a $perm";
print " -u '$user'" if $user ne 'ALL';
print " -r '$branch'" if $branch ne 'ALL';
if ($path ne 'ALL')
{
print " '$path'";
}
else
{
print ' `ls $CVSROOT | grep -v '."'#cvs'`";
}
print "\n";
}

View File

@@ -62,7 +62,8 @@ CREATE TABLE checkins (
KEY repositoryid_2 (repositoryid),
KEY dirid (dirid),
KEY fileid (fileid),
KEY branchid (branchid)
KEY branchid (branchid),
KEY descid (descid)
) TYPE=MyISAM;
DROP TABLE IF EXISTS descs;
@@ -71,7 +72,8 @@ CREATE TABLE descs (
description text,
hash bigint(20) DEFAULT '0' NOT NULL,
PRIMARY KEY (id),
KEY hash (hash)
KEY hash (hash),
FULLTEXT KEY description (description)
) TYPE=MyISAM;
DROP TABLE IF EXISTS dirs;

View File

@@ -1,3 +1,3 @@
AddHandler python-program .py
PythonHandler handler
PythonDebug On
PythonDebug Off

57
bin/setup-cvs-hooks Executable file
View File

@@ -0,0 +1,57 @@
#!/bin/sh
CVSROOTS=$1
VIEWVC_DIR=$2
CVS_USER=$3
CVS_GROUP=$4
CVS_ASYNC=$5
if [ ! "$CVSROOTS" -o ! "$VIEWVC_DIR" -o ! "$CVS_USER" -o ! "$CVS_GROUP" ]; then
echo "USAGE: $0 <CVS_ROOTS> <VIEWVC_DIR> <CVS_USER> <CVS_GROUP> [CVS_ASYNC]"
exit
fi
echo "*** Setting up commit hooks for CVS repositories (job=$CVS_ASYNC)"
chgrp $CVS_GROUP $VIEWVC_DIR
chmod 775 $VIEWVC_DIR
chmod 1777 .
for CVSROOT in $CVSROOTS; do
vcrootname=`basename $CVSROOT`
if [ "$CVS_ASYNC" ]; then
VHOOK="touch $VIEWVC_DIR/.cvs-updated-$vcrootname"
else
VHOOK="$VIEWVC_DIR/bin/cvsdbadmin update $CVSROOT >/dev/null"
fi;
su $CVS_USER -s /bin/sh <<EOSH
CVSROOT=$CVSROOT cvs co CVSROOT
if [ $? -eq 0 ]; then
cd CVSROOT
mv loginfo loginfo.bak
grep -v '/.cvs-updated' <loginfo.bak | grep -v '/bin/cvsdbadmin update' >loginfo
cat >>loginfo <<EOF
ALL $VHOOK
EOF
cvs ci -m 'CVS commit hook for ViewVC' loginfo
cd ..
rm -Rf CVSROOT
fi
EOSH
if [ "$CVS_ASYNC" ]; then
cat >$VIEWVC_DIR/cvshook-$vcrootname <<EOF
#!/bin/sh
if [ -e "$VIEWVC_DIR/.cvs-updated-$vcrootname" ]; then
rm "$VIEWVC_DIR/.cvs-updated-$vcrootname"
$VIEWVC_DIR/bin/cvsdbadmin update $CVSROOT >/dev/null
fi
EOF
chmod 755 $VIEWVC_DIR/cvshook-$vcrootname
cat >/etc/cron.d/viewvc-cvs-$vcrootname <<EOF
*/5 * * * * root $VIEWVC_DIR/cvshook-$vcrootname
EOF
fi
done;
if [ "$CVS_ASYNC" ]; then
echo "*** Reloading cron daemon"
/etc/init.d/cron reload
fi

36
bin/setup-svn-hooks Executable file
View File

@@ -0,0 +1,36 @@
#!/bin/sh
SVNROOT=$1
VIEWVC_DIR=$2
SVN_ASYNC=$3
if [ ! "$SVNROOT" -o ! "$VIEWVC_DIR" ]; then
echo "USAGE: $0 <SVNROOT> <VIEWVC_DIR>"
exit
fi
echo "*** Setting up commit hooks for Subversion"
for i in `ls $SVNROOT`; do
if [ -d "$SVNROOT/$i" ]; then
if [ "$SVN_ASYNC" ]; then
cat >"$SVNROOT/$i/hooks/post-commit.tmp" <<EOF
#!/bin/sh
echo "\$1 \$2" >> $VIEWVC_DIR/.svn-updated
EOF
else
cat >"$SVNROOT/$i/hooks/post-commit.tmp" <<EOF
#!/bin/sh
$VIEWVC_DIR/bin/svndbadmin update \$1 \$2
EOF
fi
chmod 755 "$SVNROOT/$i/hooks/post-commit.tmp"
mv "$SVNROOT/$i/hooks/post-commit.tmp" "$SVNROOT/$i/hooks/post-commit"
fi
done;
if [ "$SVN_ASYNC" ]; then
cat >/etc/cron.d/viewvc-svn <<EOF
*/10 * * * * root $VIEWVC_DIR/bin/svnupdate-async.sh "$VIEWVC_DIR"
EOF
/etc/init.d/cron reload
fi

View File

@@ -17,7 +17,7 @@ on the local machine to generate ViewVC web pages.
__author__ = "Peter Funk <pf@artcom-gmbh.de>"
__date__ = "11 November 2001"
__version__ = "$Revision$"
__version__ = "$Revision: 1962 $"
__credits__ = """Guido van Rossum, for an excellent programming language.
Greg Stein, for writing ViewCVS in the first place.
Ka-Ping Yee, for the GUI code and the framework stolen from pydoc.py.

View File

@@ -158,6 +158,7 @@ class SvnRev:
svn.repos.svn_repos_replay(fsroot, e_ptr, e_baton)
self.changes = []
changes_hash = {}
for path, change in editor.changes.items():
# skip non-file changes
if change.item_kind != svn.core.svn_node_file:
@@ -181,6 +182,14 @@ class SvnRev:
change.path and change.path or None)
diff_fp = diffobj.get_pipe()
plus, minus = _get_diff_counts(diff_fp)
# CustIS Bug 50473: a workaround for svnlib behaviour in file movements (FILE1 -> FILE2 + FILE1 -> null)
if change.base_path:
if not change.path and changes_hash.get(change.base_path, '') != '':
minus = 0
elif change.path:
changes_hash[change.base_path] = change.path
self.changes.append((path, action, plus, minus))
def _get_root_for_rev(self, rev):

50
bin/svnupdate-async Executable file
View File

@@ -0,0 +1,50 @@
#!/usr/bin/perl
# Скрипт для обновления SVN репозиториев svndbadmin-ом
# Берёт номера ревизий и имена репозиториев из перечисленных файлов или STDIN,
# группирует их по номерам и выводит список команд, необходимых для обновления
use strict;
# первый аргумент - путь к svndbadmin
my $svndbadmin = shift @ARGV
|| die "USAGE: $0 <path_to_svndbadmin> FILES...";
# считываем названия репозиториев и номера ревизий из файла
my $tou = {};
my ($repos, $rev);
while (<>)
{
s/^\s+//so;
s/\s+$//so;
($repos, $rev) = split /\s+/, $_;
$tou->{$repos}->{$rev} = 1;
}
# превращаем номера ревизий в диапазоны ревизий
my ($i, $j, $r, $nr);
foreach $repos (keys %$tou)
{
$rev = [ sort keys %{$tou->{$repos}} ];
$nr = [];
$j = 0;
for $i (1..@$rev)
{
if ($i > $#$rev || $rev->[$i]-$rev->[$j] > $i-$j)
{
$r = $rev->[$j];
$r .= ":".$rev->[$i-1] if $i-$j > 1;
push @$nr, $r;
$j = $i;
}
}
$tou->{$repos} = $nr;
}
# выводим список команд для выполнения
foreach $repos (keys %$tou)
{
foreach (@{$tou->{$repos}})
{
print "$svndbadmin update $repos $_\n";
}
}

8
bin/svnupdate-async.sh Executable file
View File

@@ -0,0 +1,8 @@
#!/bin/sh
VIEWVC_DIR=$1
test -f "$VIEWVC_DIR/.svn-updating" -o ! -f "$VIEWVC_DIR/.svn-updated" && exit 0
mv "$VIEWVC_DIR/.svn-updated" "$VIEWVC_DIR/.svn-updating"
"$VIEWVC_DIR/bin/svnupdate-async" "$VIEWVC_DIR/bin/svndbadmin" "$VIEWVC_DIR/.svn-updating" | sh >/dev/null
rm "$VIEWVC_DIR/.svn-updating"

File diff suppressed because it is too large Load Diff

View File

@@ -1,211 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<title>ViewVC: 1.1.0 Release Notes</title>
<style>
.h2, .h3 {
padding: 0.25em 0em;
background: white;
}
.warning {
font-style: italic;
}
</style>
</head>
<body>
<h1>ViewVC 1.1.0 Release Notes</h1>
<div class="h2">
<h2 id="introduction">Introduction</h2>
<p>ViewVC 1.1.0 is the superset of all previous ViewVC releases.</p>
</div>
<div class="h2">
<h2 id="compatibility">Compatibility</h2>
<p>Each ViewVC release strives to maintain URL stability with previous
releases, and 1.1.0 is no exception. All URLs considered valid for
previous ViewVC releases should continue to work correctly in this
release, though possibly only via the use of HTTP redirects
(generated by ViewVC itself).</p>
<p>The commits database functionality has changed in ViewVC 1.1.0 in
way that breaks compatibility with prior ViewVC releases, but only
for new database instantiations. ViewVC 1.1.0 will continue to
understand (for both read and write operations) the previous
schema, so you are not required to rebuild your commits database
for ViewVC 1.1.0 compatibility. By default, new commits databases
created using the 1.1.0 version of the <code>make-database</code>
script will use a new database schema that is unreadable by
previous ViewVC versions. However, if you need a database which
can co-exist with a previous ViewVC version, you can use
the <code>--version=1.0</code> option
to <code>make-database</code>.</p>
<p>The ViewVC configuration files and template language have changed
dramatically. See the file <code>docs/upgrading-howto.html</code>
in the release for information on porting existing versions of
those items for use with ViewVC 1.1.0.</p>
</div>
<div class="h2">
<h2 id="compatibility">Features and Fixes</h2>
<div class="h3">
<h3 id="">Extensible path-based authorization w/ Subversion authz support</h3>
<p>In a nutshell, ViewVC is now able to do path-based authorization.
ViewVC 1.0 has a configuration option for naming 'forbidden'
modules, but it is really limited &mdash; it basically just makes a
universal decision about which top-level directories in every
hosted repository should be hidden by ViewVC. People want
more, and specifically requested that ViewVC learn how to honor
Subversion's authz files and semantics. So, along with some other
types of authorization approaches, that's what ViewVC 1.1 can now
do. If you are using mod_authz_svn with Apache today, or
svnserve's built-in authorization support, then you can now point
ViewVC to the same authz configuration file and have it honor the
access rules you've defined for your repositories.</p>
<p>Note that ViewVC does <strong>not</strong> handle authentication,
though. You'll need to configure your web server to demand login
credentials from users, which the web server itself can then hand
off to ViewVC for application against the authorization rules
you've defined.</p>
<p class="warning">WARNING: The root listing view does not consult the
authorization subsystem when deciding what roots to display to a
given user. If you need to protect your root names, consider
disabling it by removing <code>roots</code> from the set of views
listed in the
<code>allowed_views</code> configuration option.</p>
<p class="warning">WARNING: Support for path-based authorization is
incomplete in the experimental version control backend modules,
including the one that permits display of remote Subversion
repositories.</p>
</div>
<div class="h3">
<h3 id="">Subversion versioned properties display</h3>
<p>ViewVC 1.1 displays the properties that Subversion lets you store
on files and directories
(<code>svn:mime-type</code>, <code>svn:mergeinfo</code>,
<code>svn:ignore</code>, etc.). Directory properties are shown by
default at the bottom of that directory's entry listing. File
properties are displayed at the bottom of that file's
markup/annotate view.</p>
</div>
<div class="h3">
<h3 id="">Unified markup and annotation views</h3>
<p>The "markup" and "annotate" views in ViewVC now have a unified look
and feel (driven by a single EZT template). Both views support
syntax highlighting and Subversion file property display.</p>
</div>
<div class="h3">
<h3 id="">Unified, hassle-free Pygments-based syntax highlighting</h3>
<p>ViewVC 1.0 does syntax highlighting by working with GNU enscript, or
highlight, or php, or py2html &mdash; all these external tools just
to accomplish a single task. But they all do things in slightly
different ways. And if you configure them wrongly, you get strange
errors. <a href="http://www.pygments.org/">Pygments</a> (which is
also used by <a href="http://trac.edgewall.org/">Trac</a> for
syntax highlighting) is a Python package that requires no
configuration, is easier to use inside ViewVC, and so on. So
ViewVC 1.1 drops support for all those various old integrations,
and just uses Pygments for everything now. This change was about
developer and administrator sanity. There will be complaints, to
be sure, about how various color schemes differ and what file types
now are and aren't understood by the syntax highlighting engine,
but this change should vastly simplify the discussions of such
things.</p>
</div>
<div class="h3">
<h3 id="">Better MIME detection and handling</h3>
<p>ViewVC typically consults a MIME types file to determine what kind
of file a given document is, based on its filename extension
(<code>.jpg</code> = <code>image/jpeg</code>, &hellip;). But
Subversion lets you dictate a file's MIME type using
the <code>svn:mime-type</code> property. ViewVC now recognizes and
honors that property as the preferred source of a file's MIME type.
This can be disabled in the configuration, though, which might be
desirable if many of your Subversion-versioned files carry the
generic <code>application/octet-stream</code> MIME type that
Subversion uses by default for non-human-readable files.</p>
<p>Also, ViewVC now allows you to specify multiple MIME type mapping
files that you'd like it to consult when determine the MIME type of
files based on their extensions. This allows administrators to
easily define their own custom mappings for ViewVC's benefit
without potentially affecting the mappings used by other site
services.</p>
</div>
<div class="h3">
<h3 id="">Support for full content diffs</h3>
<p>ViewVC 1.1 expands the previously existing options of "colored
diff" and "long colored diff" with a new "full colored diff", which
shows the full contents of the changed file (instead of only the 3
or 15 lines of context shown via the older diff display types).</p>
</div>
<div class="h3">
<h3 id="">Support for per-root configuration overrides</h3>
<p>In ViewVC 1.1, you can setup configuration option overrides on a
per-root (per-repository) basis (if you need/care to do so). See
the comments in the <code>viewvc.conf.dist</code> file for more on
how to do this.</p>
</div>
<div class="h3">
<h3 id="">Optional email address obfuscation/mangling</h3>
<p>ViewVC can, when displaying revision metadata, munge strings that
look like email addresses to protect them from screen-scraping
spammers. For example, a log message that says, "Patch by:
cmpilato@red-bean.com" can optionally be displayed by ViewVC using
HTML entity encoding for the characters (a trick that causes no
visible change to the output, but that might confuse
unsophisticated spam bot crawlers) or as "Patch by: cmpilato@..."
(which isn't a complete email address at all, but might be enough
information for the human reading the log message to know who to
blame for the patch).</p>
</div>
<div class="h3">
<h3 id="">Pagination improvements</h3>
<p>The way that ViewVC splits directory and log views across pages has
been reworked. The old way was "Fetch all the information you can
find, then display only one page's worth." The new way is "Fetch
only what you need to display the page requested, plus a little bit
of border information." This provides a large performance
enhancement for the default sort orderings.</p>
</div>
</div>
</body>
</html>

View File

@@ -161,6 +161,12 @@ td {
resource. Valid only when <var>pathtype</var> is <tt>file</tt>
or (for Subversion roots) <tt>dir</tt>.</td>
</tr>
<tr class="varlevel1">
<td class="varname">log_rev_href</td>
<td>String</td>
<td>Revision number of the file-revision currently being viewed, or
None.</td>
</tr>
<tr class="varlevel1">
<td class="varname">nav_path</td>
<td>List</td>
@@ -315,7 +321,7 @@ td {
<tr class="varlevel1">
<td class="varname">pathrev_hidden_values</td>
<td>List</td>
<td>Hidden field name/value pairs for the revision/tag selection form.</td>
<td>Hidden value name/value pairs for the revision/tag selection form.</td>
</tr>
<tr class="varlevel1">
<td class="varname">pathrev_clear_action</td>
@@ -325,7 +331,7 @@ td {
<tr class="varlevel1">
<td class="varname">pathrev_clear_hidden_values</td>
<td>List</td>
<td>Hidden field name/value pairs for the path revision clear button.</td>
<td>Hidden value name/value pairs for the path revision clear button.</td>
</tr>
</tbody>
</table>
@@ -444,10 +450,10 @@ td {
<tr class="varlevel1">
<td class="varname">annotation</td>
<td>String</td>
<td>Valid values are "none" (no annotations were attempted),
"annotated" (annotation was successful), "binary" (file contents
are not line-based and human-readable), and "error" (something
went wrong during annotation).</td>
<td>If set, indicates that annotations were requested. Valid values
are "annotated" (annotation was successful), "binary" (file contents
are not line-based and human-readable), and "error" (something went
wrong during annotation).</td>
</tr>
<tr class="varlevel1">
<td class="varname">author</td>
@@ -598,45 +604,6 @@ td {
<td colspan="3">Includes all variables from the
<a href="#variables-common">COMMON</a> variable set</td>
</tr>
<tr class="varlevel1">
<td class="varname">gbbox</td>
<td>Boolean</td>
<td>Toggle generation of a branch box at the tip of all branches in
the revision graph.</td>
</tr>
<tr class="varlevel1">
<td class="varname">gflip</td>
<td>Boolean</td>
<td>Toggle the direction of the revision graph.</td>
</tr>
<tr class="varlevel1">
<td class="varname">gleft</td>
<td>Boolean</td>
<td>Toggle the orientation of the revision graph.</td>
</tr>
<tr class="varlevel1">
<td class="varname">gmaxtag</td>
<td>String</td>
<td>Number of tags per revision to display in the revision graph.</td>
</tr>
<tr class="varlevel1">
<td class="varname">graph_action</td>
<td>String</td>
<td>Form action URL for the graph customization form.</td>
</tr>
<tr class="varlevel1">
<td class="varname">graph_hidden_values</td>
<td>String</td>
<td>Hidden value name/value pairs for the graph customization form.</td>
</tr>
<tr class="varlevel1">
<td class="varname">gshow</td>
<td>String</td>
<td>Classes of revisions to show in the revision graph. Valid values
are <tt>all</tt> (all revision), <tt>inittagged</tt> (initial
revision(s) and tagged revisions), and <tt>tagged</tt> (tagged
revisions only).</td>
</tr>
<tr class="varlevel1">
<td class="varname">imagemap</td>
<td>String</td>
@@ -649,37 +616,6 @@ td {
<td>URL of the ViewVC revision graph image for the current
resource.</td>
</tr>
<tr class="varlevel1">
<td class="varname">opt_gbbox</td>
<td>Boolean</td>
<td>Specifies whether the user is allowed to toggle the generation
of branch boxes at the tip of all branches in the revision
graph.</td>
</tr>
<tr class="varlevel1">
<td class="varname">opt_gflip</td>
<td>Boolean</td>
<td>Specifies whether the user is allowed to toggle the direction
of the revision graph.</td>
</tr>
<tr class="varlevel1">
<td class="varname">opt_gleft</td>
<td>Boolean</td>
<td>Specifies whether the user is allowed to toggle the orientation
of the revision graph.</td>
</tr>
<tr class="varlevel1">
<td class="varname">opt_gmaxtag</td>
<td>Boolean</td>
<td>Specifies whether the user is allowed to configure the maximum
number of tags per revision show in the revision graph.</td>
</tr>
<tr class="varlevel1">
<td class="varname">opt_gshow</td>
<td>Boolean</td>
<td>Specifies whether the user is allowed to configure which
classes of revisions are shown in the revision graph.</td>
</tr>
</tbody>
</table>
</div>
@@ -789,7 +725,7 @@ td {
<tr class="varlevel1">
<td class="varname">diff_format_hidden_values</td>
<td>List</td>
<td>Hidden field name/value pairs for the diff format selection form.</td>
<td>Hidden value name/value pairs for the diff format selection form.</td>
</tr>
<tr class="varlevel1">
<td class="varname">left</td>
@@ -969,7 +905,7 @@ td {
<tr class="varlevel1">
<td class="varname">dir_paging_hidden_values</td>
<td>List</td>
<td>Hidden field name/value pairs for the page selection form.</td>
<td>Hidden value name/value pairs for the page selection form.</td>
</tr>
<tr class="varlevel1">
<td class="varname">entries</td>
@@ -1151,16 +1087,23 @@ td {
<td>String</td>
<td>Current search expression, if any.</td>
</tr>
<tr class="varlevel1">
<td class="varname">search_re_form</td>
<td>Boolean</td>
<td>Indicates whether or not to display the regular expression search
form. Value depends on the whether searching is enabled in the
configuration and whether or not the current directory is
empty.</td>
</tr>
<tr class="varlevel1">
<td class="varname">search_re_action</td>
<td>String</td>
<td>Form action URL for the regular expression search form,
if searching is available.</td>
<td>Form action URL for the regular expression search form.</td>
</tr>
<tr class="varlevel1">
<td class="varname">search_re_hidden_values</td>
<td>List</td>
<td>Hidden field name/value pairs for the regular expression search form.</td>
<td>Hidden value name/value pairs for the regular expression search form.</td>
</tr>
<tr class="varlevel1">
<td class="varname">show_attic_href</td>
@@ -1306,7 +1249,7 @@ td {
<tr class="varlevel1">
<td class="varname">diff_select_hidden_values</td>
<td>List</td>
<td>Hidden field name/value pairs for the diff selection form.</td>
<td>Hidden value name/value pairs for the diff selection form.</td>
</tr>
<tr class="varlevel1">
<td class="varname">entries</td>
@@ -1587,7 +1530,7 @@ td {
<tr class="varlevel1">
<td class="varname">log_paging_hidden_values</td>
<td>List</td>
<td>Hidden field name/value pairs for the page selection form.</td>
<td>Hidden value name/value pairs for the page selection form.</td>
</tr>
<tr class="varlevel1">
<td class="varname">logsort</td>
@@ -1603,7 +1546,7 @@ td {
<tr class="varlevel1">
<td class="varname">logsort_hidden_values</td>
<td>List</td>
<td>Hidden field name/value pairs for the log sort drop down box</td>
<td>Hidden value name/value pairs for the log sort drop down box</td>
</tr>
<tr class="varlevel1">
<td class="varname">mime_type</td>
@@ -1967,7 +1910,7 @@ td {
<tr class="varlevel1">
<td class="varname">query_hidden_values</td>
<td>List</td>
<td>Hidden field name/value pairs for query form.</td>
<td>Hidden value name/value pairs for query form.</td>
</tr>
<tr class="varlevel1">
<td class="varname">querysort</td>
@@ -2107,7 +2050,7 @@ td {
<tr class="varlevel1">
<td class="varname">jump_rev_hidden_values</td>
<td>List</td>
<td>Hidden field name/value pairs for revision jump form.</td>
<td>Hidden value name/value pairs for revision jump form.</td>
</tr>
<tr class="varlevel1">
<td class="varname">limit_changes</td>
@@ -2130,11 +2073,6 @@ td {
<td>String</td>
<td>URL for the current view but with <tt>limit_changes</tt> disabled.</td>
</tr>
<tr class="varlevel1">
<td class="varname">num_changes</td>
<td>String</td>
<td>Number of paths changed in this revision.</td>
</tr>
<tr class="varlevel1">
<td class="varname">next_href</td>
<td>String</td>

View File

@@ -137,8 +137,9 @@ td {
configuration's "general" section.</li>
<li>Finally, ensure that that the new <code>authorizer</code>
option is set to either "forbidden" or "forbiddenre", depending
on which of those you were using in ViewVC 1.0.x.</li>
option is set to either "forbidden" (which is the default) or
"forbiddenre", depending on which of those you were using in
ViewVC 1.0.x.</li>
</ol>
@@ -214,9 +215,10 @@ td {
<li>options/py2html_path</li>
<li>options/use_enscript</li>
<li>options/use_highlight</li>
<li>options/use_pagesize</li>
<li>options/use_php</li>
<li>options/use_py2html</li>
<li>options/use_pygments</li>
<li>options/use_source_highlight</li>
</ul>
</div>
@@ -224,23 +226,16 @@ td {
<div class="h3">
<h3>Checkin Database</h3>
<p>ViewVC 1.1 introduces to the <code>cvsdbadmin</code>
and <code>svndbadmin</code> tools a new "purge" operation, which
allows you to remove all the information related to a given root
from your checkins database (without disturbing the information
associated with other roots). Likewise, the "rebuild" command in
those tools now implies a "purge" followed by an update.</p>
<p>As a related change, the <code>svndbadmin</code> program's
"rebuild" subcommand has had its purpose become more defined. It
no longer accepts a revision argument, and therefore can now only
be used to completely rebuild the entirety of the checkin database
information for a Subversion repository (instead of being able to
only update the information related to single Subversion revision).
For per-revision updating, use <code>svndbadmin update</code> and
<p>In ViewVC 1.1, the <code>svndbadmin</code> program's "rebuild"
subcommand has had its purpose become more defined. It no longer
accepts a revision argument, and therefore can now only be used to
completely rebuild the entirety of the checkin database information
for a Subversion repository (instead of being able to only update
the information related to single Subversion revision). For
per-revision updating, use <code>svndbadmin update</code> and
provide a revision (or revision range). And to get the previous
rebuild-a-revision effect, pass the new <code>--force</code> option
to <code>svndbadmin update</code>.</p>
rebuild-a-revision effect, pass the new <code>--force</code>
option to <code>svndbadmin update</code>.</p>
<p>In other words, where you once did this:</p>
@@ -254,19 +249,6 @@ td {
</pre>
</blockquote>
<p>To enhance the performance of the new "purge" operation, ViewVC 1.1
introduces some slight changes to the checkin database schema. If
you use the <code>make-database</code> tool to (re)create your
checkins database, it will by default employ the new database
schema. This should cause the database to be virtually unusable by
previous versions of ViewVC, and that's by design. If, however,
you need to (re)create your checkins database and you require
compatibility with previous versions of ViewVC or ViewCVS, simply
pass the "--version=1.0" option to the <code>make-database</code>
script. Note that your "purge" and "rebuild" operations could be
abysmally slow, though, as that version of the database schema is
not optimized for those operations.</p>
</div>
<div class="h3">
@@ -314,22 +296,6 @@ td {
<li>options/allow_tar</li>
</ul>
<p>ViewVC now honors the "svn:mime-type" property stored on
Subversion-versioned files as the primary source of MIME type
determination (before falling back to name-based MIME mappings and
such). However, this can negatively affect the viewability of
certain files &mdash; especially images &mdash; whose
"svn:mime-type" properties are set incorrectly, such as will happen
if Subversion itself merely determines that the file isn't
human-readable and uses the "application/octet-stream" MIME type to
record this determination. To make ViewVC <em>not</em> honor the
"svn:mime-type" property value, set the <code>svn_ignore_mimetype</code>
configuration option.</p>
<p>Speaking of MIME types, the option <code>mime_types_file</code> is
now <code>mime_types_files</code>, as it now carries multiple paths
to MIME mappings files, ordered by preference.</p>
<p>The <code>use_rcsparse</code> option was moved from the "general"
section to the "options" section.</p>
@@ -665,11 +631,6 @@ allow_tar = 1
<td>revision.ezt</td>
<td>now is an iterable list of objects with .name and .value attributes</td>
</tr>
<tr class="added">
<td class="varname">num_changes</td>
<td>revision.ezt</td>
<td>added</td>
</tr>
</tbody>
</table>
@@ -698,7 +659,7 @@ allow_tar = 1
<h3>Checkin Database</h3>
<p>ViewVC 1.0 reads and writes commit times in the MySQL database in
UTC time rather than local time. This can cause times displayed on
UTC time rather than local time. This can cause times displayed on
the query page to be a few hours off if an old database is being
used with a new version of ViewVC. The best way to fix this is to
rebuild the database with the new version of cvsdbadmin, but it
@@ -741,8 +702,7 @@ allow_tar = 1
<li>options/root_as_url_component</li>
<li>options/default_file_view</li>
<li>options/sort_group_dirs</li>
<li>options/dir_pagesize</li>
<li>options/log_pagesize</li>
<li>options/use_pagesize</li>
<li>options/limit_changes</li>
<li>options/use_localtime</li>
<li>options/cross_copies</li>

View File

@@ -654,35 +654,6 @@ th.caption {
<td>depends</td>
<td><a href="#root-param"><code>root</code> parameter</a></td>
</tr>
<tr>
<td><code>gflip=<var>GFLIP</var></code></td>
<td>optional</td>
<td>"1" if the revisions in the graph should run
youngest-to-oldest; "0" for the reverse</td>
</tr>
<tr>
<td><code>gbbox=<var>GBBOX</var></code></td>
<td>optional</td>
<td>"1" if the revision graph should contain branch boxes at the
tip of each branch; "0" otherwise</td>
</tr>
<tr>
<td><code>gleft=<var>GLEFT</var></code></td>
<td>optional</td>
<td>"1" if the revision graph should be orientated left-to-right;
"0" otherwise</td>
</tr>
<tr>
<td><code>gmaxtag=<var>GMAXTAG</var></code></td>
<td>optional</td>
<td>maximum number of per-revision tags to show in the revision graph</td>
</tr>
<tr>
<td><code>gshow=<var>GSHOW</var></code></td>
<td>optional</td>
<td>"all", "inittagged", or "tagged" &mdash; user-selected classes
of revision to show in the graph</td>
</tr>
</table>
<h3 id="graphimg-view">Graph Image View</h3>
@@ -729,35 +700,6 @@ th.caption {
<td>depends</td>
<td><a href="#root-param"><code>root</code> parameter</a></td>
</tr>
<tr>
<td><code>gflip=<var>GFLIP</var></code></td>
<td>optional</td>
<td>"1" if the revisions in the graph should run
youngest-to-oldest; "0" for the reverse</td>
</tr>
<tr>
<td><code>gbbox=<var>GBBOX</var></code></td>
<td>optional</td>
<td>"1" if the revision graph should contain branch boxes at the
tip of each branch; "0" otherwise</td>
</tr>
<tr>
<td><code>gleft=<var>GLEFT</var></code></td>
<td>optional</td>
<td>"1" if the revision graph should be orientated left-to-right;
"0" otherwise</td>
</tr>
<tr>
<td><code>gmaxtag=<var>GMAXTAG</var></code></td>
<td>optional</td>
<td>maximum number of per-revision tags to show in the revision graph</td>
</tr>
<tr>
<td><code>gshow=<var>GSHOW</var></code></td>
<td>optional</td>
<td>"all", "inittagged", or "tagged" &mdash; user-selected classes
of revision to show in the graph</td>
</tr>
</table>
<h3 id="log-view">Log View</h3>
@@ -1054,7 +996,7 @@ th.caption {
<td>file query string</td>
</tr>
<tr>
<td><code>file_match=<var>FILE_MATCH</var></code></td>
<td><code>file_match=FILE_MATCH</code></td>
<td>optional</td>
<td>"exact" "like" "glob" "regex" or "notregex" determining type
of file match</td>
@@ -1065,7 +1007,7 @@ th.caption {
<td>author query string</td>
</tr>
<tr>
<td><code>who_match=<var>WHO_MATCH</var></code></td>
<td><code>who_match=WHO_MATCH</code></td>
<td>optional</td>
<td>"exact" "like" "glob" "regex" or "notregex" determining type
of author match</td>
@@ -1082,36 +1024,36 @@ th.caption {
of log message match</td>
</tr>
<tr>
<td><code>querysort=<var>SORT</var></code></td>
<td><code>querysort=SORT</code></td>
<td>optional</td>
<td>"date" "author" or "file" determining order of query results</td>
</tr>
<tr>
<td><code>date=<var>DATE</var></code></td>
<td><code>date=DATE</code></td>
<td>optional</td>
<td>"hours" "day" "week" "month" "all" or "explicit" to filter
query results by date</td>
</tr>
<tr>
<td><code>hours=<var>HOURS</var></code></td>
<td><code>hours=HOURS</code></td>
<td>optional</td>
<td>number of hours back to include results from when
<code><var>DATE</var></code> is "hours"</td>
</tr>
<tr>
<td><code>mindate=<var>MINDATE</var></code></td>
<td><code>mindate=MINDATE</code></td>
<td>optional</td>
<td>earliest date to include results from when
<code><var>DATE</var></code> is "explicit"</td>
</tr>
<tr>
<td><code>maxdate=<var>MAXDATE</var></code></td>
<td><code>maxdate=MAXDATE</code></td>
<td>optional</td>
<td>latest date to include results from when
<code><var>DATE</var></code> is "explicit"</td>
</tr>
<tr>
<td><code>limit_changes=<var>LIMIT_CHANGES</var></code></td>
<td><code>limit_changes=LIMIT_CHANGES</code></td>
<td>optional</td>
<td>maximum number of files to list per commit in query
results. Default is value of <code>limit_changes</code>
@@ -1171,7 +1113,7 @@ th.caption {
<td>branch query string</td>
</tr>
<tr>
<td><code>branch_match=<var>BRANCH_MATCH</var></code></td>
<td><code>branch_match=BRANCH_MATCH</code></td>
<td>optional</td>
<td>"exact" "like" "glob" "regex" or "notregex" determining type
of branch match</td>
@@ -1187,7 +1129,7 @@ th.caption {
<td>file query string</td>
</tr>
<tr>
<td><code>file_match=<var>FILE_MATCH</var></code></td>
<td><code>file_match=FILE_MATCH</code></td>
<td>optional</td>
<td>"exact" "like" "glob" "regex" or "notregex" determining type
of file match</td>
@@ -1198,7 +1140,7 @@ th.caption {
<td>author query string</td>
</tr>
<tr>
<td><code>who_match=<var>WHO_MATCH</var></code></td>
<td><code>who_match=WHO_MATCH</code></td>
<td>optional</td>
<td>"exact" "like" "glob" "regex" or "notregex" determining type
of author match</td>
@@ -1215,50 +1157,50 @@ th.caption {
of log message match</td>
</tr>
<tr>
<td><code>querysort=<var>SORT</var></code></td>
<td><code>querysort=SORT</code></td>
<td>optional</td>
<td>"date" "author" or "file" determining order of query results</td>
</tr>
<tr>
<td><code>date=<var>DATE</var></code></td>
<td><code>date=DATE</code></td>
<td>optional</td>
<td>"hours" "day" "week" "month" "all" or "explicit" to filter
query results by date</td>
</tr>
<tr>
<td><code>hours=<var>HOURS</var></code></td>
<td><code>hours=HOURS</code></td>
<td>optional</td>
<td>number of hours back to include results from when
<code><var>DATE</var></code> is "hours"</td>
</tr>
<tr>
<td><code>mindate=<var>MINDATE</var></code></td>
<td><code>mindate=MINDATE</code></td>
<td>optional</td>
<td>earliest date to include results from when
<code><var>DATE</var></code> is "explicit"</td>
</tr>
<tr>
<td><code>maxdate=<var>MAXDATE</var></code></td>
<td><code>maxdate=MAXDATE</code></td>
<td>optional</td>
<td>latest date to include results from when
<code><var>DATE</var></code> is "explicit"</td>
</tr>
<tr>
<td><code>format=<var>FORMAT</var></code></td>
<td><code>format=FORMAT</code></td>
<td>optional</td>
<td>"rss" or "backout" values to generate an rss feed or list of
commands to back out changes instead showing a normal query result
page</td>
</tr>
<tr>
<td><code>limit=<var>LIMIT</var></code></td>
<td><code>limit=LIMIT</code></td>
<td>optional</td>
<td>maximum number of file-revisions to process during a
query. Default is value of <code>row_limit</code> configuration
option</td>
</tr>
<tr>
<td><code>limit_changes=<var>LIMIT_CHANGES</var></code></td>
<td><code>limit_changes=LIMIT_CHANGES</code></td>
<td>optional</td>
<td>maximum number of files to list per commit in query
results. Default is value of <code>limit_changes</code>
@@ -1312,7 +1254,7 @@ th.caption {
<td><a href="#revision-param"><code>revision</code> parameter</a></td>
</tr>
<tr>
<td><code>limit_changes=<var>LIMIT_CHANGES</var></code></td>
<td><code>limit_changes=LIMIT_CHANGES</code></td>
<td>optional</td>
<td>maximum number of files to list per commit. Default is value
of <code>limit_changes</code> configuration option</td>

View File

@@ -1,54 +0,0 @@
TARGETS = python/elx-python java/elx-java
all : $(TARGETS)
CFLAGS = -g -Wpointer-arith -Wwrite-strings -Wshadow -Wall
CPPFLAGS = -Ipython -Ijava -I.
# the scanner depends on tokens generated from python.y
python/scanner.c : python/python.c
# the keywords also need the tokens in python.h
python/py_keywords.c : python/python.c
# we need the scanner tokens in py_scan.h and keywords in py_keywords.h
python/elx-python.o : python/elx-python.c python/py_keywords.c
# we need java.[ch] generated first to get the tokens in java.h
java/j_scan.c : java/java.c java/j_keywords.c
# the keywords also need the tokens in java.h
java/j_keywords.c : java/java.c
# we need the scanner tokens in j_scan.h and keywords in j_keywords.h
java/elx-java.o : java/elx-java.c java/j_keywords.c java/java.c
python/elx-python : python/elx-python.o python/scanner.o python/python.o \
python/py_keywords.o elx-common.o
$(CC) -o $@ $^
java/elx-java : java/elx-java.o java/j_scan.o java/java.o java/j_keywords.o \
elx-common.o
$(CC) -o $@ $^
clean :
rm -f *.o
rm -f python/*.o python/python.[ch] python/py_keywords.[ch]
rm -f java/*.o java/java.[ch] java/j_keywords.[ch] java/j_scan.[ch]
rm -f python/*.output java/*.output
rm -f $(TARGETS)
.SUFFIXES:
.SUFFIXES: .c .y .shilka .o
%.c : %.y
@d="`echo $@ | sed 's/\.c//'`" ; \
echo msta -d -enum -v -o $$d $< ; \
msta -d -enum -v -o $$d $<
%.c : %.shilka
@d="`echo $@ | sed 's,/[^/]*$$,,'`" ; \
f="`echo $< | sed 's,.*/,,'`" ; \
echo shilka -length -no-definitions -interface $$f ; \
(cd $$d && shilka -length -no-definitions -interface $$f)

View File

@@ -1,110 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include "elx.h"
#define ELX_ELEMS_EXT ".elx"
#define ELX_SYMBOLS_EXT ".els"
static void usage(const char *progname)
{
fprintf(stderr, "USAGE: %s FILENAME\n", progname);
exit(1);
}
static const char * build_one(const char *base, int len, const char *suffix)
{
int slen = strlen(suffix);
char *fn;
fn = malloc(len + slen + 1);
memcpy(fn, base, len);
memcpy(fn + len, suffix, slen);
fn[len + slen] = '\0';
return fn;
}
elx_context_t *elx_process_args(int argc, const char **argv)
{
elx_context_t *ec;
const char *input_fn;
const char *p;
int len;
/* ### in the future, we can expand this for more options */
if (argc != 2)
{
usage(argv[0]);
/* NOTREACHED */
}
input_fn = argv[1];
p = strrchr(input_fn, '.');
if (p == NULL)
len = strlen(input_fn);
else
len = p - argv[1];
ec = malloc(sizeof(*ec));
ec->input_fn = input_fn;
ec->elx_fn = build_one(input_fn, len, ELX_ELEMS_EXT);
ec->sym_fn = build_one(input_fn, len, ELX_SYMBOLS_EXT);
return ec;
}
void elx_open_files(elx_context_t *ec)
{
const char *fn;
const char *op;
if ((ec->input_fp = fopen(ec->input_fn, "r")) == NULL)
{
fn = ec->input_fn;
op = "reading";
goto error;
}
if ((ec->elx_fp = fopen(ec->elx_fn, "w")) == NULL)
{
fn = ec->elx_fn;
op = "writing";
goto error;
}
if ((ec->sym_fp = fopen(ec->sym_fn, "w")) == NULL)
{
fn = ec->sym_fn;
op = "writing";
goto error;
}
return;
error:
fprintf(stderr, "ERROR: file \"%s\" could not be opened for %s.\n %s\n",
fn, op, strerror(errno));
exit(2);
}
void elx_close_files(elx_context_t *ec)
{
fclose(ec->input_fp);
fclose(ec->elx_fp);
fclose(ec->sym_fp);
}
void elx_issue_token(elx_context_t *ec,
char which, int start, int len,
const char *symbol)
{
fprintf(ec->elx_fp, "%c %d %d\n", which, start, len);
if (ELX_DEFINES_SYM(which))
{
fprintf(ec->sym_fp, "%s %d %s\n", symbol, start, ec->input_fn);
}
}

View File

@@ -1,54 +0,0 @@
#ifndef ELX_H
#define ELX_H
#include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define ELX_COMMENT 'C' /* a comment */
#define ELX_STRING 'S' /* a string constant */
#define ELX_KEYWORD 'K' /* a language keyword */
#define ELX_GLOBAL_FDEF 'F' /* function defn in global (visible) scope */
#define ELX_LOCAL_FDEF 'L' /* function defn in local (hidden) scope */
#define ELX_METHOD_DEF 'M' /* method definition */
#define ELX_FUNC_REF 'R' /* function reference / call */
#define ELX_DEFINES_SYM(c) ((c) == ELX_GLOBAL_FDEF || (c) == ELX_LOCAL_FDEF \
|| (c) == ELX_METHOD_DEF)
typedef struct
{
/* input filename */
const char *input_fn;
/* output filenames: element extractions, and symbols */
const char *elx_fn;
const char *sym_fn;
/* file pointers for each of the input/output files */
FILE *input_fp;
FILE *elx_fp;
FILE *sym_fp;
} elx_context_t;
elx_context_t *elx_process_args(int argc, const char **argv);
void elx_open_files(elx_context_t *ec);
void elx_close_files(elx_context_t *ec);
void elx_issue_token(elx_context_t *ec,
char which, int start, int len,
const char *symbol);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* ELX_H */

View File

@@ -1,121 +0,0 @@
#!/usr/bin/env python
#
# generate HTML given an input file and an element file
#
import re
import string
import cgi
import struct
_re_elem = re.compile('([a-zA-Z]) ([0-9]+) ([0-9]+)\n')
CHUNK_SIZE = 98304 # 4096*24
class ElemParser:
"Parse an elements file, extracting the token type, start, and length."
def __init__(self, efile):
self.efile = efile
def get(self):
line = self.efile.readline()
if not line:
return None, None, None
t, s, e = string.split(line)
return t, int(s)-1, int(e)
def unused_get(self):
record = self.efile.read(9)
if not record:
return None, None, None
return struct.unpack('>cii', record)
class Writer:
"Generate output, including copying from another input."
def __init__(self, ifile, ofile):
self.ifile = ifile
self.ofile = ofile
self.buf = ifile.read(CHUNK_SIZE)
self.offset = 0
def write(self, data):
self.ofile.write(data)
def copy(self, pos, amt):
"Copy 'amt' bytes from position 'pos' of input to output."
idx = pos - self.offset
self.ofile.write(cgi.escape(buffer(self.buf, idx, amt)))
amt = amt - (len(self.buf) - idx)
while amt > 0:
self._more()
self.ofile.write(cgi.escape(buffer(self.buf, 0, amt)))
amt = amt - len(self.buf)
def flush(self, pos):
"Flush the rest of the input to the output."
idx = pos - self.offset
self.ofile.write(cgi.escape(buffer(self.buf, idx)))
while 1:
buf = self.ifile.read(CHUNK_SIZE)
if not buf:
break
self.ofile.write(cgi.escape(buf))
def _more(self):
self.offset = self.offset + len(self.buf)
self.buf = self.ifile.read(CHUNK_SIZE)
def generate(input, elems, output, genpage=0):
ep = ElemParser(elems)
w = Writer(input, output)
cur = 0
if genpage:
w.write('''\
<html><head><title>ELX Output Page</title>
<style type="text/css">
.elx_C { color: firebrick; font-style: italic; }
.elx_S { color: #bc8f8f; font-weight: bold; }
.elx_K { color: purple; font-weight: bold }
.elx_F { color: blue; font-weight: bold; }
.elx_L { color: blue; font-weight: bold; }
.elx_M { color: blue; font-weight: bold; }
.elx_R { color: blue; font-weight: bold; }
</style>
</head>
<body>
''')
w.write('<pre>')
while 1:
type, start, length = ep.get()
if type is None:
break
if cur < start:
# print out some plain text up to 'cur'
w.copy(cur, start - cur)
# wrap a bit o' formatting here
w.write('<span class="elx_%s">' % type)
# copy over the token
w.copy(start, length)
# and close up the formatting
w.write('</span>')
cur = start + length
# all done.
w.flush(cur)
w.write('</pre>')
if genpage:
w.write('</body></html>\n')
if __name__ == '__main__':
import sys
generate(open(sys.argv[1]), open(sys.argv[2]), sys.stdout, 1)

View File

@@ -1,26 +0,0 @@
#!/bin/sh
if test "$#" != 2; then
echo "USAGE: $0 SOURCE-FILE ELX-FILE"
exit 1
fi
cat <<EOF
<html><head><title>ELX Output Page</title>
<style type="text/css">
.elx_C { color: firebrick; font-style: italic; }
.elx_S { color: #bc8f8f; font-weight: bold; }
.elx_K { color: purple; font-weight: bold }
.elx_F { color: blue; font-weight: bold; }
.elx_L { color: blue; font-weight: bold; }
.elx_M { color: blue; font-weight: bold; }
.elx_R { color: blue; font-weight: bold; }
</style>
</head>
<body>
EOF
dirname="`dirname $0`"
python2 $dirname/elx_html.py $1 $2
echo "</body></html>"

View File

@@ -1,148 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include "java.h"
#include "j_keywords.h"
#include "elx.h"
/* from j_scan.c */
extern int yylex(void);
extern void yylex_start(int *error_flag);
extern void yylex_finish(void);
extern const char *get_identifier(void);
static const char *fname;
static int saw_error = 0;
static int lineno = 1;
static int hpos = 1;
static int fpos = 0;
static int token_start = 0;
static int start_lineno;
static int start_hpos;
static elx_context_t *ectx;
//#define DEBUG_SCANNER
/* if we're debugging, then the scanner looks for this var */
int yysdebug = 0;
/* and the parser looks for this */
int yydebug = 1;
void yyserror(const char *msg)
{
fprintf(stderr, "%s:%d:%d: lex error: %s\n",
fname, start_lineno, start_hpos, msg);
saw_error = 1;
}
void yyerror(const char *msg)
{
fprintf(stderr, "%s:%d:%d: parse error: %s\n",
fname, start_lineno, start_hpos, msg);
saw_error = 1;
}
int yyslex(void)
{
int c = fgetc(ectx->input_fp);
if (c == EOF)
return -1; /* tell lexer we're done */
++fpos;
if (c == '\n')
{
hpos = 1;
++lineno;
}
else
++hpos;
// printf("char: '%c'\n", c);
return c;
}
void issue_token(char which)
{
const char *ident = NULL;
if (ELX_DEFINES_SYM(which))
ident = get_identifier();
else
ident = NULL;
elx_issue_token(ectx, which, token_start, fpos - token_start + 1, ident);
}
void mark_token_start(void)
{
token_start = fpos;
start_lineno = lineno;
start_hpos = hpos;
}
#ifdef DEBUG_SCANNER
void gen_scan_tokens(void)
{
while (1)
{
int v = yylex();
if (v == TK_IDENTIFIER)
printf("%d-%d: %d '%s'\n",
token_start, fpos-1, v, get_identifier());
else
printf("%d-%d: %d\n", token_start, fpos-1, v);
/* end of parse? */
if (v <= 0)
break;
}
}
#else /* DEBUG_SCANNER */
static void gen_elx_tokens(void)
{
/* ### what to do with the result? should have seen/set saw_error */
(void) yyparse();
}
#endif /* DEBUG_SCANNER */
int main(int argc, const char **argv)
{
int errcode;
ectx = elx_process_args(argc, argv);
yylex_start(&errcode);
if (errcode)
{
fprintf(stderr, "error: yylex_start: %d\n", errcode);
return EXIT_FAILURE;
}
elx_open_files(ectx);
#ifdef DEBUG_SCANNER
gen_scan_tokens();
#else
gen_elx_tokens();
#endif
yylex_finish();
elx_close_files(ectx);
if (saw_error)
return EXIT_FAILURE;
return EXIT_SUCCESS;
}

View File

@@ -1,65 +0,0 @@
%local {
/* get the KR_* values */
#include "java.h"
}
%%
abstract
boolean
break
byte
/* byvalue */
case
/* cast */
catch
char
class
/* const */
continue
default
do
double
else
extends
false
final
finally
float
for
/* future */
/* generic */
/* goto */
if
implements
import
/* inner */
instanceof
int
interface
long
native
new
null
/* operator */
/* outer */
package
private
protected
public
/* rest */
return
short
static
super
switch
synchronized
this
throw
throws
transient
true
try
/* var */
void
volatile
while

View File

@@ -1,135 +0,0 @@
%start token
%scanner
%local {
#include "elx.h"
/* from elx-java.c */
void yyserror(const char *msg);
int yyslex(void);
/* for the TK_ symbols, generated from java.y */
#include "java.h"
/* for keyword recognition */
#include "j_keywords.h"
extern void issue_token(char which);
extern void mark_token_start(void);
#define MAX_IDENT 200
static int idlen;
static char identifier[MAX_IDENT+1];
#define INIT_IDENT(c) (identifier[0] = (c), idlen = 1)
#define ADD_IDENT(c) if (idlen == MAX_IDENT) return E_IDENT_TOO_LONG; \
else identifier[idlen++] = (c)
/* ### is there a better place? */
#define E_IDENT_TOO_LONG (-100)
static int lookup(void);
}
%%
token : pure_ws* { mark_token_start(); } slash_op
slash_op : "/=" { return TK_OPERATOR; }
| comment token
| '/' { return TK_OPERATOR; }
| one_token
|
;
one_token : t_identifier { return lookup(); }
| t_literal { return TK_LITERAL; }
| t_operator { return TK_OPERATOR; }
| t_chars { return yysprev_char; }
| t_inc_dec { return TK_INC_DEC; }
| t_bracket
;
t_identifier : alpha { INIT_IDENT(yysprev_char); }
( alphanum { ADD_IDENT(yysprev_char); } )*
alpha : 'a' - 'z' | 'A' - 'Z' | '_' | '$'
alphanum : alpha | digit
digit : '0' - '9'
hexdigit : digit | 'a' - 'f' | 'A' - 'F'
octal : '0' - '7'
t_literal : number | string | char_constant
number : ('1' - '9') digit* decimal_suffix
| '.' digit+ [exponent] [float_suffix]
| '0' (('x' | 'X') hexdigit+ | octal+) decimal_suffix
;
decimal_suffix : ('.' digit* [exponent] [float_suffix])
| 'l' | 'L'
| /* nothing */
;
exponent : ('e' | 'E') ['+' | '-'] digit+
float_suffix : 'f' | 'F' | 'd' | 'D'
string : '"' string_char* '"' { issue_token(ELX_STRING); }
string_char : '\1' -> '"' | '"' <-> '\\' | '\\' <- '\377' | '\\' '\1' - '\377'
char_constant : '\'' one_char '\''
one_char : '\1' -> '\'' | '\'' <-> '\\' | '\\' <- '\377' | '\\' '\1' - '\377'
comment : ( "//" line_comment_char* '\n'
| "/*" (block_comment_char | '*' block_non_term_char)* "*/"
) { issue_token(ELX_COMMENT); }
;
line_comment_char : '\1' -> '\n' | '\n' <- '\377'
block_comment_char : '\1' -> '*' | '*' <- '\377'
block_non_term_char : '\1' -> '/' | '/' <- '\377'
t_operator : "<<" | ">>" | ">>>"
| ">=" | "<=" | "==" | "!=" | "&&" | "||"
| "*=" | "%=" | "+=" | "-=" | "<<=" | ">>="
| ">>>=" | "&=" | "^=" | "|="
| '<' | '>' | '%' | '^' | '&' | '|'
;
t_inc_dec : "++" | "--"
/* note: could not use ws* ; the '[' form would only reduce on $end
rather than "any" character. that meant we could not recognize '['
within the program text. separating out the cases Does The Right
Thing */
t_bracket : '[' { return '['; }
| '[' ']' { return TK_DIM; }
| '[' ws+ ']' { return TK_DIM; }
;
t_chars : ',' | ';' | '.' | '{' | '}' | '=' | '(' | ')' | ':'
| ']' | '!' | '~' | '+' | '-' | '*' | '?'
;
ws : pure_ws | comment
pure_ws : ' ' | '\t' | '\n' | '\f'
%%
static int lookup(void)
{
int kw = KR_find_keyword(identifier, idlen);
if (kw == KR__not_found)
{
/* terminate so user can grab an identifier string */
identifier[idlen] = '\0';
return TK_IDENTIFIER;
}
issue_token(ELX_KEYWORD);
return kw;
}
const char *get_identifier(void)
{
return identifier;
}

View File

@@ -1,458 +0,0 @@
%token KR_abstract
%token KR_boolean KR_break KR_byte /* KR_byvalue */
%token KR_case /* KR_cast */ KR_catch KR_char KR_class /* KR_const */ KR_continue
%token KR_default KR_do KR_double
%token KR_else KR_extends
%token KR_false KR_final KR_finally KR_float KR_for /* KR_future */
/* %token KR_generic KR_goto */
%token KR_if KR_implements KR_import /* KR_inner */ KR_instanceof KR_int KR_interface
%token KR_long
%token KR_native KR_new KR_null
/* %token KR_operator KR_outer */
%token KR_package KR_private KR_protected KR_public
%token /* KR_rest */ KR_return
%token KR_short KR_static KR_super KR_switch KR_synchronized
%token KR_this KR_throw KR_throws KR_transient KR_true KR_try
%token /* KR_var */ KR_void KR_volatile
%token KR_while
%token TK_OP_ASSIGN TK_OPERATOR TK_IDENTIFIER TK_LITERAL
%token TK_DIM TK_INC_DEC
%start CompilationUnit
/* the standard if/then/else conflict */
/* %expect 1 */
%{
#include "elx.h"
void yyerror(const char *msg);
int yylex(void);
/* ### should come from an elx-python.h or something */
void issue_token(char which);
%}
%export {
/* the main parsing function */
int yyparse(void);
/* need to define the 'not found' in addition to the regular keywords */
#define KR__not_found 0
}
%%
TypeSpecifier
: TypeName
| TypeNameDims
;
TypeNameDims
: TypeName TK_DIM+
;
TypeNameDot
: NamePeriod
| PrimitiveType '.'
;
TypeName
: PrimitiveType
| NamePeriod TK_IDENTIFIER
| TK_IDENTIFIER
;
NamePeriod
: TK_IDENTIFIER '.'
| NamePeriod TK_IDENTIFIER '.'
;
TypeNameList
: TypeName / ','
;
PrimitiveType
: KR_boolean
| KR_byte
| KR_char
| KR_double
| KR_float
| KR_int
| KR_long
| KR_short
| KR_void
;
CompilationUnit
: PackageStatement [ImportStatements] [TypeDeclarations]
| ImportStatements [TypeDeclarations]
| TypeDeclarations
;
PackageStatement
: KR_package (TK_IDENTIFIER / '.') ';'
;
TypeDeclarations
: TypeDeclaration+
;
TypeDeclaration
: ClassDeclaration
| InterfaceDeclaration
;
ImportStatements
: ImportStatement+
;
ImportStatement
: KR_import TK_IDENTIFIER ('.' TK_IDENTIFIER)* [".*"] ';'
;
/*
QualifiedName
: TK_IDENTIFIER / '.'
;
*/
ClassDeclaration
: [Modifiers] KR_class TK_IDENTIFIER [Super] [Interfaces] ClassBody
;
Modifiers
: Modifier+
;
Modifier
: KR_abstract
| KR_final
| KR_public
| KR_protected
| KR_private
| KR_static
| KR_transient
| KR_volatile
| KR_native
| KR_synchronized
;
Super
: KR_extends TypeNameList
;
Interfaces
: KR_implements TypeNameList
;
ClassBody
: '{' FieldDeclaration* '}'
;
FieldDeclaration
: FieldVariableDeclaration
| MethodDeclaration
| ConstructorDeclaration
| StaticInitializer
;
FieldVariableDeclaration
: [Modifiers] TypeSpecifier VariableDeclarators ';'
;
VariableDeclarators
: VariableDeclarator / ','
;
VariableDeclarator
: DeclaratorName ['=' VariableInitializer]
;
VariableInitializer
: Expression
| '{' [ArrayInitializers] '}'
;
ArrayInitializers
: VariableInitializer ( ',' [VariableInitializer] )*
;
MethodDeclaration
: [Modifiers] TypeSpecifier MethodDeclarator [Throws] MethodBody
;
MethodDeclarator
: DeclaratorName '(' [ParameterList] ')' TK_DIM*
;
ParameterList
: Parameter / ','
;
Parameter
: TypeSpecifier DeclaratorName
;
DeclaratorName
: TK_IDENTIFIER TK_DIM*
;
Throws
: KR_throws TypeNameList
;
MethodBody
: Block
| ';'
;
ConstructorDeclaration
: [Modifiers] ConstructorDeclarator [Throws] Block
;
ConstructorDeclarator
: TypeName '(' [ParameterList] ')'
;
StaticInitializer
: KR_static Block
;
InterfaceDeclaration
: [Modifiers] KR_interface TK_IDENTIFIER [ExtendsInterfaces] InterfaceBody
;
ExtendsInterfaces
: KR_extends TypeNameList
;
InterfaceBody
: '{' FieldDeclaration+ '}'
;
Block
: '{' LocalVariableDeclarationOrStatement* '}'
;
LocalVariableDeclarationOrStatement
: LocalVariableDeclarationStatement
| Statement
;
LocalVariableDeclarationStatement
: TypeSpecifier VariableDeclarators ';'
;
Statement
: EmptyStatement
| LabeledStatement
| ExpressionStatement ';'
| SelectionStatement
| IterationStatement
| JumpStatement
| GuardingStatement
| Block
;
EmptyStatement
: ';'
;
LabeledStatement
: TK_IDENTIFIER ':' LocalVariableDeclarationOrStatement
| KR_case ConstantExpression ':' LocalVariableDeclarationOrStatement
| KR_default ':' LocalVariableDeclarationOrStatement
;
ExpressionStatement
: Expression
;
SelectionStatement
: KR_if '(' Expression ')' Statement [KR_else Statement]
| KR_switch '(' Expression ')' Block
;
IterationStatement
: KR_while '(' Expression ')' Statement
| KR_do Statement KR_while '(' Expression ')' ';'
| KR_for '(' ForInit ForExpr [ForIncr] ')' Statement
;
ForInit
: ExpressionStatements ';'
| LocalVariableDeclarationStatement
| ';'
;
ForExpr
: [Expression] ';'
;
ForIncr
: ExpressionStatements
;
ExpressionStatements
: ExpressionStatement / ','
;
JumpStatement
: KR_break [TK_IDENTIFIER] ';'
| KR_continue [TK_IDENTIFIER] ';'
| KR_return [Expression] ';'
| KR_throw Expression ';'
;
GuardingStatement
: KR_synchronized '(' Expression ')' Statement
| KR_try Block Finally
| KR_try Block Catches
| KR_try Block Catches Finally
;
Catches
: Catch+
;
Catch
: KR_catch '(' TypeSpecifier [TK_IDENTIFIER] ')' Block
;
Finally
: KR_finally Block
;
ArgumentList
: Expression / ','
;
PrimaryExpression
: TK_LITERAL
| KR_true | KR_false
| KR_this
| KR_null
| KR_super
| '(' Expression ')'
;
PostfixExpression
: PrimaryExpression Trailers
| TypeName AltTrailers
| TypeNameDot FollowsPeriod Trailers
| TypeNameDot DimAllocation TypeTrailers
| TypeNameDims TypeTrailers
| KR_new TypeName AltTrailers
| KR_new TypeNameDims TypeTrailers
;
DimAllocation
: KR_new TypeNameDims
;
PostfixDims
: TK_DIM+ '.' KR_class
;
FollowsPeriod
: KR_this
| KR_class
| KR_super
| KR_new TypeName NoPeriodsTrailer
;
NoPeriodsTrailer
: '[' Expression ']'
| '(' [ArgumentList] ')'
;
NoDimTrailer
: NoPeriodsTrailer
| '.' (FollowsPeriod | TK_IDENTIFIER)
;
AnyTrailer
: NoDimTrailer
| PostfixDims
;
Trailers
: (AnyTrailer | DimAllocation NoDimTrailer)* [DimAllocation]
;
AltTrailers
: NoPeriodsTrailer Trailers
|
;
TypeTrailers
: NoDimTrailer Trailers
|
;
CastablePrefixExpression
: PostfixExpression [TK_INC_DEC]
| LogicalUnaryOperator CastExpression
;
LogicalUnaryOperator
: '~'
| '!'
;
UnaryOperator
: '+'
| '-'
| TK_INC_DEC
;
/* note: we don't actually have grammar for a cast. we just rely on:
(expr) (argument)
as our parse match */
CastExpression
: /* '(' PrimitiveType ')' CastExpression
| '(' NamePeriod TK_IDENTIFIER TK_DIM TK_DIM* ')' CastablePrefixExpression
| '(' NamePeriod TK_IDENTIFIER ')' CastablePrefixExpression
| '(' TK_IDENTIFIER TK_DIM TK_DIM* ')' CastablePrefixExpression
| '(' TK_IDENTIFIER ')' CastablePrefixExpression
| */ UnaryOperator CastExpression
| CastablePrefixExpression
;
BinaryExpression
: CastExpression
| BinaryExpression TK_BINARY CastExpression
| BinaryExpression KR_instanceof TypeSpecifier
;
ConditionalExpression
: BinaryExpression
| BinaryExpression '?' Expression ':' ConditionalExpression
;
AssignmentExpression
: ConditionalExpression [AssignmentOperator AssignmentExpression]
;
AssignmentOperator
: '='
| TK_OP_ASSIGN
;
Expression
: AssignmentExpression
;
ConstantExpression
: ConditionalExpression
;
/*
TK_OPERATOR : OP_LOR | OP_LAND
| OP_EQ | OP_NE | OP_LE | OP_GE
| OP_SHL | OP_SHR | OP_SHRR
;
*/
TK_BINARY : TK_OPERATOR | '+' | '-' | '*'

View File

@@ -1,150 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include "scanner.h"
#include "python.h"
#include "py_keywords.h"
#include "elx.h"
extern int yylex(void);
static const char *fname;
static int saw_error = 0;
static void *scan_ctx;
static elx_context_t *ectx;
void yyerror(const char *msg)
{
int sl, sc, el, ec;
scanner_token_linecol(scan_ctx, &sl, &sc, &el, &ec);
fprintf(stderr, "%s:%d:%d: parse error: %s\n", fname, sl, sc, msg);
saw_error = 1;
}
int reader(void *user_ctx)
{
FILE *inf = user_ctx;
int c = fgetc(inf);
if (c == EOF)
return SCANNER_EOF;
// printf("char: '%c'\n", c);
return c;
}
void issue_token(char which)
{
int start;
int end;
const char *ident = NULL;
scanner_token_range(scan_ctx, &start, &end);
if (ELX_DEFINES_SYM(which))
{
int length;
scanner_identifier(scan_ctx, &ident, &length);
}
elx_issue_token(ectx, which, start, end - start + 1, ident);
}
int yylex(void)
{
int v;
do {
v = scanner_get_token(scan_ctx);
if (v == TK_COMMENT)
{
issue_token(ELX_COMMENT);
}
} while (v == TK_COMMENT);
/* is this identifier a keyword? */
if (v == TK_IDENTIFIER)
{
const char *ident;
int length;
int kw;
scanner_identifier(scan_ctx, &ident, &length);
#if 0
printf("id=%s\n", ident);
#endif
kw = KR_find_keyword(ident, length);
if (kw != KR__not_found)
{
v = kw;
issue_token(ELX_KEYWORD);
}
}
else if (v == TK_STRING)
{
issue_token(ELX_STRING);
}
// printf("token=%d\n", v);
return v;
}
#ifdef DEBUG_SCANNER
void gen_scan_tokens(void)
{
while (1)
{
int v = scanner_get_token(scan_ctx);
int sl, sc, el, ec;
scanner_token_linecol(scan_ctx, &sl, &sc, &el, &ec);
if (v == TK_NEWLINE)
printf("%d,%d: NEWLINE\n", sl, sc);
else if (v == TK_INDENT)
printf("%d,%d: INDENT\n", el, ec);
else if (v == TK_DEDENT)
printf("%d,%d: DEDENT\n", el, ec);
else
printf("%d,%d-%d,%d: %d\n", sl, sc, el, ec, v);
/* end of parse? */
if (v <= 0)
break;
}
}
#endif /* DEBUG_SCANNER */
static void gen_elx_tokens(void)
{
/* ### what to do with the result? should have seen/set saw_error */
(void) yyparse();
}
int main(int argc, const char **argv)
{
ectx = elx_process_args(argc, argv);
elx_open_files(ectx);
scan_ctx = scanner_begin(reader, ectx->input_fp);
#ifdef DEBUG_SCANNER
gen_scan_tokens();
#else
gen_elx_tokens();
#endif
scanner_end(scan_ctx);
elx_close_files(ectx);
if (saw_error)
return EXIT_FAILURE;
return EXIT_SUCCESS;
}

View File

@@ -1,36 +0,0 @@
%local {
/* get the KR_* values */
#include "python.h"
}
%%
and
/* as */
assert
break
class
continue
def
del
elif
else
except
exec
finally
for
from
global
if
import
in
is
lambda
not
or
pass
print
raise
return
try
while
yield

View File

@@ -1,135 +0,0 @@
%token TK_COMMENT TK_IDENTIFIER TK_NUMBER
%token TK_OPERATOR TK_STRING
%token TK_INDENT TK_DEDENT TK_NEWLINE
%token KR_and KR_assert KR_break KR_class KR_continue KR_def
%token KR_del KR_elif KR_else KR_except KR_exec KR_finally
%token KR_for KR_from KR_global KR_if KR_import KR_in KR_is
%token KR_lambda KR_not KR_or KR_pass KR_print KR_raise
%token KR_return KR_try KR_while KR_yield
%start file_input
%{
#include "elx.h"
void yyerror(const char *msg);
int yylex(void);
/* ### should come from an elx-python.h or something */
void issue_token(char which);
%}
%export {
/* the main parsing function */
int yyparse(void);
/* need to define the 'not found' in addition to the regular keywords */
#define KR__not_found 0
}
%%
file_input: (TK_NEWLINE | stmt)*
NAME: TK_IDENTIFIER
funcdef: KR_def NAME { issue_token(ELX_LOCAL_FDEF); } parameters ':' suite
parameters: '(' [varargslist] ')'
varargslist: paramdef (',' paramdef)* [',' [varargsdef]]
| varargsdef
;
/* the TK_OPERATOR represents '*' or '**' */
varargsdef: TK_OPERATOR NAME [',' TK_OPERATOR NAME]
paramdef: fpdef [TK_OPERATOR test]
fpdef: NAME | '(' fplist ')'
fplist: fpdef (',' fpdef)* [',']
stmt: simple_stmt | compound_stmt
simple_stmt: small_stmt (';' small_stmt)* [';'] TK_NEWLINE
small_stmt: expr_stmt | print_stmt | raise_stmt
| import_stmt | global_stmt | exec_stmt | assert_stmt
| KR_del exprlist
| KR_pass
| KR_break
| KR_continue
| KR_return [testlist]
| KR_yield testlist
;
/* expr_stmt is normally assignment, which we get thru TK_OPERATOR in 'expr' */
expr_stmt: testlist
/* a print normally allows '>> test'; since that is a TK_OPERATOR, we
get it as part of 'factor'. this rule also allows for a trailing
comma in '>> test,' which the normal print doesn't */
print_stmt: KR_print [test (',' test)* [',']]
raise_stmt: KR_raise [test [',' test [',' test]]]
/* the TK_OPERATOR represents '*' */
import_stmt: KR_import dotted_as_name (',' dotted_as_name)*
| KR_from dotted_name KR_import (TK_OPERATOR | import_as_name (',' import_as_name)*)
import_as_name: NAME [NAME NAME]
dotted_as_name: dotted_name [NAME NAME]
dotted_name: NAME ('.' NAME)*
global_stmt: KR_global NAME (',' NAME)*
exec_stmt: KR_exec expr [KR_in test [',' test]]
assert_stmt: KR_assert test [',' test]
compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | funcdef | classdef
if_stmt: KR_if test ':' suite (KR_elif test ':' suite)* [KR_else ':' suite]
while_stmt: KR_while test ':' suite [KR_else ':' suite]
for_stmt: KR_for exprlist KR_in testlist ':' suite [KR_else ':' suite]
try_stmt: KR_try ':' suite (except_clause ':' suite)+
[KR_else ':' suite] | KR_try ':' suite KR_finally ':' suite
/* NB compile.c makes sure that the default except clause is last */
except_clause: KR_except [test [',' test]]
suite: simple_stmt | TK_NEWLINE TK_INDENT stmt+ TK_DEDENT
test: test_factor (test_op test_factor | KR_is [KR_not] factor)*
[TK_OPERATOR lambdef] | lambdef
test_op: bin_op | KR_in
test_factor: KR_not* factor
expr: factor (expr_op factor)*
expr_op: bin_op | KR_is [KR_not]
factor: TK_OPERATOR* atom trailer*
bin_op: TK_OPERATOR | KR_or | KR_and | KR_not KR_in
atom: '(' [testlist] ')' | '[' [listmaker] ']' | '{' [dictmaker] '}'
| '`' testlist_no_trailing '`' | TK_IDENTIFIER | TK_NUMBER | TK_STRING+
listmaker: test ( list_for | (',' test)* [','] )
lambdef: KR_lambda [varargslist] ':' test
trailer: '(' [arglist] ')' | '[' subscriptlist ']' | '.' NAME
subscriptlist: subscript (',' subscript)* [',']
subscript: '.' '.' '.' | test | [test] ':' [test] [sliceop]
sliceop: ':' [test]
exprlist: expr (',' expr)* [',']
testlist: test (',' test)* [',']
testlist_no_trailing: test (',' test)*
testlist_safe: test [(',' test)+ [',']] /* doesn't match: test, */
dictmaker: test ':' test (',' test ':' test)* [',']
classdef: KR_class NAME ['(' testlist ')'] ':' suite
/* arguments are normally 'keyword = test; since '=' is TK_OPERATOR, we
match keyword arguments as part of 'test' (in 'expr').
the vararg portion is normally '* test' or '** test'; since '*' and
'**' are TK_OPERATOR, we match varargs as part of 'test' (in
'factor')
thus, all argument forms are simply 'test'
varargs does not normally allow a trailing comma, but we can
simplify things and allow a match
*/
arglist: test (',' test)* [',']
list_iter: list_for | list_if
list_for: KR_for exprlist KR_in testlist_safe [list_iter]
list_if: KR_if test [list_iter]

View File

@@ -1,523 +0,0 @@
#include <stdlib.h>
#include <ctype.h>
#include <assert.h>
#include <string.h>
#include "python.h" /* get the TK_ values */
#include "scanner.h"
#define SCANNER_EMPTY (SCANNER_EOF - 1) /* -2 */
#define SCANNER_TABSIZE 8
#define SCANNER_MAXINDENT 100
#define SCANNER_MAXIDLEN 200
typedef struct
{
get_char_t getfunc;
void *user_ctx;
char saved;
int was_newline; /* was previous character a newline? */
int start; /* start position of last token returned */
int start_col;
int start_line;
int fpos; /* file position */
int lineno; /* file line number */
int line_pos; /* file position of current line's first char */
int nesting_level;
int indent; /* which indent */
int indents[SCANNER_MAXINDENT]; /* the set of indents */
int dedent_count; /* how many DEDENTs to issue */
int skip_newline; /* skip the newline after a blank_line + comment */
int idlen;
char identifier[SCANNER_MAXIDLEN]; /* accumulated identifier */
} scanner_ctx;
static int next_char(scanner_ctx *ctx)
{
int c;
++ctx->fpos;
if (ctx->saved == SCANNER_EMPTY)
{
return (*ctx->getfunc)(ctx->user_ctx);
}
c = ctx->saved;
ctx->saved = SCANNER_EMPTY;
return c;
}
static void backup_char(scanner_ctx *ctx, int c)
{
assert(ctx->saved == SCANNER_EMPTY);
ctx->saved = c;
ctx->was_newline = 0; /* we may have put it back */
--ctx->fpos;
}
/* called to note that we've moved on to another line */
static void on_next_line(scanner_ctx *ctx)
{
ctx->line_pos = ctx->fpos;
++ctx->lineno;
}
void *scanner_begin(get_char_t getfunc, void *user_ctx)
{
scanner_ctx *ctx = malloc(sizeof(*ctx));
memset(ctx, 0, sizeof(*ctx));
ctx->getfunc = getfunc;
ctx->user_ctx = user_ctx;
ctx->saved = SCANNER_EMPTY;
ctx->lineno = 1;
return ctx;
}
int scanner_get_token(void *opaque_ctx)
{
scanner_ctx *ctx = opaque_ctx;
int c;
int c2;
int blank_line;
if (ctx->dedent_count)
{
--ctx->dedent_count;
return TK_DEDENT;
}
nextline:
blank_line = 0;
/* if we're at the start of the line, then get the indentation level */
if (ctx->fpos == ctx->line_pos)
{
int col = 0;
while (1)
{
c = next_char(ctx);
if (c == ' ')
++col;
else if (c == '\t')
col = (col / SCANNER_TABSIZE + 1) * SCANNER_TABSIZE;
else if (c == '\f') /* ^L / formfeed */
col = 0;
else
break;
}
backup_char(ctx, c);
if (c == '#' || c == '\n')
{
/* this is a "blank" line and doesn't count towards indentation,
and it doesn't produce NEWLINE tokens */
blank_line = 1;
}
/* if it isn't blank, and we aren't inside nesting expressions, then
we need to handle INDENT/DEDENT */
if (!blank_line && ctx->nesting_level == 0)
{
int last_indent = ctx->indents[ctx->indent];
if (col == last_indent)
{
/* no change */
}
else if (col > last_indent)
{
if (ctx->indent == SCANNER_MAXINDENT - 1)
{
/* oops. too deep. */
return E_TOO_MANY_INDENTS;
}
ctx->indents[++ctx->indent] = col;
return TK_INDENT;
}
else /* col < last_indent */
{
/* find the previous indentation that matches this one */
while (ctx->indent > 0
&& col < ctx->indents[ctx->indent])
{
++ctx->dedent_count;
--ctx->indent;
}
if (col != ctx->indents[ctx->indent])
{
/* oops. dedent doesn't match any indent. */
return E_DEDENT_MISMATCH;
}
/* deliver one dedent now */
--ctx->dedent_count;
return TK_DEDENT;
}
} /* !blank_line ... */
} /* start of line */
/* start here if we see a line continuation */
read_more:
do {
c = next_char(ctx);
} while (c == ' ' || c == '\t' || c == '\f');
/* here is where the token starts */
ctx->start = ctx->fpos;
ctx->start_line = ctx->lineno;
ctx->start_col = ctx->fpos - ctx->line_pos;
/* comment? */
if (c == '#')
{
do {
c = next_char(ctx);
} while (c != SCANNER_EOF && c != '\n');
/* if we are suppressing newlines because this is a blank line, then
leave a marker to skip the newline, next time through. */
if (blank_line && c == '\n')
ctx->skip_newline = 1;
/* put back whatever we sucked up */
backup_char(ctx, c);
return TK_COMMENT;
}
/* Look for an identifier */
if (isalpha(c) || c == '_')
{
ctx->idlen = 0;
/* is this actually a string? */
if (c == 'r' || c == 'R')
{
ctx->identifier[ctx->idlen++] = c;
c = next_char(ctx);
if (c == '"' || c == '\'')
goto parse_string;
}
else if (c == 'u' || c == 'U')
{
ctx->identifier[ctx->idlen++] = c;
c = next_char(ctx);
if (c == 'r' || c == 'R')
{
ctx->identifier[ctx->idlen++] = c;
c = next_char(ctx);
}
if (c == '"' || c == '\'')
goto parse_string;
}
while (isalnum(c) || c == '_') {
/* store the character if there is room for it, and room left
for a null-terminator. */
if (ctx->idlen < SCANNER_MAXIDLEN-1)
ctx->identifier[ctx->idlen++] = c;
c = next_char(ctx);
}
backup_char(ctx, c);
/* ### check for a keyword */
return TK_IDENTIFIER;
}
if (c == '\n')
{
on_next_line(ctx);
/* don't report NEWLINE tokens for blank lines or nested exprs */
if (blank_line || ctx->nesting_level > 0 || ctx->skip_newline)
{
ctx->skip_newline = 0;
goto nextline;
}
return TK_NEWLINE;
}
if (c == '.')
{
c = next_char(ctx);
if (isdigit(c))
goto parse_fraction;
backup_char(ctx, c);
return '.';
}
if (isdigit(c))
{
if (c == '0')
{
c = next_char(ctx);
if (c == 'x' || c == 'X')
{
do {
c = next_char(ctx);
} while (isxdigit(c));
goto skip_fp;
}
else if (isdigit(c))
{
do {
c = next_char(ctx);
} while (isdigit(c));
}
if (c == '.')
goto parse_fraction;
if (c == 'e' || c == 'E')
goto parse_exponent;
if (c == 'j' || c == 'J')
goto parse_imaginary;
skip_fp:
/* this point: parsed an octal, decimal, or hexadecimal */
if (c == 'l' || c == 'L')
{
/* we consumed just enough. stop and return a NUMBER */
return TK_NUMBER;
}
/* consumed too much. backup and return a NUMBER */
backup_char(ctx, c);
return TK_NUMBER;
}
/* decimal number */
do {
c = next_char(ctx);
} while (isdigit(c));
if (c == 'l' || c == 'L')
{
/* we consumed just enogh. stop and return a NUMBER */
return TK_NUMBER;
}
if (c == '.')
{
parse_fraction:
do {
c = next_char(ctx);
} while (isdigit(c));
}
if (c == 'e' || c == 'E')
{
parse_exponent:
c = next_char(ctx);
if (c == '+' || c == '-')
c = next_char(ctx);
if (!isdigit(c))
{
backup_char(ctx, c);
return E_BAD_NUMBER;
}
do {
c = next_char(ctx);
} while (isdigit(c));
}
if (c == 'j' || c == 'J')
{
parse_imaginary:
c = next_char(ctx);
}
/* one too far. backup and return a NUMBER */
backup_char(ctx, c);
return TK_NUMBER;
} /* isdigit */
parse_string:
if (c == '\'' || c == '"')
{
int second_quote_pos = ctx->fpos + 1;
int which_quote = c;
int is_triple = 0;
int quote_count = 0;
while (1)
{
c = next_char(ctx);
if (c == '\n')
{
on_next_line(ctx);
if (!is_triple)
return E_UNTERM_STRING;
quote_count = 0;
}
else if (c == SCANNER_EOF)
{
return E_UNTERM_STRING;
}
else if (c == which_quote)
{
++quote_count;
if (ctx->fpos == second_quote_pos)
{
c = next_char(ctx);
if (c == which_quote)
{
is_triple = 1;
quote_count = 0;
continue;
}
/* we just read one past the empty string. back up. */
backup_char(ctx, c);
}
/* this quote may have terminated the string */
if (!is_triple || quote_count == 3)
return TK_STRING;
}
else if (c == '\\')
{
c = next_char(ctx);
if (c == SCANNER_EOF)
return E_UNTERM_STRING;
if (c == '\n')
on_next_line(ctx);
quote_count = 0;
}
else
{
quote_count = 0;
}
}
/* NOTREACHED */
}
/* line continuation */
if (c == '\\')
{
c = next_char(ctx);
if (c != '\n')
return E_BAD_CONTINUATION;
on_next_line(ctx);
goto read_more;
}
/* look for operators */
/* the nesting operators */
if (c == '(' || c == '[' || c == '{')
{
++ctx->nesting_level;
return c;
}
if (c == ')' || c == ']' || c == '}')
{
--ctx->nesting_level;
return c;
}
/* look for up-to-3-char ops */
if (c == '<' || c == '>' || c == '*' || c == '/')
{
c2 = next_char(ctx);
if (c == c2)
{
c2 = next_char(ctx);
if (c2 != '=')
{
/* oops. one too far. */
backup_char(ctx, c2);
}
return TK_OPERATOR;
}
if (c == '<' && c2 == '>')
return TK_OPERATOR;
if (c2 != '=')
{
/* one char too far. */
backup_char(ctx, c2);
}
return TK_OPERATOR;
}
/* look for 2-char ops */
if (c == '=' || c == '!' || c == '+' || c == '-'
|| c == '|' || c == '%' || c == '&' || c == '^')
{
c2 = next_char(ctx);
if (c2 == '=')
return TK_OPERATOR;
/* oops. too far. */
backup_char(ctx, c2);
return TK_OPERATOR;
}
/* ### should all of these return 'c' ? */
if (c == ':' || c == ',' || c == ';' || c == '`')
return c;
/* as a unary operator, this must be a TK_OPERATOR */
if (c == '~')
return TK_OPERATOR;
/* if we have an EOF, then just return it */
if (c == SCANNER_EOF)
return SCANNER_EOF;
/* unknown input */
return E_UNKNOWN_TOKEN;
}
void scanner_identifier(void *opaque_ctx, const char **ident, int *len)
{
scanner_ctx *ctx = opaque_ctx;
ctx->identifier[ctx->idlen] = '\0';
*ident = ctx->identifier;
*len = ctx->idlen;
}
void scanner_token_range(void *opaque_ctx, int *start, int *end)
{
scanner_ctx *ctx = opaque_ctx;
*start = ctx->start;
*end = ctx->fpos;
}
void scanner_token_linecol(void *opaque_ctx,
int *sline, int *scol, int *eline, int *ecol)
{
scanner_ctx *ctx = opaque_ctx;
*sline = ctx->start_line;
*scol = ctx->start_col;
*eline = ctx->lineno;
*ecol = ctx->fpos - ctx->line_pos;
}
void scanner_end(void *ctx)
{
free(ctx);
}

View File

@@ -1,42 +0,0 @@
#ifndef SCANNER_H
#define SCANNER_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* constants and errors returned by the scanner */
enum
{
SCANNER_EOF = -1, /* returned by get_char_t and
scanner_get_token to symbolize EOF */
E_TOO_MANY_INDENTS = -100, /* too many indents */
E_DEDENT_MISMATCH, /* no matching indent */
E_BAD_CONTINUATION, /* character occurred after \ */
E_BAD_NUMBER, /* parse error in a number */
E_UNKNOWN_TOKEN, /* dunno what we found */
E_UNTERM_STRING /* unterminated string constant */
};
typedef int (*get_char_t)(void *user_ctx);
void *scanner_begin(get_char_t getfunc, void *user_ctx);
int scanner_get_token(void *ctx);
void scanner_identifier(void *ctx, const char **ident, int *len);
void scanner_token_range(void *ctx, int *start, int *end);
void scanner_token_linecol(void *ctx,
int *sline, int *scol, int *eline, int *ecol);
void scanner_end(void *ctx);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* SCANNER_H */

View File

@@ -19,7 +19,10 @@ import os
import string
import ConfigParser
import fnmatch
import vclib
import vclib.ccvs
import vclib.svn
import cvsdb
#########################################################################
#
@@ -61,6 +64,35 @@ class Config:
if rootname:
self._process_root_options(self.parser, rootname)
self.expand_root_parents()
cvsdb.setencs(self.options.encodings.split(':'))
def expand_root_parents(self):
"""Expand the configured root parents into individual roots."""
# Each item in root_parents is a "directory : repo_type" string.
for pp in self.general.root_parents:
pos = string.rfind(pp, ':')
if pos < 0:
raise debug.ViewVCException(
"The path '%s' in 'root_parents' does not include a "
"repository type." % (pp))
repo_type = string.strip(pp[pos+1:])
pp = os.path.normpath(string.strip(pp[:pos]))
if repo_type == 'cvs':
roots = vclib.ccvs.expand_root_parent(pp)
if self.options.hide_cvsroot and roots.has_key('CVSROOT'):
del roots['CVSROOT']
self.general.cvs_roots.update(roots)
elif repo_type == 'svn':
roots = vclib.svn.expand_root_parent(pp)
self.general.svn_roots.update(roots)
else:
raise debug.ViewVCException(
"The path '%s' in 'root_parents' has an unrecognized "
"repository type." % (pp))
def load_kv_files(self, language):
kv = _sub_config()
@@ -188,6 +220,7 @@ class Config:
if section == root_authz_section:
for key, value in self._get_parser_items(self.parser, section):
params[key] = value
params['__config'] = self
return params
def set_defaults(self):
@@ -252,6 +285,9 @@ class Config:
self.options.dir_pagesize = 0
self.options.log_pagesize = 0
self.options.limit_changes = 100
self.options.cvs_ondisk_charset = 'cp1251'
self.options.binary_mime_re = '^(?!text/|.*\Wxml)'
self.options.encodings = 'utf-8:cp1251:iso-8859-1'
self.templates.diff = None
self.templates.directory = None
@@ -267,6 +303,7 @@ class Config:
self.cvsdb.enabled = 0
self.cvsdb.host = ''
self.cvsdb.port = 3306
self.cvsdb.socket = ''
self.cvsdb.database_name = ''
self.cvsdb.user = ''
self.cvsdb.passwd = ''
@@ -275,6 +312,7 @@ class Config:
self.cvsdb.row_limit = 1000
self.cvsdb.rss_row_limit = 100
self.cvsdb.check_database_for_root = 0
self.cvsdb.fulltext_min_relevance = 0.2
def _startswith(somestr, substr):
return somestr[:len(substr)] == substr

View File

@@ -37,15 +37,32 @@ error = "cvsdb error"
## defined to actually be complete; it should run well off of any DBI 2.0
## complient database interface
encs = [ "utf-8", "cp1251", "iso-8859-1" ]
def utf8string(value):
for e in encs:
try:
value = value.decode(e)
break
except: pass
return value.encode("utf-8")
def setencs(e):
global encs
encs = e
class CheckinDatabase:
def __init__(self, host, port, user, passwd, database, row_limit):
def __init__(self, host, port, socket, user, passwd, database, row_limit, min_relevance, authorizer = None):
self._host = host
self._port = port
self._socket = socket
self._user = user
self._passwd = passwd
self._database = database
self._row_limit = row_limit
self._version = None
self._min_relevance = min_relevance
self.authorizer = authorizer
## database lookup caches
self._get_cache = {}
@@ -54,7 +71,7 @@ class CheckinDatabase:
def Connect(self):
self.db = dbi.connect(
self._host, self._port, self._user, self._passwd, self._database)
self._host, self._port, self._socket, self._user, self._passwd, self._database)
cursor = self.db.cursor()
cursor.execute("SET AUTOCOMMIT=1")
table_list = self.GetTableList()
@@ -67,14 +84,16 @@ class CheckinDatabase:
else:
self._version = 0
if self._version > CURRENT_SCHEMA_VERSION:
raise DatabaseVersionError("Database version %d is newer than the "
"last version supported by this "
"software." % (self._version))
raise DatabaseVersionError("Database version %d is newer than the "
"last version supported by this "
"software." % (self._version))
def sql_get_id(self, table, column, value, auto_set):
value = utf8string(value)
sql = "SELECT id FROM %s WHERE %s=%%s" % (table, column)
sql_args = (value, )
cursor = self.db.cursor()
cursor.execute(sql, sql_args)
try:
@@ -84,7 +103,7 @@ class CheckinDatabase:
return None
else:
return str(int(id))
## insert the new identifier
sql = "INSERT INTO %s(%s) VALUES(%%s)" % (table, column)
sql_args = (value, )
@@ -235,13 +254,17 @@ class CheckinDatabase:
def GetRepository(self, id):
return self.get("repositories", "repository", id)
def GetRepositoryList(self):
return self.get_list("repositories", repository)
def SQLGetDescriptionID(self, description, auto_set = 1):
description = utf8string(description)
## lame string hash, blame Netscape -JMP
hash = len(description)
sql = "SELECT id FROM descs WHERE hash=%s AND description=%s"
sql_args = (hash, description)
cursor = self.db.cursor()
cursor.execute(sql, sql_args)
try:
@@ -255,7 +278,7 @@ class CheckinDatabase:
sql = "INSERT INTO descs (hash,description) values (%s,%s)"
sql_args = (hash, description)
cursor.execute(sql, sql_args)
return self.GetDescriptionID(description, 0)
def GetDescriptionID(self, description, auto_set = 1):
@@ -291,6 +314,26 @@ class CheckinDatabase:
def GetAuthorList(self):
return self.get_list("people", 1)
def GetLatestCheckinTime(self, repository):
repository_id = self.GetRepositoryID(repository.rootpath, 0)
if repository_id is None:
return None
commits_table = self._version >= 1 and 'commits' or 'checkins'
sql = "SELECT ci_when FROM %s WHERE "\
"repositoryid = %%s ORDER BY ci_when DESC LIMIT 1" % (commits_table)
sql_args = (repository_id)
cursor = self.db.cursor()
cursor.execute(sql, sql_args)
ci_when = None
try:
ci_when = cursor.fetchone()[0]
except TypeError:
return None
return dbi.TicksFromDateTime(ci_when)
def AddCommitList(self, commit_list):
for commit in commit_list:
self.AddCommit(commit)
@@ -358,76 +401,84 @@ class CheckinDatabase:
match = " REGEXP "
elif query_entry.match == "notregex":
match = " NOT REGEXP "
sqlList.append("%s%s%s" % (field, match, self.db.literal(data)))
return "(%s)" % (string.join(sqlList, " OR "))
def CreateSQLQueryString(self, query):
commits_table = self._version >= 1 and 'commits' or 'checkins'
tableList = [(commits_table, None)]
fields = [
commits_table+".*",
"repositories.repository AS repository_name",
"dirs.dir AS dir_name",
"files.file AS file_name"]
tableList = [
(commits_table, None),
("repositories","(%s.repositoryid=repositories.id)" % (commits_table)),
("dirs", "(%s.dirid=dirs.id)" % (commits_table)),
("files", "(%s.fileid=files.id)" % (commits_table))]
condList = []
if len(query.text_query):
tableList.append(("descs", "(descs.id=%s.descid)" % (commits_table)))
temp = "MATCH (descs.description) AGAINST (%s" % (self.db.literal(query.text_query))
condList.append("%s IN BOOLEAN MODE) > %s" % (temp, self._min_relevance))
fields.append("%s) AS relevance" % temp)
else:
fields.append("'' AS relevance")
if len(query.repository_list):
tableList.append(("repositories",
"(%s.repositoryid=repositories.id)"
% (commits_table)))
temp = self.SQLQueryListString("repositories.repository",
query.repository_list)
condList.append(temp)
if len(query.branch_list):
tableList.append(("branches",
"(%s.branchid=branches.id)" % (commits_table)))
tableList.append(("branches", "(%s.branchid=branches.id)" % (commits_table)))
temp = self.SQLQueryListString("branches.branch",
query.branch_list)
condList.append(temp)
if len(query.directory_list):
tableList.append(("dirs",
"(%s.dirid=dirs.id)" % (commits_table)))
temp = self.SQLQueryListString("dirs.dir", query.directory_list)
condList.append(temp)
if len(query.file_list):
tableList.append(("files",
"(%s.fileid=files.id)" % (commits_table)))
tableList.append(("files", "(%s.fileid=files.id)" % (commits_table)))
temp = self.SQLQueryListString("files.file", query.file_list)
condList.append(temp)
if len(query.revision_list):
condList.append("(%s.revision IN (" % (commits_table) + ','.join(map(lambda s: self.db.literal(s), query.revision_list)) + "))")
if len(query.author_list):
tableList.append(("people",
"(%s.whoid=people.id)" % (commits_table)))
tableList.append(("people", "(%s.whoid=people.id)" % (commits_table)))
temp = self.SQLQueryListString("people.who", query.author_list)
condList.append(temp)
if len(query.comment_list):
tableList.append(("descs",
"(%s.descid=descs.id)" % (commits_table)))
tableList.append(("descs", "(%s.descid=descs.id)" % (commits_table)))
temp = self.SQLQueryListString("descs.description",
query.comment_list)
condList.append(temp)
if query.from_date:
temp = "(%s.ci_when>=\"%s\")" \
% (commits_table, str(query.from_date))
temp = "(%s.ci_when>=\"%s\")" % (commits_table, str(query.from_date))
condList.append(temp)
if query.to_date:
temp = "(%s.ci_when<=\"%s\")" \
% (commits_table, str(query.to_date))
temp = "(%s.ci_when<=\"%s\")" % (commits_table, str(query.to_date))
condList.append(temp)
if query.sort == "date":
order_by = "ORDER BY %s.ci_when DESC,descid" % (commits_table)
elif query.sort == "author":
tableList.append(("people",
"(%s.whoid=people.id)" % (commits_table)))
tableList.append(("people", "(%s.whoid=people.id)" % (commits_table)))
order_by = "ORDER BY people.who,descid"
elif query.sort == "file":
tableList.append(("files",
"(%s.fileid=files.id)" % (commits_table)))
tableList.append(("files", "(%s.fileid=files.id)" % (commits_table)))
order_by = "ORDER BY files.file,descid"
elif query.sort == "relevance" and len(query.text_query):
order_by = "ORDER BY relevance DESC,%s.ci_when DESC,descid" % (commits_table)
## exclude duplicates from the table list, and split out join
## conditions from table names. In future, the join conditions
@@ -440,6 +491,7 @@ class CheckinDatabase:
tables.append(table)
if cond is not None: joinConds.append(cond)
fields = string.join(fields, ",")
tables = string.join(tables, ",")
conditions = string.join(joinConds + condList, " AND ")
conditions = conditions and "WHERE %s" % conditions
@@ -452,32 +504,46 @@ class CheckinDatabase:
elif self._row_limit:
limit = "LIMIT %s" % (str(self._row_limit))
sql = "SELECT %s.* FROM %s %s %s %s" \
% (commits_table, tables, conditions, order_by, limit)
sql = "SELECT %s FROM %s %s %s %s" % (
fields, tables, conditions, order_by, limit)
return sql
def check_commit_access(self, repos, dir, file, rev):
if self.authorizer:
rootname = repos.split('/')
rootname = rootname.pop()
path_parts = dir.split('/')
path_parts.append(file)
return self.authorizer.check_path_access(rootname, path_parts, vclib.FILE, rev)
return True
def RunQuery(self, query):
sql = self.CreateSQLQueryString(query)
cursor = self.db.cursor()
cursor.execute(sql)
while 1:
row = cursor.fetchone()
if not row:
break
(dbType, dbCI_When, dbAuthorID, dbRepositoryID, dbDirID,
dbFileID, dbRevision, dbStickyTag, dbBranchID, dbAddedLines,
dbRemovedLines, dbDescID) = row
dbRemovedLines, dbDescID, dbRepositoryName, dbDirName,
dbFileName, dbRelevance) = row
if not self.check_commit_access(dbRepositoryName, dbDirName, dbFileName, dbRevision):
continue
commit = LazyCommit(self)
if dbType == 'Add':
commit.SetTypeAdd()
commit.SetTypeAdd()
elif dbType == 'Remove':
commit.SetTypeRemove()
commit.SetTypeRemove()
else:
commit.SetTypeChange()
commit.SetTypeChange()
commit.SetTime(dbi.TicksFromDateTime(dbCI_When))
commit.SetFileID(dbFileID)
commit.SetDirectoryID(dbDirID)
@@ -488,6 +554,7 @@ class CheckinDatabase:
commit.SetPlusCount(dbAddedLines)
commit.SetMinusCount(dbRemovedLines)
commit.SetDescriptionID(dbDescID)
commit.SetRelevance(dbRelevance)
query.AddCommit(commit)
@@ -534,7 +601,7 @@ class CheckinDatabase:
sql_args = (value, value)
cursor = self.db.cursor()
cursor.execute(sql, sql_args)
def sql_purge(self, table, key, fkey, ftable):
sql = "DELETE FROM %s WHERE %s NOT IN (SELECT %s FROM %s)" \
% (table, key, fkey, ftable)
@@ -613,6 +680,7 @@ class Commit:
self.__pluscount = ''
self.__minuscount = ''
self.__description = ''
self.__relevance = ''
self.__gmt_time = 0.0
self.__type = Commit.CHANGE
@@ -681,6 +749,12 @@ class Commit:
def GetDescription(self):
return self.__description
def SetRelevance(self, relevance):
self.__relevance = relevance
def GetRelevance(self):
return self.__relevance
def SetTypeChange(self):
self.__type = Commit.CHANGE
@@ -781,8 +855,10 @@ class CheckinDatabaseQuery:
self.branch_list = []
self.directory_list = []
self.file_list = []
self.revision_list = []
self.author_list = []
self.comment_list = []
self.text_query = ""
## date range in DBI 2.0 timedate objects
self.from_date = None
@@ -798,6 +874,9 @@ class CheckinDatabaseQuery:
## are added
self.commit_cb = None
def SetTextQuery(self, query):
self.text_query = query
def SetRepository(self, repository, match = "exact"):
self.repository_list.append(QueryEntry(repository, match))
@@ -810,10 +889,15 @@ class CheckinDatabaseQuery:
def SetFile(self, file, match = "exact"):
self.file_list.append(QueryEntry(file, match))
def SetRevision(self, revision):
r = re.compile('\s*[,;]+\s*')
for i in r.split(revision):
self.revision_list.append(i)
def SetAuthor(self, author, match = "exact"):
self.author_list.append(QueryEntry(author, match))
def SetComment(self, comment, match = "exact"):
def SetComment(self, comment, match = "fulltext"):
self.comment_list.append(QueryEntry(comment, match))
def SetSortMethod(self, sort):
@@ -853,20 +937,21 @@ def CreateCommit():
def CreateCheckinQuery():
return CheckinDatabaseQuery()
def ConnectDatabase(cfg, readonly=0):
def ConnectDatabase(cfg, authorizer=None, readonly=0):
if readonly:
user = cfg.cvsdb.readonly_user
passwd = cfg.cvsdb.readonly_passwd
else:
user = cfg.cvsdb.user
passwd = cfg.cvsdb.passwd
db = CheckinDatabase(cfg.cvsdb.host, cfg.cvsdb.port, user, passwd,
cfg.cvsdb.database_name, cfg.cvsdb.row_limit)
db = CheckinDatabase(cfg.cvsdb.host, cfg.cvsdb.port, cfg.cvsdb.socket, user, passwd,
cfg.cvsdb.database_name, cfg.cvsdb.row_limit, cfg.cvsdb.fulltext_min_relevance,
authorizer)
db.Connect()
return db
def ConnectDatabaseReadOnly(cfg):
return ConnectDatabase(cfg, 1)
def ConnectDatabaseReadOnly(cfg, authorizer):
return ConnectDatabase(cfg, authorizer, 1)
def GetCommitListFromRCSFile(repository, path_parts, revision=None):
commit_list = []

View File

@@ -59,5 +59,13 @@ def TicksFromDateTime(datetime):
else:
return time.mktime(t[:8] + (-1,))
def connect(host, port, user, passwd, db):
return MySQLdb.connect(host=host, port=port, user=user, passwd=passwd, db=db)
def connect(host, port, socket, user, passwd, db, charset = 'utf8'):
return MySQLdb.connect(
host = host,
port = port,
unix_socket = socket,
user = user,
passwd = passwd,
db = db,
charset = charset,
use_unicode = charset == 'utf8')

View File

@@ -829,12 +829,18 @@ class UnknownFormatConstantError(EZTException):
"""The format specifier is an unknown value."""
def _raw_printer(ctx, s):
try: s = s.encode('utf-8')
except: pass
ctx.fp.write(s)
def _html_printer(ctx, s):
try: s = s.encode('utf-8')
except: pass
ctx.fp.write(cgi.escape(s))
def _uri_printer(ctx, s):
try: s = s.encode('utf-8')
except: pass
ctx.fp.write(urllib.quote(s))
_printers = {
@@ -859,7 +865,7 @@ def test_parse():
['', '["a \\"b[foo]" c.d f]', None, '']
def _test(argv):
import doctest, ezt
import doctest, ezt
verbose = "-v" in argv
return doctest.testmod(ezt, verbose=verbose)

View File

@@ -40,12 +40,22 @@ class FormData:
self.file = ""
self.who = ""
self.sortby = ""
self.textquery = ""
self.date = ""
self.hours = 0
self.decode_thyself(form)
def decode_thyself(self, form):
try:
self.textquery = string.strip(form["textquery"].value)
except KeyError:
pass
except TypeError:
pass
else:
self.valid = 1
try:
self.repository = string.strip(form["repository"].value)
except KeyError:
@@ -245,10 +255,15 @@ def form_to_cvsdb_query(form_data):
cmd = decode_command(cmd)
query.SetAuthor(str, cmd)
if form_data.textquery:
query.SetTextQuery(form_data.textquery)
if form_data.sortby == "author":
query.SetSortMethod("author")
elif form_data.sortby == "file":
query.SetSortMethod("file")
elif form_data.sortby == "relevance" and form_data.textquery:
query.SetSortMethod("relevance")
else:
query.SetSortMethod("date")
@@ -289,7 +304,7 @@ def is_forbidden(cfg, cvsroot_name, module):
return default
def build_commit(server, cfg, desc, files, cvsroots, viewvc_link):
ob = _item(num_files=len(files), files=[])
ob = _item(num_files=len(files), files=[], plus=0, minus=0)
if desc:
ob.log = string.replace(server.escape(desc), '\n', '<br />')
@@ -344,6 +359,9 @@ def build_commit(server, cfg, desc, files, cvsroots, viewvc_link):
flink = '[%s] %s' % (repository, file)
dlink = None
ob.relevance = commit.GetRelevance()
ob.plus += int(commit.GetPlusCount())
ob.minus += int(commit.GetMinusCount())
ob.files.append(_item(date=ctime,
author=commit.GetAuthor(),
link=flink,
@@ -357,9 +375,8 @@ def build_commit(server, cfg, desc, files, cvsroots, viewvc_link):
return ob
def run_query(server, cfg, form_data, viewvc_link):
def run_query(server, cfg, db, form_data, viewvc_link):
query = form_to_cvsdb_query(form_data)
db = cvsdb.ConnectDatabaseReadOnly(cfg)
db.RunQuery(query)
if not query.commit_list:
@@ -405,8 +422,9 @@ def main(server, cfg, viewvc_link):
form = server.FieldStorage()
form_data = FormData(form)
db = cvsdb.ConnectDatabaseReadOnly(cfg, None)
if form_data.valid:
commits = run_query(server, cfg, form_data, viewvc_link)
commits = run_query(server, cfg, db, form_data, viewvc_link)
query = None
else:
commits = [ ]
@@ -416,6 +434,8 @@ def main(server, cfg, viewvc_link):
'cfg' : cfg,
'address' : cfg.general.address,
'vsn' : viewvc.__version__,
'textquery' : server.escape(form_data.textquery, 1),
'repository' : server.escape(form_data.repository, 1),
'branch' : server.escape(form_data.branch, 1),
'directory' : server.escape(form_data.directory, 1),
@@ -432,6 +452,7 @@ def main(server, cfg, viewvc_link):
'commits' : commits,
'num_commits' : len(commits),
'rss_href' : None,
'repositories' : db.GetRepositoryList(),
'hours' : form_data.hours and form_data.hours or 2,
})

View File

@@ -0,0 +1,100 @@
# -*-python-*-
#
# Copyright (C) 2009 Vitaliy Filippov.
#
# By using this file, you agree to the terms and conditions set forth in
# the LICENSE.html file which can be found at the top level of the ViewVC
# distribution or at http://viewvc.org/license-1.html.
#
# For more information, visit http://viewvc.org/
#
# -----------------------------------------------------------------------
import vcauth
import vclib
import string
from xml.dom.ext.reader import Sax2
from xml import xpath
class ViewVCAuthorizer(vcauth.GenericViewVCAuthorizer):
"""An authorizer making use of CVSnt access control lists (which are in form
of XML files in CVS/ subdirectories in the repository)."""
def __init__(self, username, params={}):
self.username = username
self.params = params
self.cfg = params['__config']
self.default = params.get('default', 0)
self.cached = {}
self.xmlcache = {}
def checkr(self, element, paths):
r = None
for p in paths:
nodes = xpath.Evaluate(p, element)
if nodes and len(nodes):
for c in nodes:
if c.nodeName == 'read' and r is None:
r = True
if c.attributes and len(c.attributes):
for a in c.attributes:
if a.nodeName == 'deny':
r = not a.value
if r is not None:
break
return r
def check(self, rootname, path_parts, filename):
d = self.cfg.general.cvs_roots.get(rootname,None)
if not d:
return self.default
i = len(path_parts)
r = None
while i >= 0:
try:
xml = d
if len(path_parts):
xml = xml + '/' + string.join(path_parts, '/')
xml = xml + '/CVS/fileattr.xml'
if self.cached.get(xml, None) is not None:
return self.cached.get(xml, None)
doc = self.xmlcache.get(xml, None)
if doc is None:
fp = open(xml, 'rb')
doc = Sax2.Reader().fromStream(fp)
fp.close()
self.xmlcache[xml] = doc
if filename:
r = self.checkr(doc.documentElement, [
'/fileattr/file[@name=\'%s\']/acl[@user=\'%s\' and not(@branch)]/read' % (filename, self.username),
'/fileattr/file[@name=\'%s\']/acl[not(@user) and not(@branch)]/read' % filename,
'/fileattr/directory/acl[@user=\'%s\' and not(@branch)]/read' % self.username,
'/fileattr/directory/acl[not(@user) and not(@branch)]/read'
] )
else:
r = self.checkr(doc.documentElement, [
'/fileattr/directory/acl[@user=\'%s\' and not(@branch)]/read' % self.username,
'/fileattr/directory/acl[not(@user) and not(@branch)]/read'
] )
if r is not None:
self.cached[xml] = r
return r
raise Exception(None)
except:
if len(path_parts) > 0:
path_parts = path_parts[:-1]
filename = ''
i = i-1
return self.default
def check_root_access(self, rootname):
return self.check(rootname, [], '')
def check_path_access(self, rootname, path_parts, pathtype, rev=None):
if not path_parts:
return 1
if pathtype == vclib.DIR:
return self.check(rootname, path_parts, '')
f = path_parts[-1]
path_parts = path_parts[:-1]
return self.check(rootname, path_parts, f)

View File

@@ -0,0 +1,57 @@
# -*-python-*-
#
# Copyright (C) 2009 Vitaliy Filippov.
#
# By using this file, you agree to the terms and conditions set forth in
# the LICENSE.html file which can be found at the top level of the ViewVC
# distribution or at http://viewvc.org/license-1.html.
#
# For more information, visit http://viewvc.org/
#
# -----------------------------------------------------------------------
import vcauth
import vclib
import string
import grp
import re
class ViewVCAuthorizer(vcauth.GenericViewVCAuthorizer):
"""A simple authorizer checking system group membership for every
repository and every user."""
def __init__(self, username, params={}):
self.username = username
self.params = params
self.cfg = params['__config']
self.cached = {}
self.grp = {}
self.byroot = {}
self.fmt = map(lambda l: l.strip(), params.get('group_name_format', 'svn.%s|svn.%s.ro').split('|'))
byr = params.get('by_root', '')
for i in byr.split(','):
if i.find(':') < 0:
continue
(root, auth) = i.split(':', 2)
self.byroot[root.strip()] = map(lambda l: l.strip(), auth.split('|'))
def check_root_access(self, rootname):
r = self.cached.get(rootname, None)
if r is not None:
return r
try:
grent = self.grp.get(rootname, None)
if grent is None:
grent = map(lambda grn: grp.getgrnam(grn.replace('%s', re.sub('[^\w\.\-]+', '', rootname))), self.byroot.get(rootname, self.fmt))
self.grp[rootname] = grent
for i in grent:
if i.gr_mem and len(i.gr_mem) and self.username in i.gr_mem:
r = 1
break
except:
r = 0
self.cached[rootname] = r
return r
def check_path_access(self, rootname, path_parts, pathtype, rev=None):
return self.check_root_access(rootname)

View File

@@ -0,0 +1,69 @@
# -*-python-*-
#
# Copyright (C) 2009 Vitaliy Filippov.
#
# By using this file, you agree to the terms and conditions set forth in
# the LICENSE.html file which can be found at the top level of the ViewVC
# distribution or at http://viewvc.org/license-1.html.
#
# For more information, visit http://viewvc.org/
#
# -----------------------------------------------------------------------
import vcauth
import vclib
import string
class ViewVCAuthorizer(vcauth.GenericViewVCAuthorizer):
"""A 'union' authorizer: it makes possible to use one authorizer for
one root and other authorizer for other roots."""
def __init__(self, username, params={}):
self.username = username
self.params = params
self.cfg = params['__config']
self.default = params.get('default', '')
self.byroot = {}
self.authz = {}
union = params.get('union', '')
for i in union.split(','):
if i.find(':') < 0:
continue
(root, auth) = i.split(':', 2)
self.byroot[root.strip()] = auth.strip()
def create_authz(self, rootname):
aname = self.byroot.get(rootname, '') or self.default
if not aname:
return None
if self.authz.get(aname, None):
return self.authz[aname]
import imp
fp = None
try:
try:
fp, path, desc = imp.find_module(aname, vcauth.__path__)
my_auth = imp.load_module('viewvc', fp, path, desc)
except ImportError:
raise debug.ViewVCException(
'Invalid authorizer (%s) specified for root "%s"' \
% (self.cfg.options.authorizer, rootname),
'500 Internal Server Error')
finally:
if fp:
fp.close()
params = self.cfg.get_authorizer_params(aname, rootname)
self.authz[aname] = my_auth.ViewVCAuthorizer(self.username, params)
return self.authz[aname]
def check_root_access(self, rootname):
a = self.create_authz(rootname)
if a:
return a.check_root_access(rootname)
return None
def check_path_access(self, rootname, path_parts, pathtype, rev=None):
a = self.create_authz(rootname)
if a:
return a.check_path_access(rootname, path_parts, pathtype, rev)
return None

View File

@@ -328,7 +328,7 @@ def _diff_args(type, options):
if type == CONTEXT:
if options.has_key('context'):
if options['context'] is None:
args.append('--context=-1')
args.append('--context=%i' % 0x01ffffff)
else:
args.append('--context=%i' % options['context'])
else:
@@ -336,7 +336,7 @@ def _diff_args(type, options):
elif type == UNIFIED:
if options.has_key('context'):
if options['context'] is None:
args.append('--unified=-1')
args.append('--unified=%i' % 0x01ffffff)
else:
args.append('--unified=%i' % options['context'])
else:
@@ -381,13 +381,13 @@ class _diff_fp:
self.fp = None
finally:
try:
if self.temp1:
if self.temp1 and self.temp1 != '/dev/null':
os.remove(self.temp1)
self.temp1 = None
self.temp1 = None
finally:
if self.temp2:
if self.temp2 and self.temp2 != '/dev/null':
os.remove(self.temp2)
self.temp2 = None
self.temp2 = None
def __del__(self):
self.close()

View File

@@ -21,6 +21,7 @@ import stat
import string
import re
import time
import cvsdb
# ViewVC libs
import compat
@@ -322,7 +323,7 @@ class BinCVSRepository(BaseCVSRepository):
if self.itemtype(path_parts, rev) != vclib.FILE: # does auth-check
raise vclib.Error("Path '%s' is not a file."
% (string.join(path_parts, "/")))
from vclib.ccvs import blame
source = blame.BlameSource(self.rcsfile(path_parts, 1), rev)
return source, source.revision
@@ -337,13 +338,19 @@ class BinCVSRepository(BaseCVSRepository):
ignore_keyword_subst - boolean, ignore keyword substitution
"""
if not path_parts1:
path_parts1 = path_parts2
rev1 = '1.0'
if not path_parts2:
path_parts2 = path_parts1
rev2 = '1.0'
if self.itemtype(path_parts1, rev1) != vclib.FILE: # does auth-check
raise vclib.Error("Path '%s' is not a file."
% (string.join(path_parts1, "/")))
if self.itemtype(path_parts2, rev2) != vclib.FILE: # does auth-check
raise vclib.Error("Path '%s' is not a file."
% (string.join(path_parts2, "/")))
args = vclib._diff_args(type, options)
if options.get('ignore_keyword_subst', 0):
args.append('-kk')
@@ -351,8 +358,7 @@ class BinCVSRepository(BaseCVSRepository):
rcsfile = self.rcsfile(path_parts1, 1)
if path_parts1 != path_parts2:
raise NotImplementedError, "cannot diff across paths in cvs"
args.extend(['-r' + rev1, '-r' + rev2, rcsfile])
args.extend(['-N', '-r' + rev1, '-r' + rev2, rcsfile])
fp = self.rcs_popen('rcsdiff', args, 'rt')
# Eat up the non-GNU-diff-y headers.
@@ -361,7 +367,6 @@ class BinCVSRepository(BaseCVSRepository):
if not line or line[0:5] == 'diff ':
break
return fp
class CVSDirEntry(vclib.DirEntry):
def __init__(self, name, kind, errors, in_attic, absent=0):
@@ -833,6 +838,8 @@ def _parse_log_entry(fp):
raise ValueError, 'invalid year'
date = compat.timegm(tm)
log = cvsdb.utf8string(log)
return Revision(rev, date,
# author, state, lines changed
match.group(2), match.group(3) == "dead", match.group(5),

View File

@@ -32,6 +32,7 @@ import time
import math
import rcsparse
import vclib
import cvsdb
class CVSParser(rcsparse.Sink):
# Precompiled regular expressions
@@ -446,7 +447,7 @@ class BlameSource:
prev_rev = self.parser.prev_revision.get(rev)
line_number = idx + 1
author = self.parser.revision_author[rev]
thisline = self.lines[idx]
thisline = cvsdb.utf8string(self.lines[idx])
### TODO: Put a real date in here.
item = vclib.Annotation(thisline, line_number, rev, prev_rev, author, None)
self.last = item

View File

@@ -19,6 +19,7 @@ import tempfile
import vclib
import rcsparse
import blame
import cvsdb
### The functionality shared with bincvs should probably be moved to a
### separate module
@@ -66,6 +67,7 @@ class CCVSRepository(BaseCVSRepository):
entry.path = path
try:
rcsparse.parse(open(path, 'rb'), InfoSink(entry, rev, alltags))
entry.log = cvsdb.utf8string(entry.log)
except IOError, e:
entry.errors.append("rcsparse error: %s" % e)
except RuntimeError, e:
@@ -119,23 +121,32 @@ class CCVSRepository(BaseCVSRepository):
return filtered_revs
def rawdiff(self, path_parts1, rev1, path_parts2, rev2, type, options={}):
if self.itemtype(path_parts1, rev1) != vclib.FILE: # does auth-check
if path_parts1 and self.itemtype(path_parts1, rev1) != vclib.FILE: # does auth-check
raise vclib.Error("Path '%s' is not a file."
% (string.join(path_parts1, "/")))
if self.itemtype(path_parts2, rev2) != vclib.FILE: # does auth-check
if path_parts2 and self.itemtype(path_parts2, rev2) != vclib.FILE: # does auth-check
raise vclib.Error("Path '%s' is not a file."
% (string.join(path_parts2, "/")))
temp1 = tempfile.mktemp()
open(temp1, 'wb').write(self.openfile(path_parts1, rev1)[0].getvalue())
temp2 = tempfile.mktemp()
open(temp2, 'wb').write(self.openfile(path_parts2, rev2)[0].getvalue())
if not path_parts1 and not path_parts2:
raise vclib.Error("Nothing to diff.")
r1 = self.itemlog(path_parts1, rev1, vclib.SORTBY_DEFAULT, 0, 0, {})[-1]
r2 = self.itemlog(path_parts2, rev2, vclib.SORTBY_DEFAULT, 0, 0, {})[-1]
if path_parts1:
temp1 = tempfile.mktemp()
open(temp1, 'wb').write(self.openfile(path_parts1, rev1)[0].getvalue())
r1 = self.itemlog(path_parts1, rev1, vclib.SORTBY_DEFAULT, 0, 0, {})[-1]
info1 = (self.rcsfile(path_parts1, root=1, v=0), r1.date, r1.string)
else:
temp1 = '/dev/null'
info1 = ('/dev/null', '', '')
info1 = (self.rcsfile(path_parts1, root=1, v=0), r1.date, r1.string)
info2 = (self.rcsfile(path_parts2, root=1, v=0), r2.date, r2.string)
if path_parts2:
temp2 = tempfile.mktemp()
open(temp2, 'wb').write(self.openfile(path_parts2, rev2)[0].getvalue())
r2 = self.itemlog(path_parts2, rev2, vclib.SORTBY_DEFAULT, 0, 0, {})[-1]
info2 = (self.rcsfile(path_parts2, root=1, v=0), r2.date, r2.string)
else:
temp2 = '/dev/null'
info2 = ('/dev/null', '', '')
diff_args = vclib._diff_args(type, options)

View File

@@ -340,33 +340,48 @@ class RemoteSubversionRepository(vclib.Repository):
return cached_info[0], cached_info[1], cached_info[2], cached_info[3]
def rawdiff(self, path_parts1, rev1, path_parts2, rev2, type, options={}):
p1 = self._getpath(path_parts1)
p2 = self._getpath(path_parts2)
r1 = self._getrev(rev1)
r2 = self._getrev(rev2)
if not vclib.check_path_access(self, path_parts1, vclib.FILE, rev1):
raise vclib.ItemNotFound(path_parts1)
if not vclib.check_path_access(self, path_parts2, vclib.FILE, rev2):
raise vclib.ItemNotFound(path_parts2)
if path_parts1 is not None:
p1 = self._getpath(path_parts1)
r1 = self._getrev(rev1)
if not vclib.check_path_access(self, path_parts1, vclib.FILE, rev1):
raise vclib.ItemNotFound(path_parts1)
else:
p1 = None
if path_parts2 is not None:
if not p1:
raise vclib.ItemNotFound(parh_parts2)
p2 = self._getpath(path_parts2)
r2 = self._getrev(rev2)
if not vclib.check_path_access(self, path_parts2, vclib.FILE, rev2):
raise vclib.ItemNotFound(path_parts2)
else:
p2 = None
args = vclib._diff_args(type, options)
def _date_from_rev(rev):
date, author, msg, changes = self.revinfo(rev)
return date
try:
temp1 = temp_checkout(self, p1, r1)
temp2 = temp_checkout(self, p2, r2)
info1 = p1, _date_from_rev(r1), r1
info2 = p2, _date_from_rev(r2), r2
if p1:
temp1 = temp_checkout(self, p1, r1)
else:
temp1 = '/dev/null'
if p2:
temp2 = temp_checkout(self, p2, r2)
else:
temp2 = '/dev/null'
return vclib._diff_fp(temp1, temp2, info1, info2, self.diff_cmd, args)
except core.SubversionException, e:
_fix_subversion_exception(e)
if e.apr_err == vclib.svn.core.SVN_ERR_FS_NOT_FOUND:
if e.apr_err == core.SVN_ERR_FS_NOT_FOUND:
raise vclib.InvalidRevision
raise
def isexecutable(self, path_parts, rev):
props = self.itemprops(path_parts, rev) # does authz-check
return props.has_key(core.SVN_PROP_EXECUTABLE)

View File

@@ -15,9 +15,11 @@
import vclib
import os
import os.path
import stat
import string
import cStringIO
import signal
import shutil
import time
import tempfile
import popen
@@ -29,13 +31,6 @@ from svn import fs, repos, core, client, delta
if (core.SVN_VER_MAJOR, core.SVN_VER_MINOR, core.SVN_VER_PATCH) < (1, 3, 1):
raise Exception, "Version requirement not met (needs 1.3.1 or better)"
### Pre-1.5 Subversion doesn't have SVN_ERR_CEASE_INVOCATION
try:
_SVN_ERR_CEASE_INVOCATION = core.SVN_ERR_CEASE_INVOCATION
except:
_SVN_ERR_CEASE_INVOCATION = core.SVN_ERR_CANCELLED
### Pre-1.5 SubversionException's might not have the .msg and .apr_err members
def _fix_subversion_exception(e):
if not hasattr(e, 'apr_err'):
@@ -178,7 +173,7 @@ class NodeHistory:
return
self.histories.append([revision, _cleanup_path(path)])
if self.limit and len(self.histories) == self.limit:
raise core.SubversionException("", _SVN_ERR_CEASE_INVOCATION)
raise core.SubversionException("", core.SVN_ERR_CEASE_INVOCATION)
def __getitem__(self, idx):
return self.histories[idx]
@@ -205,7 +200,7 @@ def _get_history(svnrepos, path, rev, path_type, limit=0, options={}):
1, rev, options.get('svn_cross_copies', 0))
except core.SubversionException, e:
_fix_subversion_exception(e)
if e.apr_err != _SVN_ERR_CEASE_INVOCATION:
if e.apr_err != core.SVN_ERR_CEASE_INVOCATION:
raise
# Now, iterate over those history items, checking for changes of
@@ -225,7 +220,7 @@ def _log_helper(svnrepos, path, rev, lockinfo):
copyfrom_rev, copyfrom_path = fs.copied_from(rev_root, path)
# Assemble our LogEntry
date, author, msg, changes = svnrepos._revinfo(rev)
date, author, msg, changes = svnrepos.revinfo(rev)
if fs.is_file(rev_root, path):
size = fs.file_length(rev_root, path)
else:
@@ -472,7 +467,7 @@ class LocalSubversionRepository(vclib.Repository):
continue
path = self._getpath(entry_path_parts)
entry_rev = _get_last_history_rev(fsroot, path)
date, author, msg, changes = self._revinfo(entry_rev)
date, author, msg, changes = self.revinfo(entry_rev)
entry.rev = str(entry_rev)
entry.date = date
entry.author = author
@@ -570,146 +565,138 @@ class LocalSubversionRepository(vclib.Repository):
youngest_rev, oldest_rev)
return source, youngest_rev
def _revinfo(self, rev, include_changed_paths=0):
"""Internal-use, cache-friendly revision information harvester."""
def _revinfo_helper(rev, include_changed_paths):
# Get the revision property info. (Would use
# editor.get_root_props(), but something is broken there...)
revprops = fs.revision_proplist(self.fs_ptr, rev)
msg = revprops.get(core.SVN_PROP_REVISION_LOG)
author = revprops.get(core.SVN_PROP_REVISION_AUTHOR)
datestr = revprops.get(core.SVN_PROP_REVISION_DATE)
date = _datestr_to_date(datestr)
# Optimization: If our caller doesn't care about the changed
# paths, and we don't need them to do authz determinations, let's
# get outta here.
if self.auth is None and not include_changed_paths:
return date, author, msg, None
# If we get here, then we either need the changed paths because we
# were asked for them, or we need them to do authorization checks.
# Either way, we need 'em, so let's get 'em.
fsroot = self._getroot(rev)
editor = repos.ChangeCollector(self.fs_ptr, fsroot)
e_ptr, e_baton = delta.make_editor(editor)
repos.svn_repos_replay(fsroot, e_ptr, e_baton)
changedpaths = {}
changes = editor.get_changes()
# Copy the Subversion changes into a new hash, checking
# authorization and converting them into ChangedPath objects.
found_readable = found_unreadable = 0
for path in changes.keys():
change = changes[path]
if change.path:
change.path = _cleanup_path(change.path)
if change.base_path:
change.base_path = _cleanup_path(change.base_path)
is_copy = 0
if not hasattr(change, 'action'): # new to subversion 1.4.0
action = vclib.MODIFIED
if not change.path:
action = vclib.DELETED
elif change.added:
action = vclib.ADDED
replace_check_path = path
if change.base_path and change.base_rev:
replace_check_path = change.base_path
if changedpaths.has_key(replace_check_path) \
and changedpaths[replace_check_path].action == vclib.DELETED:
action = vclib.REPLACED
else:
if change.action == repos.CHANGE_ACTION_ADD:
action = vclib.ADDED
elif change.action == repos.CHANGE_ACTION_DELETE:
action = vclib.DELETED
elif change.action == repos.CHANGE_ACTION_REPLACE:
action = vclib.REPLACED
else:
action = vclib.MODIFIED
if (action == vclib.ADDED or action == vclib.REPLACED) \
and change.base_path \
and change.base_rev:
is_copy = 1
if change.item_kind == core.svn_node_dir:
pathtype = vclib.DIR
elif change.item_kind == core.svn_node_file:
pathtype = vclib.FILE
else:
pathtype = None
parts = _path_parts(path)
if vclib.check_path_access(self, parts, pathtype, rev):
if is_copy and change.base_path and (change.base_path != path):
parts = _path_parts(change.base_path)
if not vclib.check_path_access(self, parts, pathtype, change.base_rev):
is_copy = 0
change.base_path = None
change.base_rev = None
changedpaths[path] = SVNChangedPath(path, rev, pathtype,
change.base_path,
change.base_rev, action,
is_copy, change.text_changed,
change.prop_changes)
found_readable = 1
else:
found_unreadable = 1
# If our caller doesn't care about changed paths, we must be
# here for authz reasons only. That means the minute we've
# found both a readable and an unreadable path, we can bail out.
if (not include_changed_paths) and found_readable and found_unreadable:
return date, author, None, None
# Okay, we've process all our paths. Let's filter our metadata,
# and return the requested data.
if found_unreadable:
msg = None
if not found_readable:
author = None
date = None
if include_changed_paths:
return date, author, msg, changedpaths.values()
else:
return date, author, msg, None
def _revinfo_raw(self, rev):
fsroot = self._getroot(rev)
# Consult the revinfo cache first. If we don't have cached info,
# or our caller wants changed paths and we don't have those for
# this revision, go do the real work.
# Get the changes for the revision
editor = repos.ChangeCollector(self.fs_ptr, fsroot)
e_ptr, e_baton = delta.make_editor(editor)
repos.svn_repos_replay(fsroot, e_ptr, e_baton)
changes = editor.get_changes()
changedpaths = {}
# Now get the revision property info. Would use
# editor.get_root_props(), but something is broken there...
revprops = fs.revision_proplist(self.fs_ptr, rev)
msg = revprops.get(core.SVN_PROP_REVISION_LOG)
author = revprops.get(core.SVN_PROP_REVISION_AUTHOR)
datestr = revprops.get(core.SVN_PROP_REVISION_DATE)
# Copy the Subversion changes into a new hash, converting them into
# ChangedPath objects.
found_readable = found_unreadable = 0
for path in changes.keys():
change = changes[path]
if change.path:
change.path = _cleanup_path(change.path)
if change.base_path:
change.base_path = _cleanup_path(change.base_path)
is_copy = 0
if not hasattr(change, 'action'): # new to subversion 1.4.0
action = vclib.MODIFIED
if not change.path:
action = vclib.DELETED
elif change.added:
action = vclib.ADDED
replace_check_path = path
if change.base_path and change.base_rev:
replace_check_path = change.base_path
if changedpaths.has_key(replace_check_path) \
and changedpaths[replace_check_path].action == vclib.DELETED:
action = vclib.REPLACED
else:
if change.action == repos.CHANGE_ACTION_ADD:
action = vclib.ADDED
elif change.action == repos.CHANGE_ACTION_DELETE:
action = vclib.DELETED
elif change.action == repos.CHANGE_ACTION_REPLACE:
action = vclib.REPLACED
else:
action = vclib.MODIFIED
if (action == vclib.ADDED or action == vclib.REPLACED) \
and change.base_path \
and change.base_rev:
is_copy = 1
if change.item_kind == core.svn_node_dir:
pathtype = vclib.DIR
elif change.item_kind == core.svn_node_file:
pathtype = vclib.FILE
else:
pathtype = None
parts = _path_parts(path)
if vclib.check_path_access(self, parts, pathtype, rev):
if is_copy and change.base_path and (change.base_path != path):
parts = _path_parts(change.base_path)
if not vclib.check_path_access(self, parts, pathtype, change.base_rev):
is_copy = 0
change.base_path = None
change.base_rev = None
changedpaths[path] = SVNChangedPath(path, rev, pathtype,
change.base_path,
change.base_rev, action,
is_copy, change.text_changed,
change.prop_changes)
found_readable = 1
else:
found_unreadable = 1
# Return our tuple, auth-filtered: date, author, msg, changes
if found_unreadable:
msg = None
if not found_readable:
author = None
datestr = None
date = _datestr_to_date(datestr)
return date, author, msg, changedpaths.values()
def revinfo(self, rev):
rev = self._getrev(rev)
cached_info = self._revinfo_cache.get(rev)
if not cached_info \
or (include_changed_paths and cached_info[3] is None):
cached_info = _revinfo_helper(rev, include_changed_paths)
if not cached_info:
cached_info = self._revinfo_raw(rev)
self._revinfo_cache[rev] = cached_info
return cached_info[0], cached_info[1], cached_info[2], cached_info[3]
def revinfo(self, rev):
return self._revinfo(rev, 1)
def rawdiff(self, path_parts1, rev1, path_parts2, rev2, type, options={}):
p1 = self._getpath(path_parts1)
p2 = self._getpath(path_parts2)
r1 = self._getrev(rev1)
r2 = self._getrev(rev2)
if not vclib.check_path_access(self, path_parts1, vclib.FILE, rev1):
raise vclib.ItemNotFound(path_parts1)
if not vclib.check_path_access(self, path_parts2, vclib.FILE, rev2):
raise vclib.ItemNotFound(path_parts2)
if path_parts1:
p1 = self._getpath(path_parts1)
r1 = self._getrev(rev1)
if not vclib.check_path_access(self, path_parts1, vclib.FILE, rev1):
raise vclib.ItemNotFound(path_parts1)
else:
p1 = None
if path_parts2:
p2 = self._getpath(path_parts2)
r2 = self._getrev(rev2)
if not vclib.check_path_access(self, path_parts2, vclib.FILE, rev2):
raise vclib.ItemNotFound(path_parts2)
else:
if not p1:
raise vclib.ItemNotFound(path_parts2)
p2 = None
args = vclib._diff_args(type, options)
def _date_from_rev(rev):
date, author, msg, changes = self._revinfo(rev)
date, author, msg, changes = self.revinfo(rev)
return date
try:
temp1 = temp_checkout(self, p1, r1)
temp2 = temp_checkout(self, p2, r2)
info1 = p1, _date_from_rev(r1), r1
info2 = p2, _date_from_rev(r2), r2
if p1:
temp1 = temp_checkout(self, p1, r1)
info1 = p1, _date_from_rev(r1), r1
else:
temp1 = '/dev/null'
info1 = '/dev/null', _date_from_rev(rev1), rev1
if p2:
temp2 = temp_checkout(self, p2, r2)
info2 = p2, _date_from_rev(r2), r2
else:
temp2 = '/dev/null'
info2 = '/dev/null', _date_from_rev(rev2), rev2
return vclib._diff_fp(temp1, temp2, info1, info2, self.diff_cmd, args)
except core.SubversionException, e:
_fix_subversion_exception(e)

File diff suppressed because it is too large Load Diff

View File

@@ -1,53 +0,0 @@
PREFACE
-------
This file will go away soon after release 0.8. Please use the SourceForge
tracker to resubmit any of the items listed below, if you think, it is
still an issue:
http://sourceforge.net/tracker/?group_id=18760
Before reporting please check, whether someone else has already done this.
Working patches increase the chance to be included into the next release.
-- PeFu / October 2001
TODO ITEMS
----------
*) add Tamminen Eero's comments on how to make Linux directly execute
the Python script. From email on Feb 19.
[ add other examples, such as my /bin/sh hack or the teeny CGI stub
importing the bulk hack ]
*) insert rcs_path into PATH before calling "rcsdiff". rcsdiff might
use "co" and needs to find it on the path.
*) show the "locked" flag (attach it to the LogEntry objects).
Idea from Russell Gordon <russell@hoopscotch.dhs.org>
*) committing with a specific revision number:
http://mailman.lyra.org/pipermail/viewcvs/2000q1/000008.html
*) add capability similar to cvs2cl.pl:
http://mailman.lyra.org/pipermail/viewcvs/2000q2/000050.html
suggestion from Chris Meyer <cmeyer@gatan.com>.
*) add a tree view of the directory structure (and files?)
*) include a ConfigParser.py to help older Python installations
*) add a check for the rcs programs/paths to viewvc-install. clarify the
dependency on RCS in the docs.
*) have a "check" mode that verifies binaries are available on rcs_path
-> alternately (probably?): use rcsparse rather than external tools
KNOWN BUGS
----------
*) time.timezone seems to not be available on some 1.5.2 installs.
I was unable to verify this. On RedHat and SuSE Linux this bug
is non existant.
*) With old repositories containing many branches, tags or thousands
or revisions, the cvsgraph feature becomes unusable (see INSTALL).
ViewVC can't do much about this, but it might be possible to
investigate the number of branches, tags and revision in advance
and disable the cvsgraph links, if the numbers exceed a certain
treshold.

View File

@@ -1,82 +0,0 @@
Here lie TODO items for the pluggable authz system:
* Subversion uses path privelege to determine visibility of revision
metadata. That logic is pretty Subversion-specific, so it feels like it
belongs outside the vcauth library as just a helper function in viewvc.py
or something. The algorithm is something like this (culled from the
CollabNet implementation, and not expected to work as edited):
# Subversion revision access levels
REVISION_ACCESS_NONE = 0
REVISION_ACCESS_PARTIAL = 1
REVISION_ACCESS_FULL = 2
def check_svn_revision_access(request, rev):
# Check our revision access cache first.
if request.rev_access_cache.has_key(rev):
return request.rev_access_cache[rev]
# Check our cached answer to the question "Does the user have
# an all-access or a not-at-all-access pass?"
if request.full_access is not None:
return request.full_access \
and REVISION_ACCESS_FULL or REVISION_ACCESS_NONE
# Get a list of paths changed in REV.
### FIXME: There outta be a vclib-complaint way to do this,
### as this won't work for vclib.svn_ra.
import svn.fs
rev_root = svn.fs.revision_root(self.repos.fs_ptr, rev)
changes = svn.fs.paths_changed(rev_root)
# Loop over the list of changed paths, asking the access question
# for each one. We'll track whether we've found any readable paths
# as well as any un-readable (non-authorized) paths, and quit
# checking as soon as we know our revision access level.
found_readable = 0
found_unreadable = 0
for path in changes.keys():
parts = _path_parts(path)
kind = request.repos.itemtype(parts, rev)
if kind == vclib.DIR:
access = request.auth.check_dir_access(parts, rev)
elif:
access = request.auth.check_file_access(parts, rev)
if access:
found_readable = 1
else:
found_unreadable = 1
# Optimization: if we've found at least one readable, and one
# unreadable, we needn't ask about any more paths.
if found_readable and found_unreadable:
break
# If there are paths but we can't read any of them, no access is
# granted.
if len(changes) and not found_readable:
request.rev_access_cache[rev] = REVISION_ACCESS_NONE
# If we found at least one unreadable path, partial access is
# granted.
elif found_unreadable:
request.rev_access_cache[rev] = REVISION_ACCESS_PARTIAL
# Finally, if there were no paths at all, or none of the existing
# ones were unreadable, grant full access.
else:
request.rev_access_cache[rev] = REVISION_ACCESS_FULL
return request.rev_access_cache[rev]
The problems are: where does one hang the revision access cache
so that it doesn't survive a given request? On the request, as
shown in the edited code above?
Can we actually get a good interface into the vcauth layer for
asking the all-access / no-access question? Obviously each vcauth
provider can cache that value for itself and use it as it deems
necessary, but ideally the revision access level question will
want to know if said auth provider was able to answer the question
and, if so, what the answer was.
Another off-the-wall idea -- let's just teach Subversion to do
this calculation as part of a libsvn_repos API.

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -1,87 +0,0 @@
RELEASE MANAGEMENT
ViewVC rolls releases from release branches associate with each minor
version of the software. For example, the 1.1.0 is rolled from the
1.1.x branch. The same is true for the 1.1.1, 1.1.2, ... releases.
There is a script, `tools/make-release', which creates a release
directory and the various archive files that we distribute. All other
steps required to get a ViewVC release out of the door require manual
execution (currently by C. Michael Pilato). Those steps are as
follows:
Checkout a working copy of the release branch for the release you
intend to roll, and in that working copy, perform the following steps
(X, Y, and Z below represent integral major, minor, and patch version
numbers, and not literal):
1. Review any open bug reports:
http://viewvc.tigris.org/servlets/ProjectIssues
2. Add a new subsection to the file 'docs/upgrading.html' describing
all user visible changes for users of previous releases of ViewVC.
Commit any modifications. NOTE: This step should not be necessary
for patch releases.
3. Verify that copyright years are correct in both the license-1.html
file and the source code.
4. Update and commit the 'CHANGES' file.
5. Test, test, test! There is no automatic testsuite available. So
just run with permuting different `viewvc.conf' settings... and
pray. Fix what needs fixin', keeping the CHANGES file in sync
with the branch.
6. At this point, the source code committed to the release branch
should exactly reflect what you wish to distribute and dub "the
release".
7. Edit the file 'lib/viewvc.py' and remove the "-dev" suffix from
__version__. The remainder should be of the form "X.Y.Z", where X,
Y, and Z are positive integers. Do NOT commit this change.
8. Update your working copy to HEAD, and tag the release:
svn update
svn cp -m "Tag the X.Y.Z final release." . \
http://viewvc.tigris.org/svn/viewvc/tags/X.Y.Z
9. Go into an empty directory and run the 'make-release' script:
tools/make-release viewvc-X.Y.Z tags/X.Y.Z
10. Verify the archive files:
- do they have a LICENSE.html file?
- do they have necessary include documentation?
- do they *not* have unnecessary stuff?
- do they install and work correctly?
11. Upload the created archive files (tar.gz and zip) into the Files
and Documents section of the Tigris.org project, and modify the
CHECKSUMS document there accordingly. Also, drop a copy of the
archive files into the root directory of the viewvc.org website
(unversioned).
12. On trunk, update the websites (both the viewvc.org/ and www/ ones)
to refer to the new release files, and copy the CHANGES for the
new release into trunk's CHANGES file.
13. Edit the file 'lib/viewvc.py' again, re-adding the "-dev" suffix
and incrementing the patch number assigned to the __version__
variable, and add a new empty block in the branch's CHANGES file,
and commit:
svn ci -m "Begin a new release cycle."
14. Edit the Issue Tracker configuration options, adding a new Version
for the just-released one, and a new Milestone for the next patch
(and possibly, minor or major) release. (For the Milestone sort
key, use a packed integer XXYYZZ: 1.0.3 == 10003, 2.11.4 == 21104.)
15. Write an announcement explaining all the cool new features and
post it to the announce@ list, to the project's News area, and to
other places interested in this sort of stuff, such as Freshmeat
(http://www.freshmeat.net).

View File

@@ -1,78 +0,0 @@
The following is an email from a developer who was integrating bzr
into ViewVC in which he shares some thoughts on how to further
abstract the version control system interactions into first-class APIs
in the vclib module.
Subject: Re: [ViewCVS-dev] difflib module
Date: Wed, 1 Jun 2005 16:59:10 -0800
From: "Johan Rydberg" <jrydberg@gnu.org>
To: "Michael Pilato" <cmpilato@collab.net>
Cc: <viewcvs-dev@lyra.org>
"C. Michael Pilato" <cmpilato@collab.net> writes:
>> I've tried to minimize the changes to the viewcvs.py, but of course
>> there are a few places where some things has to be altered.
>
> Well, if along the way, you have ideas about how to further abstract
> stuff into the vclib/ modules, please post.
I came up with a few as off now;
* Generalize revision counting; svn starts from 0, bzr starts from 1.
Can be done by a constant; request.repos.MIN_REVNO. For CVS I'm not
sure exactly what should be done. Right now this is only used in
view_revision_svn, so it is not a problem in the short term.
* Generalize view_diff;
* Have a repo-method diff(file1, rev1, file2, rev2, args) that returns
(date1, date2, fp). Means human_readbale_diff and raw_diff does not
have to parse dates. Good for VCS that does not have the date in
the diff. [### DONE ###]
* I'm not sure you should require GNU diff. Some VCS may use own
diff mechanisms (bzr uses difflib, _or_ GNU diff when needed.
Monotone uses its own, IIRC.)
* Generalize view_revision ;
* Have a method, revision_info(), which returns (date, author, msg,
changes) much like vclib.svn.get_revision_info. The CVS version
can raise a ViewCVSException. [### DONE ###]
* Establish a convention for renamed/copied files; current should
work good enough (change.base_path, change.base_rev) but action
string must be same for both svn and others.
* request.repos.rev (or .revision) should give the current revision
number of the repo. No need for this (from view_directory):
if request.roottype == 'svn':
revision = str(vclib.svn.created_rev(request.repos, request.where))
If svn needs the full name of the repo, why not give it when the
repo is created?
* request.repos.youngest vs vclib.svn.get_youngest_revision(REPO)
* More object oriented;
* The subversion backend is not really object oriented. viewcfg.py uses
a lot function from vclib.svn, which could instead be methods of the
Repository class. Example:
diffobj = vclib.svn.do_diff(request.repos, p1, int(rev1),
p2, int(rev2), args)
This should be a method of the repository;
diffobj = request.repos.do_diff(p1, rev1, ...)
I have identified the following functions;
- vclib.svn.created_rev
- vclib.svn.get_youngest_revision
- vclib.svn.date_from_rev
- vclib.svn.do_diff
- vclib.svn.get_revision_info

5
templates-contrib/README Normal file
View File

@@ -0,0 +1,5 @@
This directory contains ViewVC template sets contributed by their
respective authors and expected to work against ViewVC 1.0.x. They
are not necessarily supported by the ViewVC development community, and
do not necessarily carry the same license or copyright as ViewVC
itself.

View File

@@ -0,0 +1,7 @@
Template Set: newvc
Author(s): C. Michael Pilato <cmpilato@red-bean.com>
Compatibility: ViewVC 1.1
The "newvc" template set uses top navigation tabs to flip between
various views of a file or directory, and aims for a clean-yet-modern
look and feel.

View File

@@ -0,0 +1,128 @@
[# Setup page definitions]
[define page_title]Diff of:[end]
[define help_href][docroot]/help_rootview.html[end]
[# end]
[include "include/header.ezt" "diff"]
<form method="get" action="[diff_format_action]" style="display: inline;">
<div>
[for diff_format_hidden_values]<input type="hidden" name="[diff_format_hidden_values.name]" value="[diff_format_hidden_values.value]"/>[end]
<select name="diff_format" onchange="submit()">
<option value="h" [is diff_format "h"]selected="selected"[end]>Colored Diff</option>
<option value="l" [is diff_format "l"]selected="selected"[end]>Long Colored Diff</option>
<option value="f" [is diff_format "f"]selected="selected"[end]>Full Colored Diff</option>
<option value="u" [is diff_format "u"]selected="selected"[end]>Unidiff</option>
<option value="c" [is diff_format "c"]selected="selected"[end]>Context Diff</option>
<option value="s" [is diff_format "s"]selected="selected"[end]>Side by Side</option>
</select>
<input type="submit" value="Show" />
(<a href="[patch_href]">Generate patch</a>)
</div>
</form>
<div id="vc_main_body">
<!-- ************************************************************** -->
[if-any raw_diff]
<pre>[raw_diff]</pre>
[else]
[define change_right][end]
[define last_change_type][end]
[# these should live in stylesheets]
<table cellpadding="0" cellspacing="0" style="width: 100%;">
[for changes]
[is changes.type "change"][else]
[if-any change_right][change_right][define change_right][end][end]
[end]
[is changes.type "header"]
<tr>
<th class="vc_header" style="width:6%;"><strong>#</strong></th>
<th colspan="2" class="vc_header">
<strong>Line [changes.line_info_left]</strong> |
<strong>Line [changes.line_info_right]</strong>
</th>
</tr>
[else]
[is changes.type "add"]
<tr>
<td id="l[changes.line_number]">[if-any right.annotate_href]<a href="[right.annotate_href]#l[changes.line_number]">[changes.line_number]</a>[else][changes.line_number][end]</td>
<td class="vc_diff_plusminus"><strong style="color: green;">+</strong></td>
<td class="vc_diff_add">[changes.right]</td>
</tr>
[else]
[is changes.type "remove"]
<tr>
<td style="text-decoration: line-through">[changes.line_number]</td>
<td class="vc_diff_plusminus"><strong style="color: red;">&ndash;</strong></td>
<td class="vc_diff_remove">[changes.left]</td>
</tr>
[else]
[is changes.type "change"]
[if-any changes.have_left]
<tr>
<td style="text-decoration: line-through">[changes.line_number]</td>
<td class="vc_diff_plusminus"><strong style="color: yellow;">&lt;</strong></td>
<td class="vc_diff_changes1">[changes.left]</td>
</tr>
[end]
[define change_right][change_right]
[if-any changes.have_right]
<tr>
<td id="l[changes.line_number]">[if-any right.annotate_href]<a href="[right.annotate_href]#l[changes.line_number]">[changes.line_number]</a>[else][changes.line_number][end]</td>
<td class="vc_diff_plusminus"><strong style="color: yellow;">&gt;</strong></td>
<td class="vc_diff_changes2">[changes.right]</td>
</tr>[end]
[end]
[else]
[is changes.type "no-changes"]
<tr><td colspan="3" style="vc_diff_nochange"><strong>- No changes -</strong></td></tr>
[else]
[is changes.type "binary-diff"]
<tr><td colspan="3" class="vc_diff_binary"><strong>- Binary file revisions differ -</strong></td></tr>
[else]
[is changes.type "error"]
<tr><td colspan="3" class="vc_diff_error"><strong>- ViewVC depends on rcsdiff and GNU diff
to create this page. ViewVC cannot find GNU diff. Even if you
have GNU diff installed, the rcsdiff program must be configured
and compiled with the GNU diff location. -</strong></td></tr>
[else][# a line of context]
<tr>
<td id="l[changes.line_number]">[if-any right.annotate_href]<a href="[right.annotate_href]#l[changes.line_number]">[changes.line_number]</a>[else][changes.line_number][end]</td>
<td class="vc_diff_plusminus">&nbsp;</td>
<td style="font-family: monospace; white-space: pre;">[changes.right]</td>
</tr>
[end][end][end][end][end][end][end]
[define last_change_type][changes.type][end]
[end]
[if-any change_right][change_right][end]
</table>
<h3>Diff Legend</h3>
<table class="auto" cellspacing="0">
<tr>
<td class="vc_diff_plusminus"><strong style="color: red;">&ndash;</strong></td>
<td class="vc_diff_remove">Removed lines</td>
</tr>
<tr>
<td class="vc_diff_plusminus"><strong style="color: green;">+</strong></td>
<td class="vc_diff_add">Added lines</td>
</tr>
<tr>
<td class="vc_diff_plusminus"><strong style="color: yellow;">&lt;</strong></td>
<td class="vc_diff_changes1">Changed lines</td>
</tr>
<tr>
<td class="vc_diff_plusminus"><strong style="color: yellow;">&gt;</strong></td>
<td class="vc_diff_changes2">Changed lines</td>
</tr>
</table>
[end]
<!-- ************************************************************** -->
</div>
[include "include/footer.ezt"]

View File

@@ -0,0 +1,139 @@
[# setup page definitions]
[define page_title]Index of:[end]
[define help_href][docroot]/help_[if-any where]dir[else]root[end]view.html[end]
[# end]
[include "include/header.ezt" "directory"]
[if-any where][else]
<!-- you may insert repository access instructions here -->
[end]
<table class="auto">
[is cfg.options.use_pagesize "0"][else][is picklist_len "1"][else]
<tr>
<td>Jump to page:</td>
<td><form method="get" action="[dir_paging_action]">
[for dir_paging_hidden_values]<input type="hidden" name="[dir_paging_hidden_values.name]" value="[dir_paging_hidden_values.value]"/>[end]
<select name="dir_pagestart" onchange="submit()">
[for picklist]
<option [is picklist.count dir_pagestart]selected[end] value="[picklist.count]">Page [picklist.page]: [picklist.start] to [picklist.end]</option>
[end]
</select>
<input type="submit" value="Go" />
</form>
</td>
</tr>
[end][end]
</table>
<div id="vc_main_body">
<!-- ************************************************************** -->
<div id="vc_togglables">
[is roottype "svn"]
[if-any rev]r<a href="[revision_href]">[rev]</a>[end]
[else]
[is num_dead "0"]
[else]
[if-any attic_showing]
<a href="[hide_attic_href]">Hide
[else]
<a href="[show_attic_href]">Show
[end]
dead files</a>
[end]
[end]
</div>
<table cellspacing="2" class="fixed" id="dirlist">
<thead>
<tr>
<th style="width: 200px" class="vc_header[is sortby "file"]_sort[end]">
<a href="[sortby_file_href]#dirlist">File
[is sortby "file"]
<img class="vc_sortarrow" alt="[is sortdir "down"](rev)[end]"
width="13" height="13"
src="[docroot]/images/[is sortdir "up"]up[else]down[end].png" />
[end]
</a>
</th>
<th class="vc_header[is sortby "rev"]_sort[end]">
<a href="[sortby_rev_href]#dirlist">Last Change
[is sortby "rev"]
<img class="vc_sortarrow" alt="[is sortdir "down"](rev)[end]"
width="13" height="13"
src="[docroot]/images/[is sortdir "up"]up[else]down[end].png" />
[end]
</a>
</th>
</tr>
</thead>
<tbody>
[if-any up_href]
<tr class="vc_row_odd">
<td colspan="2">
<a href="[up_href]">
<img src="[docroot]/images/back_small.png" alt="" class="vc_icon"
/>&nbsp;../</a>
</td>
</tr>
[end]
[for entries]
[define click_href][is entries.pathtype "dir"][entries.view_href][else][if-any entries.prefer_markup][entries.view_href][else][entries.download_href][end][end][end]
<tr class="vc_row_[if-index entries even]even[else]odd[end]">
<td style="width: 200px" onclick="jumpTo('[click_href]')">
<a name="[entries.anchor]" href="[click_href]" title="[is entries.pathtype "dir"]View Directory Contents[else][if-any entries.prefer_markup]View[else]Download[end] File Contents[end]">
<img src="[docroot]/images/[is entries.pathtype "dir"]dir[else][is entries.state "dead"]broken[else]text[end][end].png" alt="" class="vc_icon" />
[entries.name][is entries.pathtype "dir"]/[end]</a>
[is entries.state "dead"](dead)[end]
</td>
<td [if-any entries.log_href]onclick="jumpTo('[entries.log_href]')"[end]>
[if-any entries.rev]
<strong>[if-any entries.log_href]<a href="[entries.log_href]" title="Revision [entries.rev]">[entries.rev]</a>[else][entries.rev][end]</strong>
([entries.ago] ago)
by <em>[entries.author]</em>:
[entries.log]
[is entries.pathtype "dir"][is roottype "cvs"]
<em>(from [entries.log_file]/[entries.log_rev])</em>
[end][end]
[end]
</td>
</tr>
[end]
</tbody>
</table>
<div id="vc_view_summary">
[if-any search_re_form]
<form class="inline" method="get" action="[search_re_action]">
<div class="inline">
[for search_re_hidden_values]<input type="hidden" name="[search_re_hidden_values.name]" value="[search_re_hidden_values.value]"/>[end]
<input type="text" name="search" value="[search_re]" />
<input type="submit" value="Search Files" />
</div>
</form>
[if-any search_re]
<form class="inline" method="get" action="[search_re_action]">
<div class="inline">
[for search_re_hidden_values]<input type="hidden" name="[search_re_hidden_values.name]" value="[search_re_hidden_values.value]"/>[end]
<input type="submit" value="Show all files" />
</div>
</form>
[end]
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[end]
[include "include/pathrev_form.ezt"]
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[files_shown] file[is files_shown "1"][else]s[end] shown
</div>
[include "include/props.ezt"]
<!-- ************************************************************** -->
</div>
[include "include/footer.ezt"]

View File

@@ -0,0 +1,8 @@
/************************************/
/*** ViewVC Help CSS Stylesheet ***/
/************************************/
body { margin: 0.5em; }
img { border: none; }
table { width: 100%; }
td { vertical-align: top; }
col.menu { width:12em; }

View File

@@ -0,0 +1,126 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>ViewVC Help: Directory View</title>
<link rel="stylesheet" href="help.css" type="text/css" />
</head>
<body>
<table>
<col class="menu" />
<col />
<tr>
<td colspan="2">
<h1>ViewVC Help: Directory View</h1>
</td>
</tr>
<tr><td>
<h3>Help</h3>
<a href="help_rootview.html">General</a><br />
<strong>Directory&nbsp;View</strong><br />
<a href="help_log.html">Log&nbsp;View</a><br />
<h3>Internet</h3>
<a href="http://viewvc.org/index.html">Home</a><br />
<a href="http://viewvc.org/upgrading.html">Upgrading</a><br />
<a href="http://viewvc.org/contributing.html">Contributing</a><br />
<a href="http://viewvc.org/license-1.html">License</a><br />
</td><td colspan="2">
<p>The directory listing view should be a familiar sight to any
computer user. It shows the path of the current directory being viewed
at the top of the page. Below that is a table summarizing the
directory contents, and then comes actual contents, a sortable list of
all files and subdirectories inside the current directory.</p>
<p><a name="summary"></a>The summary table is made up of some or all
of the following rows:</p>
<ul>
<li><a name="summary-files-shown"><strong>Files Shown</strong></a>
- Number of files shown in the directory listing. This might be less
than the actual number of files in the directory if a
<a href="#option-search">regular expression search</a> is in place,
hiding files which don't meet the search criteria. In CVS directory
listings, this row will also have a link to toggle display of
<a href="help_rootview.html#dead-files">dead files</a>, if any are
present.</li>
<li><a name="summary-revision"><strong>Directory
Revision</strong></a> - For Subversion directories only.
Shown as "# of #" where the first number is the most recent
repository revision where the directory (or a path underneath it)
was modified. The second number is just the latest repository
revision. Both numbers are links to
<a href="help_rootview.html#view-rev">revision views</a></li>
<li><a name="summary-sticky-revision-tag"><strong>Sticky
Revision/Tag</strong></a> - shows the current
<a href="help_rootview.html#sticky-revision-tag">sticky revision or
tag</a> and contains form fields to set or clear it.</li>
<li><a name="summary-search"><strong>Current Search</strong></a> -
If a <a href="#option-search">regular expression search</a> is in place,
shows the search string.</li>
<li><a name="summary-query"><strong>Query</strong></a> - Provides
a link to a <a href="help_rootview.html#view-query">query form</a>
for the directory</li>
</ul>
<p><a name="list"></a>The actual directory list is a table with
filenames and directory names in one column and information about the
most recent revisions where each file or directory was modified in the
other columns. Column headers can be clicked to sort the directory
entries in order by a column, and clicked again to reverse the sort
order.</p>
<p>
<!-- If using directory.ezt template -->
File names are links to <a href="help_log.html">log views</a>
showing a list of revisions where a file was modified. Revision
numbers are links to either
<a href="help_rootview.html#view-markup">view</a>
or <a href="help_rootview.html#view-checkout">download</a> a file
(depending on its file type). The links are reversed for directories.
Directory revision numbers are links to <a href="help_log.html">log
views</a>, while directory names are links showing the contents of those
directories.
<!-- If using dir_alt.ezt template -->
<!--
File and directory names are links to retrieve their contents.
File links may be either
<a href="help_rootview.html#view-markup">view</a>
or <a href="help_rootview.html#view-download">download</a> links
depending on the file type. Directory links go to directory
listings. Revision numbers are links to <a href="help_log.html">log
views</a> showing lists of revisions where a file or directory was
modified.
-->
Also, in CVS repositories with the <a
href="help_rootview.html#view-graph">graph view</a> enabled, there
will be small icons next to file names which are links to revision
graphs.</p>
<p>Depending on how ViewVC is configured, there may be more options
at the bottom of directory pages:</p>
<ul>
<li><a name="option-search"><strong>Regular expression
search</strong></a> - If enabled, will show a form field accepting
a search string (a
<a href="http://doc.python.org/lib/re-syntax.html">python regular
expression</a>). Once submitted, only files that have at least
one occurance of the expression will show up in directory listings.
</li>
<li><a name="option-tarball"><strong>Tarball download</strong></a> -
If enabled, will show a link to download a gzipped tar archive of
the directory contents.</li>
</ul>
</td></tr></table>
<hr />
<address><a href="mailto:users@viewvc.tigris.org">ViewVC Users Mailinglist</a></address>
</body>
</html>

View File

@@ -0,0 +1,71 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>ViewVC Help: Log View</title>
<link rel="stylesheet" href="help.css" type="text/css" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
</head>
<body>
<table>
<col class="menu" />
<col />
<tr>
<td colspan="2">
<h1>ViewVC Help: Log View</h1>
</td>
</tr>
<tr><td>
<h3>Help</h3>
<a href="help_rootview.html">General</a><br />
<a href="help_dirview.html">Directory&nbsp;View</a><br />
<strong>Log&nbsp;View</strong><br />
<h3>Internet</h3>
<a href="http://viewvc.org/index.html">Home</a><br />
<a href="http://viewvc.org/upgrading.html">Upgrading</a><br />
<a href="http://viewvc.org/contributing.html">Contributing</a><br />
<a href="http://viewvc.org/license-1.html">License</a><br />
</td><td colspan="2">
<p>
The log view displays the revision history of the selected source
file or directory. For each revision the following information is
displayed:
<ul>
<li>The revision number. In Subversion repositories, this is a
link to the <a href="help_rootview.html#view-rev">revision
view</a></li>
<li>For files, links to
<a href="help_rootview.html#view-markup">view</a>,
<a href="help_rootview.html#view-checkout">download</a>, and
<a href="help_rootview.html#view-annotate">annotate</a> the
revision. For directories, a link to
<a href="help_dirview.html">list directory contents</a></li>
<li>A link to select the revision for diffs (see below)</li>
<li>The date and age of the change</li>
<li>The author of the modification</li>
<li>The CVS branch (usually <em>MAIN</em>, if not on a branch)</li>
<li>Possibly a list of CVS tags bound to the revision (if any)</li>
<li>The size of the change measured in added and removed lines of
code. (CVS only)</li>
<li>The size of the file in bytes at the time of the revision
(Subversion only)</li>
<li>Links to view diffs to the previous revision or possibly to
an arbitrary selected revision (if any, see above)</li>
<li>If the revision is the result of a copy, the path and revision
copied from</li>
<li>If the revision precedes a copy or rename, the path at the
time of the revision</li>
<li>And last but not least, the commit log message which should tell
about the reason for the change.</li>
</ul>
<p>
At the bottom of the page you will find a form which allows
to request diffs between arbitrary revisions.
</p>
</td></tr></table>
<hr />
<address><a href="mailto:users@viewvc.tigris.org">ViewVC Users Mailinglist</a></address>
</body>
</html>

View File

@@ -0,0 +1,66 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>ViewVC Help: Query The Commit Database</title>
<link rel="stylesheet" href="help.css" type="text/css" />
</head>
<body>
<table>
<col class="menu" />
<col />
<tr>
<td colspan="2">
<h1>ViewVC Help: Query The Commit Database</h1>
</td>
</tr>
<tr><td>
<h3>Other&nbsp;Help:</h3>
<a href="help_rootview.html">General</a><br />
<a href="help_dirview.html">Directory&nbsp;View</a><br />
<a href="help_log.html">Classic&nbsp;Log&nbsp;View</a><br />
<a href="help_logtable.html">Alternative&nbsp;Log&nbsp;View</a><br />
<strong>Query&nbsp;Database</strong>
<h3>Internet</h3>
<a href="http://viewvc.org/index.html">Home</a><br />
<a href="http://viewvc.org/upgrading.html">Upgrading</a><br />
<a href="http://viewvc.org/contributing.html">Contributing</a><br />
<a href="http://viewvc.org/license-1.html">License</a><br />
</td><td colspan="2">
<p>
Select your parameters for querying the CVS commit database in the
form at the top of the page. You
can search for multiple matches by typing a comma-seperated list
into the text fields. Regular expressions, and wildcards are also
supported. Blank text input fields are treated as wildcards.
</p>
<p>
Any of the text entry fields can take a comma-seperated list of
search arguments. For example, to search for all commits from
authors <em>jpaint</em> and <em>gstein</em>, just type: <code>jpaint,
gstein</code> in the <em>Author</em> input box. If you are searching
for items containing spaces or quotes, you will need to quote your
request. For example, the same search above with quotes is:
<code>"jpaint", "gstein"</code>.
</p>
<p>
Wildcard and regular expression searches are entered in a similar
way to the quoted requests. You must quote any wildcard or
regular expression request, and a command character preceeds the
first quote. The command character <code>l</code>(lowercase L) is for wildcard
searches, and the wildcard character is a percent (<code>%</code>). The
command character for regular expressions is <code>r</code>, and is
passed directly to MySQL, so you'll need to refer to the MySQL
manual for the exact regex syntax. It is very similar to Perl. A
wildard search for all files with a <em>.py</em> extention is:
<code>l"%.py"</code> in the <em>File</em> input box. The same search done
with a regular expression is: <code>r".*\.py"</code>.
</p>
<p>
All search types can be mixed, as long as they are seperated by
commas.
</p>
</td></tr></table>
</body></html>

View File

@@ -0,0 +1,166 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>ViewVC Help: General</title>
<link rel="stylesheet" href="help.css" type="text/css" />
</head>
<body>
<table>
<col class="menu" />
<col />
<tr>
<td colspan="2">
<h1>ViewVC Help: General</h1>
</td>
</tr>
<tr><td>
<h3>Help</h3>
<strong>General</strong><br />
<a href="help_dirview.html">Directory&nbsp;View</a><br />
<a href="help_log.html">Log&nbsp;View</a><br />
<h3>Internet</h3>
<a href="http://viewvc.org/index.html">Home</a><br />
<a href="http://viewvc.org/upgrading.html">Upgrading</a><br />
<a href="http://viewvc.org/contributing.html">Contributing</a><br />
<a href="http://viewvc.org/license-1.html">License</a><br />
</td><td colspan="2">
<p><em>ViewVC</em> is a WWW interface for CVS and Subversion
repositories. It allows you to browse the files and directories in a
repository while showing you metadata from the repository history: log
messages, modification dates, author names, revision numbers, copy
history, and so on. It provides several different views of repository
data to help you find the information you are looking for:</p>
<ul>
<li><a name="view-dir" href="help_dirview.html"><strong>Directory
View</strong></a> - Shows a list of files and subdirectories in a
directory of the repository, along with metadata like author names and
log entries.</li>
<li><a name="view-log" href="help_log.html"><strong>Log
View</strong></a> - Shows a revision by revision list of all the
changes that have made to a file or directory in the repository, with
metadata and links to views of each revision.</li>
<li><a name="view-markup"><strong>File Contents View (Markup
View)</strong></a> - Shows the contents of a file at a particular
revision, with revision information at the top of the page. File
revisions which are GIF, PNG, or JPEG images are displayed inline on
the page. Other file types are displayed as marked up text. The markup
may be limited to turning URLs and email addresses into links, or
configured to show colorized source code.</li>
<li><a name="view-checkout"><strong>File Download (Checkout
View)</strong></a> - Retrieves the unaltered contents of a file
revision. Browsers may try to display the file, or just save it to
disk.</li>
<li><a name="view-annotate"><strong>File Annotate View</strong></a> -
Shows the contents of a file revision and breaks it down line by line,
showing the revision number where each one was last modified, along
with links and other information. <em>This view is disabled in some
ViewVC configurations</em></li>
<li><a name="view-diff"><strong>File Diff View</strong></a> - Shows
the changes made between two revisions of a file</li>
<li><a name="view-tarball"><strong>Directory Tarball View</strong> -
Retrieves a gzipped tar archive containing the contents of a
directory.<em>This view is disabled in the default ViewVC
configuration.</em></li>
<li><a name="view-query"><strong>Directory Query View</strong></a> -
Shows information about changes made to all subdirectories and files
under a parent directory, sorted and filtered by criteria you specify.
<em>This view is disabled in the default ViewVC configuration.</em>
</li>
<li><a name="view-rev"><strong>Revision View</strong> - Shows
information about a revision including log message, author, and a list
of changed paths. <em>For Subversion repositories only.</em></li>
<li><a name="view-graph"><strong>Graph View</strong></a> - Shows a
graphical representation of a file's revisions and branches complete
with tag and author names and links to markup and diff pages.
<em>For CVS repositories only, and disabled in the default
configuration.</em></li>
</ul>
<h3><a name="multiple-repositories">Multiple Repositories</a></h3>
<p>A single installation of ViewVC is often used to provide access to
more than one repository. In these installations, ViewVC shows a
<em>Project Root</em> drop down box in the top right corner of every
generated page to allow for quick access to any repository.</p>
<h3><a name="sticky-revision-tag">Sticky Revision and Tag</a></h3>
<p>By default, ViewVC will show the files and directories and revisions
that currently exist in the repository. But it's also possible to browse
the contents of a repository at a point in its past history by choosing
a "sticky tag" (in CVS) or a "sticky revision" (in Subversion) from the
forms at the top of directory and log pages. They're called sticky
because once they're chosen, they stick around when you navigate to
other pages, until you reset them. When they're set, directory and log
pages only show revisions preceding the specified point in history. In
CVS, when a tag refers to a branch or a revision on a branch, only
revisions from the branch history are shown, including branch points and
their preceding revisions.</p>
<h3><a name="dead-files">Dead Files</a></h3>
<p>In CVS directory listings, ViewVC can optionally display dead files.
Dead files are files which used to be in a directory but are currently
deleted, or files which just don't exist in the currently selected
<a href="#sticky-revision-tag">sticky tag</a>. Dead files cannot be
shown in Subversion repositories. The only way to see a deleted file in
a Subversion directory is to navigate to a sticky revision where the
file previously existed.</p>
<h3><a name="artificial-tags">Artificial Tags</a></h3>
<p>In CVS Repositories, ViewVC adds artificial tags <em>HEAD</em> and
<em>MAIN</em> to tag listings and accepts them in place of revision
numbers and real tag names in all URLs. <em>MAIN</em> acts like a branch
tag pointing at the default branch, while <em>HEAD</em> acts like a
revision tag pointing to the latest revision on the default branch. The
default branch is usually just the trunk, but may be set to other
branches inside individual repository files. CVS will always check out
revisions from a file's default branch when no other branch is specified
on the command line.</p>
<h3><a name="more-information">More Information</a></h3>
<p>More information about <em>ViewVC</em> is available from
<a href="http://viewvc.org/">viewvc.org</a>.
See the links below for guides to CVS and Subversion</p>
<h4>Documentation about CVS</h4>
<blockquote>
<p>
<a href="http://cvsbook.red-bean.com/"><em>Open Source
Development with CVS</em></a><br />
<a href="http://www.loria.fr/~molli/cvs/doc/cvs_toc.html">CVS
User's Guide</a><br />
<a href="http://cellworks.washington.edu/pub/docs/cvs/tutorial/cvs_tutorial_1.html">Another CVS tutorial</a><br />
<a href="http://www.csc.calpoly.edu/~dbutler/tutorials/winter96/cvs/">Yet another CVS tutorial (a little old, but nice)</a><br />
<a href="http://www.cs.utah.edu/dept/old/texinfo/cvs/FAQ.txt">An old but very useful FAQ about CVS</a>
</p>
</blockquote>
<h4>Documentation about Subversion</h3>
<blockquote>
<p>
<a href="http://svnbook.red-bean.com/"><em>Version Control with
Subversion</em></a><br />
</p>
</blockquote>
</td></tr></table>
<hr />
<address><a href="mailto:users@viewvc.tigris.org">ViewVC Users Mailinglist</a></address>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1004 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

@@ -0,0 +1,4 @@
function jumpTo(url)
{
window.location = url;
}

View File

@@ -0,0 +1,332 @@
/*******************************/
/*** ViewVC CSS Stylesheet ***/
/*******************************/
/*** Standard Tags ***/
html, body {
background-color: white;
color: black;
font-family: sans-serif;
font-size: 100%;
margin: 5px;
}
a {
text-decoration: none;
color: rgb(30%,30%,60%);
}
img { border: none; }
table {
width: 100%;
margin: 0;
border: none;
}
td, th {
vertical-align: top;
}
th { white-space: nowrap; }
table.auto {
width: auto;
}
table.fixed {
width: 100%;
table-layout: fixed;
}
table.fixed td {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
form { margin: 0; }
address { font-style: normal; display: inline; }
.inline { display: inline; }
/*** Icons ***/
.vc_icon {
width: 16px;
height: 16px;
border: none;
padding: 0 1px;
}
#vc_header {
padding: 0 0 10px 0;
border-bottom: 10px solid #94bd5e;
}
#vc_footer {
text-align: right;
font-size: 85%;
padding: 10px 0 0 0;
border-top: 10px solid #94bd5e;
}
#vc_topmatter {
float: right;
text-align: right;
font-size: 85%;
}
#vc_current_path {
color: rgb(50%,50%,50%);
padding: 10px 0;
font-size: 140%;
font-weight: bold;
}
#vc_current_path a {
color: rgb(60%,60%,60%);
}
#vc_current_path a:hover {
background-color: rgb(90%,90%,90%);
}
#vc_current_path .thisitem {
color: #94bd5e;
}
#vc_current_path .pathdiv {
padding: 0 0.1em;
}
#vc_view_selection_group {
background: black;
color: white;
margin: 0 0 5px 0;
padding: 5px;
text-align: right;
}
#vc_view_selection_group a {
padding: 5px;
font-size: 100%;
color: white;
text-decoration: none;
}
#vc_view_selection_group a.vc_view_link_this, #vc_view_selection_group a.vc_view_link:hover {
color: #94bd5e;
}
#vc_view_selection_group a:hover {
background-color: black;
}
#vc_view_main {
border-top: 1px solid black;
border-bottom: 1px solid black;
}
#vc_togglables {
text-align: right;
font-size: 85%;
}
#vc_main_body {
background: white;
padding: 5px 0 20px 0;
}
#vc_view_summary {
font-size: 85%;
text-align: right;
margin-top: 5px;
}
/*** Table Headers ***/
.vc_header, .vc_header_sort {
text-align: left;
vertical-align: top;
border-bottom: 1px solid black;
background-color: rgb(80%,80%,80%);
}
.vc_header_sort {
background-color: rgb(85%,85%,85%);
}
/*** Table Rows ***/
.vc_row_even {
background-color: rgb(95%,95%,95%);
}
.vc_row_odd {
background-color: rgb(90%,90%,90%);
}
/*** Directory View ***/
#dirlist td, #dirlist th {
padding: 0.2em;
vertical-align: middle;
}
#dirlist tr:hover {
background-color: white;
}
/*** Log messages ***/
.vc_log {
/* unfortunately, white-space: pre-wrap isn't widely supported ... */
white-space: -moz-pre-wrap; /* Mozilla based browsers */
white-space: -pre-wrap; /* Opera 4 - 6 */
white-space: -o-pre-wrap; /* Opera >= 7 */
white-space: pre-wrap; /* CSS3 */
word-wrap: break-word; /* IE 5.5+ */
}
/*** Properties Listing ***/
.vc_properties {
margin: 1em 0;
}
.vc_properties h2 {
font-size: 115%;
}
.vc_properties td, .vc_properties th {
padding: 0.2em;
}
/*** File Content Markup Styles ***/
.vc_summary {
background-color: #eeeeee;
}
#vc_file td {
border-right-style: solid;
border-right-color: #505050;
text-decoration: none;
font-weight: normal;
font-style: normal;
padding: 1px 5px;
}
.vc_file_line_number {
border-right-width: 1px;
background-color: #eeeeee;
color: #505050;
text-align: right;
}
.vc_file_line_author, .vc_file_line_rev {
border-right-width: 1px;
text-align: right;
}
.vc_file_line_text {
border-right-width: 0px;
background-color: white;
font-family: monospace;
text-align: left;
white-space: pre;
width: 100%;
}
.pygments-c { color: #408080; font-style: italic } /* Comment */
.pygments-err { border: 1px solid #FF0000 } /* Error */
.pygments-k { color: #008000; font-weight: bold } /* Keyword */
.pygments-o { color: #666666 } /* Operator */
.pygments-cm { color: #408080; font-style: italic } /* Comment.Multiline */
.pygments-cp { color: #BC7A00 } /* Comment.Preproc */
.pygments-c1 { color: #408080; font-style: italic } /* Comment.Single */
.pygments-cs { color: #408080; font-style: italic } /* Comment.Special */
.pygments-gd { color: #A00000 } /* Generic.Deleted */
.pygments-ge { font-style: italic } /* Generic.Emph */
.pygments-gr { color: #FF0000 } /* Generic.Error */
.pygments-gh { color: #000080; font-weight: bold } /* Generic.Heading */
.pygments-gi { color: #00A000 } /* Generic.Inserted */
.pygments-go { color: #808080 } /* Generic.Output */
.pygments-gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.pygments-gs { font-weight: bold } /* Generic.Strong */
.pygments-gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.pygments-gt { color: #0040D0 } /* Generic.Traceback */
.pygments-kc { color: #008000; font-weight: bold } /* Keyword.Constant */
.pygments-kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
.pygments-kp { color: #008000 } /* Keyword.Pseudo */
.pygments-kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
.pygments-kt { color: #B00040 } /* Keyword.Type */
.pygments-m { color: #666666 } /* Literal.Number */
.pygments-s { color: #BA2121 } /* Literal.String */
.pygments-na { color: #7D9029 } /* Name.Attribute */
.pygments-nb { color: #008000 } /* Name.Builtin */
.pygments-nc { color: #0000FF; font-weight: bold } /* Name.Class */
.pygments-no { color: #880000 } /* Name.Constant */
.pygments-nd { color: #AA22FF } /* Name.Decorator */
.pygments-ni { color: #999999; font-weight: bold } /* Name.Entity */
.pygments-ne { color: #D2413A; font-weight: bold } /* Name.Exception */
.pygments-nf { color: #0000FF } /* Name.Function */
.pygments-nl { color: #A0A000 } /* Name.Label */
.pygments-nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
.pygments-nt { color: #008000; font-weight: bold } /* Name.Tag */
.pygments-nv { color: #19177C } /* Name.Variable */
.pygments-ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
.pygments-w { color: #bbbbbb } /* Text.Whitespace */
.pygments-mf { color: #666666 } /* Literal.Number.Float */
.pygments-mh { color: #666666 } /* Literal.Number.Hex */
.pygments-mi { color: #666666 } /* Literal.Number.Integer */
.pygments-mo { color: #666666 } /* Literal.Number.Oct */
.pygments-sb { color: #BA2121 } /* Literal.String.Backtick */
.pygments-sc { color: #BA2121 } /* Literal.String.Char */
.pygments-sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
.pygments-s2 { color: #BA2121 } /* Literal.String.Double */
.pygments-se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
.pygments-sh { color: #BA2121 } /* Literal.String.Heredoc */
.pygments-si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
.pygments-sx { color: #008000 } /* Literal.String.Other */
.pygments-sr { color: #BB6688 } /* Literal.String.Regex */
.pygments-s1 { color: #BA2121 } /* Literal.String.Single */
.pygments-ss { color: #19177C } /* Literal.String.Symbol */
.pygments-bp { color: #008000 } /* Name.Builtin.Pseudo */
.pygments-vc { color: #19177C } /* Name.Variable.Class */
.pygments-vg { color: #19177C } /* Name.Variable.Global */
.pygments-vi { color: #19177C } /* Name.Variable.Instance */
.pygments-il { color: #666666 } /* Literal.Number.Integer.Long */
/*** Diff Styles ***/
.vc_diff_plusminus { width: 1em; }
.vc_diff_remove, .vc_diff_add, .vc_diff_changes1, .vc_diff_changes2 {
font-family: monospace;
white-space: pre;
}
.vc_diff_remove { background: rgb(100%,60%,60%); }
.vc_diff_add { background: rgb(60%,100%,60%); }
.vc_diff_changes1 { background: rgb(100%,100%,70%); color: rgb(50%,50%,50%); text-decoration: line-through; }
.vc_diff_changes2 { background: rgb(100%,100%,0%); }
.vc_diff_nochange, .vc_diff_binary, .vc_diff_error {
font-family: sans-serif;
font-size: smaller;
}
/*** Intraline Diff Styles ***/
.vc_idiff_add {
background-color: #aaffaa;
}
.vc_idiff_change {
background-color:#ffff77;
}
.vc_idiff_remove {
background-color:#ffaaaa;
}
.vc_idiff_empty {
background-color:#e0e0e0;
}
table.vc_idiff col.content {
width: 50%;
}
table.vc_idiff tbody {
font-family: monospace;
/* unfortunately, white-space: pre-wrap isn't widely supported ... */
white-space: -moz-pre-wrap; /* Mozilla based browsers */
white-space: -pre-wrap; /* Opera 4 - 6 */
white-space: -o-pre-wrap; /* Opera >= 7 */
white-space: pre-wrap; /* CSS3 */
word-wrap: break-word; /* IE 5.5+ */
}
table.vc_idiff tbody th {
background-color:#e0e0e0;
text-align:right;
}
/*** Query Form ***/
.vc_query_form {
}

View File

@@ -0,0 +1,51 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- ViewVC :: http://www.viewvc.org/ -->
<head>
<title>ViewVC Exception</title>
</head>
<body>
<h3>An Exception Has Occurred</h3>
[if-any msg]
<p>[msg]</p>
[end]
[if-any status]
<h4>HTTP Response Status</h4>
<p><pre>[status]</pre></p>
<hr />
[end]
[if-any msg][else]
<h4>Python Traceback</h4>
<p><pre>
[stacktrace]
</pre></p>
[end]
[# Here follows a bunch of space characters, present to ensure that
our error message is larger than 512 bytes so that IE's "Friendly
Error Message" won't show. For more information, see
http://oreillynet.com/onjava/blog/2002/09/internet_explorer_subverts_err.html]
</body>
</html>

View File

@@ -0,0 +1,61 @@
[# setup page definitions]
[define page_title]Annotation of:[end]
[define help_href][docroot]/help_rootview.html[end]
[# end]
[include "include/header.ezt" "annotate"]
[include "include/fileview.ezt"]
<div id="vc_main_body">
<!-- ************************************************************** -->
[define last_rev]0[end]
[define rowclass]vc_row_odd[end]
[if-any lines]
<div id="vc_file">
<table cellspacing="0" cellpadding="0">
<tr>
<th class="vc_header">Line</th>
[is annotation "annotated"]
<th class="vc_header">User</th>
<th class="vc_header">Rev</th>
[end]
<th class="vc_header">File contents</th>
</tr>
[for lines]
[is lines.rev last_rev]
[else]
[is rowclass "vc_row_even"]
[define rowclass]vc_row_odd[end]
[else]
[define rowclass]vc_row_even[end]
[end]
[end]
<tr class="[rowclass]" id="l[lines.line_number]">
<td class="vc_file_line_number">[lines.line_number]</td>
[is annotation "annotated"]
<td class="vc_file_line_author">[is lines.rev last_rev]&nbsp;[else][lines.author][end]</td>
<td class="vc_file_line_rev">[is lines.rev last_rev]&nbsp;[else][if-any lines.diff_href]<a href="[lines.diff_href]">[end][lines.rev][if-any lines.diff_href]</a>[end][end]</td>
[end]
<td class="vc_file_line_text">[lines.text]</td>
</tr>
[define last_rev][lines.rev][end]
[end]
</table>
</div>
[else]
[if-any image_src_href]
<div id="vc_file_image">
<img src="[image_src_href]" alt="" />
</div>
[end]
[end]
[include "include/props.ezt"]
<!-- ************************************************************** -->
</div>
[include "include/footer.ezt"]

View File

@@ -0,0 +1,15 @@
[# setup page definitions]
[define page_title]Graph of:[end]
[define help_href][docroot]/help_rootview.html[end]
[# end]
[include "include/header.ezt" "graph"]
<div style="text-align:center;">
[imagemap]
<img usemap="#MyMapName"
src="[imagesrc]"
alt="Revisions of [where]" />
</div>
[include "include/footer.ezt"]

View File

@@ -0,0 +1,70 @@
<div style="border-bottom: solid 1px black;">
<p id="diff">This form allows you to request diffs between any two
revisions of this file.
For each of the two "sides" of the diff,
[if-any tags]
select a symbolic revision name using the selection box, or choose
'Use Text Field' and enter a numeric revision.
[else]
enter a numeric revision.
[end]
</p>
<form method="get" action="[diff_select_action]" id="diff_select">
<table cellpadding="2" cellspacing="0" class="auto">
<tr>
<td>&nbsp;</td>
<td>
[for diff_select_hidden_values]<input type="hidden" name="[diff_select_hidden_values.name]" value="[diff_select_hidden_values.value]"/>[end]
Diffs between
[if-any tags]
<select name="r1">
<option value="text" selected="selected">Use Text Field</option>
[for tags]
<option value="[tags.rev]:[tags.name]">[tags.name]</option>
[end]
</select>
<input type="text" size="12" name="tr1"
value="[if-any rev_selected][rev_selected][else][first_revision][end]"
onchange="document.getElementById('diff_select').r1.selectedIndex=0" />
[else]
<input type="text" size="12" name="r1"
value="[if-any rev_selected][rev_selected][else][first_revision][end]" />
[end]
and
[if-any tags]
<select name="r2">
<option value="text" selected="selected">Use Text Field</option>
[for tags]
<option value="[tags.rev]:[tags.name]">[tags.name]</option>
[end]
</select>
<input type="text" size="12" name="tr2"
value="[last_revision]"
onchange="document.getElementById('diff_select').r2.selectedIndex=0" />
[else]
<input type="text" size="12" name="r2" value="[last_revision]" />
[end]
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
Type of Diff should be a
<select name="diff_format" onchange="submit()">
<option value="h" [is diff_format "h"]selected="selected"[end]>Colored Diff</option>
<option value="l" [is diff_format "l"]selected="selected"[end]>Long Colored Diff</option>
<option value="f" [is diff_format "f"]selected="selected"[end]>Full Colored Diff</option>
<option value="u" [is diff_format "u"]selected="selected"[end]>Unidiff</option>
<option value="c" [is diff_format "c"]selected="selected"[end]>Context Diff</option>
<option value="s" [is diff_format "s"]selected="selected"[end]>Side by Side</option>
</select>
<input type="submit" value=" Get Diffs " />
</td>
</tr>
</table>
</form>
</div>

View File

@@ -0,0 +1,74 @@
<table class="auto">
<tr>
<td>Revision:</td>
<td><strong>[if-any revision_href]<a href="[revision_href]">[rev]</a>[else][rev][end]</strong> [if-any vendor_branch] <em>(vendor branch)</em>[end]</td>
</tr>
<tr>
<tr>
<td>Committed:</td>
<td>[if-any date]<em>[date]</em> [end][if-any ago]([ago] ago) [end][if-any author]by <em>[author]</em>[end]</td>
</tr>
[if-any orig_path]
<tr>
<td>Original Path:</td>
<td><strong><a href="[orig_href]"><em>[orig_path]</em></a></strong></td>
</tr>
[end]
[if-any branches]
<tr>
<td>Branch:</td>
<td><strong>[branches]</strong></td>
</tr>
[end]
[if-any tags]
<tr>
<td>CVS Tags:</td>
<td><strong>[tags]</strong></td>
</tr>
[end]
[if-any branch_points]
<tr>
<td>Branch point for:</td>
<td><strong>[branch_points]</strong></td>
</tr>
[end]
[is roottype "cvs"][if-any changed]
<tr>
<td>Changes since <strong>[prev]</strong>:</td>
<td><strong>[changed] lines</strong></td>
</tr>
[end][end]
[is roottype "svn"][if-any size]
<td>File size:</td>
<td>[size] byte(s)</td>
</tr>
[end][end]
[if-any lockinfo]
<td>Lock status:</td>
<td>[lockinfo]</td>
[end]
[is state "dead"]
<tr>
<td>State:</td>
<td><strong><em>FILE REMOVED</em></strong></td>
</tr>
[end]
[if-any annotation]
[is annotation "binary"]
<tr>
<td colspan="2"><strong>Unable to calculate annotation data on binary file contents.</strong></td>
</tr>
[end]
[is annotation "error"]
<tr>
<td colspan="2"><strong>Error occurred while calculating annotation data.</strong></td>
</tr>
[end]
[end]
[if-any log]
<tr>
<td>Log Message:</td>
<td><pre class="vc_log">[log]</span></td>
</tr>
[end]
</table>

View File

@@ -0,0 +1,10 @@
</div> <!-- vc_view_main -->
<div id="vc_footer">
[if-any cfg.general.address]Administered by <address><a href="mailto:[cfg.general.address]">[cfg.general.address]</a></address><br/>[end]
Powered by <a href="http://viewvc.tigris.org/">ViewVC [vsn]</a>
[if-any rss_href]<br/><a href="[rss_href]" title="RSS 2.0 feed"><img src="[docroot]/images/feed-icon-16x16.jpg" class="vc_icon" alt="RSS 2.0 feed" /></a>[else]&nbsp;[end]
</div>
</body>
</html>

View File

@@ -0,0 +1,63 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- ViewVC :: http://www.viewvc.org/ -->
<head>
<title>[[]ViewVC] [page_title] [if-any rootname][rootname][if-any where]/[where][end][end]</title>
<meta name="generator" content="ViewVC [vsn]" />
<link rel="stylesheet" href="[docroot]/styles.css" type="text/css" />
<script src="[docroot]/scripts.js"></script>
[if-any rss_href]
<link rel="alternate" type="application/rss+xml" href="[rss_href]" title="ViewVC RSS: [if-any rootname][rootname][if-any where]/[where][end][end]">
[end]
</head>
<body>
<div id="vc_header">
<div id="vc_topmatter">
[if-any username]Logged in as: <strong>[username]</strong> |[end]
<a href="[help_href]">ViewVC Help</a>
</div>
<div id="vc_logo">
<a href="http://www.viewvc.org/"><img src="[docroot]/images/viewvc-logo.png" alt="ViewVC logotype" width="240" height="70" /></a>
</div>
<div id="vc_view_selection_group">
[is pathtype "dir"]
<a class="vc_view_link[is view "dir"]_this[end]" href="[view_href]">View Directory</a>
[if-any log_href]
| <a class="vc_view_link[is view "log"]_this[end]" href="[log_href]">Revision Log</a>
[end]
[if-any queryform_href]
| <a class="vc_view_link[is view "queryform"]_this[end]" href="[queryform_href]">Commit Query</a>
[end]
[if-any tarball_href]
| <a class="vc_view_link" href="[tarball_href]">Download Tarball</a>
[end]
[end]
[is pathtype "file"]
<a class="vc_view_link[is view "markup"]_this[end]" href="[view_href]">View File</a>
| <a class="vc_view_link[is view "log"]_this[end]" href="[log_href]">Revision Log</a>
| <a class="vc_view_link[is view "annotate"]_this[end]" href="[annotate_href]">Show Annotations</a>
[if-any graph_href]
| <a class="vc_view_link[is view "graph"]_this[end]" href="[graph_href]">Revision Graph</a>
[end]
| <a class="vc_view_link" href="[download_href]">Download File</a>
[end]
[if-any revision_href]
| <a class="vc_view_link[is view "revision"]_this[end]" href="[revision_href]">View Changeset</a>
[end]
| <a class="vc_view_link[is view "roots"]_this[end]" href="[roots_href]">Root Listing</a>
</div>
<div id="vc_current_path">
[if-any roots_href]<a href="[roots_href]">root</a>[end][if-any nav_path]<span class="pathdiv">/</span>[for nav_path][if-any nav_path.href]<a href="[nav_path.href]">[end][if-index nav_path last]<span class="thisitem">[end][nav_path.name][if-index nav_path last]</span>[end][if-any nav_path.href]</a>[end][if-index nav_path last][else]<span class="pathdiv">/</span>[end][end][end]
</div>
</div> <!-- vc_header -->
<div id="vc_view_main">

View File

@@ -0,0 +1,53 @@
<form method="get" action="[pathrev_action]" style="display: inline">
<div style="display: inline">
[for pathrev_hidden_values]<input type="hidden" name="[pathrev_hidden_values.name]" value="[pathrev_hidden_values.value]"/>[end]
[is roottype "cvs"]
[define pathrev_selected][pathrev][end]
<select name="pathrev" onchange="submit()">
<option value=""></option>
[if-any branch_tags]
<optgroup label="Branches">
[for branch_tags]
[is branch_tags pathrev]
<option selected>[branch_tags]</option>
[define pathrev_selected][end]
[else]
<option>[branch_tags]</option>
[end]
[end]
</optgroup>
[end]
<optgroup label="Non-branch tags">
[for plain_tags]
[is plain_tags pathrev]
<option selected>[plain_tags]</option>
[define pathrev_selected][end]
[else]
<option>[plain_tags]</option>
[end]
[end]
</optgroup>
[if-any pathrev_selected]
<option selected>[pathrev_selected]</option>
[end]
</select>
[else]
<input type="text" name="pathrev" value="[pathrev]" size="6"/>
[end]
<input type="submit" value="Set Sticky [is roottype "cvs"]Tag[else]Revision[end]" />
</div>
</form>
[if-any pathrev]
<form method="get" action="[pathrev_clear_action]" style="display: inline">
<div style="display: inline">
[for pathrev_clear_hidden_values]<input type="hidden" name="[pathrev_clear_hidden_values.name]" value="[pathrev_clear_hidden_values.value]"/>[end]
[if-any lastrev]
[is pathrev lastrev][else]<input type="submit" value="Set to [lastrev]" />[end]
(<i>Current path doesn't exist after revision <strong>[lastrev]</strong></i>)
[else]
<input type="submit" value="Clear" />
[end]
</div>
</form>
[end]

View File

@@ -0,0 +1,26 @@
[if-any properties]
<hr/>
<div class="vc_properties">
<h2>Properties</h2>
<table cellspacing="2" class="fixed">
<thead>
<tr>
<th class="vc_header_sort" style="width: 200px;">Name</th>
<th class="vc_header">Value</th>
</tr>
</thead>
<tbody>
[for properties]
<tr class="vc_row_[if-index properties even]even[else]odd[end]">
<td><strong>[properties.name]</strong></td>
[if-any properties.undisplayable]
<td><em>Property value is undisplayable.</em></td>
[else]
<td style="white-space: pre;">[properties.value]</td>
[end]
</tr>
[end]
</tbody>
</table>
</div>
[end]

View File

@@ -0,0 +1,247 @@
[# setup page definitions]
[define page_title]Log of:[end]
[define help_href][docroot]/help_log.html[end]
[# end]
[include "include/header.ezt" "log"]
<table class="auto">
[if-any default_branch]
<tr>
<td>Default branch:</td>
<td>[for default_branch]<a href="[default_branch.href]">[default_branch.name]</a>[if-index default_branch last][else], [end]
[end]</td>
</tr>
[end]
[is pathtype "file"]
[if-any view_href]
<tr>
<td>Links to HEAD:</td>
<td>
(<a href="[view_href]">view</a>)
[if-any download_href](<a href="[download_href]">download</a>)[end]
[if-any download_text_href](<a href="[download_text_href]">as text</a>)[end]
[if-any annotate_href](<a href="[annotate_href]">annotate</a>)[end]
</td>
</tr>
[end]
[if-any tag_view_href]
<tr>
<td>Links to [pathrev]:</td>
<td>
(<a href="[tag_view_href]">view</a>)
[if-any tag_download_href](<a href="[tag_download_href]">download</a>)[end]
[if-any tag_download_text_href](<a href="[tag_download_text_href]">as text</a>)[end]
[if-any tag_annotate_href](<a href="[tag_annotate_href]">annotate</a>)[end]
</td>
</tr>
[end]
[end]
<tr>
<td>Sticky [is roottype "cvs"]Tag[else]Revision[end]:</td>
<td>[include "include/pathrev_form.ezt"]</td>
</tr>
[is cfg.options.use_pagesize "0"][else][is picklist_len "1"][else]
<tr>
<td>Jump to page:</td>
<td><form method="get" action="[log_paging_action]">
[for log_paging_hidden_values]<input type="hidden" name="[log_paging_hidden_values.name]" value="[log_paging_hidden_values.value]"/>[end]
<select name="log_pagestart" onchange="submit()">
[for picklist]
[if-any picklist.more]
<option [is picklist.count log_pagestart]selected[end] value="[picklist.count]">Page [picklist.page]: [picklist.start] ...</option>
[else]
<option [is picklist.count log_pagestart]selected[end] value="[picklist.count]">Page [picklist.page]: [picklist.start] - [picklist.end]</option>
[end]
[end]
</select>
<input type="submit" value="Go" />
</form>
</td>
</tr>
[end][end]
<tr>
<td>Sort logs by:</td>
<td><form method="get" action="[logsort_action]">
<div>
<a name="logsort"></a>
[for logsort_hidden_values]<input type="hidden" name="[logsort_hidden_values.name]" value="[logsort_hidden_values.value]"/>[end]
<select name="logsort" onchange="submit()">
<option value="cvs" [is logsort "cvs"]selected="selected"[end]>Not sorted</option>
<option value="date" [is logsort "date"]selected="selected"[end]>Commit date</option>
<option value="rev" [is logsort "rev"]selected="selected"[end]>Revision</option>
</select>
<input type="submit" value=" Sort " />
</div>
</form>
</td>
</tr>
</table>
<div id="vc_main_body">
<!-- ************************************************************** -->
[define first_revision][end]
[define last_revision][end]
[for entries]
[if-index entries first][define first_revision][entries.rev][end][end]
[if-index entries last]
[define last_revision][entries.rev][end]
<div>
[else]
<div style="border-bottom: 1px dotted black">
[end]
[is entries.state "dead"]
Revision <strong>[entries.rev]</strong>
[else]
<a name="rev[entries.rev]"></a>
[for entries.tag_names]<a name="[entries.tag_names]"></a>
[end]
[for entries.branch_names]<a name="[entries.branch_names]"></a>
[end]
Revision [is roottype "svn"]<a href="[entries.revision_href]"><strong>[entries.rev]</strong></a>[else]<strong>[entries.rev]</strong>[end] -
[if-any entries.view_href]
[is pathtype "file"]
(<a href="[entries.view_href]">view</a>)
[else]
<a href="[entries.view_href]">Directory Listing</a>
[end]
[end]
[if-any entries.download_href](<a href="[entries.download_href]">download</a>)[end]
[if-any entries.download_text_href](<a href="[entries.download_text_href]">as text</a>)[end]
[if-any entries.annotate_href](<a href="[entries.annotate_href]">annotate</a>)[end]
[is pathtype "file"]
[# if you don't want to allow select for diffs then remove this section]
[is entries.rev rev_selected]
- <strong>[[]selected]</strong>
[else]
- <a href="[entries.sel_for_diff_href]">[[]select for diffs]</a>
[end]
[end]
[end]
[if-any entries.vendor_branch]
<em>(vendor branch)</em>
[end]
<br />
[is roottype "svn"]
[if-index entries last]Added[else]Modified[end]
[end]
<em>[if-any entries.date][entries.date][else](unknown date)[end]</em>
[if-any entries.ago]([entries.ago] ago)[end]
by <em>[if-any entries.author][entries.author][else](unknown author)[end]</em>
[if-any entries.orig_path]
<br />Original Path: <a href="[entries.orig_href]"><em>[entries.orig_path]</em></a>
[end]
[if-any entries.branches]
<br />Branch:
[for entries.branches]
<a href="[entries.branches.href]"><strong>[entries.branches.name]</strong></a>[if-index entries.branches last][else],[end]
[end]
[end]
[if-any entries.tags]
<br />CVS Tags:
[for entries.tags]
<a href="[entries.tags.href]"><strong>[entries.tags.name]</strong></a>[if-index entries.tags last][else],[end]
[end]
[end]
[if-any entries.branch_points]
<br />Branch point for:
[for entries.branch_points]
<a href="[entries.branch_points.href]"><strong>[entries.branch_points.name]</strong></a>[if-index entries.branch_points last][else],[end]
[end]
[end]
[if-any entries.prev]
[if-any entries.changed]
[is roottype "cvs"]
<br />Changes since <strong>[entries.prev]: [entries.changed] lines</strong>
[end]
[end]
[end]
[if-any entries.lockinfo]
<br />Lock status: [entries.lockinfo]
[end]
[is roottype "svn"]
[if-any entries.size]
<br />File length: [entries.size] byte(s)
[end]
[if-any entries.copy_path]
<br />Copied from: <a href="[entries.copy_href]"><em>[entries.copy_path]</em></a> revision [entries.copy_rev]
[end]
[end]
[is entries.state "dead"]
<br /><strong><em>FILE REMOVED</em></strong>
[else]
[is pathtype "file"]
[if-any entries.prev]
<br />Diff to <a href="[entries.diff_to_prev_href]">previous [entries.prev]</a>
[if-any human_readable]
[else]
(<a href="[entries.diff_to_prev_href]&amp;diff_format=h">colored</a>)
[end]
[end]
[is roottype "cvs"]
[if-any entries.branch_point]
, to <a href="[entries.diff_to_branch_href]">branch point [entries.branch_point]</a>
[if-any human_readable]
[else]
(<a href="[entries.diff_to_branch_href]&amp;diff_format=h">colored</a>)
[end]
[end]
[if-any entries.next_main]
, to <a href="[entries.diff_to_main_href]">next main [entries.next_main]</a>
[if-any human_readable]
[else]
(<a href="[entries.diff_to_main_href]&amp;diff_format=h">colored</a>)
[end]
[end]
[end]
[if-any entries.diff_to_sel_href]
[if-any entries.prev], [else]<br />Diff[end]
to <a href="[entries.diff_to_sel_href]">selected [rev_selected]</a>
[if-any human_readable]
[else]
(<a href="[entries.diff_to_sel_href]&amp;diff_format=h">colored</a>)
[end]
[end]
[end]
[end]
<pre class="vc_log">[entries.log]</pre>
</div>
[end]
<!-- ************************************************************** -->
</div>
[is pathtype "file"]
[include "include/diff_form.ezt"]
[end]
[include "include/footer.ezt"]

View File

@@ -0,0 +1,18 @@
[# setup page definitions]
[define page_title]View of:[end]
[define help_href][docroot]/help_rootview.html[end]
[# end]
[include "include/header.ezt" "markup"]
[include "include/fileview.ezt"]
<div id="vc_main_body">
<!-- ************************************************************** -->
<div id="vc_markup"><pre>[markup]</pre></div>
[include "include/props.ezt"]
<!-- ************************************************************** -->
</div>
[include "include/footer.ezt"]

View File

@@ -0,0 +1,241 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- ViewVC :: http://www.viewvc.org/ -->
<head>
<title>Checkin Database Query</title>
<link rel="stylesheet" href="[docroot]/styles.css" type="text/css" />
</head>
<body>
[# setup page definitions]
[define help_href][docroot]/help_query.html[end]
[# end]
<p>
Select your parameters for querying the CVS commit database. You
can search for multiple matches by typing a comma-seperated list
into the text fields. Regular expressions, and wildcards are also
supported. Blank text input fields are treated as wildcards.
</p>
<p>
Any of the text entry fields can take a comma-seperated list of
search arguments. For example, to search for all commits from
authors <em>jpaint</em> and <em>gstein</em>, just type: <strong>jpaint,
gstein</strong> in the <em>Author</em> input box. If you are searching
for items containing spaces or quotes, you will need to quote your
request. For example, the same search above with quotes is:
<strong>"jpaint", "gstein"</strong>.
</p>
<p>
Wildcard and regular expression searches are entered in a similar
way to the quoted requests. You must quote any wildcard or
regular expression request, and a command charactor preceeds the
first quote. The command charactor <strong>l</strong> is for wildcard
searches, and the wildcard charactor is a percent (<strong>%</strong>). The
command charactor for regular expressions is <strong>r</strong>, and is
passed directly to MySQL, so you'll need to refer to the MySQL
manual for the exact regex syntax. It is very similar to Perl. A
wildard search for all files with a <em>.py</em> extention is:
<strong>l"%.py"</strong> in the <em>File</em> input box. The same search done
with a regular expression is: <strong>r".*\.py"</strong>.
</p>
<p>
All search types can be mixed, as long as they are seperated by
commas.
</p>
<form method="get" action="">
<div class="vc_query_form">
<table cellspacing="0" cellpadding="2" class="auto">
<tr>
<td>
<table>
<tr>
<td style="vertical-align:top;">
<table>
<tr>
<td align="right">CVS Repository:</td>
<td>
<input type="text" name="repository" size="40" value="[repository]" />
</td>
</tr>
<tr>
<td align="right">CVS Branch:</td>
<td>
<input type="text" name="branch" size="40" value="[branch]" />
</td>
</tr>
<tr>
<td align="right">Directory:</td>
<td>
<input type="text" name="directory" size="40" value="[directory]" />
</td>
</tr>
<tr>
<td align="right">File:</td>
<td>
<input type="text" name="file" size="40" value="[file]" />
</td>
</tr>
<tr>
<td align="right">Author:</td>
<td>
<input type="text" name="who" size="40" value="[who]" />
</td>
</tr>
</table>
</td>
<td style="vertical-align:top;">
<table>
<tr>
<td align="left">Sort By:</td>
<td>
<select name="sortby">
<option value="date" [is sortby "date"]selected="selected"[end]>Date</option>
<option value="author" [is sortby "author"]selected="selected"[end]>Author</option>
<option value="file" [is sortby "file"]selected="selected"[end]>File</option>
</select>
</td>
</tr>
<tr>
<td colspan="2">
<table cellspacing="0" cellpadding="0">
<tr>
<td>Date:</td>
</tr>
<tr>
<td><input type="radio" name="date" value="hours"
[is date "hours"]checked="checked"[end] /></td>
<td>In the last
<input type="text" name="hours" value="[hours]" size="4" />hours
</td>
</tr>
<tr>
<td><input type="radio" name="date" value="day"
[is date "day"]checked="checked"[end] /></td>
<td>In the last day</td>
</tr>
<tr>
<td><input type="radio" name="date" value="week"
[is date "week"]checked="checked"[end] /></td>
<td>In the last week</td>
</tr>
<tr>
<td><input type="radio" name="date" value="month"
[is date "month"]checked="checked"[end] /></td>
<td>In the last month</td>
</tr>
<tr>
<td><input type="radio" name="date" value="all"
[is date "all"]checked="checked"[end] /></td>
<td>Since the beginning of time</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td>
<input type="submit" value="Search" />
</td>
</tr>
</table>
</div>
</form>
[is query "skipped"]
[else]
<p><strong>[num_commits]</strong> matches found.</p>
[if-any commits]
<table cellspacing="0" cellpadding="2">
<thead>
<tr class="vc_header">
<th>Revision</th>
<th>File</th>
<th>Branch</th>
<th>+/-</th>
<th>Date</th>
<th>Author</th>
[# uncommment, if you want a separate Description column: (also see below)
<th>Description</th>
]
</tr>
</thead>
[for commits]
<tbody>
[for commits.files]
<tr class="vc_row_[if-index commits even]even[else]odd[end]">
<td style="vertical-align:top;">
[if-any commits.files.rev][commits.files.rev][else]&nbsp;[end]
</td>
<td style="vertical-align:top;">[commits.files.link]</td>
<td style="vertical-align:top;">
[if-any commits.files.branch][commits.files.branch][else]&nbsp;[end]
</td>
<td style="vertical-align:top;">
[is commits.files.type "Add"]<ins>[end]
[is commits.files.type "Change"]<a href="[commits.files.difflink]">[end]
[is commits.files.type "Remove"]<del>[end]
[commits.files.plus]/[commits.files.minus]
[is commits.files.type "Add"]</ins>[end]
[is commits.files.type "Change"]</a>[end]
[is commits.files.type "Remove"]</del>[end]
</td>
<td style="vertical-align:top;">
[if-any commits.files.date][commits.files.date][else]&nbsp;[end]
</td>
<td style="vertical-align:top;">
[if-any commits.files.author][commits.files.author][else]&nbsp;[end]
</td>
[# uncommment, if you want a separate Description column:
{if-index commits.files first{
<td style="vertical-align:top;" rowspan="{commits.num_files}">
{commits.log}
</td>
{end}
(substitute brackets for the braces)
]
</tr>
[# and also take the following out in the "Description column"-case:]
[if-index commits.files last]
<tr class="vc_row_[if-index commits even]even[else]odd[end]">
<td>&nbsp;</td>
<td colspan="5"><strong>Log:</strong><br />
<pre class="vc_log">[commits.log]</pre></td>
</tr>
[end]
[# ---]
[end]
</tbody>
[end]
<tr class="vc_header">
<th style="text-align:left;vertical-align:top;">&nbsp;</th>
<th style="text-align:left;vertical-align:top;">&nbsp;</th>
<th style="text-align:left;vertical-align:top;">&nbsp;</th>
<th style="text-align:left;vertical-align:top;">&nbsp;</th>
<th style="text-align:left;vertical-align:top;">&nbsp;</th>
<th style="text-align:left;vertical-align:top;">&nbsp;</th>
[# uncommment, if you want a separate Description column:
<th style="text-align:left;vertical-align:top;">&nbsp;</th>
]
</tr>
</table>
[end]
[end]
[include "include/footer.ezt"]

View File

@@ -0,0 +1,201 @@
[# setup page definitions]
[define page_title]Query on:[end]
[define help_href][docroot]/help_rootview.html[end]
[# end]
[include "include/header.ezt" "query"]
<form action="[query_action]" method="get">
<div class="vc_query_form">
[for query_hidden_values]<input type="hidden" name="[query_hidden_values.name]" value="[query_hidden_values.value]"/>[end]
<table cellspacing="0" cellpadding="5" class="auto">
[is roottype "cvs"]
[# For subversion, the branch field is not used ]
<tr>
<th style="text-align:right;vertical-align:top;">Branch:</th>
<td>
<input type="text" name="branch" value="[branch]" />
<label for="branch_match_exact">
<input type="radio" name="branch_match" id="branch_match_exact"
value="exact" [is branch_match "exact"]checked="checked"[end] />
exact
</label>
<label for="branch_match_glob">
<input type="radio" name="branch_match" id="branch_match_glob"
value="glob" [is branch_match "glob"]checked="checked"[end] />
glob pattern
</label>
<label for="branch_match_regex">
<input type="radio" name="branch_match" id="branch_match_regex"
value="regex" [is branch_match "regex"]checked="checked"[end] />
regex
</label>
<label for="branch_match_notregex">
<input type="radio" name="branch_match" id="branch_match_notregex"
value="notregex" [is branch_match "notregex"]checked="checked"[end] />
<em>not</em> regex
</label>
</td>
</tr>
[end]
<tr>
<th style="text-align:right;vertical-align:top;">Subdirectory:</th>
<td>
<input type="text" name="dir" value="[dir]" />
<em>(You can list multiple directories separated by commas.)</em>
</td>
</tr>
<tr>
<th style="text-align:right;vertical-align:top;">File:</th>
<td>
<input type="text" name="file" value="[file]" />
<label for="file_match_exact">
<input type="radio" name="file_match" id="file_match_exact"
value="exact" [is file_match "exact"]checked="checked"[end] />
exact
</label>
<label for="file_match_glob">
<input type="radio" name="file_match" id="file_match_glob"
value="glob" [is file_match "glob"]checked="checked"[end] />
glob pattern
</label>
<label for="file_match_regex">
<input type="radio" name="file_match" id="file_match_regex"
value="regex" [is file_match "regex"]checked="checked"[end] />
regex
</label>
<label for="file_match_notregex">
<input type="radio" name="file_match" id="file_match_notregex"
value="notregex" [is file_match "notregex"]checked="checked"[end] />
<em>not</em> regex
</label>
</td>
</tr>
<tr>
<th style="text-align:right;vertical-align:top;">Who:</th>
<td>
<input type="text" name="who" value="[who]" />
<label for="who_match_exact">
<input type="radio" name="who_match" id="who_match_exact"
value="exact" [is who_match "exact"]checked="checked"[end] />
exact
</label>
<label for="who_match_glob">
<input type="radio" name="who_match" id="who_match_glob"
value="glob" [is who_match "glob"]checked="checked"[end] />
glob pattern
</label>
<label for="who_match_regex">
<input type="radio" name="who_match" id="who_match_regex"
value="regex" [is who_match "regex"]checked="checked"[end] />
regex
</label>
<label for="who_match_notregex">
<input type="radio" name="who_match" id="who_match_notregex"
value="notregex" [is who_match "notregex"]checked="checked"[end] />
<em>not</em> regex
</label>
</td>
</tr>
<tr>
<th style="text-align:right;vertical-align:top;">Comment:</th>
<td>
<input type="text" name="comment" value="[comment]" />
<label for="comment_match_exact">
<input type="radio" name="comment_match" id="comment_match_exact"
value="exact" [is comment_match "exact"]checked=""[end] />
exact
</label>
<label for="comment_match_glob">
<input type="radio" name="comment_match" id="comment_match_glob"
value="glob" [is comment_match "glob"]checked=""[end] />
glob pattern
</label>
<label for="comment_match_regex">
<input type="radio" name="comment_match" id="comment_match_regex"
value="regex" [is comment_match "regex"]checked=""[end] />
regex
</label>
<label for="comment_match_notregex">
<input type="radio" name="comment_match" id="comment_match_notregex"
value="notregex" [is comment_match "notregex"]checked=""[end] />
<em>not</em> regex
</label>
</td>
</tr>
<tr>
<th style="text-align:right;vertical-align:top;">Sort By:</th>
<td>
<select name="querysort">
<option value="date" [is querysort "date"]selected="selected"[end]>Date</option>
<option value="author" [is querysort "author"]selected="selected"[end]>Author</option>
<option value="file" [is querysort "file"]selected="selected"[end]>File</option>
</select>
</td>
</tr>
<tr>
<th style="text-align:right;vertical-align:top;">Date:</th>
<td>
<table cellspacing="0" cellpadding="0">
<tr>
<td><input type="radio" name="date" id="date_hours"
value="hours" [is date "hours"]checked="checked"[end] /></td>
<td>
<label for="date_hours">In the last</label>
<input type="text" name="hours" value="[hours]" size="4" />
hours
</td>
</tr>
<tr>
<td><input type="radio" name="date" id="date_day"
value="day" [is date "day"]checked="checked"[end] /></td>
<td><label for="date_day">In the last day</label></td>
</tr>
<tr>
<td><input type="radio" name="date" id="date_week"
value="week" [is date "week"]checked="checked"[end] /></td>
<td><label for="date_week">In the last week</label></td>
</tr>
<tr>
<td><input type="radio" name="date" id="date_month"
value="month" [is date "month"]checked="checked"[end] /></td>
<td><label for="date_month">In the last month</label></td>
</tr>
<tr>
<td><input type="radio" name="date" id="date_all"
value="all" [is date "all"]checked="checked"[end] /></td>
<td><label for="date_all">Since the beginning of time</label></td>
</tr>
<tr>
<td><input type="radio" name="date" id="date_explicit"
value="explicit" [is date "explicit"]checked="checked"[end] /></td>
<td>
<label for="date_explicit">Between</label>
<input type="text" name="mindate" value="[mindate]" size="20" />
and
<input type="text" name="maxdate" value="[maxdate]" size="20" />
<br />
(use the form <strong>yyyy-mm-dd hh:mm:ss</strong>)
</td>
</tr>
</table>
</td>
</tr>
<tr>
<th style="text-align:right;vertical-align:top;">Limit:</th>
<td>
Show at most
<input type="text" name="limit_changes" value="[limit_changes]" size="5" />
changed files per commit. <em>(Use 0 to show all files.)</em>
</td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="Search" /></td>
</tr>
</table>
</div>
</form>
[include "include/footer.ezt"]

View File

@@ -0,0 +1,86 @@
[# setup page definitions]
[define page_title]Query results in:[end]
[define help_href][docroot]/help_rootview.html[end]
[# end]
[include "include/header.ezt"]
<p><strong>[english_query]</strong></p>
[# <!-- {sql} --> ]
<p><a href="[queryform_href]">Modify query</a></p>
<p><a href="[backout_href]">Show commands which could be used to back out these changes</a></p>
<p><strong>+[plus_count]/-[minus_count]</strong> lines changed.</p>
[if-any commits]
<table cellspacing="1" cellpadding="2">
<thead>
<tr>
<th class="vc_header">Revision</th>
<th class="vc_header[is querysort "file"]_sort[end]">File</th>
[if-any show_branch]
<th class="vc_header">Branch</th>
[end]
<th class="vc_header">+/-</th>
<th class="vc_header[is querysort "date"]_sort[end]">Date</th>
<th class="vc_header[is querysort "author"]_sort[end]">Author</th>
[# uncommment, if you want a separate Description column: (also see below)
<th class="vc_header">Description</th>
]
</tr>
</thead>
[for commits]
[for commits.files]
<tbody>
<tr class="vc_row_[if-index commits even]even[else]odd[end]">
<td style="vertical-align: top;">
[define rev_href][if-any commits.files.prefer_markup][commits.files.view_href][else][if-any commits.files.download_href][commits.files.download_href][end][end][end]
[if-any commits.files.rev][if-any rev_href]<a href="[rev_href]">[end][commits.files.rev][if-any rev_href]</a>[end][else]&nbsp;[end]
</td>
<td style="vertical-align: top;">
<a href="[commits.files.dir_href]">[commits.files.dir]/</a>
<a href="[commits.files.log_href]">[commits.files.file]</a>
</td>
[if-any show_branch]
<td style="vertical-align: top;">
[if-any commits.files.branch][commits.files.branch][else]&nbsp;[end]
</td>
[end]
<td style="vertical-align: top;">
[# only show a diff link for changes ]
[is commits.files.type "Add"]<ins>[end]
[is commits.files.type "Change"]<a href="[commits.files.diff_href]">[end]
[is commits.files.type "Remove"]<del>[end]
[commits.files.plus]/[commits.files.minus]
[is commits.files.type "Add"]</ins>[end]
[is commits.files.type "Change"]</a>[end]
[is commits.files.type "Remove"]</del>[end]
</td>
<td style="vertical-align: top;">
[if-any commits.files.date][commits.files.date][else]&nbsp;[end]
</td>
<td style="vertical-align: top;">
[if-any commits.files.author][commits.files.author][else]&nbsp;[end]
</td>
</tr>
[end]
[if-any commits.limited_files]
<tr class="vc_row_[if-index commits even]even[else]odd[end]">
<td>&nbsp;</td>
<td colspan="5">
<strong><em><small>Only first [commits.num_files] files shown.
<a href="[limit_changes_href]">Show all files</a> or
<a href="[queryform_href]">adjust limit</a>.</small></em></strong>
</tr>
[end]
<tr class="vc_row_[if-index commits even]even[else]odd[end]">
<td>&nbsp;</td>
<td colspan="5"><strong>Log:</strong><br />
<pre class="vc_log">[commits.log]</pre></td>
</tr>
</tbody>
[end]
</table>
[end]
[include "include/footer.ezt"]

View File

@@ -0,0 +1,83 @@
[# setup page definitions]
[define page_title]Revision [rev] of:[end]
[define help_href][docroot]/help_rootview.html[end]
[# end]
[include "include/header.ezt" "revision"]
<form method="get" action="[jump_rev_action]">
<table cellspacing="1" cellpadding="2" style="width: auto;">
<tr align="left">
<th>Jump to revision:</th>
<td>
[for jump_rev_hidden_values]<input type="hidden" name="[jump_rev_hidden_values.name]" value="[jump_rev_hidden_values.value]"/>[end]
<input type="text" name="revision" value="[rev]" />
<input type="submit" value="Go" />
[if-any prev_href]
<a href="[prev_href]" title="Previous Revision"><img src="[docroot]/images/back.png" alt="Previous" width="20" height="22" /></a>[end]
[if-any next_href] <a href="[next_href]" title="Next Revision"><img src="[docroot]/images/forward.png" width="20" height="22" alt="Next" /></a>[end]
</td>
</tr>
<tr align="left">
<th>Author:</th>
<td>[if-any author][author][else]<em>(unknown author)</em>[end]</td>
</tr>
<tr align="left">
<th>Date:</th>
<td>[if-any date][date][else]<em>(unknown date)</em>[end]
[if-any ago]<em>([ago] ago)</em>[end]</td>
</tr>
<tr align="left">
<th>Log Message:</th>
<td><pre class="vc_log">[log]</pre></td>
</tr>
</table>
</form>
<div id="vc_main_body">
<!-- ************************************************************** -->
<p><strong>Changed paths:</strong></p>
[if-any more_changes]
<div>
Only [limit_changes] changes shown,
<a href="[more_changes_href]">display [more_changes] more changes...</a>
</div>
[end]
[if-any first_changes]
<div><a href="[first_changes_href]">Show only first [first_changes] changes...</div>
[end]
<table cellspacing="1" cellpadding="2">
<thead>
<tr align="left">
<th class="vc_header_sort">Path</th>
<th class="vc_header">Details</th>
</tr>
</thead>
<tbody>
[if-any changes]
[for changes]
<tr class="vc_row_[if-index changes even]even[else]odd[end]">
<td>[if-any changes.view_href]<a href="[changes.view_href]" title="View [is changes.pathtype "dir"]Directory[else]File[end] Contents">[end]<img src="[docroot]/images/[is changes.pathtype "dir"]dir[else]text[end].png" class="vc_icon" alt="Directory" />[changes.path][is changes.pathtype "dir"]/[end][if-any changes.view_href]</a>[end]
[if-any changes.is_copy]<br /><em>(Copied from [changes.copy_path], r[changes.copy_rev])</em>[end]
</td>
<td>[if-any changes.log_href]<a href="[changes.log_href]" title="View Log">[end][changes.action][if-any changes.log_href]</a>[end]
[if-any changes.text_mods], [if-any changes.diff_href]<a href="[changes.diff_href]" title="View Diff">[end]text changed[if-any changes.diff_href]</a>[end][end]
[if-any changes.prop_mods], props changed[end]
</td>
</tr>
[end]
[else]
<tr>
<td colspan="5">No changed paths.</td>
</tr>
[end]
</tbody>
</table>
<!-- ************************************************************** -->
</div>
[include "include/footer.ezt"]

View File

@@ -0,0 +1,33 @@
[# setup page definitions]
[define page_title]Repository Listing[end]
[define help_href][docroot]/help_rootview.html[end]
[# end]
[include "include/header.ezt" "directory"]
<div id="vc_main_body">
<!-- ************************************************************** -->
<table cellspacing="1" id="dirlist">
<thead>
<tr>
<th class="vc_header_sort">Name</th>
</tr>
</thead>
<tbody>
[if-any roots]
[for roots]
<tr class="vc_row_[if-index roots even]even[else]odd[end]">
<td onclick="jumpTo('[roots.href]')"><a href="[roots.href]"><img src="[docroot]/images/[roots.type]-logo.png" alt="" class="vc_icon" />[roots.name]</a></td>
</tr>
[end]
[end]
</tbody>
</table>
<!-- ************************************************************** -->
</div>
[include "include/footer.ezt"]

View File

@@ -0,0 +1,17 @@
<?xml version="1.0"?>
<rss version="2.0">
<channel>
<link>[rss_link_href]</link>
<title>[rootname] checkins[if-any where] (in [where])[end]</title>
<description>[is roottype "svn"]Subversion[else]CVS[end] commits to the[if-any where] [where] directory of the[end] [rootname] repository</description>
[for commits]<item>
<title>[if-any commits.rev][commits.rev]: [end][[commits.author]] [commits.short_log]</title>
[if-any commits.rss_url]<link>[commits.rss_url]</link>[end]
<author>[commits.author]</author>
<pubDate>[if-any commits.rss_date][commits.rss_date][else](unknown date)[end]</pubDate>
<description>&lt;pre&gt;[format "xml"][commits.log][end]&lt;/pre&gt;</description>
</item>[end]
</channel>
</rss>

View File

@@ -0,0 +1,8 @@
Template Set: tabbed
Author(s): C. Michael Pilato <cmpilato@red-bean.com>,
Russell Yanofsky <russ@yanofsky.org>
Compatibility: ViewVC 1.1
The "tabbed" template set uses top navigation tabs to flip between
various views of a file or directory.

View File

@@ -0,0 +1,46 @@
[# setup page definitions]
[define page_title]Annotation of:[end]
[define help_href][docroot]/help_rootview.html[end]
[# end]
[include "include/header.ezt" "annotate"]
[include "include/fileview.ezt"]
<div id="vc_main_body">
<!-- ************************************************************** -->
[define last_rev]0[end]
[define rowclass]vc_row_odd[end]
<table class="fixed" cellspacing="0" cellpadding="0">
<tr>
<th class="vc_header" style="text-align: center; width: 5em;">Line</th>
<th class="vc_header" style="text-align: center; width: 8em;">User</th>
<th class="vc_header" style="text-align: center; width: 5em;">Rev</th>
<th class="vc_header" style="text-align: left;">File contents</th>
</tr>
[for lines]
[is lines.rev last_rev]
[else]
[is rowclass "vc_row_even"]
[define rowclass]vc_row_odd[end]
[else]
[define rowclass]vc_row_even[end]
[end]
[end]
<tr class="[rowclass]">
<td id="l[lines.line_number]" class="vc_blame_metadata">[lines.line_number]</td>
<td class="vc_blame_metadata">[is lines.rev last_rev]&nbsp;[else][lines.author][end]</td>
<td class="vc_blame_metadata">[is lines.rev last_rev]&nbsp;[else][if-any lines.diff_url]<a href="[lines.diff_url]">[end][lines.rev][if-any lines.diff_url]</a>[end][end]</td>
<td class="vc_blame_textdata" style="background: [is rowclass "vc_row_even"]white[else]rgb(95%,95%,95%)[end];">[lines.text]</td>
</tr>
[define last_rev][lines.rev][end]
[end]
</table>
[include "include/props.ezt"]
<!-- ************************************************************** -->
</div>
[include "include/footer.ezt"]

View File

@@ -0,0 +1,128 @@
[# Setup page definitions]
[define page_title]Diff of:[end]
[define help_href][docroot]/help_rootview.html[end]
[# end]
[include "include/header.ezt" "diff"]
<form method="get" action="[diff_format_action]" style="display: inline;">
<div>
[for diff_format_hidden_values]<input type="hidden" name="[diff_format_hidden_values.name]" value="[diff_format_hidden_values.value]"/>[end]
<select name="diff_format" onchange="submit()">
<option value="h" [is diff_format "h"]selected="selected"[end]>Colored Diff</option>
<option value="l" [is diff_format "l"]selected="selected"[end]>Long Colored Diff</option>
<option value="f" [is diff_format "f"]selected="selected"[end]>Full Colored Diff</option>
<option value="u" [is diff_format "u"]selected="selected"[end]>Unidiff</option>
<option value="c" [is diff_format "c"]selected="selected"[end]>Context Diff</option>
<option value="s" [is diff_format "s"]selected="selected"[end]>Side by Side</option>
</select>
<input type="submit" value="Show" />
(<a href="[patch_href]">Generate patch</a>)
</div>
</form>
<div id="vc_main_body">
<!-- ************************************************************** -->
[if-any raw_diff]
<pre>[raw_diff]</pre>
[else]
[define change_right][end]
[define last_change_type][end]
[# these should live in stylesheets]
<table cellpadding="0" cellspacing="0" style="width: 100%;">
[for changes]
[is changes.type "change"][else]
[if-any change_right][change_right][define change_right][end][end]
[end]
[is changes.type "header"]
<tr>
<th class="vc_header" style="width:6%;"><strong>#</strong></th>
<th colspan="2" class="vc_header">
<strong>Line [changes.line_info_left]</strong> |
<strong>Line [changes.line_info_right]</strong>
</th>
</tr>
[else]
[is changes.type "add"]
<tr>
<td id="l[changes.line_number]">[if-any right.annotate_href]<a href="[right.annotate_href]#l[changes.line_number]">[changes.line_number]</a>[else][changes.line_number][end]</td>
<td class="vc_diff_plusminus"><strong style="color: green;">+</strong></td>
<td class="vc_diff_add">[changes.right]</td>
</tr>
[else]
[is changes.type "remove"]
<tr>
<td style="text-decoration: line-through">[changes.line_number]</td>
<td class="vc_diff_plusminus"><strong style="color: red;">&ndash;</strong></td>
<td class="vc_diff_remove">[changes.left]</td>
</tr>
[else]
[is changes.type "change"]
[if-any changes.have_left]
<tr>
<td style="text-decoration: line-through">[changes.line_number]</td>
<td class="vc_diff_plusminus"><strong style="color: yellow;">&lt;</strong></td>
<td class="vc_diff_changes1">[changes.left]</td>
</tr>
[end]
[define change_right][change_right]
[if-any changes.have_right]
<tr>
<td id="l[changes.line_number]">[if-any right.annotate_href]<a href="[right.annotate_href]#l[changes.line_number]">[changes.line_number]</a>[else][changes.line_number][end]</td>
<td class="vc_diff_plusminus"><strong style="color: yellow;">&gt;</strong></td>
<td class="vc_diff_changes2">[changes.right]</td>
</tr>[end]
[end]
[else]
[is changes.type "no-changes"]
<tr><td colspan="3" style="vc_diff_nochange"><strong>- No changes -</strong></td></tr>
[else]
[is changes.type "binary-diff"]
<tr><td colspan="3" class="vc_diff_binary"><strong>- Binary file revisions differ -</strong></td></tr>
[else]
[is changes.type "error"]
<tr><td colspan="3" class="vc_diff_error"><strong>- ViewVC depends on rcsdiff and GNU diff
to create this page. ViewVC cannot find GNU diff. Even if you
have GNU diff installed, the rcsdiff program must be configured
and compiled with the GNU diff location. -</strong></td></tr>
[else][# a line of context]
<tr>
<td id="l[changes.line_number]">[if-any right.annotate_href]<a href="[right.annotate_href]#l[changes.line_number]">[changes.line_number]</a>[else][changes.line_number][end]</td>
<td class="vc_diff_plusminus">&nbsp;</td>
<td style="font-family: monospace; white-space: pre;">[changes.right]</td>
</tr>
[end][end][end][end][end][end][end]
[define last_change_type][changes.type][end]
[end]
[if-any change_right][change_right][end]
</table>
<h3>Diff Legend</h3>
<table class="auto" cellspacing="0">
<tr>
<td class="vc_diff_plusminus"><strong style="color: red;">&ndash;</strong></td>
<td class="vc_diff_remove">Removed lines</td>
</tr>
<tr>
<td class="vc_diff_plusminus"><strong style="color: green;">+</strong></td>
<td class="vc_diff_add">Added lines</td>
</tr>
<tr>
<td class="vc_diff_plusminus"><strong style="color: yellow;">&lt;</strong></td>
<td class="vc_diff_changes1">Changed lines</td>
</tr>
<tr>
<td class="vc_diff_plusminus"><strong style="color: yellow;">&gt;</strong></td>
<td class="vc_diff_changes2">Changed lines</td>
</tr>
</table>
[end]
<!-- ************************************************************** -->
</div>
[include "include/footer.ezt"]

View File

@@ -0,0 +1,132 @@
[include "include/dir_header.ezt"]
<table cellspacing="1" cellpadding="2" class="fixed" id="dirlist">
<thead>
<tr>
<th style="width: 200px" class="vc_header[is sortby "file"]_sort[end]">
<a href="[sortby_file_href]#dirlist">File
[is sortby "file"]
<img class="vc_sortarrow" alt="[is sortdir "down"](rev)[end]"
width="13" height="13"
src="[docroot]/images/[is sortdir "up"]up[else]down[end].png" />
[end]
</a>
</th>
<th style="width: 96px" class="vc_header"></th>
<th class="vc_header[is sortby "rev"]_sort[end]">
<a href="[sortby_rev_href]#dirlist">Last Change
[is sortby "rev"]
<img class="vc_sortarrow" alt="[is sortdir "down"](rev)[end]"
width="13" height="13"
src="[docroot]/images/[is sortdir "up"]up[else]down[end].png" />
[end]
</a>
</th>
</tr>
</thead>
<tbody>
[if-any up_href]
<tr class="vc_row_odd">
<td style="width: 200px">
<a href="[up_href]">
<img src="[docroot]/images/back_small.png" alt="" class="vc_icon"
/>&nbsp;Parent&nbsp;Directory</a>
</td>
<td style="width: 96px; font-size: 0;"></td>
<td>&nbsp;</td>
</tr>
[end]
[for entries]
<tr class="vc_row_[if-index entries even]even[else]odd[end]">
<td style="width: 200px">
<a name="[entries.anchor]" href="[is entries.pathtype "dir"][entries.view_href][else][if-any entries.prefer_markup][entries.view_href][else][entries.download_href][end][end]" title="[is entries.pathtype "dir"]View Directory Contents[else][if-any entries.prefer_markup]View[else]Download[end] File Contents[end]">
<img src="[docroot]/images/[is entries.pathtype "dir"]dir[else][is entries.state "dead"]broken[else]text[end][end].png" alt="" class="vc_icon" />
[entries.name][is entries.pathtype "dir"]/[end]</a>
[is entries.state "dead"](dead)[end]
</td>
[if-any entries.errors]
<td colspan="2">[for entries.errors]<em>[entries.errors]</em>[end]</td>
[else]
[define view_icon_link][end]
[define graph_icon_link][end]
[define download_icon_link][end]
[define annotate_icon_link][end]
[define log_icon_link][if-any entries.log_href]<a
href="[entries.log_href]"
title="View Log"><img
src="[docroot]/images/log.png"
alt="View Log"
class="vc_icon" /></a>[end][end]
[is entries.pathtype "dir"]
[is roottype "cvs"]
[# no point in showing icon when there's only one to choose from]
[else]
[define view_icon_link]<a
href="[entries.view_href]"
title="View Directory Listing"><img
src="[docroot]/images/list.png"
alt="View Directory Listing"
class="vc_icon" /></a>[end]
[end]
[end]
[is entries.pathtype "file"]
[define view_icon_link][if-any entries.view_href]<a
href="[entries.view_href]"
title="View File"><img
src="[docroot]/images/view.png"
alt="View File"
class="vc_icon" /></a>[end][end]
[define graph_icon_link][if-any entries.graph_href]<a
href="[entries.graph_href]"
title="View Revision Graph"><img
src="[docroot]/images/cvsgraph_16x16.png"
alt="View Revision Graph"
class="vc_icon" /></a>[end][end]
[define download_icon_link][if-any entries.download_href]<a
href="[entries.download_href]"
title="Download File"><img
src="[docroot]/images/download.png"
alt="Download File"
class="vc_icon" /></a>[end][end]
[define annotate_icon_link][if-any entries.annotate_href]<a
href="[entries.annotate_href]"
title="Annotate File"><img
src="[docroot]/images/annotate.png"
alt="Annotate File"
class="vc_icon" /></a>[end][end]
[end]
<td style="width: 96px"
>[# Icon column. We might want to add more icons like a tarball
# icon for directories or a diff to previous icon for files.
# Make sure this sucker has no whitespace in it, or the fixed
# widthness of will suffer for large font sizes
][log_icon_link][view_icon_link][graph_icon_link][download_icon_link][annotate_icon_link]</td>
<td>
[if-any entries.rev]
<strong>[if-any entries.revision_href]<a href="[entries.revision_href]" title="Revision [entries.rev]">[entries.rev]</a>[else][entries.rev][end]</strong>
([entries.ago] ago)
by <em>[entries.author]</em>:
[entries.log]
[is entries.pathtype "dir"][is roottype "cvs"]
<em>(from [entries.log_file]/[entries.log_rev])</em>
[end][end]
[end]
</td>
[end]
</tr>
[end]
</tbody>
</table>
[include "include/props.ezt"]
[include "include/dir_footer.ezt"]

Some files were not shown because too many files have changed in this diff Show More