darcs

Issue 2378 moving a directory to a file makes repo unusable

Title moving a directory to a file makes repo unusable
Priority bug Status resolved
Milestone Resolved in 2.10.0
Superseder Nosy List bf
Assigned To
Topics

Created on 2014-04-13.12:17:35 by bf, last changed 2017-08-13.23:03:56 by bf.

Files
File name Uploaded Type Edit Remove
test.sh bf, 2014-04-13.12:17:34 application/x-shellscript
Messages
msg17347 (view) Author: bf Date: 2014-04-13.12:17:34
1. Summarise the issue (what were doing, what went wrong?)

darcs initialize 
mkdir d
darcs add d
echo sometext > d/f
darcs add d/f
darcs record -am'added d/f' --skip-long-comment
darcs move d/f .
darcs record -am'moved d/f to .' --skip-long-comment
rmdir d
darcs record -am'removed d' --skip-long-comment
darcs move f d
darcs record -am'moved f to d' --skip-long-comment
darcs obliterate --last=3 --all
darcs whatsnew -l

The last command results in this error message:

darcs: /home/ben/tmp/issueNNNN/test/d: openBinaryFile: inappropriate
type (is a directory)

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

2.8.4 (+ 1 patch)

4. What operating system are you running?

linux
Attachments
msg17348 (view) Author: bf Date: 2014-04-13.12:18:17
Forgot to mention tat I attached the test.sh file that reproduces the bug.
msg17349 (view) Author: bf Date: 2014-04-13.12:18:50
This may be related to issue2377.
msg18563 (view) Author: bf Date: 2015-06-20.12:44:47
This seems to be resolved as the test script no longer fails. Will add
it to the regression tests and move on...
msg19582 (view) Author: bf Date: 2017-08-13.22:52:05
I am re-opening this because I just saw that the test for this issue
still fails for darcs1 repos. BTW, I ran the tests in my clone of reviewed.
msg19583 (view) Author: bf Date: 2017-08-13.22:52:46
Note, the test is issue2382-mv-dir-to-file-confuses-darcs.sh .
msg19584 (view) Author: bf Date: 2017-08-13.23:03:54
It turned out that this was merely an error in the test script, which
did not account for the extra {...} that darcs1 puts around hunks.
Filtering them fixes the test.
History
Date User Action Args
2014-04-13 12:17:35bfcreate
2014-04-13 12:18:18bfsetpriority: bug
messages: + msg17348
2014-04-13 12:18:51bfsetmessages: + msg17349
2015-06-20 12:44:49bfsetmessages: + msg18563
resolvedin: 2.10.0
2017-07-31 01:59:07ghsetstatus: unknown -> given-up
2017-08-13 22:52:06bfsetstatus: given-up -> needs-diagnosis/design
messages: + msg19582
2017-08-13 22:52:48bfsetmessages: + msg19583
2017-08-13 23:03:56bfsetstatus: needs-diagnosis/design -> resolved
messages: + msg19584