~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_reconfigure.py

  • Committer: Jelmer Vernooij
  • Date: 2011-10-14 13:56:45 UTC
  • mfrom: (6215 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6216.
  • Revision ID: jelmer@samba.org-20111014135645-phc3q3y21k2ks0s2
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007 Canonical Ltd
 
1
# Copyright (C) 2007, 2008, 2009 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
44
44
        self.assertRaises(errors.NoWorkingTree, workingtree.WorkingTree.open,
45
45
                          'tree')
46
46
 
 
47
    def test_tree_with_pending_merge_to_branch(self):
 
48
        tree = self.make_branch_and_tree('tree')
 
49
        tree.commit('unchanged')
 
50
        other_tree = tree.bzrdir.sprout('other').open_workingtree()
 
51
        other_tree.commit('mergeable commit')
 
52
        tree.merge_from_branch(other_tree.branch)
 
53
        reconfiguration = reconfigure.Reconfigure.to_branch(tree.bzrdir)
 
54
        self.assertRaises(errors.UncommittedChanges, reconfiguration.apply)
 
55
        reconfiguration.apply(force=True)
 
56
        self.assertRaises(errors.NoWorkingTree, workingtree.WorkingTree.open,
 
57
                          'tree')
 
58
 
47
59
    def test_branch_to_branch(self):
48
60
        branch = self.make_branch('branch')
49
61
        self.assertRaises(errors.AlreadyBranch,