Rename SVNPropertySetter to RevisionPropertySetter.
[cvs2svn.git] / cvs2svn_lib / svn_commit_item.py
blob8e9add2444a33793aa3c884a69b4de3f06367882
1 # (Be in -*- python -*- mode.)
3 # ====================================================================
4 # Copyright (c) 2000-2008 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 cvs2svn_lib.context import Ctx
23 class SVNCommitItem:
24 """A wrapper class for CVSRevision objects upon which
25 Subversion-related data (such as properties) may be hung."""
27 def __init__(self, cvs_rev, svn_props_changed):
28 """Initialize instance and record the properties for this file.
29 SVN_PROPS_CHANGED indicates whether the svn: properties are known
30 to have changed since the last revision.
32 The properties are set by the RevisionPropertySetter in
33 Ctx().revision_property_setters."""
35 self.cvs_rev = cvs_rev
36 # Did the svn properties change for this file (i.e., do they have
37 # to be written to the dumpfile?)
38 self.svn_props_changed = svn_props_changed
40 # The properties for this item as a map { key : value }. If VALUE
41 # is None, the property should be left unset.
42 self.svn_props = cvs_rev.cvs_file.properties.copy()
44 for revision_property_setter in Ctx().revision_property_setters:
45 revision_property_setter.set_properties(self)
47 def has_keywords(self):
48 return bool(self.svn_props.get('svn:keywords', None))