Make minimal changes to get HTML files to be valid XHTML, dropping from Strict
[cvs2svn.git] / cvs2svn_lib / stdout_delegate.py
blob894a951cde29969dfe52d687f3d976ced9868dc5
1 # (Be in -*- python -*- mode.)
3 # ====================================================================
4 # Copyright (c) 2000-2006 CollabNet. All rights reserved.
6 # This software is licensed as described in the file COPYING, which
7 # you should have received as part of this distribution. The terms
8 # are also available at http://subversion.tigris.org/license-1.html.
9 # If newer versions of this license are posted there, you may use a
10 # newer version instead, at your option.
12 # This software consists of voluntary contributions made by many
13 # individuals. For exact contribution history, see the revision
14 # history and logs, available at http://cvs2svn.tigris.org/.
15 # ====================================================================
17 """This module contains database facilities used by cvs2svn."""
20 from boolean import *
21 from log import Log
22 from svn_repository_mirror import SVNRepositoryMirrorDelegate
25 class StdoutDelegate(SVNRepositoryMirrorDelegate):
26 """Makes no changes to the disk, but writes out information to
27 STDOUT about what the SVNRepositoryMirror is doing. Of course, our
28 print statements will state that we're doing something, when in
29 reality, we aren't doing anything other than printing out that we're
30 doing something. Kind of zen, really."""
32 def __init__(self, total_revs):
33 self.total_revs = total_revs
35 def start_commit(self, svn_commit):
36 """Prints out the Subversion revision number of the commit that is
37 being started."""
39 Log().write(Log.VERBOSE, "=" * 60)
40 Log().write(Log.NORMAL, "Starting Subversion r%d / %d" %
41 (svn_commit.revnum, self.total_revs))
43 def mkdir(self, path):
44 """Print a line stating that we are creating directory PATH."""
46 Log().write(Log.VERBOSE, " New Directory", path)
48 def add_path(self, s_item):
49 """Print a line stating that we are 'adding' s_item.c_rev.svn_path."""
51 Log().write(Log.VERBOSE, " Adding", s_item.c_rev.svn_path)
53 def change_path(self, s_item):
54 """Print a line stating that we are 'changing' s_item.c_rev.svn_path."""
56 Log().write(Log.VERBOSE, " Changing", s_item.c_rev.svn_path)
58 def delete_path(self, path):
59 """Print a line stating that we are 'deleting' PATH."""
61 Log().write(Log.VERBOSE, " Deleting", path)
63 def copy_path(self, src_path, dest_path, src_revnum):
64 """Print a line stating that we are 'copying' revision SRC_REVNUM
65 of SRC_PATH to DEST_PATH."""
67 Log().write(Log.VERBOSE, " Copying revision", src_revnum, "of", src_path)
68 Log().write(Log.VERBOSE, " to", dest_path)
70 def finish(self):
71 """State that we are done creating our repository."""
73 Log().write(Log.VERBOSE, "Finished creating Subversion repository.")
74 Log().write(Log.QUIET, "Done.")