Rev 2637: (Ian Clatworthy) Deprecate old fns that use InventoryEntry methods that ought to go in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Fri Jul 20 07:53:16 BST 2007
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 2637
revision-id: pqm at pqm.ubuntu.com-20070720065314-hhb0qw5h3cfe8mga
parent: pqm at pqm.ubuntu.com-20070720054555-bffj18ybejmgiv50
parent: ian.clatworthy at internode.on.net-20070720060924-du7j6i4gryqin95k
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2007-07-20 07:53:14 +0100
message:
(Ian Clatworthy) Deprecate old fns that use InventoryEntry methods that ought to go
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/tests/test_transform.py test_transaction.py-20060105172520-b3ffb3946550e6c4
bzrlib/transform.py transform.py-20060105172343-dd99e54394d91687
------------------------------------------------------------
revno: 2636.1.1
merged: ian.clatworthy at internode.on.net-20070720060924-du7j6i4gryqin95k
parent: pqm at pqm.ubuntu.com-20070720054555-bffj18ybejmgiv50
parent: ian.clatworthy at internode.on.net-20070720050632-ee61b1maehkxrcmh
committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
branch nick: ianc-integration
timestamp: Fri 2007-07-20 16:09:24 +1000
message:
(Ian Clatworthy) Deprecate old fns that use InventoryEntry methods that ought to go
------------------------------------------------------------
revno: 2625.4.3
merged: ian.clatworthy at internode.on.net-20070720050632-ee61b1maehkxrcmh
parent: ian.clatworthy at internode.on.net-20070719065835-b2hd6o94wud54kzs
committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
branch nick: bzr.nuke-change_entry
timestamp: Fri 2007-07-20 15:06:32 +1000
message:
Add a test to ensure the deprecation worked.
------------------------------------------------------------
revno: 2625.4.2
merged: ian.clatworthy at internode.on.net-20070719065835-b2hd6o94wud54kzs
parent: ian.clatworthy at internode.on.net-20070718071053-bfvsmb0dcs9ibi4p
committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
branch nick: bzr.nuke-change_entry
timestamp: Thu 2007-07-19 16:58:35 +1000
message:
Incorporate feedback from jameinel
------------------------------------------------------------
revno: 2625.4.1
merged: ian.clatworthy at internode.on.net-20070718071053-bfvsmb0dcs9ibi4p
parent: pqm at pqm.ubuntu.com-20070717180333-5smmeduk2q3sbzvw
committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
branch nick: bzr.nuke-change_entry
timestamp: Wed 2007-07-18 17:10:53 +1000
message:
Deprecate old fns that use InventoryEntry methods that ought to go
=== modified file 'NEWS'
--- a/NEWS 2007-07-20 03:20:20 +0000
+++ b/NEWS 2007-07-20 06:09:24 +0000
@@ -75,6 +75,8 @@
* New ``file_names.FileNames`` support class which mananges names
for unlistable transport situations. (Robert Collins)
+ * Deprecated ``change_entry`` in transform.py. (Ian Clatworthy)
+
TESTING:
* Remove selftest ``--clean-output``, ``--numbered-dirs`` and
=== modified file 'bzrlib/tests/test_transform.py'
--- a/bzrlib/tests/test_transform.py 2007-06-06 01:28:18 +0000
+++ b/bzrlib/tests/test_transform.py 2007-07-20 05:06:32 +0000
@@ -37,7 +37,8 @@
from bzrlib.tests import TestCaseInTempDir, TestSkipped, TestCase
from bzrlib.transform import (TreeTransform, ROOT_PARENT, FinalPaths,
resolve_conflicts, cook_conflicts,
- find_interesting, build_tree, get_backup_name)
+ find_interesting, build_tree, get_backup_name,
+ change_entry)
class TestTreeTransform(tests.TestCaseWithTransport):
@@ -942,6 +943,11 @@
transform.cancel_creation(parent)
transform.finalize()
+ def test_change_entry(self):
+ txt = 'bzrlib.transform.change_entry was deprecated in version 0.19.'
+ self.callDeprecated([txt], change_entry, None, None, None, None, None,
+ None, None, None)
+
class TransformGroup(object):
def __init__(self, dirname, root_id):
=== modified file 'bzrlib/transform.py'
--- a/bzrlib/transform.py 2007-07-12 17:46:52 +0000
+++ b/bzrlib/transform.py 2007-07-20 05:06:32 +0000
@@ -34,7 +34,8 @@
from bzrlib.osutils import (file_kind, supports_executable, pathjoin, lexists,
delete_any)
from bzrlib.progress import DummyProgress, ProgressPhase
-from bzrlib.symbol_versioning import deprecated_function, zero_fifteen
+from bzrlib.symbol_versioning import deprecated_function, zero_fifteen, \
+ zero_nineteen
from bzrlib.trace import mutter, warning
from bzrlib import tree
import bzrlib.ui
@@ -1424,9 +1425,13 @@
working_tree.unlock()
+ at deprecated_function(zero_nineteen)
def change_entry(tt, file_id, working_tree, target_tree,
trans_id_file_id, backups, trans_id, by_parent):
"""Replace a file_id's contents with those from a target tree."""
+ if file_id is None and target_tree is None:
+ # skip the logic altogether in the deprecation test
+ return
e_trans_id = trans_id_file_id(file_id)
entry = target_tree.inventory[file_id]
has_contents, contents_mod, meta_mod, = _entry_changes(file_id, entry,
More information about the bazaar-commits
mailing list