From 3e1618a29d54913423dbfbc98bb6540f2cd67119 Mon Sep 17 00:00:00 2001 From: mhagger Date: Fri, 11 Nov 2005 20:28:16 +0000 Subject: [PATCH] Allow SVNCommitItem.svn_props to contain None (to indicate property unset). * cvs2svn (SVNCommitItem.__init__): Document contents of svn_props field. (DumpfileDelegate._add_or_change_path): If a property value is None, don't set anything. git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@1651 be7e6eca-30d4-0310-a8e5-ac0d63af7087 --- cvs2svn | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cvs2svn b/cvs2svn index 25e2caa8..b3fabeb4 100755 --- a/cvs2svn +++ b/cvs2svn @@ -3702,8 +3702,11 @@ class SVNCommitItem: # to be written to the dumpfile?) self.svn_props_changed = svn_props_changed - # We begin with only a "CVS revision" property. + # The properties for this item as a map { key : value }. If VALUE + # is None, no property should be set. self.svn_props = { } + + # We begin with only a "CVS revision" property. if Ctx().cvs_revnums: self.svn_props['cvs2svn:cvs-rev'] = c_rev.rev self.svn_props_changed = True @@ -3967,7 +3970,9 @@ class DumpfileDelegate(SVNRepositoryMirrorDelegate): prop_names = svn_props.keys() prop_names.sort() for pname in prop_names: - prop_contents += self._string_for_prop(pname, svn_props[pname]) + pvalue = svn_props[pname] + if pvalue is not None: + prop_contents += self._string_for_prop(pname, pvalue) prop_contents += 'PROPS-END\n' props_header = 'Prop-content-length: %d\n' % len(prop_contents) else: -- 2.11.4.GIT