Commit Graph

32 Commits (f48add83f7d3ee999dc582312f9b3afc7fdb2a5c)

Author SHA1 Message Date
cmpilato f48add83f7 Bump copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2820 8cb11bc2-c004-0410-86c3-e597b4017df7
2013-01-04 19:01:54 +00:00
cmpilato 9e9b82218c Bump copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2720 8cb11bc2-c004-0410-86c3-e597b4017df7
2012-01-23 17:52:47 +00:00
cmpilato a5df176395 Wow. Drop a "general code cleanup" kind of bomb on the codebase. All
of this is aimed at not paying the maintenance price of supporting
Python versions prior to 2.4 any longer, plus a little bit of just
getting dead code out of the way.

* lib/compat.py
  Remove as unused.

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

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

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

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

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

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

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

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

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

Also, so some rearranging of non-critical bits.

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


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2437 8cb11bc2-c004-0410-86c3-e597b4017df7
2010-09-03 16:49:52 +00:00
cmpilato 7fd9e405a1 Update copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2107 8cb11bc2-c004-0410-86c3-e597b4017df7
2009-03-18 16:43:33 +00:00
cmpilato d1a7412c6d Remove dead code.
* lib/popen.py
  (pipe_cmds, _copy): Remove as unused.

* bin/standalone.py
  (StandaloneServer.run_viewvc): Tweak comment that referred to pipe_cmds().

Found by: Rune Halvorsen <runeh {AT} sanedefaults.net>


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2088 8cb11bc2-c004-0410-86c3-e597b4017df7
2009-02-03 03:53:25 +00:00
cmpilato 4395bc3b1c Update copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1828 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-28 16:11:24 +00:00
cmpilato e1f28b1bc0 * lib/viewvc.py
* lib/vclib/ccvs/rcsparse/common.py
* lib/vclib/ccvs/rcsparse/default.py
* lib/vclib/ccvs/rcsparse/texttools.py
* lib/vclib/ccvs/blame.py
* lib/blame.py
* lib/popen.py
  Replace stray tabs with spaces.  (Hopefully) no logic changes.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1616 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-17 21:07:33 +00:00
rey4 3efd3fa040 Clean for file headers and copyright notices for issue 167
* bin/asp/query.asp
* bin/asp/viewvc.asp
* bin/cgi/query.cgi
* bin/cgi/viewvc.cgi
* bin/cvsdbadmin
* bin/loginfo-handler
* bin/make-database
* bin/mod_python/handler.py
* bin/mod_python/query.py
* bin/mod_python/viewvc.py
* bin/standalone.py
* bin/svndbadmin
* lib/accept.py
* lib/blame.py
* lib/compat.py
* lib/config.py
* lib/cvsdb.py
* lib/dbi.py
* lib/debug.py
* lib/idiff.py
* lib/popen.py
* lib/query.py
* lib/sapi.py
* lib/vclib/__init__.py
* lib/vclib/bincvs/__init__.py
* lib/vclib/ccvs/__init__.py
* lib/vclib/ccvs/blame.py
* lib/vclib/ccvs/rcsparse/__init__.py
* lib/vclib/ccvs/rcsparse/common.py
* lib/vclib/ccvs/rcsparse/debug.py
* lib/vclib/ccvs/rcsparse/default.py
* lib/vclib/ccvs/rcsparse/texttools.py
* lib/vclib/svn/__init__.py
* lib/vclib/svn_ra/__init__.py
* lib/viewvc.py
* lib/win32popen.py
* tools/make-release
* tparse/tparse.cpp
* tparse/tparse.h
* tparse/tparsemodule.cpp
* tparse/tparsemodule.h
* viewcvs-install


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1288 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-18 02:07:36 +00:00
rey4 41296bf318 Avoid potential problem with pipe_cmds
* lib/popen.py
  (_pipe.close): use os.waitpid instead of os.wait to avoid messing with
    processes that dont belong us


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1286 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-17 20:25:34 +00:00
cmpilato a2db8718cf Make some fixes to the pipe handling code to avoid zombie processes.
Patch by Paul Sokolovsky <psokolovsky@vasoftware.com>.

* lib/popen.py
  (pipe_cmds): Instead of storing only the process ID of the last
    child process in a multi-process pipe, keep them all, and wait on
    them all to finish.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1278 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-07 14:57:27 +00:00
rey4 42b55eb5f9 Improve error reporting when svn blame fails. Also fix some bugs in
BlameSource. Maybe now we don't need BlameSourceKludge anymore...

* lib/vclib/svn/__init__.py
  (BlameSource.__init__): add missing first_rev parameter
  (BlameSource.__getitem__): remove check for fp.eof() which may
    return true when the process has finished executing but data
    can still be read from the pipe
  (BlameSource.__getitem__, BlameSourceKludge.__getitem__):
    use regex to parse blame info so we can show a detailed error
    message instead of just an exception when split() or int() fail

* lib/popen.py
  (_pipe.eof): add note about implementation problem


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1236 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-01-22 17:01:02 +00:00
rey4 360c5d9e66 Make popen.pipe_cmds() accept an "out" argument that controls where
output from last command goes. For now only the unix implementation
respects it, windows implementation always writes to standard output
as before.

* lib/popen.py
  (pipe_cmds): add "out" argument

* lib/viewcvs.py
  (MarkupShell.__call__): update call to pipe_cmds()


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1220 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-29 14:49:42 +00:00
rey4 b91146fee0 Work on issue 168, s/ViewCVS/ViewVC. This patch changes references to
ViewCVS in comments, strings, and documentation. References to ViewCVS
in filenames and urls still need to be fixed. Also, logo.png (the blimp)
needs to be updated or replaced.

This patch is by Gerard Gerritsen (sigcafe), the only change I've made is
to restore a reference to ViewCVS in a comment about backwards compatibility.

* windows/README
* viewcvs-install
* README
* templates/include/footer.ezt
* templates/include/header.ezt
* templates/error.ezt
* templates/query.ezt
* templates/docroot/help.css
* templates/docroot/help_query.html
* templates/docroot/help_dirview.html
* templates/docroot/help_rootview.html
* templates/docroot/styles.css
* templates/docroot/help_log.html
* templates/diff.ezt
* tools/make-release
* lib/sapi.py
* lib/dbi.py
* lib/accept.py
* lib/cvsdb.py
* lib/config.py
* lib/query.py
* lib/vclib/bincvs/__init__.py
* lib/vclib/svn/__init__.py
* lib/vclib/__init__.py
* lib/vclib/svn_ra/__init__.py
* lib/vclib/ccvs/rcsparse/common.py
* lib/vclib/ccvs/rcsparse/__init__.py
* lib/vclib/ccvs/rcsparse/default.py
* lib/vclib/ccvs/rcsparse/texttools.py
* lib/vclib/ccvs/rcsparse/debug.py
* lib/vclib/ccvs/__init__.py
* lib/vclib/ccvs/blame.py
* lib/blame.py
* lib/popen.py
* lib/compat.py
* lib/viewcvs.py
* lib/debug.py
* INSTALL
* bin/standalone.py
* bin/make-database
* bin/mod_python/query.py
* bin/mod_python/viewcvs.py
* bin/cgi/query.cgi
* bin/cgi/viewcvs.cgi
* bin/asp/query.asp
* bin/asp/viewcvs.asp
* bin/svndbadmin
* bin/loginfo-handler
* bin/cvsdbadmin
* viewcvs.conf.dist


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1200 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-17 17:19:28 +00:00
rey4 5d0396e4c7 Restore viewcvs's ability to run under python 1.5
* lib/vclib/bincvs/__init__.py
  (BinCVSRepository.rcs_popen):
    convert tuples to lists before passing to list.extend

* lib/compat.py
  (formatdate):
    cut n' paste of rfc822.formatdate()

* lib/popen.py
  (popen):
    don't use string "find" method

* lib/viewcvs.py
  (Request.get_link):
    don't use dictionary "setdefault" method

  (check_freshness):
    don't use rfc822.formatdate()

* lib/win32popen.py
  (CommandLine, MakePrivateHandle, MakeInheritedHandle):
    don't use +=, |= operators

  (File2FileObject):
    don't use string "find" methods

  (SpoolWorker):
    don't use print >> syntax


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1081 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-08-22 18:41:59 +00:00
cmpilato f85b7bb67e * viewcvs/lib/popen.py
(popen): Removed commented-out code.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1009 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-01-31 21:14:04 +00:00
rey4 a06053167b fixes for python 1.5 compatibility
* lib/popen.py
    use string functions instead of methods

* lib/viewcvs.py
    use apply() function instead of **arg calling syntax


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@697 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-08-04 17:42:21 +00:00
rey4 3b02f55c88 Changed windows implementation of popen() to call CreateProcess with a "nul"
file handle instead of no handle at all when discarding the child process's
standard error output. Without this change, some versions of RCS crash when
they try to print warning messages.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@659 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-06-09 23:20:00 +00:00
rey4 f62fc9bd69 * lib/win32popen.py:
- removed nonblocking implementation of win32popen.MakeSpyPipe(). It added
    unnecessary complexity and had a flaw which made it inefficient to boot.

* lib/popen.py:
  - changes to work with new win32popen.CreatePipe() signature


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@653 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-06-02 04:40:44 +00:00
rey4 9c77b6eb7d fixed pipe_cmds() to work with mod_python on unix
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@652 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-06-02 04:05:00 +00:00
rey4 459ed3fea3 * lib/sapi.py
- Filled in ModPythonServer and AspServer header() methods to make use of
      the new http 'status' parameter. Also, changed CgiServer's header()
      method to ignore the status parameter under IIS to prevent the server
      from discarding the ViewCVS output and instead sending a static error
      page.
    - ModPythonFile and AspFile classes have been eliminated and replaced
      with a more generic File class. All server classes have new write()
      and flush() methods.
    - Common code from AspServer and ModPythonServer has been moved into
      a base class called ThreadedServer. AspProxy is renamed to
      ThreadedServerProxy.
    - All server classes now inherit from a new base class called Server
      which contains the small amount of code common to all of them.
    - added fix_iis_path_info() function, renamed IIS_FixURL() to
      fix_iis_url()
    - renamed getFile() methods to file()

* lib/viewcvs.py
    - Eliminated global server variable. Changed some scattered
      server.escape() calls into cgi.escape() calls. Got around other uses
      of the variable by adding a server member to the Request class.
    - Deleted gstein's strongly worded comment about the quality of the sapi
      hack :)
    - Page-global 'g_name_printed' is now passed as a normal parameter
      called 'name_printed' to the augment_entry() function
    - Got rid of some confusing string manipulation in human_readable_diff()
    - added 'server' parameter to viewcvs.main() to avoid relying on the
      sapi.server global variable

* cgi/viewcvs.cgi, windows/viewcvs.py, windows/viewcvs.asp
    - Added 'server' parameter to viewcvs.main() calls

* standalone.py:
    - Changed StandaloneServer.header() method to accept http status code
    - Added 'server' parameter to viewcvs.main() call

* lib/query.py
    - added 'server' parameter to query.main() to avoid relying on the
      sapi.server global variable
    - got rid of global 'server' variable and page-global 'viewcvs_link'
      variable, instead those values are passed as function parameters

* cgi/query.cgi, windows/query.py, windows/query.asp
    - Added 'server' parameter to query.main() calls

* lib/debug.py
    - Changed PrintStackTrace(), PrintException(), and DumpChildren() not to
      rely on global sapi.server variable and to use new server.write()
      method

* lib/popen.py
    - changed server.getFile() calls to server.file()


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@642 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-03-12 23:08:09 +00:00
gstein d51c87a71a Various fixes and improvements.
* lib/config.py:
  (_parse_roots): get rid of a string method usage.

* lib/popen.py:
  (pipe_cmds): stop using the += syntax (not compatible with 1.5.2)

* lib/sapi.py:
  (CgiServer.__init__): use os.environ, not os.getenv()
  (IIS_FixURL): stop using the += syntax

* lib/viewcvs.py:
  - note: these changes look big, but are small. use 'cvs diff -b' to
    see the real change without the reindentation.
  (markup_stream_python): record a note about some future work
  (run_viewcvs): new function which holds the guts of ViewCVS. this
    used to be main() a long while back before that got monkeyed. this
    is really just a reindent.
  (main): hold the exception handling logic. tweak then the t_start
    and t_end calls are made, relative to the try/finally.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@638 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-03-11 20:43:06 +00:00
rey4 a79f56d178 bugfix: enabled display of pipe_cmds error streams in debug mode
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@625 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-02-20 10:21:08 +00:00
rey4 d8b66eebde - fixed debug.PrintStackTrace() function
- updated child process tracker to use the sapi.server.pageGlobals dictionary


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@601 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-02-11 02:58:04 +00:00
rey4 f6f2654281 - modified popen module to work on windows
- added debugging mode for popen which can display the input and
  output from child processes (only works on windows for now)


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@592 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-02-09 09:57:46 +00:00
gstein 79728fb463 Update copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@543 8cb11bc2-c004-0410-86c3-e597b4017df7
2002-09-05 07:34:45 +00:00
pefu f5fa59bbd3 Improve setup debugging based on an idea of Tim Cera.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@290 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-31 09:15:42 +00:00
gstein 007ad51b2c change web site references from www.lyra.org/viewcvs/ to the new
viewcvs.sourceforge.net/ site.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@193 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-05-30 08:49:19 +00:00
gstein e3dbdb4fcc Update copyright years to include 2001.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@182 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-05-12 22:51:02 +00:00
gstein e6080c8366 execvp() can raise an exception, which means we never get to the sys.exit()
call. by wrapping it with try/except, we can ensure that get there.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@129 8cb11bc2-c004-0410-86c3-e597b4017df7
2000-05-25 06:57:02 +00:00
gstein 1a821bda9e add pipe_cmds() to set up a sequence of processes/pipes
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@126 8cb11bc2-c004-0410-86c3-e597b4017df7
2000-05-22 08:46:04 +00:00
gstein 7fc9018074 allow errors to be captured or tossed.
fix small bug with mode=='w' (use correct file for stdout/stderr)


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@101 8cb11bc2-c004-0410-86c3-e597b4017df7
2000-05-10 00:58:44 +00:00
gstein a7fe838521 better version of popen(), which allows us to not worry about quoting the
arguments to the target program.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@100 8cb11bc2-c004-0410-86c3-e597b4017df7
2000-05-09 22:38:21 +00:00