~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/commands/test_update.py

  • Committer: Robert Collins
  • Date: 2007-10-04 22:00:07 UTC
  • mfrom: (2887 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2933.
  • Revision ID: robertc@robertcollins.net-20071004220007-6tb7pyeknkhpnfyq
Merge bzr.dev (untested)

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
 
18
 
from bzrlib import builtins
19
 
from bzrlib.tests.transport_util import TestCaseWithConnectionHookedTransport
20
 
 
21
 
 
22
 
class TestUpdate(TestCaseWithConnectionHookedTransport):
 
18
from bzrlib import (
 
19
    branch,
 
20
    builtins,
 
21
    )
 
22
from bzrlib.tests import transport_util
 
23
 
 
24
 
 
25
class TestUpdate(transport_util.TestCaseWithConnectionHookedTransport):
23
26
 
24
27
    def test_update(self):
25
 
        wt1 = self.make_branch_and_tree('branch1')
26
 
        wt2 = self.make_branch_and_tree('branch2')
27
 
        wt2.pull(wt1.branch)
28
 
 
29
 
        wt1.commit('empty commit')
30
 
        wt2.commit('empty commit too')
31
 
 
32
 
        bind = builtins.cmd_bind()
33
 
        bind.run(location=self.get_url('branch1'))
34
 
 
35
 
        self.install_hooks()
 
28
        remote_wt = self.make_branch_and_tree('remote')
 
29
        local_wt = self.make_branch_and_tree('local')
 
30
 
 
31
        remote_branch = branch.Branch.open(self.get_url('remote'))
 
32
        local_wt.branch.bind(remote_branch)
 
33
 
 
34
        remote_wt.commit('empty commit')
 
35
 
 
36
        self.start_logging_connections()
36
37
 
37
38
        update = builtins.cmd_update()
38
 
        update.run()
 
39
        # update calls it 'dir' where other commands calls it 'directory'
 
40
        update.run(dir='local')
39
41
        self.assertEquals(1, len(self.connections))
40
42