[MERGE][Bug #152811] Removing an already-removed file doesn't traceback
John Arbash Meinel
john at arbash-meinel.com
Fri Nov 9 14:02:48 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Daniel Watkins wrote:
> On Fri, 09 Nov 2007 21:40:01 +0900
> Kent Gibson <warthog618 at gmail.com> wrote:
>> I would like to see a test for the variant that Warren Togami reported
>> i.e. given a tree with a/b previously commited
> Done in attached.
>
>> but maybe that's just being pedantic.
> Isn't that what TDD is all about? :p
>
>
+
+ def test_remove_file_and_containing_dir(self):
+ tree = self.make_branch_and_tree('.')
+ self.build_tree(['config%s' % (os.sep,),
+ osutils.joinpath(['config', 'file'])])
+ tree.add(['config', osutils.joinpath(['config', 'file'])])
+ tree.commit(message="add files")
+ self.run_bzr(['remove', osutils.joinpath(['config', 'file'])])
+ self.run_bzr('remove config')
^- This isn't really a style we use in our test setup. We pretty much always
use "/". In fact, I think the build_tree might do the wrong thing if you give
it 'config\'.
So this should be:
self.build_tree(['config/', 'config/file'])
tree.add(['config', 'config/file'])
tree.commit(message='add files')
self.run_bzr(['remove', 'config/file'])
self.run_bzr(['remove', 'config'])
or self.run_bzr('remove config/file')
etc.
We also tend to just do "tree.commit('message')", but message= is still correct.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHNGiIJdeBCYSNAAMRAkrNAKCqPVW17xYbHjBlpHLr4KdBSPZfZQCgnb/4
jo/ulINGU2Bduetnd5zWFs0=
=tIie
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list