~mhammond/bzr/update-r

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2006-09-13 01:57:42 UTC
  • mfrom: (2003 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2004.
  • Revision ID: john@arbash-meinel.com-20060913015742-26daf2a7676b904e
[merge] bzr.dev 2003

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
        t = get_transport(self.get_url())
57
57
        # an empty inventory with no revision for testing with.
58
58
        repo = self.make_repository('inventory_without_revision')
59
 
        inv = Inventory()
 
59
        inv = Inventory(revision_id='missing')
 
60
        inv.root.revision = 'missing'
60
61
        repo.add_inventory('missing', inv, [])
61
62
 
62
63
        # an empty inventory with no revision for testing with.
64
65
        # that all the cached data is correctly converted into ghost links
65
66
        # and the referenced inventory still cleaned.
66
67
        repo = self.make_repository('inventory_without_revision_and_ghost')
67
 
        inv = Inventory()
68
68
        repo.add_inventory('missing', inv, [])
 
69
        inv = Inventory(revision_id='references_missing')
 
70
        inv.root.revision = 'references_missing'
69
71
        sha1 = repo.add_inventory('references_missing', inv, ['missing'])
70
72
        rev = Revision(timestamp=0,
71
73
                       timezone=None,
79
81
        # a inventory with no parents and the revision has parents..
80
82
        # i.e. a ghost.
81
83
        repo = self.make_repository('inventory_one_ghost')
 
84
        inv = Inventory(revision_id='ghost')
 
85
        inv.root.revision = 'ghost'
82
86
        sha1 = repo.add_inventory('ghost', inv, [])
83
87
        rev = Revision(timestamp=0,
84
88
                       timezone=None,
92
96
        # a inventory with a ghost that can be corrected now.
93
97
        t.copy_tree('inventory_one_ghost', 'inventory_ghost_present')
94
98
        repo = bzrlib.repository.Repository.open('inventory_ghost_present')
 
99
        inv = Inventory(revision_id='the_ghost')
 
100
        inv.root.revision = 'the_ghost'
95
101
        sha1 = repo.add_inventory('the_ghost', inv, [])
96
102
        rev = Revision(timestamp=0,
97
103
                       timezone=None,
265
271
 
266
272
        # now setup the wrong-first parent case
267
273
        repo = tree.branch.repository
268
 
        inv = Inventory()
 
274
        inv = Inventory(revision_id='wrong-first-parent')
 
275
        inv.root.revision = 'wrong-first-parent'
269
276
        sha1 = repo.add_inventory('wrong-first-parent', inv, ['2', '1'])
270
277
        rev = Revision(timestamp=0,
271
278
                       timezone=None,
278
285
 
279
286
        # now setup the wrong-secondary parent case
280
287
        repo = repo_secondary
281
 
        inv = Inventory()
 
288
        inv = Inventory(revision_id='wrong-secondary-parent')
 
289
        inv.root.revision = 'wrong-secondary-parent'
282
290
        sha1 = repo.add_inventory('wrong-secondary-parent', inv, ['1', '3', '2'])
283
291
        rev = Revision(timestamp=0,
284
292
                       timezone=None,