/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: Robert Collins
  • Date: 2009-05-23 20:57:12 UTC
  • mfrom: (4371 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4441.
  • Revision ID: robertc@robertcollins.net-20090523205712-lcwbfqk6vwavinuv
MergeĀ .dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
import os
18
18
import re
95
95
    br_a3.fetch(br_a2, br_a.revision_history()[2])
96
96
    # pull the 3 revisions introduced by a@u-0-3
97
97
    br_a3.fetch(br_a2, br_a.revision_history()[3])
98
 
    # InstallFailed should be raised if the branch is missing the revision
 
98
    # NoSuchRevision should be raised if the branch is missing the revision
99
99
    # that was requested.
100
 
    self.assertRaises(errors.InstallFailed, br_a3.fetch, br_a2, 'pizza')
 
100
    self.assertRaises(errors.NoSuchRevision, br_a3.fetch, br_a2, 'pizza')
101
101
 
102
102
    # TODO: Test trying to fetch from a branch that points to a revision not
103
103
    # actually present in its repository.  Not every branch format allows you
321
321
        self.assertEqual(1, self._count_log_matches('branch/format', http_logs))
322
322
        self.assertEqual(1, self._count_log_matches('repository/format',
323
323
            http_logs))
 
324
        self.assertEqual(1, self._count_log_matches('revisions.kndx',
 
325
            http_logs))
324
326
        self.assertTrue(1 >= self._count_log_matches('revision-history',
325
327
                                                     http_logs))
326
328
        self.assertTrue(1 >= self._count_log_matches('last-revision',
327
329
                                                     http_logs))
328
 
        self.assertEqual(4, len(http_logs))
 
330
        self.assertLength(5, http_logs)
329
331
 
330
332
 
331
333
class TestKnitToPackFetch(TestCaseWithTransport):
576
578
        self.repo.fetch(self.tree.branch.repository, 'second-id')
577
579
        root_id = self.tree.get_root_id()
578
580
        self.assertEqual(
579
 
            ((root_id, 'left-parent'), (root_id, 'ghost-parent'),
580
 
             (root_id, 'not-ghost-parent')),
 
581
            ((root_id, 'left-parent'), (root_id, 'not-ghost-parent')),
581
582
            self.get_parents(root_id, 'second-id'))
582
583
 
583
584
    def make_two_commits(self, change_root, fetch_twice):