This file is indexed.

/usr/lib/python2.7/dist-packages/xxdiff/resilient.py is in xxdiff-scripts 1:4.0.1+dfsg-1.

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
# This file is part of the xxdiff package.  See xxdiff for license and details.

"""
Resilient files.

This is used to manage a location where merge comments and preview history are
saved between sessions.

Support a per-user directory to hold resilient temporary files.  We want to be
able to recycle the files stored in there if the process/script has been
interrupted for some reason--this is quite common for source code, as the
reviewer often realizes he forgot to do something or other, this is a benefit of
reviewing diffs before committing--if the same directories/files are to be
checked-in.  We do not want to store the files in the CWD because that might
change, and it may later interfere with other tools, e.g. show up in 'svn
status' if left behind.  Therefore, we store the comments file in the user's
home directory under a hash computed from the absolute paths of the directories
given as arguments.
"""

__author__ = 'Martin Blais <blais@furius.ca>'


# stdlib imports.
import os, hashlib
from os.path import *

# xxdiff imports.
from xxdiff.scripts import script_name


resilient_dir = join(os.environ['HOME'], '.%s' % script_name)

def resilient_for_paths(paths):
    """
    Compute a unique file or directory name for a set of paths (considered
    unique as absolute) for a specific process.
    """

    # Compute a unique hash from the given absolute paths.
    comhash = hashlib.md5()
    for p in paths:
        comhash.update(abspath(p))
    resdir = join(resilient_dir, comhash.hexdigest())
    return resdir

def resilient_remove(fn):
    """
    Removes a resilient file, and then checks if the resilient file's parent
    directory can be removed as well.
    """
    os.unlink(fn)
    parent = dirname(fn)
    if not os.listdir(parent):
        os.rmdir(parent)