/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/branch_implementations/test_pull.py

  • Committer: Martin Pool
  • Date: 2007-02-23 05:39:35 UTC
  • mto: (2220.2.35 tags)
  • mto: This revision was merged to the branch mainline in revision 2309.
  • Revision ID: mbp@sourcefrog.net-20070223053935-r601f8e1xwwljm21
Pull now returns a PullResult rather than just an integer.

Remove old Branch.is_control_file function.

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
        self.hook_calls = []
88
88
        TestCaseWithBranch.setUp(self)
89
89
 
90
 
    def capture_post_pull_hook(self, source, local, master, old_revno,
91
 
        old_revid, new_revno, new_revid):
 
90
    def capture_post_pull_hook(self, result):
92
91
        """Capture post pull hook calls to self.hook_calls.
93
92
        
94
93
        The call is logged, as is some state of the two branches.
95
94
        """
96
 
        if local:
97
 
            local_locked = local.is_locked()
98
 
            local_base = local.base
 
95
        if result.local:
 
96
            local_locked = result.local.is_locked()
 
97
            local_base = result.local.base
99
98
        else:
100
99
            local_locked = None
101
100
            local_base = None
102
101
        self.hook_calls.append(
103
 
            ('post_pull', source, local_base, master.base, old_revno, old_revid,
104
 
             new_revno, new_revid, source.is_locked(), local_locked,
105
 
             master.is_locked()))
 
102
            ('post_pull', result.source, local_base, result.master.base, result.old_revno,
 
103
             result.old_revid,
 
104
             result.new_revno, result.new_revid, result.source.is_locked(), local_locked,
 
105
             result.master.is_locked()))
106
106
 
107
107
    def test_post_pull_empty_history(self):
108
108
        target = self.make_branch('target')