59
59
"""Tests 'ancestry' command with a location that is a
60
60
repository branch."""
61
61
self._build_branches()
62
self.run_bzr('init-repo', 'repo')
63
self.run_bzr('branch', 'A', 'repo/A')
62
self.run_bzr('init-repo repo')
63
self.run_bzr('branch A repo/A')
64
64
self._check_ancestry('repo/A')
66
66
def test_ancestry_with_checkout(self):
67
67
"""Tests 'ancestry' command with a location that is a
68
68
checkout of a repository branch."""
69
69
self._build_branches()
70
self.run_bzr('init-repo', 'repo')
71
self.run_bzr('branch', 'A', 'repo/A')
72
self.run_bzr('checkout', 'repo/A', 'A-checkout')
70
self.run_bzr('init-repo repo')
71
self.run_bzr('branch A repo/A')
72
self.run_bzr('checkout repo/A A-checkout')
73
73
self._check_ancestry('A-checkout')
75
75
def test_ancestry_with_lightweight_checkout(self):
76
76
"""Tests 'ancestry' command with a location that is a
77
77
lightweight checkout of a repository branch."""
78
78
self._build_branches()
79
self.run_bzr('init-repo', 'repo')
80
self.run_bzr('branch', 'A', 'repo/A')
81
self.run_bzr('checkout', '--lightweight', 'repo/A', 'A-checkout')
79
self.run_bzr('init-repo repo')
80
self.run_bzr('branch A repo/A')
81
self.run_bzr('checkout --lightweight repo/A A-checkout')
82
82
self._check_ancestry('A-checkout')
84
84
def test_ancestry_with_truncated_checkout(self):
85
85
"""Tests 'ancestry' command with a location that is a
86
86
checkout of a repository branch with a shortened revision history."""
87
87
self._build_branches()
88
self.run_bzr('init-repo', 'repo')
89
self.run_bzr('branch', 'A', 'repo/A')
90
self.run_bzr('checkout', '-r', '2', 'repo/A', 'A-checkout')
88
self.run_bzr('init-repo repo')
89
self.run_bzr('branch A repo/A')
90
self.run_bzr('checkout -r 2 repo/A A-checkout')
91
91
self._check_ancestry('A-checkout', "A1\nA2\n")
93
93
def test_ancestry_with_truncated_lightweight_checkout(self):
94
94
"""Tests 'ancestry' command with a location that is a lightweight
95
95
checkout of a repository branch with a shortened revision history."""
96
96
self._build_branches()
97
self.run_bzr('init-repo', 'repo')
98
self.run_bzr('branch', 'A', 'repo/A')
99
self.run_bzr('checkout', '-r', '2', '--lightweight',
100
'repo/A', 'A-checkout')
97
self.run_bzr('init-repo repo')
98
self.run_bzr('branch A repo/A')
99
self.run_bzr('checkout -r 2 --lightweight repo/A A-checkout')
101
100
self._check_ancestry('A-checkout', "A1\nA2\n")