From fe94a0347bbd1aff3a9e36b2ee744e74104c414c Mon Sep 17 00:00:00 2001 From: maxb Date: Fri, 4 Feb 2005 23:22:24 +0000 Subject: [PATCH] Fix up help message w.r.t. exact value of svn:keywords. * cvs2svn (SVN_KEYWORDS_VALUE): New constant. (SVNCommitItem.__init__, usage): Use the new constant, instead of a literal. git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@1415 be7e6eca-30d4-0310-a8e5-ac0d63af7087 --- cvs2svn | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cvs2svn b/cvs2svn index eca3d25a..b0bdd1d9 100755 --- a/cvs2svn +++ b/cvs2svn @@ -106,6 +106,8 @@ trunk_rev = re.compile('^[0-9]+\\.[0-9]+$') branch_tag = re.compile('^[0-9.]+\\.0\\.[0-9]+$') vendor_tag = re.compile('^[0-9]+\\.[0-9]+\\.[0-9]+$') +SVN_KEYWORDS_VALUE = 'Author Date Id Revision' + # This really only matches standard '1.1.1.*'-style vendor revisions. # One could conceivably have a file whose default branch is 1.1.3 or # whatever, or was that at some point in time, with vendor revisions @@ -3367,7 +3369,7 @@ class SVNCommitItem: # Set the svn:keywords property, if appropriate. See issue #2. if not self.keywords_off and (c_rev.mode is None or c_rev.mode == 'kv' or c_rev.mode == 'kvl'): - keywords = 'Author Date Id Revision' + keywords = SVN_KEYWORDS_VALUE # Remember if we need to filter the EOLs. We can't use self.svn_props # becase they are only set on the first revision and we need to filter @@ -3385,7 +3387,7 @@ class SVNCommitItem: # Set the svn:keywords property, if appropriate. See issue #2. if keywords: - self.svn_props['svn:keywords'] = 'Author Date Id Revision' + self.svn_props['svn:keywords'] = SVN_KEYWORDS_VALUE if mime_type: self.svn_props['svn:mime-type'] = mime_type @@ -4482,9 +4484,9 @@ def usage(): ' setting svn:mime-type' print ' --eol-from-mime-type set svn:eol-style by mime type (only with --mime-types)' print ' --no-default-eol don\'t set svn:eol-style by CVS defaults' - print ' --keywords-off don\'t set svn:keywords on any files (cvs2svn sets' - print ' "svn:keywords to author date id" on non-binary files' - print ' by default)' + print ' --keywords-off don\'t set svn:keywords on any files (by default,' + print ' cvs2svn sets svn:keywords on non-binary files to' + print ' "%s")' % SVN_KEYWORDS_VALUE def main(): # Convenience var, so we don't have to keep instantiating this Borg. -- 2.11.4.GIT