darcs

Issue 1965 'darcs move' gets confused by non-repository paths

Title 'darcs move' gets confused by non-repository paths
Priority bug Status resolved
Milestone 2.8.0 Resolved in 2.8.0
Superseder Nosy List dmitry.kurochkin, tux_rocker
Assigned To
Topics UI

Created on 2010-10-03.14:21:43 by tux_rocker, last changed 2010-11-20.22:55:58 by noreply.

Messages
msg12628 (view) Author: tux_rocker Date: 2010-10-03.14:21:42
When you use darcs move on a non-repository path, it gives funny error
messages. Some examples (with darcs 2.4.98.5) from the darcs darcs repo:

===
$ darcs move GNUmakefile /var/lib
Ignoring non-repository paths: /var/lib
darcs: Cannot rename a file or directory onto itself!

$ darcs move GNUmakefile dontexist /var/lib
Ignoring non-repository paths: /var/lib
darcs failed:  The target directory dontexist isn't known in working
directory, did you forget to add it?

$ darcs move GNUmakefile src /var/lib
Ignoring non-repository paths: /var/lib
$ darcs wh
move ./GNUmakefile ./src/GNUmakefile
===

This happens because darcs move does not expect that the fixSubPaths
function returns a list that is shorter than its argument. That case
occurs when you supply non-repository paths (on darcs without patch404
these have to be absolute).
msg12653 (view) Author: kowey Date: 2010-10-05.11:35:30
Observation: this is another funny interaction between throwing out 
paths and assuming the last good path is the target.

I guess we need an exception to explicitly catch the last path (not just 
the last good one) being a bad path so that we get less funny UI.

Trade-off between code complexity and helpful UI
msg13127 (view) Author: noreply Date: 2010-11-20.22:55:57
The following patch sent by Reinier Lamers <tux_rocker@reinier.de> updated issue issue1965 with
status=resolved;resolvedin=2.8.0 HEAD

* resolve issue1965: Resolve conflicts with argument handling work in move 
Ignore-this: 7d12c75a4806cb786d118a3cb64f8904

This resolves conflicts with:
Wed Mar 17 00:02:11 EET 2010  Alexey Levan <exlevan@gmail.com>
  * Separate argument handling from repository work in Move.lhs
History
Date User Action Args
2010-10-03 14:21:43tux_rockercreate
2010-10-05 11:35:30koweysetstatus: needs-reproduction -> needs-implementation
messages: + msg12653
2010-11-20 22:55:58noreplysetstatus: needs-implementation -> resolved
messages: + msg13127
resolvedin: 2.8.0