[MERGE] bzr rm should delete the working file (Bug #82602)

Martin Pool mbp at sourcefrog.net
Fri Apr 20 09:58:19 BST 2007


On 4/20/07, Marius Kruger <amanic at gmail.com> wrote:
> hi,
> I have addressed the issues raised on the list, in the way I replied to the
> mails.
>
> please find attached the updated bundle and a diff since the previous bundle
> if you'd like to see how I tried to fix things.

Thanks for the incremental diff, that makes it a lot easier.  I really
want to get this in the next release, and appreciate you redrafting it
so many times.

@@ -31,6 +31,16 @@

 class TestRemove(ExternalBase):

+    def run_bzr_captured(self, argv, retcode=0, encoding=None, stdin=None,
+                         working_dir=None):
+
+        # magically convert commands like 'remove abc' to ['remove', 'abc']
+        if (isinstance(argv, tuple) and len(argv) == 1 and
+            isinstance(argv[0], basestring)):
+            argv = shlex.split(argv[0])
+        return ExternalBase.run_bzr_captured(self, argv, retcode, encoding,
+            stdin, working_dir)
+
     def _make_add_and_assert_tree(self, files):
         tree = self.make_branch_and_tree('.')
         self.build_tree(files)

I don't think this really addresses the gist of John's comments, and
it might be confusing that run_bzr_captured works differently in this
class to elsewhere.  So I think it would be better to actually change
all the calls in these tests to just pass the arguments as individual
strings, which should be a pretty mechanical change.  I'll keep an eye
out tomorrow and hopefully we can then merge it.

-- 
Martin



More information about the bazaar mailing list