/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: Robert Collins
  • Date: 2006-02-25 00:32:59 UTC
  • mto: (1587.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 1588.
  • Revision ID: robertc@robertcollins.net-20060225003259-eafe402b13b8b16e
Only reconcile if doing so will perform gc or correct ancestry.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
"""Black box tests for the reconcile command."""
18
18
 
19
19
 
 
20
import bzrlib
20
21
import bzrlib.bzrdir as bzrdir
21
22
import bzrlib.repository as repository
22
23
from bzrlib.tests import TestCaseWithTransport
41
42
        t = bzrdir.BzrDir.create_standalone_workingtree('.')
42
43
        (out, err) = self.run_bzr_captured(['reconcile'])
43
44
        self.assertEqualDiff(out, "Reconciling repository %s\n"
 
45
                                  "Inventory ok.\n"
 
46
                                  "Reconciliation complete.\n" %
 
47
                                  t.bzrdir.root_transport.base)
 
48
        self.assertEqualDiff(err, "")
 
49
 
 
50
    def test_does_something_reconcile(self):
 
51
        t = bzrdir.BzrDir.create_standalone_workingtree('.')
 
52
        # an empty inventory with no revision will trigger reconciliation.
 
53
        repo = t.branch.repository
 
54
        inv = bzrlib.tree.EmptyTree().inventory
 
55
        repo.add_inventory('missing', inv, [])
 
56
        (out, err) = self.run_bzr_captured(['reconcile'])
 
57
        self.assertEqualDiff(out, "Reconciling repository %s\n"
44
58
                                  "Backup Inventory created.\n"
45
59
                                  "Inventory regenerated.\n"
46
60
                                  "Reconciliation complete.\n" %