~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transactions.py

  • Committer: John Arbash Meinel
  • Date: 2006-08-23 22:16:27 UTC
  • mto: This revision was merged to the branch mainline in revision 1955.
  • Revision ID: john@arbash-meinel.com-20060823221627-fc64105bb12ae770
Ghozzy: Fix Bzr's support of Active FTP (aftp://)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005 Canonical Ltd
 
1
# Copyright (C) 2005 by Canonical Ltd
2
2
#   Authors: Robert Collins <robert.collins@canonical.com>
3
3
#
4
4
# This program is free software; you can redistribute it and/or modify
59
59
 
60
60
    def is_clean(self, an_object):
61
61
        """Return True if an_object is clean."""
62
 
        return (an_object in self._clean_objects)
 
62
        return an_object in self._clean_objects
63
63
 
64
64
    def register_clean(self, an_object, precious=False):
65
65
        """Register an_object as being clean.
79
79
 
80
80
    def set_cache_size(self, size):
81
81
        """Set a new cache size."""
82
 
        if size < -1:
83
 
            raise ValueError(size)
 
82
        assert -1 <= size
84
83
        self._limit = size
85
84
        self._trim()
86
85
 
135
134
 
136
135
    def is_dirty(self, an_object):
137
136
        """Return True if an_object is dirty."""
138
 
        return (an_object in self._dirty_objects)
 
137
        return an_object in self._dirty_objects
139
138
 
140
139
    def register_dirty(self, an_object):
141
140
        """Register an_object as being dirty.