Restore ViewCVS' ability to work straight from the development tree.

* lib/viewcvs.py:
  (g_install_dir): from the CGI, the conf is a couple levels up (now)
    rather than just one.
  (view_directory_cvs): row.name must be set for all row types since it
    will be displayed as part of the error lines. move the assignment
    further up in the file.

* www/cgi/viewcvs.cgi:
  (__main__): the lib is a couple levels up from the CGI (now)


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@706 8cb11bc2-c004-0410-86c3-e597b4017df7
remotes/tags/1.0.0-rc1
gstein 2003-09-18 22:16:04 +00:00
parent c77b65be9d
commit 7183660985
2 changed files with 8 additions and 8 deletions

View File

@ -114,7 +114,7 @@ if CONF_PATHNAME:
g_install_dir = os.path.dirname(CONF_PATHNAME)
else:
# development directories
g_install_dir = os.pardir # typically, ".."
g_install_dir = os.path.join(os.pardir, os.pardir) # typically, "../.."
class Request:
@ -1492,6 +1492,12 @@ def view_directory_cvs(request, data, sortby, sortdir):
row.type = 'file'
row.anchor = file
file_where = where_prefix + file
if file[:6] == 'Attic/':
file = file[6:]
row.name = file # ensure this occurs after we strip Attic/
num_files = num_files + 1
info = fileinfo.get(file)
if info == bincvs._FILE_HAD_ERROR:
@ -1507,13 +1513,7 @@ def view_directory_cvs(request, data, sortby, sortdir):
continue
num_displayed = num_displayed + 1
file_where = where_prefix + file
if file[:6] == 'Attic/':
file = file[6:]
row.cvs = 'data'
row.name = file # ensure this occurs after we strip Attic/
row.href = request.get_url(view_func=view_log,
where=file_where,
pathtype=vclib.FILE,

View File

@ -43,7 +43,7 @@ import sys
if LIBRARY_DIR:
sys.path.insert(0, LIBRARY_DIR)
else:
sys.path[:0] = ['../lib'] # any other places to look?
sys.path[:0] = ['../../lib'] # any other places to look?
#########################################################################