darcs

Issue 1727 darcs move . target => There was an attempt to write an invalid pending!

Title darcs move . target => There was an attempt to write an invalid pending!
Priority bug Status resolved
Milestone Resolved in 2.8.0
Superseder Nosy List darcs-devel, dmitry.kurochkin, kowey, merehap
Assigned To
Topics

Created on 2010-01-06.02:48:35 by merehap, last changed 2011-12-29.01:12:31 by noreply.

Files
File name Uploaded Type Edit Remove
failing-issue1727_move-current-directory.sh merehap, 2010-01-11.00:21:42 application/x-sh
pending_buggy merehap, 2010-01-06.02:48:32 application/octet-stream
Messages
msg9729 (view) Author: merehap Date: 2010-01-06.02:48:32
Upon executing the command "darcs move . core", I was greated with the following
error message:

darcs: bug at src/Darcs/Repository/Internal.hs:367 compiled Sep 21 2009 08:50:23
There was an attempt to write an invalid pending!
If possible, please send the contents of _darcs/patches/pending_buggy
along with a bug report.

Please note that there were files in the current directory and that the target
directory existed but did not have anything in it.

My pending_buggy file is attached.
Attachments
msg9756 (view) Author: kowey Date: 2010-01-09.17:48:57
Sounds like a very nice, reproducible bug.

Do you think you could help us turn this into a regression test?
http://wiki.darcs.net/Development/RegressionTests

Thanks!
msg9773 (view) Author: merehap Date: 2010-01-11.00:21:42
I have sent the appropriate regression test patch (hopefully). I won't be
offended if these are heavily editted as my bash skills were nearly non-existent
before reporting this bug. However, it does work as intended on my machine
(WOMM). The file is attached also, just in case.

It turns out that the current directory can be empty and the target directory
doesn't have to exist to reproduce the bug. The file contains test cases
accounting for all four possibilies.
Attachments
msg10559 (view) Author: kowey Date: 2010-03-29.15:29:00
On Mon, Jan 11, 2010 at 00:21:45 +0000, merehap wrote:
> I have sent the appropriate regression test patch (hopefully). I won't be
> offended if these are heavily editted as my bash skills were nearly non-existent
> before reporting this bug. However, it does work as intended on my machine
> (WOMM). The file is attached also, just in case.

Thanks! I've pushed this into the Darcs repo.  Sorry for the delay;
I've been tracking this since January, but only managed to get back
on top of things now (let's see how long this lasts...).

Adding Alexey to this bug, because I think it should be of interest to
him given his recent work trying to clean up the Darcs command line
handling.

PS. using darcs send to submit the patch directly is also a help as
    it cuts out an extra step on our part

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
msg10560 (view) Author: kowey Date: 2010-03-29.15:31:16
It sounds like this needs two levels of work.

First: the core-ward bits of Darcs should just refuse this, maybe just
bomb out.

Second: the command line layer should filter this out
msg10561 (view) Author: kowey Date: 2010-03-29.15:35:07
Correction (sorry for the noise): I meant that the command line layer
should refuse this as being non-sensical (presumably)
msg14799 (view) Author: markstos Date: 2011-10-28.02:21:48
This issue is supposedly resolved by this patch:

"resolve issue1727: forbid moving the root of the repository"
msg14890 (view) Author: noreply Date: 2011-12-29.01:12:30
The following patch sent by Florent Becker <florent.becker@ens-lyon.org> updated issue issue1727 with
status=resolved;resolvedin=2.8.0 HEAD

* resolve issue1727: forbid moving the root of the repository 
Ignore-this: 7b195f350fdc8a291599cd1a06d94cce
History
Date User Action Args
2010-01-06 02:48:35merehapcreate
2010-01-06 02:50:50merehapsetpriority: bug
2010-01-09 17:48:59koweysetstatus: unknown -> needs-reproduction
nosy: + kowey
messages: + msg9756
assignedto: merehap
2010-01-11 00:21:44merehapsetfiles: + failing-issue1727_move-current-directory.sh
assignedto: merehap -> kowey
messages: + msg9773
2010-03-29 15:23:50koweylinkissue1800 superseder
2010-03-29 15:29:02koweysetmessages: + msg10559
2010-03-29 15:31:17koweysetstatus: needs-reproduction -> needs-implementation
assignedto: kowey ->
messages: + msg10560
title: darcs move failure -> darcs move . target => There was an attempt to write an invalid pending!
2010-03-29 15:35:08koweysetmessages: + msg10561
2011-10-28 02:21:48markstossetstatus: needs-implementation -> resolved
messages: + msg14799
resolvedin: 2.8.0
2011-12-29 01:12:31noreplysetmessages: + msg14890