~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-02-17 17:11:16 UTC
  • mfrom: (4797.2.17 2.1)
  • mto: (4797.2.18 2.1)
  • mto: This revision was merged to the branch mainline in revision 5055.
  • Revision ID: john@arbash-meinel.com-20100217171116-h7t9223ystbnx5h8
merge bzr.2.1 in preparation for NEWS entry.

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())