~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-01-14 00:01:32 UTC
  • mfrom: (4957.1.1 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100114000132-3p3rabnonjw3gzqb
(jam) 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())