Rev 4728: pull also is broken wrt root-id changes. in http://bazaar.launchpad.net/~jameinel/bzr/2.0.4-dirstate-set-root-504390

John Arbash Meinel john at arbash-meinel.com
Mon Jan 11 23:02:48 GMT 2010


At http://bazaar.launchpad.net/~jameinel/bzr/2.0.4-dirstate-set-root-504390

------------------------------------------------------------
revno: 4728
revision-id: john at arbash-meinel.com-20100111230232-rs0ol3emp9ohc9h6
parent: john at arbash-meinel.com-20100111225904-pqgwx78ryuvys2kz
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.0.4-dirstate-set-root-504390
timestamp: Mon 2010-01-11 17:02:32 -0600
message:
  pull also is broken wrt root-id changes.
-------------- next part --------------
=== modified file 'bzrlib/tests/per_workingtree/test_pull.py'
--- a/bzrlib/tests/per_workingtree/test_pull.py	2009-07-10 07:14:02 +0000
+++ b/bzrlib/tests/per_workingtree/test_pull.py	2010-01-11 23:02:32 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2006 Canonical Ltd
+# Copyright (C) 2006, 2007, 2009, 2010 Canonical Ltd
 # Authors:  Robert Collins <robert.collins at canonical.com>
 #
 # This program is free software; you can redistribute it and/or modify
@@ -56,3 +56,15 @@
         tree_b.pull(tree_a.branch)
         self.assertFileEqual('contents of from/file\n', 'to/file')
 
+    def test_pull_changes_root_id(self):
+        tree = self.make_branch_and_tree('from')
+        tree.set_root_id('first_root_id')
+        self.build_tree(['from/file'])
+        tree.add(['file'])
+        tree.commit('first')
+        to_tree = tree.bzrdir.sprout('to').open_workingtree()
+        self.assertEqual('first_root_id', to_tree.get_root_id())
+        tree.set_root_id('second_root_id')
+        tree.commit('second')
+        to_tree.pull(tree.branch)
+        self.assertEqual('second_root_id', to_tree.get_root_id())



More information about the bazaar-commits mailing list