~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2010-01-13 23:06:42 UTC
  • mfrom: (4634.119.7 2.0)
  • mto: This revision was merged to the branch mainline in revision 4959.
  • Revision ID: john@arbash-meinel.com-20100113230642-gr0vg8u3qyzz3p2b
Merge bzr.stable, bringing in bug fixes #175839, #504390

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 Canonical Ltd
 
1
# Copyright (C) 2006, 2007, 2009, 2010 Canonical Ltd
2
2
# Authors:  Robert Collins <robert.collins@canonical.com>
3
3
#
4
4
# This program is free software; you can redistribute it and/or modify
56
56
        tree_b.pull(tree_a.branch)
57
57
        self.assertFileEqual('contents of from/file\n', 'to/file')
58
58
 
 
59
    def test_pull_changes_root_id(self):
 
60
        tree = self.make_branch_and_tree('from')
 
61
        tree.set_root_id('first_root_id')
 
62
        self.build_tree(['from/file'])
 
63
        tree.add(['file'])
 
64
        tree.commit('first')
 
65
        to_tree = tree.bzrdir.sprout('to').open_workingtree()
 
66
        self.assertEqual('first_root_id', to_tree.get_root_id())
 
67
        tree.set_root_id('second_root_id')
 
68
        tree.commit('second')
 
69
        to_tree.pull(tree.branch)
 
70
        self.assertEqual('second_root_id', to_tree.get_root_id())