~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Andrew Bennetts
  • Date: 2007-03-28 07:08:42 UTC
  • mfrom: (2380 +trunk)
  • mto: (2018.5.146 hpss)
  • mto: This revision was merged to the branch mainline in revision 2414.
  • Revision ID: andrew.bennetts@canonical.com-20070328070842-r843houy668oxb9o
Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 Canonical Ltd
 
1
# Copyright (C) 2006, 2007 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
169
169
        
170
170
        base = urlutils.local_path_from_url(branch_a.base)
171
171
        self.assertEquals(out, 'Merging from remembered location %s\n' % (base,))
172
 
        self.assertEquals(err, 'All changes applied successfully.\n')
 
172
        self.assertEquals(err, '+N  b\nAll changes applied successfully.\n')
173
173
        self.assertEquals(abspath(branch_b.get_parent()), abspath(parent))
174
174
        # re-open tree as external runbzr modified it
175
175
        tree_b = branch_b.bzrdir.open_workingtree()
177
177
        # test explicit --remember
178
178
        out, err = self.runbzr('merge ../branch_c --remember')
179
179
        self.assertEquals(out, '')
180
 
        self.assertEquals(err, 'All changes applied successfully.\n')
 
180
        self.assertEquals(err, '+N  c\nAll changes applied successfully.\n')
181
181
        self.assertEquals(abspath(branch_b.get_parent()),
182
182
                          abspath(branch_c.bzrdir.root_transport.base))
183
183
        # re-open tree as external runbzr modified it
232
232
        tree_a.rename_one('file_1', 'file_i')
233
233
        tree_a.commit('commit 2')
234
234
        tree_a.rename_one('file_2', 'file_ii')
235
 
        os.chdir('b')
236
 
        self.run_bzr('merge', '../a', '--uncommitted')
237
 
        self.failUnlessExists('file_1')
238
 
        self.failUnlessExists('file_ii')
 
235
        ## os.chdir('b')
 
236
        self.run_bzr('merge', 'a', '--uncommitted', '-d', 'b')
 
237
        self.failUnlessExists('b/file_1')
 
238
        self.failUnlessExists('b/file_ii')
239
239
        tree_b.revert([])
240
 
        self.run_bzr_error(('Cannot use --uncommitted and --revision',), 
241
 
                           'merge', '../a', '--uncommitted', '-r1')
 
240
        self.run_bzr_error(('Cannot use --uncommitted and --revision',),
 
241
                           'merge', '/a', '--uncommitted', '-r1',
 
242
                           '-d', 'b')
242
243
 
243
244
    def pullable_branch(self):
244
245
        os.mkdir('a')
266
267
        self.pullable_branch()
267
268
        os.chdir('a')
268
269
        (out, err) = self.run_bzr('merge', '--pull', '../b')
269
 
        self.assertContainsRe(err, '1 revision\\(s\\) pulled')
 
270
        self.assertContainsRe(err, 'Now on revision 2\\.')
270
271
        tree_a = WorkingTree.open('.')
271
272
        self.assertEqual([self.id2], tree_a.get_parent_ids())
272
273