This file is indexed.

/usr/lib/python2.7/dist-packages/cvs2svn_lib/artifact.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
# (Be in -*- python -*- mode.)
#
# ====================================================================
# Copyright (c) 2000-2008 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 defines Artifact types to be used with an ArtifactManager."""


import os

from cvs2svn_lib.context import Ctx
from cvs2svn_lib.log import logger


class Artifact(object):
  """An object that is created, used across passes, then cleaned up."""

  def __init__(self):
    # The set of passes that need this artifact.  This field is
    # maintained by ArtifactManager.
    self._passes_needed = set()

  def cleanup(self):
    """This artifact is no longer needed; clean it up."""

    pass


class TempFile(Artifact):
  """A temporary file that can be used across cvs2svn passes."""

  def __init__(self, basename):
    Artifact.__init__(self)
    self.basename = basename

  def _get_filename(self):
    return Ctx().get_temp_filename(self.basename)

  filename = property(_get_filename)

  def cleanup(self):
    logger.verbose("Deleting", self.filename)
    os.unlink(self.filename)

  def __str__(self):
    return 'Temporary file %r' % (self.filename,)