~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_repository/test_reconcile.py

  • Committer: Danny van Heumen
  • Date: 2010-03-09 21:42:11 UTC
  • mto: (4634.139.5 2.0)
  • mto: This revision was merged to the branch mainline in revision 5160.
  • Revision ID: danny@dannyvanheumen.nl-20100309214211-iqh42x6qcikgd9p3
Reverted now-useless TODO list.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2010 Canonical Ltd
 
1
# Copyright (C) 2006 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
18
18
 
19
19
 
20
20
import bzrlib
21
 
from bzrlib import (
22
 
    errors,
23
 
    transport,
24
 
    )
 
21
import bzrlib.errors as errors
25
22
from bzrlib.inventory import Inventory
26
23
from bzrlib.reconcile import reconcile, Reconciler
27
24
from bzrlib.repofmt.knitrepo import RepositoryFormatKnit
33
30
from bzrlib.tests.per_repository import (
34
31
    TestCaseWithRepository,
35
32
    )
 
33
from bzrlib.transport import get_transport
36
34
from bzrlib.uncommit import uncommit
37
35
 
38
36
 
61
59
    def setUp(self):
62
60
        super(TestsNeedingReweave, self).setUp()
63
61
 
64
 
        t = transport.get_transport(self.get_url())
 
62
        t = get_transport(self.get_url())
65
63
        # an empty inventory with no revision for testing with.
66
64
        repo = self.make_repository('inventory_without_revision')
67
65
        repo.lock_write()
312
310
        self.reduceLockdirTimeout()
313
311
        super(TestReconcileWithIncorrectRevisionCache, self).setUp()
314
312
 
315
 
        t = transport.get_transport(self.get_url())
 
313
        t = get_transport(self.get_url())
316
314
        # we need a revision with two parents in the wrong order
317
315
        # which should trigger reinsertion.
318
316
        # and another with the first one correct but the other two not
381
379
 
382
380
    def test_reconcile_wrong_order(self):
383
381
        # a wrong order in primary parents is optionally correctable
384
 
        t = transport.get_transport(self.get_url()).clone('wrong-first-parent')
 
382
        t = get_transport(self.get_url()).clone('wrong-first-parent')
385
383
        d = bzrlib.bzrdir.BzrDir.open_from_transport(t)
386
384
        repo = d.open_repository()
387
385
        repo.lock_read()
410
408
 
411
409
    def test_reconcile_wrong_order_secondary_inventory(self):
412
410
        # a wrong order in the parents for inventories is ignored.
413
 
        t = transport.get_transport(self.get_url()
414
 
                                    ).clone('reversed-secondary-parents')
 
411
        t = get_transport(self.get_url()).clone('reversed-secondary-parents')
415
412
        d = bzrlib.bzrdir.BzrDir.open_from_transport(t)
416
413
        repo = d.open_repository()
417
414
        self.checkUnreconciled(d, repo.reconcile())