Rev 2376: Fix the small bug that ie.snapshot() didn't think about kind changes. in http://bzr.arbash-meinel.com/branches/bzr/0.15-dev/commit_kind_change_90111

John Arbash Meinel john at arbash-meinel.com
Fri Mar 23 20:19:19 GMT 2007


At http://bzr.arbash-meinel.com/branches/bzr/0.15-dev/commit_kind_change_90111

------------------------------------------------------------
revno: 2376
revision-id: john at arbash-meinel.com-20070323201901-2m5hfkh8xe26wywh
parent: john at arbash-meinel.com-20070323192548-f81b8vw3irmyclhe
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: commit_kind_change_90111
timestamp: Fri 2007-03-23 15:19:01 -0500
message:
  Fix the small bug that ie.snapshot() didn't think about kind changes.
modified:
  bzrlib/commit.py               commit.py-20050511101309-79ec1a0168e0e825
  bzrlib/inventory.py            inventory.py-20050309040759-6648b84ca2005b37
  bzrlib/tests/workingtree_implementations/test_commit.py test_commit.py-20060421013633-1610ec2331c8190f
-------------- next part --------------
=== modified file 'bzrlib/commit.py'
--- a/bzrlib/commit.py	2007-03-06 10:51:27 +0000
+++ b/bzrlib/commit.py	2007-03-23 20:19:01 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2006 Canonical Ltd
+# Copyright (C) 2005, 2006, 2007 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

=== modified file 'bzrlib/inventory.py'
--- a/bzrlib/inventory.py	2007-03-07 01:14:11 +0000
+++ b/bzrlib/inventory.py	2007-03-23 20:19:01 +0000
@@ -491,6 +491,8 @@
         # renamed
         elif previous_ie.name != self.name:
             compatible = False
+        elif previous_ie.kind != self.kind:
+            compatible = False
         return compatible
 
     def _read_tree_state(self, path, work_tree):

=== modified file 'bzrlib/tests/workingtree_implementations/test_commit.py'
--- a/bzrlib/tests/workingtree_implementations/test_commit.py	2007-03-23 19:25:48 +0000
+++ b/bzrlib/tests/workingtree_implementations/test_commit.py	2007-03-23 20:19:01 +0000
@@ -109,7 +109,6 @@
         from another. When committed it should commit the new kind.
         """
         wt = self.make_branch_and_tree('.')
-        wt.lock_write()
         self.build_tree(['a'])
         wt.add(['a'])
         wt.commit('commit one')



More information about the bazaar-commits mailing list