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

Compare commits

...

17 Commits
1.0.6 ... 1.0.8

Author SHA1 Message Date
cmpilato
64f27831ba Retroactively "peg" the svn:externals property on these tags which
pulls in the 'templates-contrib' area.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/tags/1.0.8@2451 8cb11bc2-c004-0410-86c3-e597b4017df7
2010-09-08 16:51:21 +00:00
cmpilato
9d097d15a0 Tag the 1.0.8 final release.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/tags/1.0.8@2150 8cb11bc2-c004-0410-86c3-e597b4017df7
2009-05-05 17:15:10 +00:00
cmpilato
e55a53826a Let's pretend we'll release 1.0.8 today, shall we?
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@2149 8cb11bc2-c004-0410-86c3-e597b4017df7
2009-05-05 17:12:06 +00:00
cmpilato
2e42e8210a Update copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@2145 8cb11bc2-c004-0410-86c3-e597b4017df7
2009-05-05 17:06:06 +00:00
cmpilato
07019eaf2b Backport from trunk r2137: Fix issue #409, an exception thrown when
sorting by revision in a remote Subversion directory view.

* lib/vclib/svn_ra/__init__.py
  (get_logs): Store the entry's revision as a string, for consistency
    with other vclib modules.

Also:

* CHANGES
  Record this change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@2138 8cb11bc2-c004-0410-86c3-e597b4017df7
2009-05-05 14:57:37 +00:00
cmpilato
ee17367b8b Backport to the 1.0.x branch trunk's r2134, whose log message read thusly:
Fix an exception in log views of Subversion repositories with 0
   revisions.
   
   * lib/vclib/svn/__init__.py
     (_get_history): Add easy-out for repositories with 0 revisions.
   
   Reported by: Wojciech Wróblewski <wojtek{_AT_}elmi.pl>

Also:

* CHANGES
  Note this fix.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@2136 8cb11bc2-c004-0410-86c3-e597b4017df7
2009-05-04 15:00:22 +00:00
cmpilato
63e89c6517 Merge from trunk r2128-2129.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@2131 8cb11bc2-c004-0410-86c3-e597b4017df7
2009-04-20 17:42:06 +00:00
cmpilato
89c5af7d9d Update copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@2109 8cb11bc2-c004-0410-86c3-e597b4017df7
2009-03-18 16:56:29 +00:00
cmpilato
743fcdd6ae Merge from trunk r2103, whose log message read thusly:
Fix namespace problem with raised Exception.
   
   * lib/viewvc.py
     (view_revision): raise *debug.*ViewVCException.
   
   Patch by: Kamesh Jayachandran <kamesh@collab.net>


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@2105 8cb11bc2-c004-0410-86c3-e597b4017df7
2009-03-18 12:52:59 +00:00
cmpilato
9451f373e8 Merge from trunk r2097, whose log message read thusly:
Finish issue #396 - Malformed accept-language header crashes viewvc
   
   * lib/accept.py
     (AcceptLanguageParseError): Was AcceptParseError.
     (_parse): Track renamed Exception.
   
   * lib/viewvc.py
     (Request.__init__): Catch and handle raised AcceptLanguageParseError.
   
   Patch by: Rune Halvorsen <runefh{_AT_}gmail.com>,
             me

Also:

* CHANGES
  Note this change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@2100 8cb11bc2-c004-0410-86c3-e597b4017df7
2009-02-26 16:16:40 +00:00
cmpilato
c0ce6b9dbe Merge from trunk r2090, whose log message read thusly:
ViewVC doesn't "do" directory entry sorting by revision for CVS, so
   don't imply that it does in the UI.
   
   * lib/viewvc.py
     (view_directory): Don't provide sortby_rev_href to the template.
   
   * templates/directory.ezt
     Only offer sort links when those links are provided by ViewVC.
   
   * templates/dir_new.ezt
     Only offer sort links when those links are provided by ViewVC.  Use
     date-based sorting if rev-based sorting isn't available.

Also:

* CHANGES
  Note this change.



git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@2093 8cb11bc2-c004-0410-86c3-e597b4017df7
2009-02-20 15:31:27 +00:00
cmpilato
e498d9fdbe Record a bunch of old merges (as determined from log message harvesting)
in Subversion's mergeinfo tracking system.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@2061 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-12-05 17:23:38 +00:00
cmpilato
1bb0b7ee38 Merge r2048 from trunk.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@2050 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-11-13 20:09:01 +00:00
cmpilato
7bafa7b77e Begin a new release cycle.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@2020 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-10-14 22:06:35 +00:00
cmpilato
1bc2914f4b Finalize release date for 1.0.7. Need to get this regression fix available.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@2018 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-10-14 21:47:06 +00:00
cmpilato
06f6ba27d0 Backport from trunk r2016, whose log message reads thusly:
Fix issue #373: Regression: "as text" view no longer transmits
   Content-type: text/plain header.
   
   * lib/viewvc.py
     (Request.run_viewvc): Add 'text/plain' to the list of content types
       allowed to be specified via the CGI query params.
     (view_checkout): Revert the change from r1978 which caused this to
       ignore the content-type query param; we'll go back to paying
       attention to that, and simply trust that Request.run_viewvc() has
       sanitized it.

Also:

* CHANGES
  Note this change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@2017 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-10-02 15:57:59 +00:00
cmpilato
6cf12dd9b3 Begin a new release cycle.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@2006 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-09-16 19:05:57 +00:00
20 changed files with 87 additions and 51 deletions

11
CHANGES
View File

@@ -1,3 +1,14 @@
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)
Version 1.0.7 (released 14-Oct-2008)
* fix regression in the 'as text' download view (issue #373)
Version 1.0.6 (released 16-Sep-2008)
* security fix: ignore arbitrary user-provided MIME types (issue #354)

View File

@@ -1,6 +1,6 @@
# -*-python-*-
#
# Copyright (C) 1999-2006 The ViewCVS Group. All Rights Reserved.
# Copyright (C) 1999-2008 The ViewCVS Group. All Rights Reserved.
#
# 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

View File

@@ -1,6 +1,6 @@
# -*-python-*-
#
# Copyright (C) 1999-2006 The ViewCVS Group. All Rights Reserved.
# Copyright (C) 1999-2008 The ViewCVS Group. All Rights Reserved.
#
# 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

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env python
# -*-python-*-
#
# Copyright (C) 1999-2006 The ViewCVS Group. All Rights Reserved.
# Copyright (C) 2004 James Henstridge
#
# By using this file, you agree to the terms and conditions set forth in

View File

@@ -1,6 +1,6 @@
# -*-python-*-
#
# Copyright (C) 1999-2006 The ViewCVS Group. All Rights Reserved.
# Copyright (C) 1999-2009 The ViewCVS Group. All Rights Reserved.
#
# 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
@@ -39,7 +39,7 @@ def _parse(hdr, result):
while pos < len(hdr):
name = _re_token.match(hdr, pos)
if not name:
raise AcceptParseError()
raise AcceptLanguageParseError()
a = result.item_class(string.lower(name.group(1)))
pos = name.end()
while 1:
@@ -210,7 +210,7 @@ class _LanguageSelector:
def append(self, item):
self.requested.append(item)
class AcceptParseError(Exception):
class AcceptLanguageParseError(Exception):
pass
def _test():

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*-python-*-
#
# Copyright (C) 1999-2006 The ViewCVS Group. All Rights Reserved.
# Copyright (C) 1999-2008 The ViewCVS Group. All Rights Reserved.
# Copyright (C) 2000 Curt Hagenlocher <curt@hagenlocher.org>
#
# By using this file, you agree to the terms and conditions set forth in

View File

@@ -1,6 +1,6 @@
# -*-python-*-
#
# Copyright (C) 1999-2006 The ViewCVS Group. All Rights Reserved.
# Copyright (C) 1999-2008 The ViewCVS Group. All Rights Reserved.
#
# 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
@@ -38,13 +38,17 @@ if SHOW_TIMES:
else:
_times[which] = t
def dump():
for name, value in _times.items():
print '%s: %.6f<br />' % (name, value)
def t_dump(out):
out.write('<div>')
names = _times.keys()
names.sort()
for name in names:
out.write('%s: %.6fs<br/>\n' % (name, _times[name]))
out.write('</div>')
else:
t_start = t_end = dump = lambda *args: None
t_start = t_end = t_dump = lambda *args: None
class ViewVCException:

View File

@@ -1,6 +1,6 @@
# -*-python-*-
#
# Copyright (C) 1999-2006 The ViewCVS Group. All Rights Reserved.
# Copyright (C) 1999-2008 The ViewCVS Group. All Rights Reserved.
#
# 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

View File

@@ -1,6 +1,6 @@
# -*-python-*-
#
# Copyright (C) 1999-2006 The ViewCVS Group. All Rights Reserved.
# Copyright (C) 1999-2008 The ViewCVS Group. All Rights Reserved.
#
# 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

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*-python-*-
#
# Copyright (C) 1999-2006 The ViewCVS Group. All Rights Reserved.
# Copyright (C) 1999-2008 The ViewCVS Group. All Rights Reserved.
# Copyright (C) 2000 Curt Hagenlocher <curt@hagenlocher.org>
#
# By using this file, you agree to the terms and conditions set forth in

View File

@@ -1,6 +1,6 @@
# -*-python-*-
#
# Copyright (C) 1999-2006 The ViewCVS Group. All Rights Reserved.
# Copyright (C) 1999-2008 The ViewCVS Group. All Rights Reserved.
#
# 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

View File

@@ -1,6 +1,6 @@
# -*-python-*-
#
# Copyright (C) 1999-2006 The ViewCVS Group. All Rights Reserved.
# Copyright (C) 1999-2008 The ViewCVS Group. All Rights Reserved.
#
# 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

View File

@@ -1,6 +1,6 @@
# -*-python-*-
#
# Copyright (C) 1999-2006 The ViewCVS Group. All Rights Reserved.
# Copyright (C) 1999-2008 The ViewCVS Group. All Rights Reserved.
#
# 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

View File

@@ -1,6 +1,6 @@
# -*-python-*-
#
# Copyright (C) 1999-2008 The ViewCVS Group. All Rights Reserved.
# Copyright (C) 1999-2009 The ViewCVS Group. All Rights Reserved.
#
# 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
@@ -239,6 +239,9 @@ class NodeHistory:
def _get_history(svnrepos, full_name, rev, options={}):
if svnrepos.youngest == 0:
return {}
fsroot = svnrepos._getroot(rev)
show_all_logs = options.get('svn_show_all_dir_logs', 0)
if not show_all_logs:

View File

@@ -1,6 +1,6 @@
# -*-python-*-
#
# Copyright (C) 1999-2008 The ViewCVS Group. All Rights Reserved.
# Copyright (C) 1999-2009 The ViewCVS Group. All Rights Reserved.
#
# 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
@@ -220,7 +220,7 @@ def get_logs(svnrepos, full_name, rev, files):
rev, author, date, log, changes = \
_get_rev_details(svnrepos, entry.created_rev, subpool)
rev_info_cache[entry.created_rev] = rev, author, date, log
file.rev = rev
file.rev = str(rev)
file.author = author
file.date = _datestr_to_date(date, subpool)
file.log = log

View File

@@ -1,6 +1,6 @@
# -*-python-*-
#
# Copyright (C) 1999-2008 The ViewCVS Group. All Rights Reserved.
# Copyright (C) 1999-2009 The ViewCVS Group. All Rights Reserved.
#
# 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
@@ -14,7 +14,7 @@
#
# -----------------------------------------------------------------------
__version__ = '1.0.6-dev'
__version__ = '1.0.8'
# this comes from our library; measure the startup time
import debug
@@ -112,7 +112,10 @@ class Request:
# process the Accept-Language: header
hal = server.getenv('HTTP_ACCEPT_LANGUAGE','')
self.lang_selector = accept.language(hal)
try:
self.lang_selector = accept.language(hal)
except accept.AcceptLanguageParseError:
self.lang_selector = accept.language('en')
self.language = self.lang_selector.select_from(cfg.general.languages)
# load the key/value files, given the selected language
@@ -160,9 +163,13 @@ class Request:
# validate the parameter
_validate_param(name, values[0])
# only allow the magic ViewVC MIME types to be declared via CGI params
# Only allow the magic ViewVC MIME types (the ones used for
# requesting the markup as as-text views) to be declared via CGI
# params. Ignore disallowed values.
if (name == 'content-type') and \
(not values[0] in (viewcvs_mime_type, alt_mime_type)):
(not values[0] in (viewcvs_mime_type,
alt_mime_type,
'text/plain')):
continue
# if we're here, then the parameter is okay
@@ -1723,6 +1730,9 @@ def view_directory(request):
data['sortby_%s_href' % sortby] = request.get_url(params={'sortdir':
revsortdir},
escape=1)
# CVS doesn't support sorting by rev
if request.roottype == "cvs":
data['sortby_rev_href'] = None
# set cvs-specific fields
if request.roottype == 'cvs':
@@ -2184,7 +2194,8 @@ def view_checkout(request):
# The revision number acts as a strong validator.
if not check_freshness(request, None, revision):
request.server.header(request.mime_type or 'text/plain')
request.server.header(request.query_dict.get('content-type')
or request.mime_type or 'text/plain')
copy_stream(fp)
fp.close()
@@ -2980,8 +2991,9 @@ def download_tarball(request):
def view_revision(request):
if request.roottype == "cvs":
raise ViewVCException("Revision view not supported for CVS repositories "
"at this time.", "400 Bad Request")
raise debug.ViewVCException("Revision view not supported for CVS "
"repositories at this time.",
"400 Bad Request")
data = common_template_data(request)
query_dict = request.query_dict
@@ -3746,7 +3758,7 @@ def main(server, cfg):
finally:
debug.t_end('main')
debug.dump()
debug.t_dump(server.file())
debug.DumpChildren(server)

View File

@@ -50,7 +50,7 @@ numbers, and not literal):
9. Go into an empty directory and run the 'make-release' script:
tools/make-release viewvc-X.Y.Z X.Y.Z
tools/make-release viewvc-X.Y.Z tags/X.Y.Z
10. Verify the archive files:

View File

@@ -4,22 +4,30 @@
<thead>
<tr>
<th class="vc_header[is sortby "file"]_sort[end]" colspan="2">
<a href="[sortby_file_href]#dirlist">File
[if-any sortby_file_href]<a href="[sortby_file_href]#dirlist">File</a>[else]File[end]
[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>
[if-any sortby_rev_href]
<th class="vc_header[is sortby "rev"]_sort[end]">
<a href="[sortby_rev_href]#dirlist">Last Change
<a href="[sortby_rev_href]#dirlist">Last Change</a>
[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>
[else]
<th class="vc_header[is sortby "date"]_sort[end]">
[if-any sortby_date_href]<a href="[sortby_date_href]#dirlist">Last Change</a>[else]Last Change[end]
[is sortby "date"]
<img class="vc_sortarrow" alt="[is sortdir "down"](date)[end]"
width="13" height="13"
src="[docroot]/images/[is sortdir "up"]up[else]down[end].png" />
[end]
[end]
</th>
</tr>
</thead>

View File

@@ -4,50 +4,45 @@
<thead>
<tr>
<th class="vc_header[is sortby "file"]_sort[end]" colspan="2">
<a href="[sortby_file_href]#dirlist">File
[if-any sortby_file_href]<a href="[sortby_file_href]#dirlist">File</a>[else]File[end]
[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">Rev.
[if-any sortby_rev_href]<a href="[sortby_rev_href]#dirlist">Rev.</a>[else]Rev.[end]
[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>
<th class="vc_header[is sortby "date"]_sort[end]">
<a href="[sortby_date_href]#dirlist">Age
[if-any sortby_date_href]<a href="[sortby_date_href]#dirlist">Age</a>[else]Age[end]
[is sortby "date"]
<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 "author"]_sort[end]">
<a href="[sortby_author_href]#dirlist">Author
[if-any sortby_author_href]<a href="[sortby_author_href]#dirlist">Author</a>[else]Author[end]
[is sortby "author"]
<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>
[is cfg.options.show_logs "1"]
<th class="vc_header[is sortby "log"]_sort[end]">
<a href="[sortby_log_href]#dirlist">Last log entry
[if-any sortby_log_href]<a href="[sortby_log_href]#dirlist">Last log entry</a>[else]Last log entry[end]
[is sortby "log"]
<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>
[end]
</tr>

View File

@@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (C) 1999-2007 The ViewCVS Group. All Rights Reserved.
# Copyright (C) 1999-2009 The ViewCVS Group. All Rights Reserved.
#
# 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
@@ -17,17 +17,18 @@
### Validate input
if test $# != 2 && test $# != 1; then
echo "Usage: $0 TARGET-DIRECTORY [TAGNAME]"
echo "Usage: $0 TARGET-DIRECTORY [BRANCH]"
echo ""
echo "If TAGNAME is not provided, the release will be rolled from trunk."
echo "If BRANCH (i.e. \"tags/1.1.0\" or \"branches/1.0.x\") is not provided,"
echo "the release will be rolled from trunk."
exit 1
fi
TARGET=${1}
if test $# == 1; then
if test $# = 1; then
ROOT=trunk
else
ROOT=tags/${2}
ROOT=${2}
fi
if test -e ${TARGET}; then
@@ -36,7 +37,8 @@ if test -e ${TARGET}; then
fi
### Grab an export from the Subversion repository.
echo "Exporting into:" ${TARGET}
EXPORT_URL="http://viewvc.tigris.org/svn/viewvc/${ROOT}"
echo "Exporting '${EXPORT_URL}' into '${TARGET}'"
for PLATFORM in unix windows; do
if test ${PLATFORM} = windows; then
@@ -48,7 +50,7 @@ for PLATFORM in unix windows; do
echo "Beginning build for ${PLATFORM}:"
echo " Exporting source code..."
svn export --quiet ${EOL} http://viewvc.tigris.org/svn/viewvc/${ROOT} ${TARGET}
svn export --quiet ${EOL} ${EXPORT_URL} ${TARGET}
### Various shifting, cleanup.