Make minimal changes to get HTML files to be valid XHTML, dropping from Strict
[cvs2svn.git] / cvs2svn_lib / svn_commit_item.py
blobe0c13e219c2e70116d2fe64be9850f0716c19d7d
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 class SVNCommitItem."""
20 from boolean import *
21 from context import Ctx
24 class SVNCommitItem:
25 """A wrapper class for CVSRevision objects upon which
26 Subversion-related data (such as properties) may be hung."""
28 def __init__(self, c_rev, svn_props_changed):
29 """Initialize instance and record the properties for this file.
30 SVN_PROPS_CHANGED indicates whether the svn: properties are known
31 to have changed since the last revision.
33 The properties are set by the SVNPropertySetters in
34 Ctx().svn_property_setters, then we read a couple of the
35 properties back out for our own purposes."""
37 self.c_rev = c_rev
38 # Did the svn properties change for this file (i.e., do they have
39 # to be written to the dumpfile?)
40 self.svn_props_changed = svn_props_changed
42 # The properties for this item as a map { key : value }. If VALUE
43 # is None, no property should be set.
44 self.svn_props = { }
46 for svn_property_setter in Ctx().svn_property_setters:
47 svn_property_setter.set_properties(self)
49 # Remember if we need to filter the EOLs. We could actually use
50 # self.svn_props now, since it is initialized for each revision.
51 self.needs_eol_filter = \
52 self.svn_props.get('svn:eol-style', None) is not None
54 self.has_keywords = self.svn_props.get('svn:keywords', None) is not None