[Pkg-bazaar-commits] ./bzr/unstable r470: - remove dead code for cmd_compare_trees
Martin Pool
mbp at sourcefrog.net
Fri Apr 10 08:19:34 UTC 2009
------------------------------------------------------------
revno: 470
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Wed 2005-05-11 16:12:44 +1000
message:
- remove dead code for cmd_compare_trees
- compare_trees new parameter want_unchanged to avoid allocating
strings if not needed
modified:
bzrlib/commands.py
bzrlib/diff.py
bzrlib/info.py
bzrlib/log.py
bzrlib/status.py
-------------- next part --------------
=== modified file 'bzrlib/commands.py'
--- a/bzrlib/commands.py 2005-05-11 06:05:28 +0000
+++ b/bzrlib/commands.py 2005-05-11 06:12:44 +0000
@@ -897,16 +897,6 @@
statcache.update_cache(b.base, b.read_working_inventory())
-class cmd_compare_trees(Command):
- """Show quick calculation of status."""
- hidden = True
- def run(self):
- import diff
- b = Branch('.')
- delta = diff.compare_trees(b.basis_tree(), b.working_tree())
- delta.show(sys.stdout, False)
-
-
######################################################################
# main routine
=== modified file 'bzrlib/diff.py'
--- a/bzrlib/diff.py 2005-05-11 05:55:27 +0000
+++ b/bzrlib/diff.py 2005-05-11 06:12:44 +0000
@@ -310,7 +310,7 @@
-def compare_trees(old_tree, new_tree):
+def compare_trees(old_tree, new_tree, want_unchanged):
old_inv = old_tree.inventory
new_inv = new_tree.inventory
delta = TreeDelta()
=== modified file 'bzrlib/info.py'
--- a/bzrlib/info.py 2005-05-11 05:02:35 +0000
+++ b/bzrlib/info.py 2005-05-11 06:12:44 +0000
@@ -49,7 +49,7 @@
basis = b.basis_tree()
working = b.working_tree()
work_inv = working.inventory
- delta = diff.compare_trees(basis, working)
+ delta = diff.compare_trees(basis, working, want_unchanged=True)
print
print 'in the working tree:'
=== modified file 'bzrlib/log.py'
--- a/bzrlib/log.py 2005-05-11 04:25:35 +0000
+++ b/bzrlib/log.py 2005-05-11 06:12:44 +0000
@@ -142,7 +142,7 @@
if verbose:
this_tree = branch.revision_tree(revision_id)
- delta = compare_trees(prev_tree, this_tree)
+ delta = compare_trees(prev_tree, this_tree, want_unchanged=False)
delta.show(to_file, show_ids)
prev_tree = this_tree
=== modified file 'bzrlib/status.py'
--- a/bzrlib/status.py 2005-05-11 05:55:27 +0000
+++ b/bzrlib/status.py 2005-05-11 06:12:44 +0000
@@ -39,7 +39,7 @@
raise NotImplementedError("sorry, status on selected files is not implemented "
"at the moment")
- delta = diff.compare_trees(old, new)
+ delta = diff.compare_trees(old, new, want_unchanged=show_unchanged)
delta.show(sys.stdout, show_ids=show_ids,
show_unchanged=show_unchanged)
More information about the Pkg-bazaar-commits
mailing list