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
    #    ),

    # To read mime types from a file and use them to set svn:mime-type
    # based on the filename extensions, uncomment the following line
    # and specify a filename (see
    # http://en.wikipedia.org/wiki/Mime.types for information about
    # mime.types files):
    #MimeMapper(r'/etc/mime.types', ignore_case=False),

    # Omit the svn:eol-style property from any files that are listed
    # as binary (i.e., mode '-kb') in CVS:
    CVSBinaryFileEOLStyleSetter(),

    # If the file is binary and its svn:mime-type property is not yet
    # set, set svn:mime-type to 'application/octet-stream'.
    CVSBinaryFileDefaultMimeTypeSetter(),

    # To try to determine the eol-style from the mime type, uncomment
    # the following line:
    #EOLStyleFromMimeTypeSetter(),

    # Choose one of the following lines to set the default
    # svn:eol-style if none of the above rules applied.  The argument
    # is the svn:eol-style that should be applied, or None if no
    # svn:eol-style should be set (i.e., the file should be treated as
    # binary).
    #
    # The default is to treat all files as binary unless one of the
    # previous rules has determined otherwise, because this is the
    # safest approach.  However, if you have been diligent about
    # marking binary files with -kb in CVS and/or you have used the
Beispiel #3
0
        # Now add a rule whose job it is to pick the preferred parents of
        # branches and tags:
        symbol_strategy_rules.append(HeuristicPreferredParentRule())

        if auto_props_file:
            ctx.svn_property_setters.append(
                AutoPropsPropertySetter(auto_props_file,
                                        auto_props_ignore_case))

        if mime_types_file:
            ctx.svn_property_setters.append(MimeMapper(mime_types_file))

        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