monotone

Issue 189: 'mtn mv file dir' to new directory 'dir' fails

Reported by joe 23, Sep 16, 2011

This is not a major issue as the workaround/correct procedure is 
fairly obvious, however you could make it easier on the user by 
either auto-adding the directory or failing the move operation in 
step 5.


Steps to reproduce the problem:
-------------------------------


1. > foo
2. mtn add foo
3. mtn ci
4. mkdir bar
(don't do mtn add bar here)
5. mtn mv foo bar (note that 'mtn mv foo bar/foo' would work)
   mtn: renaming 'foo' to 'bar' in workspace manifest
   mtn: warning: destination 'bar' already exists in workspace, 
skipping filesystem rename
6. mtn ci bar
   mtn: warning: not a file 'bar'
   mtn: warning: expected file 'bar', but it is a directory.
   mtn: misuse: 1 missing items; use 'mtn ls missing' to view.




Expected result:
----------------

mtn recognizes that bar is a directory and auto-adds it in step 5, 
as it would do if you did 'mtn mv foo bar/foo'

Alternatively, step 5 above should be a fatal error and not a 
warning.


Actual results:
---------------

mtn gets confused and thinks bar is a file, not a directory, in step 
5. The user must 'mtn revert .' and start over and either add the 
directory or specify the full path in the move.


Output of `mtn version --full`:
-------------------------------

1.0.0

Created: 12 years 7 months ago by joe 23

Status: New

Labels:
Type:Defect
Priority:Medium

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status