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

  • Committer: Vincent Ladeuil
  • Author(s): Jelmer Vernooij
  • Date: 2018-03-01 02:50:57 UTC
  • mfrom: (6862.4.2 fetch-limit-unsupported)
  • Revision ID: v.ladeuil+lp@free.fr-20180301025057-moxu8jgwohpy6k3m
Allow InterBranch implementations to not provide support for limit= parameter.

Merged from https://code.launchpad.net/~jelmer/brz/fetch-limit-unsupported/+merge/340021

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Tests for InterBranch.fetch."""
18
18
 
 
19
from breezy.errors import FetchLimitUnsupported
19
20
from breezy.revision import NULL_REVISION
 
21
from breezy.tests import TestNotApplicable
20
22
from breezy.tests.per_interbranch import (
21
23
    TestCaseWithInterBranch,
22
24
    )
55
57
        builder.finish_series()
56
58
        b1 = builder.get_branch()
57
59
        b2 = self.make_to_branch('b2')
58
 
        b2.fetch(b1, limit=1)
 
60
        try:
 
61
            b2.fetch(b1, limit=1)
 
62
        except FetchLimitUnsupported:
 
63
            raise TestNotApplicable('interbranch does not support fetch limits')
59
64
 
60
65
        # fetch does not update the last revision
61
66
        self.assertEqual(NULL_REVISION, b2.last_revision())
72
77
        rev1 = wt.commit('lala!', allow_pointless=False)
73
78
 
74
79
        b2 = self.make_to_branch('b2')
75
 
        b2.fetch(b1, limit=1)
 
80
        try:
 
81
            b2.fetch(b1, limit=1)
 
82
        except FetchLimitUnsupported:
 
83
            raise TestNotApplicable('interbranch does not support fetch limits')
76
84
 
77
85
        self.assertEqual(
78
86
            {rev1},