~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/knitrepo.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-03-06 06:48:25 UTC
  • mfrom: (4070.8.6 debug-config)
  • Revision ID: pqm@pqm.ubuntu.com-20090306064825-kbpwggw21dygeix6
(mbp) debug_flags configuration option

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
from bzrlib.lazy_import import lazy_import
18
18
lazy_import(globals(), """
53
53
    def __repr__(self):
54
54
        return 'KnitParentsProvider(%r)' % self._knit
55
55
 
 
56
    @symbol_versioning.deprecated_method(symbol_versioning.one_one)
 
57
    def get_parents(self, revision_ids):
 
58
        """See graph._StackedParentsProvider.get_parents"""
 
59
        parent_map = self.get_parent_map(revision_ids)
 
60
        return [parent_map.get(r, None) for r in revision_ids]
 
61
 
56
62
    def get_parent_map(self, keys):
57
63
        """See graph._StackedParentsProvider.get_parent_map"""
58
64
        parent_map = {}
207
213
        revision_id = osutils.safe_revision_id(revision_id)
208
214
        return self.get_revision_reconcile(revision_id)
209
215
 
210
 
    def _refresh_data(self):
211
 
        if not self.is_locked():
212
 
            return
213
 
        # Create a new transaction to force all knits to see the scope change.
214
 
        # This is safe because we're outside a write group.
215
 
        self.control_files._finish_transaction()
216
 
        if self.is_write_locked():
217
 
            self.control_files._set_write_transaction()
218
 
        else:
219
 
            self.control_files._set_read_transaction()
220
 
 
221
216
    @needs_write_lock
222
217
    def reconcile(self, other=None, thorough=False):
223
218
        """Reconcile this repository."""
291
286
    supports_ghosts = True
292
287
    # External lookups are not supported in this format.
293
288
    supports_external_lookups = False
294
 
    # No CHK support.
295
 
    supports_chks = False
296
289
    _fetch_order = 'topological'
297
290
    _fetch_uses_deltas = True
298
 
    fast_deltas = False
299
291
 
300
292
    def _get_inventories(self, repo_transport, repo, name='inventory'):
301
293
        mapper = versionedfile.ConstantMapper(name)
381
373
        repo.signatures = self._get_signatures(repo_transport, repo)
382
374
        repo.inventories = self._get_inventories(repo_transport, repo)
383
375
        repo.texts = self._get_texts(repo_transport, repo)
384
 
        repo.chk_bytes = None
385
376
        repo._transport = repo_transport
386
377
        return repo
387
378