[PATCH] make bzr mv use rename if only moving one file

David Clymer david at zettazebra.com
Fri Sep 9 05:47:13 BST 2005


On Thu, 2005-09-08 at 13:23 -0400, David Clymer wrote:
> On Thu, 2005-09-08 at 11:24 -0400, Aaron Bentley wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> > 
> > David Clymer wrote:
> > > builtin cmd_mv uses branch.move for multiple and single files.
> > > Branch.move doesnt seem to handle single files (is there a good reason
> > > for that?).
> > 
> > I think the point is to provide a cleaner API.  mv(1) can have somewhat
> > surprising behaviour, because it tries to guess user intention based on
> > whether the target is a dirctory.
> > 
> > > This patch uses branch.rename_one to mv single files with cmd_mv.
> > 
> > Great.  Do you mind adding a test case?
> > 
> 
> I'll take a whack at it.

It seems someone has already written a blackbox test for bzr mv, but
it's been disabled since r1101. I enabled it, and added a line to add
the files in the test tree it builds, so that bzr can fiddle with them
properly. The test fails on mainline and not on my branch, as one would
expect.

I've attached the mv test patch.

-davidc

-- 
gpg-key: http://www.zettazebra.com/files/key.gpg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mv_tests.patch
Type: text/x-patch
Size: 910 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050909/2b2c9b50/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050909/2b2c9b50/attachment.pgp 


More information about the bazaar mailing list