Issue 2380 Cannot darcs mv file to file that did exist but has been removed in working

Title Cannot darcs mv file to file that did exist but has been removed in working
Priority Status resolved
Milestone Resolved in 2.12.0
Superseder Nosy List owst
Assigned To
Topics ThePendingPatch

Created on 2014-04-22.11:32:04 by owst, last changed 2015-06-22.05:51:56 by noreply.

msg17369 (view) Author: owst Date: 2014-04-22.11:32:03
1. Summarise the issue (what were doing, what went wrong?)

I tried to delete a file from my repo, and rename another to the same
name as the deleted file. Darcs complained that the target of the rename
already exists in the repo, even though it doesn't in the working dir.

2. What behaviour were you expecting instead?

Darcs should allow me to rename the file! I should also be able to use
revert to get back to exactly where I was (both files existing and with
the correct contents)

Assuming file foo contains one line: "foostuff" and other contains one
line: "otherstuff", I would like to see something like this in whatsnew,
after executing `rm foo && darcs mv other foo`:

    hunk ./foo 1
    rmfile ./foo
    move ./other ./foo

Note that the move cannot be commuted past the rmfile!

3. What darcs version are you using? (Try: darcs --exact-version)

2.9.8 (+ 18 patches)

4. What operating system are you running?
Ubuntu 13.10 X86_64
msg17373 (view) Author: owst Date: 2014-04-22.12:03:51
I've just sent a failing testcase for this
msg17375 (view) Author: owst Date: 2014-04-22.13:27:25
Interestingly, it is possible to do:

rm foo
darcs rec -am 'Remove foo'
darcs move other foo
darcs amend # Add the move to the last patch

to get to a patch with the desired changes, so this is just a UI issue.
msg17379 (view) Author: gh Date: 2014-04-22.18:03:10
Sounds like a pending patch issue.
msg17730 (view) Author: noreply Date: 2014-10-31.08:17:10
The following patch sent by Owen Stephens <darcs@owenstephens.co.uk> updated issue issue2380 with
status=resolved;resolvedin=2.10.0 HEAD

* Resolve issue2380: allow darcs mv into known, but deleted in working, file 
Ignore-this: 8c4f8d77480dd360d051b944dc22c6d
msg18584 (view) Author: noreply Date: 2015-06-22.05:51:53
The following patch sent by Ben Franksen <benjamin.franksen@helmholtz-berlin.de> updated issue issue2380 with
status=resolved;resolvedin=2.12.0 HEAD

* renamed no longer failing test for resolved issue2380 
Ignore-this: d8f2c13f1c5c7aecc7d0e0554fb4e130
Date User Action Args
2014-04-22 11:32:04owstcreate
2014-04-22 12:03:53owstsetstatus: unknown -> needs-diagnosis/design
messages: + msg17373
2014-04-22 13:27:26owstsetmessages: + msg17375
2014-04-22 17:58:37ghsettopic: + ThePendingPatch
2014-04-22 18:03:11ghsetmessages: + msg17379
2014-10-31 08:17:12noreplysetstatus: needs-diagnosis/design -> resolved
messages: + msg17730
resolvedin: 2.10.0
2015-06-22 05:51:56noreplysetmessages: + msg18584
resolvedin: 2.10.0 -> 2.12.0