~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_repository_reference/test_graph.py

  • Committer: Tarmac
  • Author(s): Vincent Ladeuil
  • Date: 2017-01-30 14:42:05 UTC
  • mfrom: (6620.1.1 trunk)
  • Revision ID: tarmac-20170130144205-r8fh2xpmiuxyozpv
Merge  2.7 into trunk including fix for bug #1657238 [r=vila]

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2011 Canonical Ltd
 
1
# Copyright (C) 2011, 2016 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
20
20
 
21
21
from bzrlib import (
22
22
    remote,
23
 
    repository,
24
23
    tests,
 
24
    urlutils,
25
25
    )
26
26
from bzrlib.tests.per_repository import TestCaseWithRepository
27
27
 
35
35
        """
36
36
        branch_a, branch_b, branch_c, revid_1 = self.make_double_stacked_branches()
37
37
        for br in [branch_a, branch_b, branch_c]:
38
 
            self.assertEquals(
 
38
            self.assertEqual(
39
39
                [revid_1],
40
40
                br.repository.get_known_graph_ancestry([revid_1]).topo_sort())
41
41
 
43
43
        wt_a = self.make_branch_and_tree('a')
44
44
        branch_a = wt_a.branch
45
45
        branch_b = self.make_branch('b')
46
 
        branch_b.set_stacked_on_url('../a')
 
46
        branch_b.set_stacked_on_url(
 
47
            urlutils.relative_url(branch_b.base, branch_a.base))
47
48
        branch_c = self.make_branch('c')
48
 
        branch_c.set_stacked_on_url('../b')
 
49
        branch_c.set_stacked_on_url(
 
50
            urlutils.relative_url(branch_c.base, branch_b.base))
49
51
        revid_1 = wt_a.commit('first commit')
50
52
        return branch_a, branch_b, branch_c, revid_1
51
53