Restore "this entry is unreadable" error messages that got mistakenly

suppressed in revision 1.205 of viewcvs.py.

* lib/viewcvs.py:
  (view_directory_cvs):
    stop skipping unreadable rows. also simplify row.name initialization
    by omitting trailing slashes for directory names

  (view_directory_svn):
    omit trailing slashes from directory names

* templates/directory.ezt
* templates/dir_alternate.ezt
    add trailing slashes to directory names


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@755 8cb11bc2-c004-0410-86c3-e597b4017df7
remotes/tags/1.0.0-rc1
rey4 2003-10-25 04:17:06 +00:00
parent a34029940f
commit a478890739
3 changed files with 8 additions and 11 deletions

View File

@ -1264,6 +1264,7 @@ def view_directory_cvs(request, data, sortby, sortdir):
have_logs = 1
row.anchor = file.name
row.name = file.name
row.type = (file.kind == vclib.FILE and 'file') or \
(file.kind == vclib.DIR and 'dir')
@ -1281,7 +1282,6 @@ def view_directory_cvs(request, data, sortby, sortdir):
if file.name == 'CVS': # CVS directory in repository is for fileattr.
continue
row.name = file.name + '/'
row.href = request.get_url(view_func=view_directory,
where=where_prefix+file.name,
pathtype=vclib.DIR,
@ -1294,19 +1294,16 @@ def view_directory_cvs(request, data, sortby, sortdir):
row.log_file = file.newest_file
row.log_rev = file.rev
rows.append(row)
elif file.kind == vclib.FILE:
num_files = num_files + 1
if file.rev is None:
if file.rev is None and not file.verboten:
continue
elif hideattic and view_tag and file.state == 'dead':
continue
num_displayed = num_displayed + 1
file_where = where_prefix + (file.in_attic and 'Attic/' or '') + file.name
row.name = file.name
row.href = request.get_url(view_func=view_log,
where=file_where,
@ -1324,7 +1321,7 @@ def view_directory_cvs(request, data, sortby, sortdir):
pathtype=vclib.FILE,
params={})
rows.append(row)
rows.append(row)
data.update({
'num_files' : num_files,
@ -1391,7 +1388,7 @@ def view_directory_svn(request, data, sortby, sortdir):
if file.kind == vclib.DIR:
row.type = 'dir'
row.name = file.name + '/'
row.name = file.name
row.cvs = 'none' # What the heck is this?
row.href = request.get_url(view_func=view_directory,
where=where_prefix + file.name,

View File

@ -183,10 +183,10 @@ href="[docroot]/help_[if-any where]dir[else]root[end]view.html">ViewCVS and CVS
<td [if-any have_logs][is cfg.options.use_cvsgraph "1"]colspan=2[end][end]>
<a name="[rows.anchor]" href="[rows.href]">
<img src="[icons]/small/dir.gif" alt="(dir)" border=0 width=16 height=16>
[rows.name]
[rows.name]/
</a>
[is roottype "cvs"]
[is rows.name "Attic/"]
[is rows.name "Attic"]
&nbsp; <a href="[show_attic_href]#dirlist">[[]show contents]</a>
[end]
[end]

View File

@ -185,10 +185,10 @@ href="[docroot]/help_[if-any where]dir[else]root[end]view.html">ViewCVS and CVS
<td [if-any have_logs][is cfg.options.use_cvsgraph "1"]colspan=2[end][end]>
<a name="[rows.anchor]" href="[rows.href]">
<img src="[icons]/small/dir.gif" alt="(dir)" border=0 width=16 height=16>
[rows.name]
[rows.name]/
</a>
[is roottype "cvs"]
[is rows.name "Attic/"]
[is rows.name "Attic"]
&nbsp; <a href="[show_attic_href]#dirlist">[[]show contents]</a>
[end]
[end]