From 54947b73b8ecd268472728091b6e964c223215c8 Mon Sep 17 00:00:00 2001 From: mhagger Date: Sat, 12 Jun 2010 09:40:33 +0000 Subject: [PATCH] Change DescriptionPropertySetter into a FilePropertySetter. git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@5158 be7e6eca-30d4-0310-a8e5-ac0d63af7087 --- cvs2svn-example.options | 4 ++-- cvs2svn_lib/property_setters.py | 12 ++++++------ cvs2svn_lib/run_options.py | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cvs2svn-example.options b/cvs2svn-example.options index d35abe39..2c26b85a 100644 --- a/cvs2svn-example.options +++ b/cvs2svn-example.options @@ -501,12 +501,12 @@ ctx.file_property_setters.extend([ # being executable: ExecutablePropertySetter(), - ]) -ctx.revision_property_setters.extend([ # Set the cvs:description property to the CVS description of any # file that has one: DescriptionPropertySetter(propname='cvs:description'), + ]) +ctx.revision_property_setters.extend([ # Uncomment the following line to include the original CVS revision # numbers as file properties in the SVN archive: #CVSRevisionNumberSetter(propname='cvs2svn:cvs-rev'), diff --git a/cvs2svn_lib/property_setters.py b/cvs2svn_lib/property_setters.py index 370e184d..41771fef 100644 --- a/cvs2svn_lib/property_setters.py +++ b/cvs2svn_lib/property_setters.py @@ -86,18 +86,18 @@ class ExecutablePropertySetter(FilePropertySetter): cvs_file.properties[self.propname] = '*' -class DescriptionPropertySetter(RevisionPropertySetter): - """Set the cvs:description property based on cvs_rev.cvs_file.description.""" +class DescriptionPropertySetter(FilePropertySetter): + """Set the cvs:description property based on cvs_file.description.""" def __init__(self, propname='cvs:description'): self.propname = propname - def set_properties(self, s_item): - if self.propname in s_item.svn_props: + def set_properties(self, cvs_file): + if self.propname in cvs_file.properties: return - if s_item.cvs_rev.cvs_file.description: - s_item.svn_props[self.propname] = s_item.cvs_rev.cvs_file.description + if cvs_file.description: + cvs_file.properties[self.propname] = cvs_file.description class CVSBinaryFileEOLStyleSetter(FilePropertySetter): diff --git a/cvs2svn_lib/run_options.py b/cvs2svn_lib/run_options.py index c363d6b4..8d2dcca0 100644 --- a/cvs2svn_lib/run_options.py +++ b/cvs2svn_lib/run_options.py @@ -1054,7 +1054,7 @@ class RunOptions(object): ctx.file_property_setters.append(ExecutablePropertySetter()) - ctx.revision_property_setters.append(DescriptionPropertySetter()) + ctx.file_property_setters.append(DescriptionPropertySetter()) def process_options(self): """Do the main configuration based on command-line options. -- 2.11.4.GIT