~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/testfetch.py

  • Committer: Robert Collins
  • Date: 2005-10-08 00:39:04 UTC
  • mfrom: (1185.1.52)
  • Revision ID: robertc@robertcollins.net-20051008003904-aaffaea2778efe3e
merge in martins reweave, integrated to fetch, and a bugfix for commit and upgrade with executable files

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
136
137
        self.assertEqual(greedy_fetch(target, source), (2, []))
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 -'
 
138
        weave_suffix = 'weaves/id.weave HTTP/1.1" 200 -'
141
139
        self.assertEqual(1,
142
140
            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))