darcs repository web UI and hosting app. This is the main darcsden trunk, which also runs hub.darcs.net. (http://hub.darcs.net)

#139editing a file via hub.darcs.net web interface fails and leaves repository in corrupted state

I did the following steps to reproduce the problem: I created a darcs repository and added a file 'test' containing the text line 'foobar'. I pushed that to http://hub.darcs.net/thielema/test-edit-file/. Then I edited the 'test' file via the web interface, i.e. http://hub.darcs.net/thielema/test-edit-file/edit-file/test. When submitting the change I got a red error page saying

error
Sorry.. your POST request to /thielema/test-edit-file/edit-file/test failed.

test: hGetContents: illegal operation (delayed read on closed handle)

If I try a new edit then the text field is empty. When I edit the 'test' file offline, record the change and push it to hub.darcs.net then I get:

test-edit-file$ darcs record -m "blabla"
hunk ./test 2
+blabla
Shall I record this change? (1/1)  [ynW...], or ? for more options: y
Finished recording patch 'blabla'
test-edit-file$ darcs push thielema@hub.darcs.net:test-edit-file
Sat Jul 25 11:29:00 CEST 2015  haskell@henning-thielemann.de
  * blabla
Shall I push this patch? (1/1)  [ynW...], or ? for more options: y

darcs failed:  Refusing to apply patches leading to conflicts.
If you would rather apply the patch and mark the conflicts,
use the --mark-conflicts or --allow-conflicts options to apply
These can set as defaults by adding
 apply mark-conflicts
to _darcs/prefs/defaults in the target repo. 
There are conflicts in the following files:
./test

Apply failed!

My assumption: hub.darcs.net got something wrong with reading the 'test' file lazily, thus making the 'test' file empty. The empty file differs from the recorded 'test' file and thus darcs refuses to push new changes to that file.

Of course the bug as is must be fixed. However, a command like 'ssh hub.darcs.net revert repo' would enable the user to fix corruption himself. This would be analogous to 'obliterate'.