Beispiel #1
0
  def process_property_setter_options(self):
    """Process the options that set SVN properties."""

    ctx = Ctx()
    options = self.options

    for value in options.auto_props_files:
      ctx.svn_property_setters.append(
          AutoPropsPropertySetter(value, options.auto_props_ignore_case)
          )

    for value in options.mime_types_files:
      ctx.svn_property_setters.append(MimeMapper(value))

    ctx.svn_property_setters.append(CVSBinaryFileEOLStyleSetter())

    ctx.svn_property_setters.append(CVSBinaryFileDefaultMimeTypeSetter())

    if options.eol_from_mime_type:
      ctx.svn_property_setters.append(EOLStyleFromMimeTypeSetter())

    ctx.svn_property_setters.append(
        DefaultEOLStyleSetter(options.default_eol)
        )

    ctx.svn_property_setters.append(SVNBinaryFileKeywordsPropertySetter())

    if not options.keywords_off:
      ctx.svn_property_setters.append(
          KeywordsPropertySetter(config.SVN_KEYWORDS_VALUE))

    ctx.svn_property_setters.append(ExecutablePropertySetter())
Beispiel #2
0
    # the most convenient setting for text files.  Other possible
    # options: 'CRLF', 'CR', 'LF'.
    DefaultEOLStyleSetter(None),
    #DefaultEOLStyleSetter('native'),

    # Prevent svn:keywords from being set on files that have
    # svn:eol-style unset.
    SVNBinaryFileKeywordsPropertySetter(),

    # If svn:keywords has not been set yet, set it based on the file's
    # CVS mode:
    KeywordsPropertySetter(config.SVN_KEYWORDS_VALUE),

    # Set the svn:executable flag on any files that are marked in CVS as
    # being executable:
    ExecutablePropertySetter(),

    # The following causes keywords to be untouched in binary files and
    # collapsed in all text to be committed:
    ConditionalPropertySetter(
        cvs_file_is_binary, KeywordHandlingPropertySetter('untouched'),
        ),
    KeywordHandlingPropertySetter('kept'),

    ])
ctx.revision_property_setters.extend([
    ])

# To skip the cleanup of temporary files, uncomment the following
# option:
#ctx.skip_cleanup = True
Beispiel #3
0
        ctx.svn_property_setters.append(CVSBinaryFileEOLStyleSetter())

        ctx.svn_property_setters.append(CVSBinaryFileDefaultMimeTypeSetter())

        if eol_from_mime_type:
            ctx.svn_property_setters.append(EOLStyleFromMimeTypeSetter())

        ctx.svn_property_setters.append(DefaultEOLStyleSetter(default_eol))

        ctx.svn_property_setters.append(SVNBinaryFileKeywordsPropertySetter())

        if not keywords_off:
            ctx.svn_property_setters.append(
                KeywordsPropertySetter(config.SVN_KEYWORDS_VALUE))

        ctx.svn_property_setters.append(ExecutablePropertySetter())

        # Create the default project (using ctx.trunk, ctx.branches, and
        # ctx.tags):
        self.add_project(
            cvsroot,
            trunk_path=trunk_base,
            branches_path=branches_base,
            tags_path=tags_base,
            symbol_transforms=symbol_transforms,
            symbol_strategy_rules=symbol_strategy_rules,
        )

    def check_options(self):
        """Check the the run options are OK.