Issue 189 - 'mtn mv file dir' to new directory 'dir' fails (monotone)
| Newsgroups | gmane.comp.version-control.monotone.devel |
|---|---|
| Message-ID | <93b200d986c6e3a56ffc798658e2bb19@localhost> |
Hello, A new issue has been created and assigned to you: 189 - 'mtn mv file dir' to new directory 'dir' fails Project: monotone Status: New Reported by: joe 23 Labels: Type:Defect Priority:Medium Description: 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 -- Issue: https://code.monotone.ca/p/monotone/issues/189/