~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Aaron Bentley
  • Date: 2007-02-16 07:02:19 UTC
  • mfrom: (2292 +trunk)
  • mto: (2255.6.1 dirstate)
  • mto: This revision was merged to the branch mainline in revision 2322.
  • Revision ID: aaron.bentley@utoronto.ca-20070216070219-b22k0gwnisnxawnk
Merged bzr.dev (17 tests failing)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005 Canonical Ltd
2
 
# -*- coding: utf-8 -*-
 
1
# Copyright (C) 2005, 2006 Canonical Ltd
3
2
#
4
3
# This program is free software; you can redistribute it and/or modify
5
4
# it under the terms of the GNU General Public License as published by
24
23
from bzrlib.branch import Branch
25
24
from bzrlib.tests.blackbox import ExternalBase
26
25
from bzrlib.uncommit import uncommit
 
26
from bzrlib import urlutils
27
27
 
28
28
 
29
29
class TestPull(ExternalBase):
96
96
        self.runbzr('pull ../b')
97
97
        self.runbzr('pull ../b')
98
98
 
 
99
    def test_pull_dash_d(self):
 
100
        os.mkdir('a')
 
101
        os.chdir('a')
 
102
        self.example_branch()
 
103
        self.runbzr('init ../b')
 
104
        self.runbzr('init ../c')
 
105
        # pull into that branch
 
106
        self.runbzr('pull -d ../b .')
 
107
        # pull into a branch specified by a url
 
108
        c_url = urlutils.local_path_to_url('../c')
 
109
        self.assertStartsWith(c_url, 'file://')
 
110
        self.runbzr('pull -d %s .' % c_url)
 
111
 
99
112
    def test_pull_revision(self):
100
113
        """Pull some changes from one branch to another."""
101
114
        os.mkdir('a')
286
299
        os.chdir('../branch_b')
287
300
        output = self.run_bzr('pull', '../bundle')
288
301
        self.assertEqual('', output[0])
289
 
        self.assertEqual('All changes applied successfully.\n'
 
302
        self.assertEqual(' M  a\nAll changes applied successfully.\n'
290
303
                         '1 revision(s) pulled.\n', output[1])
291
304
 
292
305
        self.assertEqualDiff(tree_a.branch.revision_history(),