From d404f4c624871c9d1c967fd637f68de9af53c04d Mon Sep 17 00:00:00 2001 From: mhagger Date: Sat, 12 Jun 2010 15:08:26 +0000 Subject: [PATCH] Remove field SVNCommitItem.svn_props_changed. Use CVSRevision.properties_changed instead. (It includes the smarts to distinguish between CVSRevision instance types.) git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@5172 be7e6eca-30d4-0310-a8e5-ac0d63af7087 --- cvs2svn_lib/dumpfile_delegate.py | 2 +- cvs2svn_lib/svn_commit_item.py | 15 +++------------ cvs2svn_lib/svn_output_option.py | 4 ++-- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/cvs2svn_lib/dumpfile_delegate.py b/cvs2svn_lib/dumpfile_delegate.py index 360167da..73bb340b 100644 --- a/cvs2svn_lib/dumpfile_delegate.py +++ b/cvs2svn_lib/dumpfile_delegate.py @@ -238,7 +238,7 @@ class DumpfileDelegate(SVNRepositoryDelegate): # Calculate the (sorted-by-name) property string and length, if any. svn_props = cvs_rev.get_properties() - if s_item.svn_props_changed: + if cvs_rev.properties_changed: prop_contents = '' prop_names = svn_props.keys() prop_names.sort() diff --git a/cvs2svn_lib/svn_commit_item.py b/cvs2svn_lib/svn_commit_item.py index a0130f94..257d6c9f 100644 --- a/cvs2svn_lib/svn_commit_item.py +++ b/cvs2svn_lib/svn_commit_item.py @@ -21,21 +21,12 @@ from cvs2svn_lib.context import Ctx class SVNCommitItem: - """A wrapper class for CVSRevision objects upon which - Subversion-related data (such as properties) may be hung.""" + """A wrapper class for CVSRevision objects with no real purpose.""" - def __init__(self, cvs_rev, svn_props_changed): - """Initialize instance and record the properties for this file. - SVN_PROPS_CHANGED indicates whether the svn: properties are known - to have changed since the last revision. - - The properties are set by the RevisionPropertySetter in - Ctx().revision_property_setters.""" + def __init__(self, cvs_rev): + """Initialize instance.""" self.cvs_rev = cvs_rev - # Did the svn properties change for this file (i.e., do they have - # to be written to the dumpfile?) - self.svn_props_changed = svn_props_changed or cvs_rev.properties_changed def has_keywords(self): return bool(self.cvs_rev.get_properties().get('svn:keywords', None)) diff --git a/cvs2svn_lib/svn_output_option.py b/cvs2svn_lib/svn_output_option.py index 2cb25efd..50ed8c85 100644 --- a/cvs2svn_lib/svn_output_option.py +++ b/cvs2svn_lib/svn_output_option.py @@ -219,7 +219,7 @@ class SVNOutputOption(OutputOption): # We do not have to update the nodes because our mirror is only # concerned with the presence or absence of paths, and a file # content change does not cause any path changes. - self._invoke_delegates('change_path', SVNCommitItem(cvs_rev, False)) + self._invoke_delegates('change_path', SVNCommitItem(cvs_rev)) def _make_empty_subdirectories(self, cvs_directory, lod): """Make any empty subdirectories of CVS_DIRECTORY in LOD.""" @@ -272,7 +272,7 @@ class SVNOutputOption(OutputOption): lod = cvs_rev.lod parent_node = self._mkdir_p(parent_path, lod) parent_node.add_file(cvs_file) - self._invoke_delegates('add_path', SVNCommitItem(cvs_rev, True)) + self._invoke_delegates('add_path', SVNCommitItem(cvs_rev)) def copy_lod(self, src_lod, dest_lod, src_revnum): """Copy all of SRC_LOD at SRC_REVNUM to DST_LOD. -- 2.11.4.GIT