[Pkg-bazaar-commits] ./bzr/unstable r29: When removing files, new status should be I or ?, not D

Martin Pool mbp at sourcefrog.net
Fri Apr 10 07:25:38 UTC 2009


------------------------------------------------------------
revno: 29
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Sun 2005-03-13 16:22:51 +1100
message:
  When removing files, new status should be I or ?, not D
modified:
  bzrlib/branch.py
-------------- next part --------------
=== modified file 'bzrlib/branch.py'
--- a/bzrlib/branch.py	2005-03-09 07:29:44 +0000
+++ b/bzrlib/branch.py	2005-03-13 05:22:51 +0000
@@ -300,7 +300,8 @@
         if isinstance(files, types.StringTypes):
             files = [files]
         
-        inv = self.read_working_inventory()
+        tree = self.working_tree()
+        inv = tree.inventory
 
         # do this before any modifications
         for f in files:
@@ -309,7 +310,12 @@
                 bailout("cannot remove unversioned file %s" % quotefn(f))
             mutter("remove inventory entry %s {%s}" % (quotefn(f), fid))
             if verbose:
-                show_status('D', inv[fid].kind, quotefn(f))
+                # having remove it, it must be either ignored or unknown
+                if tree.is_ignored(f):
+                    new_status = 'I'
+                else:
+                    new_status = '?'
+                show_status(new_status, inv[fid].kind, quotefn(f))
             del inv[fid]
 
         self._write_inventory(inv)



More information about the Pkg-bazaar-commits mailing list