Hi,

here’s a refreshed patch. Please apply and submit upstream.

Thanks,
//mirabilos
-- 
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-235
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg
diff -Nru cvs2svn-2.4.0/debian/changelog cvs2svn-2.4.0/debian/changelog
--- cvs2svn-2.4.0/debian/changelog      2016-07-30 19:57:13.000000000 +0200
+++ cvs2svn-2.4.0/debian/changelog      2016-08-08 18:39:12.000000000 +0200
@@ -1,3 +1,10 @@
+cvs2svn (2.4.0-3tarent1) tarent; urgency=low
+
+  * Non-maintainer upload. (Closes: #780448)
+  * Update from sid package.
+
+ -- Thorsten Glaser <[email protected]>  Mon, 08 Aug 2016 18:39:12 +0200
+
 cvs2svn (2.4.0-3) unstable; urgency=low
 
   * Update Standards-Version to 3.9.8 .
@@ -7,6 +14,14 @@
 
  -- Laszlo Boszormenyi (GCS) <[email protected]>  Sat, 30 Jul 2016 17:40:30 +0000
 
+cvs2svn (2.4.0-2tarent3) tarent; urgency=medium
+
+  * Non-maintainer upload.
+  * debian/patches/force-keyword-mode.patch: New.
+  * debian/patches/cvs-domain.patch: New.
+
+ -- Thorsten Glaser <[email protected]>  Mon, 06 Apr 2015 21:27:08 +0000
+
 cvs2svn (2.4.0-2) unstable; urgency=low
 
   * Run tests, but don't fail on them as only the Subversion output changed
diff -Nru cvs2svn-2.4.0/debian/patches/cvs-domain.patch 
cvs2svn-2.4.0/debian/patches/cvs-domain.patch
--- cvs2svn-2.4.0/debian/patches/cvs-domain.patch       1970-01-01 
01:00:00.000000000 +0100
+++ cvs2svn-2.4.0/debian/patches/cvs-domain.patch       2016-08-08 
18:38:20.000000000 +0200
@@ -0,0 +1,52 @@
+--- a/cvs2svn_lib/git_output_option.py
++++ b/cvs2svn_lib/git_output_option.py
+@@ -148,6 +148,7 @@ class GitOutputOption(DVCSOutputOption):
+         self, dump_filename, revision_writer,
+         author_transforms=None,
+         tie_tag_fixup_branches=False,
++        cvs_domain='',
+         ):
+     """Constructor.
+ 
+@@ -178,6 +179,7 @@ class GitOutputOption(DVCSOutputOption):
+     self.author_transforms = self.normalize_author_transforms(
+         author_transforms
+         )
++    self.cvs_domain = cvs_domain
+ 
+     self.tie_tag_fixup_branches = tie_tag_fixup_branches
+ 
+@@ -242,6 +244,8 @@ class GitOutputOption(DVCSOutputOption):
+     return self._map_author(cvs_author)
+ 
+   def _map_author(self, cvs_author):
++    if self.cvs_domain:
++        return "%s <%s@%s>" % (cvs_author, cvs_author, self.cvs_domain)
+     return self.author_transforms.get(cvs_author, "%s <>" % (cvs_author,))
+ 
+   @staticmethod
+--- a/cvs2svn_lib/git_run_options.py
++++ b/cvs2svn_lib/git_run_options.py
+@@ -111,6 +111,16 @@ A directory called \\fIcvs2svn-tmp\\fR (
+             'Do not create any output; just print what would happen.'
+             ),
+         ))
++    group.add_option(IncompatibleOption(
++        '--cvs-domain', type='string',
++        action='store',
++        help='domain for CVS user to eMail mapping',
++        man_help=(
++            'Enables writing \\fIcvsusername\\fR@\\fIdomain\\fR style'
++            'eMail addresses to the git commits.'
++            ),
++        metavar='DOMAIN',
++        ))
+ 
+     return group
+ 
+@@ -193,4 +203,5 @@ A directory called \\fIcvs2svn-tmp\\fR (
+           GitRevisionMarkWriter(),
+           # Optional map from CVS author names to git author names:
+           author_transforms={}, # FIXME
++          cvs_domain=self.options.cvs_domain,
+           )
diff -Nru cvs2svn-2.4.0/debian/patches/force-keyword-mode.patch 
cvs2svn-2.4.0/debian/patches/force-keyword-mode.patch
--- cvs2svn-2.4.0/debian/patches/force-keyword-mode.patch       1970-01-01 
01:00:00.000000000 +0100
+++ cvs2svn-2.4.0/debian/patches/force-keyword-mode.patch       2016-08-08 
18:38:20.000000000 +0200
@@ -0,0 +1,134 @@
+--- a/cvs2svn_lib/abstract_rcs_revision_manager.py
++++ b/cvs2svn_lib/abstract_rcs_revision_manager.py
+@@ -38,6 +38,9 @@ class AbstractRCSRevisionReader(Revision
+   # mode, which leaves the keywords untouched.  Therefore, whenever
+   # eol_fix is False, we need to use '-kb' mode and then (if
+   # necessary) expand or collapse the keywords ourselves.
++  #
++  # The 'kept' substitution is an exception, we do not deal with
++  # keywords at all in this case and just let CVS do its thing.
+   _text_options = {
+       (False, 'collapsed') : (['-kb'], 'collapsed'),
+       (False, 'expanded') : (['-kb'], 'expanded'),
+@@ -46,6 +49,9 @@ class AbstractRCSRevisionReader(Revision
+       (True, 'collapsed') : (['-kk'], None),
+       (True, 'expanded') : (['-kkv'], None),
+       (True, 'untouched') : (['-ko'], None),
++
++      (False, 'kept') : ([], None),
++      (True, 'kept') : ([], None),
+       }
+ 
+   def get_pipe_command(self, cvs_rev, k_option):
+--- a/cvs2svn_lib/checkout_internal.py
++++ b/cvs2svn_lib/checkout_internal.py
+@@ -706,6 +706,9 @@ class InternalRevisionReader(RevisionRea
+         'untouched' -- output keywords in the form they are found in
+             the RCS file
+ 
++        'kept' -- output keywords in the form they are found in
++            the CVS checkout output
++
+     Note that $Log$ never actually generates a log (which makes test
+     'requires_cvs()' fail).
+ 
+@@ -727,6 +730,9 @@ class InternalRevisionReader(RevisionRea
+     if keyword_handling == 'untouched':
+       # Leave keywords in the form that they were checked in.
+       pass
++    elif keyword_handling == 'kept':
++      # Leave keywords in the form they would have on checkout.
++      pass
+     elif keyword_handling == 'collapsed':
+       text = collapse_keywords(text)
+     elif keyword_handling == 'expanded':
+--- a/cvs2svn_lib/dvcs_common.py
++++ b/cvs2svn_lib/dvcs_common.py
+@@ -24,6 +24,7 @@ from cvs2svn_lib import config
+ from cvs2svn_lib.common import FatalError
+ from cvs2svn_lib.common import InternalError
+ from cvs2svn_lib.run_options import RunOptions
++from cvs2svn_lib.run_options import IncompatibleOption
+ from cvs2svn_lib.log import logger
+ from cvs2svn_lib.common import error_prefix
+ from cvs2svn_lib.context import Ctx
+@@ -50,9 +51,9 @@ class KeywordHandlingPropertySetter(File
+   propname = '_keyword_handling'
+ 
+   def __init__(self, value):
+-    if value not in ['collapsed', 'expanded', 'untouched', None]:
++    if value not in ['collapsed', 'expanded', 'untouched', 'kept', None]:
+       raise FatalError(
+-          'Value for %s must be "collapsed", "expanded", or "untouched"'
++          'Value for %s must be "collapsed", "expanded", "untouched", or 
"kept"'
+           % (self.propname,)
+           )
+     self.value = value
+@@ -69,6 +70,27 @@ class DVCSRunOptions(RunOptions):
+     Ctx().cross_branch_commits = False
+     RunOptions.__init__(self, progname, cmd_args, pass_manager)
+ 
++  def _get_extraction_options_group(self):
++    group = super(DVCSRunOptions, self)._get_extraction_options_group()
++    self.parser.set_default('force_keyword_mode', 'no')
++    group.add_option(IncompatibleOption(
++        '--force-keyword-mode', type='choice',
++        choices=['untouched', 'collapsed', 'expanded', 'kept', 'no'],
++        action='store',
++        help='force (untouched, collapsed, expanded, kept), or no',
++        man_help=(
++            'Keyword mode to force, or \\fIno\\fR to use the default. '
++            '\\fIopt\\fR can be \'untouched\' (keep literally as they '
++            'are recorded in the RCS file), \'collapsed\' (retain the '
++            'key but not the value), \'expanded\' (fake the way CVS '
++            'expands them, even for binaries), \'kept\' (just let CVS '
++            'deal with keywords).'
++            ),
++        metavar='OPT',
++        ))
++
++    return group
++
+   def set_project(
+         self,
+         project_cvs_repos_path,
+@@ -100,9 +122,14 @@ class DVCSRunOptions(RunOptions):
+   def process_property_setter_options(self):
+     super(DVCSRunOptions, self).process_property_setter_options()
+ 
++    property_mode = self.options.force_keyword_mode
++    if property_mode == 'no':
++        # default
++        property_mode = 'collapsed'
++
+     # Property setters for internal use:
+     Ctx().file_property_setters.append(
+-        KeywordHandlingPropertySetter('collapsed')
++        KeywordHandlingPropertySetter(property_mode)
+         )
+ 
+   def process_options(self):
+--- a/cvs2svn_lib/revision_manager.py
++++ b/cvs2svn_lib/revision_manager.py
+@@ -116,6 +116,8 @@ class RevisionReader(object):
+         *previous* revision, because CVS expands keywords on checkout,
+         not checkin.
+ 
++      * kept -- let CVS deal with keywords
++
+       * unset -- undefined behavior; depends on which revision manager
+         is being used.
+ 
+--- a/doc/properties.txt
++++ b/doc/properties.txt
+@@ -75,6 +75,10 @@ they are used for two purposes:
+                useful feature, but is listed for completeness.  NOT
+                YET IMPLEMENTED.
+ 
++           'kept' -- Just let CVS deal with the keywords, do not
++               handle them specially internally.  This may conflict
++               with other options and should be used carefully.
++
+        _eol_fix -- Should end-of-line sequences be made uniform before
+            committing to the target VCS?  If this property is set to a
+            non-empty value, then every end-of-line character sequence
diff -Nru cvs2svn-2.4.0/debian/patches/series 
cvs2svn-2.4.0/debian/patches/series
--- cvs2svn-2.4.0/debian/patches/series 2016-07-30 19:51:43.000000000 +0200
+++ cvs2svn-2.4.0/debian/patches/series 2016-08-08 18:38:34.000000000 +0200
@@ -1,3 +1,5 @@
 fix-co-dashv-obsolete.patch
 update_gcs_email.patch
 reproducible-build.patch
+force-keyword-mode.patch
+cvs-domain.patch

Reply via email to