44
44
tree, files = self.create_with_commits(100, 100, "a")
45
45
self.time(bzrdir.BzrDir.open(self.get_url('a')).sprout, "b")
47
def create_commit_and_pull(self, num_pull_revisions):
49
tree, files = self.create_with_commits(100, 100, "a")
50
rbzrdir = bzrdir.BzrDir.open(self.get_url('a'))
51
b2 = tree.bzrdir.sprout("b") # branch
52
# change a few files and commit
53
self.commit_some_revisions(tree, files, num_pull_revisions, 20)
54
self.time(b2.open_branch().pull, rbzrdir.open_branch())
47
56
def test_pull_1(self):
49
tree, files = self.create_with_commits(100, 100, "a")
50
rbzrdir = bzrdir.BzrDir.open(self.get_url('a'))
51
b2 = tree.bzrdir.sprout("b") # branch
52
# change a few files and commit
53
self.commit_some_revisions(tree, files, 1, 20)
54
self.time(b2.open_branch().pull, rbzrdir.open_branch())
57
self.create_commit_and_pull(1)
59
def test_pull_10(self):
60
self.create_commit_and_pull(10)
56
62
def test_pull_100(self):
58
tree, files = self.create_with_commits(100, 100, "a")
59
rbzrdir = bzrdir.BzrDir.open(self.get_url('a'))
60
b2 = tree.bzrdir.sprout("b") # branch
61
# change a few files and commit
62
self.commit_some_revisions(tree, files, 100, 20)
63
self.time(b2.open_branch().pull, rbzrdir.open_branch())
63
self.create_commit_and_pull(100)
65
65
def create_commit_and_push(self, num_push_revisions):
75
75
changes_per_commit=20)
76
76
self.time(rbzrdir.open_branch().pull, wtree.branch)
78
def test_initial_push(self):
80
tree, files = self.create_with_commits(100, 100, "a")
81
self.time(tree.bzrdir.clone, self.get_url('b'),
82
revision_id=tree.last_revision())
78
84
def test_push_1(self):
79
85
self.create_commit_and_push(1)