[Pkg-bazaar-commits] ./bzr/unstable r135: Simple new 'deleted' command
mbp at sourcefrog.net
mbp at sourcefrog.net
Fri Apr 10 07:44:10 UTC 2009
------------------------------------------------------------
revno: 135
committer: mbp at sourcefrog.net
timestamp: Tue 2005-03-29 16:02:14 +1000
message:
Simple new 'deleted' command
modified:
NEWS
bzrlib/commands.py
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS 2005-03-29 03:02:34 +0000
+++ b/NEWS 2005-03-29 06:02:14 +0000
@@ -14,7 +14,10 @@
* Reinstate the 'bzr check' command to check invariants of the
branch.
- * New 'ignored' command shows which files are ignored and why.
+ * New 'ignored' command lists which files are ignored and why;
+ 'deleted' lists files deleted in the current working tree.
+
+ * Performance improvements.
bzr-0.0.1 2005-03-26
=== modified file 'bzrlib/commands.py'
--- a/bzrlib/commands.py 2005-03-29 03:02:34 +0000
+++ b/bzrlib/commands.py 2005-03-29 06:02:14 +0000
@@ -339,6 +339,21 @@
+def cmd_deleted():
+ """List files deleted in the working tree.
+
+TODO: Show files deleted since a previous revision, or between two revisions.
+ """
+ b = Branch('.')
+ old = b.basis_tree()
+ new = b.working_tree()
+
+ for path, ie in old.inventory.iter_entries():
+ if not new.has_id(ie.file_id):
+ print path
+
+
+
def cmd_root(filename=None):
"""Print the branch root."""
print bzrlib.branch.find_branch_root(filename)
More information about the Pkg-bazaar-commits
mailing list