Rev 4727: Add a failing test for 'update'. When this branch lands, update should work. 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 22:59:20 GMT 2010
At http://bazaar.launchpad.net/~jameinel/bzr/2.0.4-dirstate-set-root-504390
------------------------------------------------------------
revno: 4727
revision-id: john at arbash-meinel.com-20100111225904-pqgwx78ryuvys2kz
parent: john at arbash-meinel.com-20100111225136-5fzkqr75tkqy6m12
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.0.4-dirstate-set-root-504390
timestamp: Mon 2010-01-11 16:59:04 -0600
message:
Add a failing test for 'update'. When this branch lands, update should work.
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS 2010-01-11 22:51:36 +0000
+++ b/NEWS 2010-01-11 22:59:04 +0000
@@ -55,7 +55,6 @@
the tree root changes. Rather than trying to rename your working
directory, or failing early saying that you can't have multiple
tree roots. This also fixes ``bzr revert`` when the root id changes.
- (Currently ``bzr update`` is still broken.)
(John Arbash Meinel, #494269)
* ``_update_current_block`` no longer suppresses exceptions, so ^C at just
=== modified file 'bzrlib/tests/per_workingtree/test_workingtree.py'
--- a/bzrlib/tests/per_workingtree/test_workingtree.py 2009-08-20 04:09:58 +0000
+++ b/bzrlib/tests/per_workingtree/test_workingtree.py 2010-01-11 22:59:04 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2006, 2007 Canonical Ltd
+# Copyright (C) 2006, 2007, 2008, 2009, 2010 Canonical Ltd
# Authors: Robert Collins <robert.collins at canonical.com>
# and others
#
@@ -478,6 +478,20 @@
self.assertEqual(wt.get_root_id(), checkout.get_root_id())
self.assertNotEqual(None, wt.get_root_id())
+ def test_update_sets_updated_root_id(self):
+ wt = self.make_branch_and_tree('tree')
+ wt.set_root_id('first_root_id')
+ self.assertEqual('first_root_id', wt.get_root_id())
+ self.build_tree(['tree/file'])
+ wt.add(['file'])
+ wt.commit('first')
+ co = wt.branch.create_checkout('checkout')
+ wt.set_root_id('second_root_id')
+ wt.commit('second')
+ self.assertEqual('second_root_id', wt.get_root_id())
+ self.assertEqual(0, co.update())
+ self.assertEqual('second_root_id', co.get_root_id())
+
def test_update_returns_conflict_count(self):
# working tree formats from the meta-dir format and newer support
# setting the last revision on a tree independently of that on the
More information about the bazaar-commits
mailing list