[Pkg-bazaar-commits] ./bzr/unstable r865: - cleaner 'modified 'command
Martin Pool
mbp at sourcefrog.net
Fri Apr 10 08:13:39 UTC 2009
------------------------------------------------------------
revno: 865
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Fri 2005-07-08 12:53:13 +1000
message:
- cleaner 'modified 'command
modified:
bzrlib/commands.py
bzrlib/selftest/testhashcache.py
-------------- next part --------------
=== modified file 'bzrlib/commands.py'
--- a/bzrlib/commands.py 2005-07-07 10:56:27 +0000
+++ b/bzrlib/commands.py 2005-07-08 02:53:13 +0000
@@ -771,25 +771,13 @@
hidden = True
def run(self):
from bzrlib.statcache import update_cache, SC_SHA1
+ from bzrlib.diff import compare_trees
+
b = find_branch('.')
- inv = b.read_working_inventory()
- sc = update_cache(b, inv)
- basis = b.basis_tree()
- basis_inv = basis.inventory
-
- # We used to do this through iter_entries(), but that's slow
- # when most of the files are unmodified, as is usually the
- # case. So instead we iterate by inventory entry, and only
- # calculate paths as necessary.
+ td = compare_trees(b.basis_tree(), b.working_tree())
- for file_id in basis_inv:
- cacheentry = sc.get(file_id)
- if not cacheentry: # deleted
- continue
- ie = basis_inv[file_id]
- if cacheentry[SC_SHA1] != ie.text_sha1:
- path = inv.id2path(file_id)
- print path
+ for path, id, kind in td.modified:
+ print path
=== modified file 'bzrlib/selftest/testhashcache.py'
--- a/bzrlib/selftest/testhashcache.py 2005-07-08 02:49:15 +0000
+++ b/bzrlib/selftest/testhashcache.py 2005-07-08 02:53:13 +0000
@@ -33,7 +33,7 @@
class TestHashCache(InTempDir):
- """Functional tests for statcache"""
+ """Functional tests for hashcache"""
def runTest(self):
from bzrlib.hashcache import HashCache
import os
More information about the Pkg-bazaar-commits
mailing list