/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/test_fetch.py

  • Committer: James Blackwell
  • Date: 2006-05-05 01:05:04 UTC
  • mfrom: (1697 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1700.
  • Revision ID: jblack@merconline.com-20060505010504-264cb48507e53b64
mergedĀ mainline

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
    # from its own revision history
92
92
    br_a2.append_revision('a-b-c')
93
93
    self.assertRaises(bzrlib.errors.InstallFailed, br_a3.fetch, br_a2)
 
94
 
 
95
    # TODO: jam 20051218 Branch should no longer allow append_revision for revisions
 
96
    #       which don't exist. So this test needs to be rewritten
 
97
    #       RBC 20060403 the way to do this is to uncommit the revision from the
 
98
    #           repository after the commit
 
99
 
94
100
    #TODO: test that fetch correctly does reweaving when needed. RBC 20051008
95
101
    # Note that this means - updating the weave when ghosts are filled in to 
96
102
    # add the right parents.
103
109
        br_a, br_b = make_branches(self)
104
110
        fetch_steps(self, br_a, br_b, br_a)
105
111
 
 
112
    def test_fetch_self(self):
 
113
        wt = self.make_branch_and_tree('br')
 
114
        self.assertEqual(wt.branch.fetch(wt.branch), (0, []))
 
115
 
106
116
 
107
117
class TestMergeFetch(TestCaseWithTransport):
108
118
 
216
226
        self.log("web server logs are:")
217
227
        http_logs = self.get_readonly_server().logs
218
228
        self.log('\n'.join(http_logs))
219
 
        self.assertEqual(1, self._count_log_matches('weaves/ce/id.weave', http_logs))
220
 
        self.assertEqual(1, self._count_log_matches('inventory.weave', http_logs))
 
229
        # unfortunately this log entry is branch format specific. We could 
 
230
        # factor out the 'what files does this format use' to a method on the 
 
231
        # repository, which would let us to this generically. RBC 20060419
 
232
        self.assertEqual(1, self._count_log_matches('/ce/id.kndx', http_logs))
 
233
        self.assertEqual(1, self._count_log_matches('/ce/id.knit', http_logs))
 
234
        self.assertEqual(1, self._count_log_matches('inventory.kndx', http_logs))
 
235
        self.assertEqual(1, self._count_log_matches('inventory.knit', http_logs))
221
236
        # this r-h check test will prevent regressions, but it currently already 
222
237
        # passes, before the patch to cache-rh is applied :[
223
238
        self.assertEqual(1, self._count_log_matches('revision-history', http_logs))
230
245
        http_logs = self.get_readonly_server().logs
231
246
        self.log("web server logs are:")
232
247
        self.log('\n'.join(http_logs))
233
 
        self.assertEqual(1, self._count_log_matches('branch-format', http_logs[0:1]))
234
 
        self.assertEqual(1, self._count_log_matches('revision-history', http_logs[1:2]))
235
 
        self.assertEqual(2, len(http_logs))
 
248
        self.assertEqual(1, self._count_log_matches('branch-format', http_logs))
 
249
        self.assertEqual(1, self._count_log_matches('branch/format', http_logs))
 
250
        self.assertEqual(1, self._count_log_matches('repository/format', http_logs))
 
251
        self.assertEqual(1, self._count_log_matches('revision-history', http_logs))
 
252
        self.assertEqual(4, len(http_logs))