/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: Jelmer Vernooij
  • Date: 2018-03-24 17:48:04 UTC
  • mfrom: (6921 work)
  • mto: This revision was merged to the branch mainline in revision 6923.
  • Revision ID: jelmer@jelmer.uk-20180324174804-xf22o05byoj12x1q
Merge trunk.

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, NoRoundtrippingSupport
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
    )
33
35
        rev1 = wt.commit('lala!', allow_pointless=False)
34
36
 
35
37
        b2 = self.make_to_branch('b2')
36
 
        b2.fetch(b1)
 
38
        try:
 
39
            b2.fetch(b1)
 
40
        except NoRoundtrippingSupport:
 
41
            raise TestNotApplicable(
 
42
                'lossless cross-vcs fetch %r to %r not supported' %
 
43
                (b1, b2))
37
44
 
38
45
        # fetch does not update the last revision
39
46
        self.assertEqual(NULL_REVISION, b2.last_revision())
55
62
        builder.finish_series()
56
63
        b1 = builder.get_branch()
57
64
        b2 = self.make_to_branch('b2')
58
 
        b2.fetch(b1, limit=1)
 
65
        try:
 
66
            b2.fetch(b1, limit=1)
 
67
        except FetchLimitUnsupported:
 
68
            raise TestNotApplicable('interbranch does not support fetch limits')
 
69
        except NoRoundtrippingSupport:
 
70
            raise TestNotApplicable(
 
71
                'lossless cross-vcs fetch %r to %r not supported' %
 
72
                (b1, b2))
59
73
 
60
74
        # fetch does not update the last revision
61
75
        self.assertEqual(NULL_REVISION, b2.last_revision())
72
86
        rev1 = wt.commit('lala!', allow_pointless=False)
73
87
 
74
88
        b2 = self.make_to_branch('b2')
75
 
        b2.fetch(b1, limit=1)
 
89
        try:
 
90
            b2.fetch(b1, limit=1)
 
91
        except FetchLimitUnsupported:
 
92
            raise TestNotApplicable('interbranch does not support fetch limits')
 
93
        except NoRoundtrippingSupport:
 
94
            raise TestNotApplicable(
 
95
                'lossless cross-vcs fetch %r to %r not supported' %
 
96
                (b1, b2))
76
97
 
77
98
        self.assertEqual(
78
99
            {rev1},