~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/file_names.py

  • Committer: Robert Collins
  • Date: 2007-07-19 03:37:17 UTC
  • mto: (2592.3.45 repository)
  • mto: This revision was merged to the branch mainline in revision 2634.
  • Revision ID: robertc@robertcollins.net-20070719033717-2ajc3s1ua9wq2a9k
Rename to FileNames as per review.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
""")
25
25
 
26
26
 
27
 
class FileCollection(object):
 
27
class FileNames(object):
28
28
    """A collection of file names.
29
29
 
30
30
    The file names are persisted to a file on a transport, and cand be
44
44
    """
45
45
 
46
46
    def __init__(self, transport, index_name):
47
 
        """Create a collection on transport called index_name."""
 
47
        """Create a names on transport called index_name."""
48
48
        self._transport = transport
49
49
        self._index_name = index_name
50
50
        self._names = None
58
58
        raise errors.BzrError('too many files')
59
59
 
60
60
    def initialise(self):
61
 
        """Initialise the collection record on disk."""
 
61
        """Initialise the names record on disk."""
62
62
        self._names = set()
63
63
 
64
64
    def load(self):
69
69
            self._names.remove('')
70
70
 
71
71
    def names(self):
72
 
        """What are the names in this collection?"""
 
72
        """What are the names in this names?"""
73
73
        return frozenset(self._names)
74
74
 
75
75
    def remove(self, name):
76
 
        """Remove name from the collection."""
 
76
        """Remove name from the names."""
77
77
        self._names.remove(name)
78
78
 
79
79
    def save(self):