darcs

Issue 1737 darcs mv does not warn when moving old to new if > 2 args

Title darcs mv does not warn when moving old to new if > 2 args
Priority bug Status resolved
Milestone Resolved in 2.8.0
Superseder Nosy List darcs-devel, dmitry.kurochkin, exlevan, jaredj, kowey
Assigned To
Topics ProbablyEasy, UI

Created on 2010-02-04.10:55:41 by kowey, last changed 2011-02-22.20:49:52 by noreply.

Messages
msg9954 (view) Author: kowey Date: 2010-02-04.10:55:36
Assigning to myself to submit a regression test:

 darcs mv inkscape-layers* inkscape-layers

complains that the target directory "inkscape-layers.hs" (note the hs)
does not exist

The real reason this happens (I think) is that if you expand that glob,
you get something like

 darcs mv inkscape-layers inkscape-layers.cabal inkscape-layers.hs
inkscape-layers

Somewhere that second inkscape-layers gets filtered out and this becomes
equivalent to saying

 darcs mv inkscape-layers inkscape-layers.cabal inkscape-layers.hs

Oops.  I'm hoping this is just superficially on the Darcs.Commands.Move
layer and not something deeper that's simplifying those command lines.

Assigning to myself to produce a regression test.
msg10676 (view) Author: kowey Date: 2010-04-05.16:34:36
I'm about to push my test case into the darcs.net repository.  I guess
the point is that

  darcs mv d d.txt d

should actually complain that you're trying to mv d onto itself and not
fool itself into thinking that you're just doing

  darcs mv d d.txt

Seems like a straightforward fix to make.
msg13738 (view) Author: noreply Date: 2011-02-22.20:49:51
The following patch sent by bsrkaditya@gmail.com updated issue issue1737 with
status=resolved;resolvedin=2.8.0 HEAD

* resolve issue1737: darcs mv does not warn when moving old to new if > 2 args 
Ignore-this: acb803e02ad9cbf10a835f3c187a92a2
History
Date User Action Args
2010-02-04 10:55:41koweycreate
2010-03-29 14:15:40koweysetnosy: + exlevan
2010-04-05 16:34:38koweysetstatus: needs-reproduction -> needs-implementation
assignedto: kowey ->
messages: + msg10676
2011-02-21 23:02:44exlevanlinkpatch558 issues
2011-02-22 20:49:52noreplysetstatus: needs-implementation -> resolved
messages: + msg13738
resolvedin: 2.8.0