This file is indexed.

/usr/lib/python2.7/dist-packages/cvs2svn_lib/output_option.py is in cvs2svn 2.4.0-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# (Be in -*- python -*- mode.)
#
# ====================================================================
# Copyright (c) 2000-2009 CollabNet.  All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.  The terms
# are also available at http://subversion.tigris.org/license-1.html.
# If newer versions of this license are posted there, you may use a
# newer version instead, at your option.
#
# This software consists of voluntary contributions made by many
# individuals.  For exact contribution history, see the revision
# history and logs, available at http://cvs2svn.tigris.org/.
# ====================================================================

"""This module contains classes that hold the cvs2svn output options."""

from cvs2svn_lib.common import IllegalSVNPathError


class OutputOption:
  """Represents an output choice for a run of cvs2svn."""

  # name of output format (for error messages), capitalized for use at
  # the start of a sentence.  This class attribute must be set by
  # subclasses
  name = None

  def register_artifacts(self, which_pass):
    """Register artifacts that will be needed for this output option.

    WHICH_PASS is the pass that will call our callbacks, so it should
    be used to do the registering (e.g., call
    WHICH_PASS.register_temp_file() and/or
    WHICH_PASS.register_temp_file_needed())."""

    pass

  def verify_filename_legal(self, filename):
    """Verify that FILENAME is a legal filename.

    FILENAME is a path component of a CVS path.  Check that it won't
    choke the destination VCS:

    - Check that it is not empty.

    - Check that it is not equal to '.' or '..'.

    - Check that the filename does not include any characters that are
      illegal in the destination VCS.

    If any of these tests fail, raise an IllegalSVNPathError.

    This method should be overridden as needed by derived classes."""

    if filename == '':
      raise IllegalSVNPathError("Empty filename component.")

    if filename in ['.', '..']:
      raise IllegalSVNPathError("Illegal filename component %r." % (filename,))

  def check(self):
    """Check that the options stored in SELF are sensible.

    This might including the existence of a repository on disk, etc."""

    raise NotImplementedError()

  def check_symbols(self, symbol_map):
    """Check that the symbols in SYMBOL_MAP are OK for this output option.

    SYMBOL_MAP is a map {AbstractSymbol : (Trunk|TypedSymbol)},
    indicating how each symbol is planned to be converted.  Raise a
    FatalError if the symbol plan is not acceptable for this output
    option."""

    raise NotImplementedError()

  def setup(self, svn_rev_count):
    """Prepare this output option."""

    raise NotImplementedError()

  def process_initial_project_commit(self, svn_commit):
    """Process SVN_COMMIT, which is an SVNInitialProjectCommit."""

    raise NotImplementedError()

  def process_primary_commit(self, svn_commit):
    """Process SVN_COMMIT, which is an SVNPrimaryCommit."""

    raise NotImplementedError()

  def process_post_commit(self, svn_commit):
    """Process SVN_COMMIT, which is an SVNPostCommit."""

    raise NotImplementedError()

  def process_branch_commit(self, svn_commit):
    """Process SVN_COMMIT, which is an SVNBranchCommit."""

    raise NotImplementedError()

  def process_tag_commit(self, svn_commit):
    """Process SVN_COMMIT, which is an SVNTagCommit."""

    raise NotImplementedError()

  def cleanup(self):
    """Perform any required cleanup related to this output option."""

    raise NotImplementedError()


class NullOutputOption(OutputOption):
  """An OutputOption that doesn't do anything."""

  name = 'null'

  def check(self):
    pass

  def check_symbols(self, symbol_map):
    pass

  def setup(self, svn_rev_count):
    pass

  def process_initial_project_commit(self, svn_commit):
    pass

  def process_primary_commit(self, svn_commit):
    pass

  def process_post_commit(self, svn_commit):
    pass

  def process_branch_commit(self, svn_commit):
    pass

  def process_tag_commit(self, svn_commit):
    pass

  def cleanup(self):
    pass