49
50
to_unzip_output.write(content)
50
51
to_unzip_output.close()
52
import pdb;pdb.set_trace()
53
53
br_rem = Branch.open(self.get_remote_url(br_a.base))
54
assert not has_revision(br_b, br_rem.revision_history()[3])
55
assert has_revision(br_b, br_rem.revision_history()[2])
56
assert len(br_b.revision_history()) == 7
57
assert greedy_fetch(br_b, br_rem, br_rem.revision_history()[2])[0] == 0
59
# greedy_fetch is not supposed to alter the revision history
60
assert len(br_b.revision_history()) == 7
61
assert not has_revision(br_b, br_rem.revision_history()[3])
63
assert len(br_b.revision_history()) == 7
64
assert greedy_fetch(br_b, br_rem, br_rem.revision_history()[3])[0] == 1
65
assert has_revision(br_b, br_a.revision_history()[3])
66
assert not has_revision(br_rem, br_b.revision_history()[3])
67
assert not has_revision(br_rem, br_b.revision_history()[4])
69
# When a non-branch ancestor is missing, it should be a failure, not
71
br_a4 = new_branch('br_a4')
72
count, failures = greedy_fetch(br_a4, br_rem)
74
assert failures == set((br_b.revision_history()[4],
75
br_b.revision_history()[5]))
77
assert greedy_fetch(br_a, br_b)[0] == 4
78
assert has_revision(br_a, br_b.revision_history()[3])
79
assert has_revision(br_a, br_b.revision_history()[4])
81
br_b2 = new_branch('br_b2')
82
assert greedy_fetch(br_b2, br_b)[0] == 7
83
assert has_revision(br_b2, br_b.revision_history()[4])
84
assert has_revision(br_b2, br_a.revision_history()[2])
85
assert not has_revision(br_b2, br_a.revision_history()[3])
87
br_a2 = new_branch('br_a2')
88
assert greedy_fetch(br_a2, br_rem)[0] == 9
89
assert has_revision(br_a2, br_b.revision_history()[4])
90
assert has_revision(br_a2, br_a.revision_history()[3])
54
fetch_steps(self, br_rem, br_b, br_a)