Rev 4725: Add a test which exposes the bug in revert. in http://bazaar.launchpad.net/~jameinel/bzr/2.0.4-change-root-id-494269
John Arbash Meinel
john at arbash-meinel.com
Mon Jan 11 22:27:33 GMT 2010
At http://bazaar.launchpad.net/~jameinel/bzr/2.0.4-change-root-id-494269
------------------------------------------------------------
revno: 4725
revision-id: john at arbash-meinel.com-20100111222717-dabj1yui9dilms6o
parent: john at arbash-meinel.com-20100111222337-yhzz815b01dk5k4u
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.0.4-change-root-id-494269
timestamp: Mon 2010-01-11 16:27:17 -0600
message:
Add a test which exposes the bug in revert.
-------------- next part --------------
=== modified file 'bzrlib/tests/test_revert.py'
--- a/bzrlib/tests/test_revert.py 2009-03-23 14:59:43 +0000
+++ b/bzrlib/tests/test_revert.py 2010-01-11 22:27:17 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2006 Canonical Ltd
+# Copyright (C) 2006, 2007, 2009, 2010 Canonical Ltd
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -157,3 +157,14 @@
self.failUnlessExists('dir/file1')
self.failIfExists('dir/file2')
self.assertEqual('dir-id', tree.path2id('dir'))
+
+ def test_revert_root_id_change(self):
+ tree = self.make_branch_and_tree('.')
+ tree.set_root_id('initial-root-id')
+ self.build_tree(['file1'])
+ tree.add(['file1'])
+ tree.commit('first')
+ tree.set_root_id('temp-root-id')
+ self.assertEqual('temp-root-id', tree.get_root_id())
+ tree.revert()
+ self.assertEqual('initial-root-id', tree.get_root_id())
More information about the bazaar-commits
mailing list