/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/selftest/testfetch.py

  • Committer: aaron.bentley at utoronto
  • Date: 2005-10-11 05:20:36 UTC
  • mfrom: (1442)
  • mto: (1185.25.1)
  • mto: This revision was merged to the branch mainline in revision 1460.
  • Revision ID: aaron.bentley@utoronto.ca-20051011052036-23ff7bae64a29826
latest from robert collins

Show diffs side-by-side

added added

removed removed

Lines of Context:
133
133
        branch.commit("changed file")
134
134
        target = Branch.initialize("target/")
135
135
        source = Branch.open(self.get_remote_url("source/"))
136
 
        source.weave_store.enable_cache = False
137
136
        self.assertEqual(greedy_fetch(target, source), (2, []))
138
 
        weave_suffix = 'weaves/id.weave HTTP/1.1" 200 -'
 
137
        # this is the path to the literal file. As format changes 
 
138
        # occur it needs to be updated. FIXME: ask the store for the
 
139
        # path.
 
140
        weave_suffix = 'weaves/ce/id.weave HTTP/1.1" 200 -'
139
141
        self.assertEqual(1,
140
142
            len([log for log in self.weblogs if log.endswith(weave_suffix)]))
 
143
        inventory_weave_suffix = 'inventory.weave HTTP/1.1" 200 -'
 
144
        self.assertEqual(1,
 
145
            len([log for log in self.weblogs if log.endswith(
 
146
                inventory_weave_suffix)]))
 
147
        # this r-h check test will prevent regressions, but it currently already 
 
148
        # passes, before the patch to cache-rh is applied :[
 
149
        revision_history_suffix = 'revision-history HTTP/1.1" 200 -'
 
150
        self.assertEqual(1,
 
151
            len([log for log in self.weblogs if log.endswith(
 
152
                revision_history_suffix)]))
 
153
        self.weblogs = []
 
154
        # check there is nothing more to fetch
 
155
        source = Branch.open(self.get_remote_url("source/"))
 
156
        self.assertEqual(greedy_fetch(target, source), (0, []))
 
157
        self.failUnless(self.weblogs[0].endswith('branch-format HTTP/1.1" 200 -'))
 
158
        self.failUnless(self.weblogs[1].endswith('revision-history HTTP/1.1" 200 -'))
 
159
        self.assertEqual(2, len(self.weblogs))