Rev 3005: (Daniel Watkins) 'bzr rm already-deleted' should not traceback in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Sat Nov 17 01:48:07 GMT 2007


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 3005
revision-id: pqm at pqm.ubuntu.com-20071117014803-umq9bksvua0zmpts
parent: pqm at pqm.ubuntu.com-20071116062543-dl3xkea5ri27qwnz
parent: john at arbash-meinel.com-20071117005318-u3djk62gl31ffeci
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Sat 2007-11-17 01:48:03 +0000
message:
  (Daniel Watkins) 'bzr rm already-deleted' should not traceback
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/tests/workingtree_implementations/test_remove.py test_remove.py-20070413183901-rvnp85rtc0q0sclp-1
  bzrlib/workingtree.py          workingtree.py-20050511021032-29b6ec0a681e02e3
    ------------------------------------------------------------
    revno: 2967.5.13
    merged: john at arbash-meinel.com-20071117005318-u3djk62gl31ffeci
    parent: d.m.watkins at warwick.ac.uk-20071114184814-rg8x1qbtelbmhld2
    parent: pqm at pqm.ubuntu.com-20071116062543-dl3xkea5ri27qwnz
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: jam-integration
    timestamp: Fri 2007-11-16 18:53:18 -0600
    message:
      Merge bzr.dev 3004
    ------------------------------------------------------------
    revno: 2967.5.12
    merged: d.m.watkins at warwick.ac.uk-20071114184814-rg8x1qbtelbmhld2
    parent: d.m.watkins at warwick.ac.uk-20071114105353-2f3bapodql1sdt23
    committer: Daniel Watkins <D.M.Watkins at warwick.ac.uk>
    branch nick: 152811
    timestamp: Wed 2007-11-14 18:48:14 +0000
    message:
      Modified tests as suggested on-list.
    ------------------------------------------------------------
    revno: 2967.5.11
    merged: d.m.watkins at warwick.ac.uk-20071114105353-2f3bapodql1sdt23
    parent: d.m.watkins at warwick.ac.uk-20071113033134-0mflbajfukkvafdm
    parent: pqm at pqm.ubuntu.com-20071114092157-du5ikf6q4k64nseu
    committer: Daniel Watkins <D.M.Watkins at warwick.ac.uk>
    branch nick: 152811
    timestamp: Wed 2007-11-14 10:53:53 +0000
    message:
      Merged bzr.dev, fixing conflict in NEWS.
    ------------------------------------------------------------
    revno: 2967.5.10
    merged: d.m.watkins at warwick.ac.uk-20071113033134-0mflbajfukkvafdm
    parent: d.m.watkins at warwick.ac.uk-20071113033057-hx30p2dk4xx36wg4
    committer: Daniel Watkins <D.M.Watkins at warwick.ac.uk>
    branch nick: 152811
    timestamp: Tue 2007-11-13 03:31:34 +0000
    message:
      Moved NEWS entry.
    ------------------------------------------------------------
    revno: 2967.5.9
    merged: d.m.watkins at warwick.ac.uk-20071113033057-hx30p2dk4xx36wg4
    parent: d.m.watkins at warwick.ac.uk-20071113032019-sxatm1og83kirpvh
    parent: pqm at pqm.ubuntu.com-20071113005140-mp4owdlrd1ccnqc9
    committer: Daniel Watkins <D.M.Watkins at warwick.ac.uk>
    branch nick: 152811
    timestamp: Tue 2007-11-13 03:30:57 +0000
    message:
      Merged bzr.dev.
    ------------------------------------------------------------
    revno: 2967.5.8
    merged: d.m.watkins at warwick.ac.uk-20071113032019-sxatm1og83kirpvh
    parent: d.m.watkins at warwick.ac.uk-20071109141057-f9n7y2q99xudnhrh
    committer: Daniel Watkins <D.M.Watkins at warwick.ac.uk>
    branch nick: 152811
    timestamp: Tue 2007-11-13 03:20:19 +0000
    message:
      Moved tests to correct location.
    ------------------------------------------------------------
    revno: 2967.5.7
    merged: d.m.watkins at warwick.ac.uk-20071109141057-f9n7y2q99xudnhrh
    parent: d.m.watkins at warwick.ac.uk-20071109134406-lhrkgwcr3a6hd9s8
    committer: Daniel Watkins <D.M.Watkins at warwick.ac.uk>
    branch nick: 152811
    timestamp: Fri 2007-11-09 14:10:57 +0000
    message:
      Modified tests to be more idiomatic.
    ------------------------------------------------------------
    revno: 2967.5.6
    merged: d.m.watkins at warwick.ac.uk-20071109134406-lhrkgwcr3a6hd9s8
    parent: d.m.watkins at warwick.ac.uk-20071109105652-ecqt3umaiyph6njp
    committer: Daniel Watkins <D.M.Watkins at warwick.ac.uk>
    branch nick: 152811
    timestamp: Fri 2007-11-09 13:44:06 +0000
    message:
      Added test for Warren Togami's case as per Kent Gibson's request.
    ------------------------------------------------------------
    revno: 2967.5.5
    merged: d.m.watkins at warwick.ac.uk-20071109105652-ecqt3umaiyph6njp
    parent: d.m.watkins at warwick.ac.uk-20071106134623-a63w1rgt9vtw0tr5
    parent: pqm at pqm.ubuntu.com-20071109031316-n814a39wmtxvybyw
    committer: Daniel Watkins <D.M.Watkins at warwick.ac.uk>
    branch nick: 152811
    timestamp: Fri 2007-11-09 10:56:52 +0000
    message:
      Merged bzr.dev.
    ------------------------------------------------------------
    revno: 2967.5.4
    merged: d.m.watkins at warwick.ac.uk-20071106134623-a63w1rgt9vtw0tr5
    parent: d.m.watkins at warwick.ac.uk-20071106105556-p445zjab739oaehi
    parent: pqm at pqm.ubuntu.com-20071106124804-ehlreba0lfp3kab9
    committer: Daniel Watkins <D.M.Watkins at warwick.ac.uk>
    branch nick: 152811
    timestamp: Tue 2007-11-06 13:46:23 +0000
    message:
      Merged bzr.dev and moved NEWS item to appropriate location.
    ------------------------------------------------------------
    revno: 2967.5.3
    merged: d.m.watkins at warwick.ac.uk-20071106105556-p445zjab739oaehi
    parent: d.m.watkins at warwick.ac.uk-20071106052039-c7hfze50wkc5wrjk
    committer: Daniel Watkins <D.M.Watkins at warwick.ac.uk>
    branch nick: 152811
    timestamp: Tue 2007-11-06 10:55:56 +0000
    message:
      Added NEWS item.
    ------------------------------------------------------------
    revno: 2967.5.2
    merged: d.m.watkins at warwick.ac.uk-20071106052039-c7hfze50wkc5wrjk
    parent: d.m.watkins at warwick.ac.uk-20071106045440-p0x11nax6uzfzkdq
    committer: Daniel Watkins <D.M.Watkins at warwick.ac.uk>
    branch nick: 152811
    timestamp: Tue 2007-11-06 05:20:39 +0000
    message:
      Fixed bug #152811.
    ------------------------------------------------------------
    revno: 2967.5.1
    merged: d.m.watkins at warwick.ac.uk-20071106045440-p0x11nax6uzfzkdq
    parent: pqm at pqm.ubuntu.com-20071105211156-bwx6vf8f88m247cy
    committer: Daniel Watkins <D.M.Watkins at warwick.ac.uk>
    branch nick: 152811
    timestamp: Tue 2007-11-06 04:54:40 +0000
    message:
      Added failing test.
=== modified file 'NEWS'
--- a/NEWS	2007-11-16 05:36:12 +0000
+++ b/NEWS	2007-11-17 00:53:18 +0000
@@ -79,6 +79,9 @@
    * ``RemoteBranch`` was not initializing ``self._revision_id_to_revno_map``
      properly. (John Arbash Meinel, #162486)
 
+   * Removing an already-removed file reports the file does not exist. (Daniel
+     Watkins, #152811)
+
    * Stderr output via logging mechanism now goes through encoded wrapper
      and no more uses utf-8, but terminal encoding instead. So all unicode
      strings now should be readable in non-utf-8 terminal.

=== modified file 'bzrlib/tests/workingtree_implementations/test_remove.py'
--- a/bzrlib/tests/workingtree_implementations/test_remove.py	2007-08-13 20:00:03 +0000
+++ b/bzrlib/tests/workingtree_implementations/test_remove.py	2007-11-14 18:48:14 +0000
@@ -273,3 +273,17 @@
         tree.remove('dir/', keep_files=False)
         self.failIfExists('tree/dir/file')
         self.assertNotInWorkingTree('tree/dir/file', 'tree')
+
+    def test_remove_uncommitted_removed_file(self):
+        # As per bug #152811
+        tree = self.get_committed_tree(['a'])
+        tree.remove('a', keep_files=False)
+        tree.remove('a', keep_files=False)
+        self.failIfExists('a')
+
+    def test_remove_file_and_containing_dir(self):
+        tree = self.get_committed_tree(['config/', 'config/file'])
+        tree.remove('config/file', keep_files=False)
+        tree.remove('config', keep_files=False)
+        self.failIfExists('config/file')
+        self.failIfExists('config')

=== modified file 'bzrlib/workingtree.py'
--- a/bzrlib/workingtree.py	2007-11-14 08:20:59 +0000
+++ b/bzrlib/workingtree.py	2007-11-14 10:53:53 +0000
@@ -1891,9 +1891,9 @@
                          want_unversioned=True, specific_files=files):
                     # Check if it's an unknown (but not ignored) OR
                     # changed (but not deleted) :
-                    if not self.is_ignored(path[1]) and (
-                        versioned == (False, False) or
-                        content_change and kind[1] != None):
+                    if ((versioned == (False, False) or
+                         content_change and kind[1] != None)
+                        and not self.is_ignored(path[1])):
                         has_changed_files = True
                         break
 




More information about the bazaar-commits mailing list