/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/test_fetch_ghosts.py

  • Committer: Jelmer Vernooij
  • Date: 2018-02-18 21:42:57 UTC
  • mto: This revision was merged to the branch mainline in revision 6859.
  • Revision ID: jelmer@jelmer.uk-20180218214257-jpevutp1wa30tz3v
Update TODO to reference Breezy, not Bazaar.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
 
17
from __future__ import absolute_import
 
18
 
17
19
from ..fetch_ghosts import GhostFetcher
18
20
from . import TestCaseWithTransport
19
21
 
22
24
 
23
25
    def prepare_with_ghosts(self):
24
26
        tree = self.make_branch_and_tree('.')
25
 
        tree.commit('rev1', rev_id=b'rev1-id')
26
 
        tree.set_parent_ids([b'rev1-id', b'ghost-id'])
 
27
        tree.commit('rev1', rev_id='rev1-id')
 
28
        tree.set_parent_ids(['rev1-id', 'ghost-id'])
27
29
        tree.commit('rev2')
28
30
        return tree
29
31
 
31
33
        tree = self.prepare_with_ghosts()
32
34
        branch = self.make_branch('branch')
33
35
        GhostFetcher(tree.branch, branch).run()
34
 
        self.assertFalse(tree.branch.repository.has_revision(b'ghost-id'))
 
36
        self.assertFalse(tree.branch.repository.has_revision('ghost-id'))
35
37
 
36
38
    def test_fetch_ghosts_success(self):
37
39
        tree = self.prepare_with_ghosts()
38
40
        ghost_tree = self.make_branch_and_tree('ghost_tree')
39
 
        ghost_tree.commit('ghost', rev_id=b'ghost-id')
 
41
        ghost_tree.commit('ghost', rev_id='ghost-id')
40
42
        GhostFetcher(tree.branch, ghost_tree.branch).run()
41
 
        self.assertTrue(tree.branch.repository.has_revision(b'ghost-id'))
 
43
        self.assertTrue(tree.branch.repository.has_revision('ghost-id'))