bzr.rename-move-mv-unification.diff

Martin Pool mbp at sourcefrog.net
Tue Dec 6 05:46:11 GMT 2005


On  5 Dec 2005, Paul Sladen <ubuntu at paul.sladen.org> wrote:
> On Mon, 5 Dec 2005, Martin Pool wrote:
> > On  5 Nov 2005, Paul Sladen <ubuntu at paul.sladen.org> wrote:
> > > +    * 'bzr mv', 'move', 'rename' unified into a single command with the 
> > > +      same behavior as Unix mv:
> > Here's an update to the new tree; could someone please add tests inside
> > bzrlib.test.blackbox.test_rename to make sure it works as intended, 
> 
> It passes the existing tests for 'mv/move/rename' as they fall-through to
> the new command.  While testing I found a bug with the previous/current
> implementation of 'mv' which leaves files in the wrong place if the
> destination is a relative directory ('..'), so this is in some ways a
> bugfix for that.
> 
> What needs updating for the test suite, just shift the three current test
> functions into a single location?  Or do  s/^m(v|ove)/rename/  in addition?

The rule of thumb is that the tests should fail before the fix is put
in, and pass afterwards.  Therefore something like this:

  a test that moving a file to .. does move it correctly

  a test that rename can move files between directories and move can
  rename them

The second in particular might seem too trivial to test but having them
in the suite helps prevent embarassing regressions.

-- 
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051206/dcf1d593/attachment.pgp 


More information about the bazaar mailing list