26
26
def test_branch(self):
28
t, files = self.create_with_commits(100, 100, "a")
28
tree, files = self.create_with_commits(100, 100, "a")
29
29
self.time(bzrdir.BzrDir.open(self.get_url('a')).sprout, "b")
31
31
def test_pull_1(self):
33
t, files = self.create_with_commits(100, 100, "a")
33
tree, files = self.create_with_commits(100, 100, "a")
34
34
rbzrdir = bzrdir.BzrDir.open(self.get_url('a'))
35
b2 = rbzrdir.sprout("b") # branch
35
b2 = tree.bzrdir.sprout("b") # branch
36
36
# change a few files and commit
37
self.commit_some_revisions(t, files, 1, 20)
37
self.commit_some_revisions(tree, files, 1, 20)
38
38
self.time(b2.open_branch().pull, rbzrdir.open_branch())
40
40
def test_pull_100(self):
42
t, files = self.create_with_commits(100, 100, "a")
42
tree, files = self.create_with_commits(100, 100, "a")
43
43
rbzrdir = bzrdir.BzrDir.open(self.get_url('a'))
44
b2 = rbzrdir.sprout("b") # branch
44
b2 = tree.bzrdir.sprout("b") # branch
45
45
# change a few files and commit
46
self.commit_some_revisions(t, files, 100, 20)
46
self.commit_some_revisions(tree, files, 100, 20)
47
47
self.time(b2.open_branch().pull, rbzrdir.open_branch())
49
49
def create_commit_and_push(self, num_push_revisions):
51
t, files = self.create_with_commits(100, 100, "a")
51
tree, files = self.create_with_commits(100, 100, "a")
52
52
rbzrdir = bzrdir.BzrDir.open(self.get_url('a'))
53
53
b2 = rbzrdir.sprout("b") # branch
54
wt = b2.open_workingtree()
54
wtree = b2.open_workingtree()
55
55
# change a few files and commit
56
56
self.commit_some_revisions(
57
wt, ["b/%i" for i in range(100)],
57
wtree, ["b/%i" for i in range(100)],
58
58
num_commits=num_push_revisions,
59
59
changes_per_commit=20)
60
60
self.time(rbzrdir.open_branch().pull, wt.branch)