[darcs-devel] [issue2377] darcs amend crashes in src/Darcs/Repository/PatchIndex.hs:246

Ben Franksen bugs at darcs.net
Sat Apr 12 23:13:40 UTC 2014


Ben Franksen <benjamin.franksen at helmholtz-berlin.de> added the comment:

I verified my suspicion that the error lies in the patches by Jose Luis
Neder that implement detection of replaces and moves and that need the
unreleased hashed-storage version that is currently bundled with the
darcs sources. When I obliterate these patches:

ben at sarun[1]: .../darcs/screened > darcs pull --dry-run   
Would pull from "http://darcs.net/screened"...
Welcome to the darcs screened repository.

If you would like to contribute, please read our guide for contributors:
http://wiki.darcs.net/Development/GettingStarted

Thanks and happy hacking!
**********************
Would pull the following changes:
Fri Jan 10 00:00:42 CET 2014  Jose Luis Neder <jlneder at gmail.com>
  * Show fileid info with show index
  Update timestamp index with new adds and moves in pending
  (darcs mv, darcs add)
  Require hashed-storage 0.5.11

Mon Sep 16 01:41:26 CEST 2013  Jose Luis Neder <jlneder at gmail.com>
  * resolve issue642: Automatic detection of file renames

Fri Jan 10 05:20:13 CET 2014  Jose Luis Neder <jlneder at gmail.com>
  * resolve issue2209: Automatically detect replace
  This patch add the flag --look-for-replaces to amend-record, record and
  whatsnew commands, to automatically detect possible replaces.

Fri Feb  7 20:29:23 CET 2014  Ganesh Sittampalam <ganesh at earth.li>
  * we need utf8-string on Windows too now for the fast-export/import code

Fri Feb  7 11:59:11 CET 2014  Dan Frumin <difrumin at gmail.com>
  * Cleaning up the headers in WhatsNew and SelectChanges
  

Fri Feb  7 12:00:51 CET 2014  Dan Frumin <difrumin at gmail.com>
  * resolve issue851: interactive mode for whatsnew

Sun Mar 16 15:47:49 CET 2014  Ganesh Sittampalam <ganesh at earth.li>
  * conditionally use local copy of Data.Map.Strict in Darcs.Repository.Util
  This is needed for building with containers<0.5, e.g. on Debian stable

Tue Apr  8 18:45:28 CEST 2014  Ale Gadea <alex.aegf at gmail.com>
  * Resolve Issue1416: put log files in tempdir instead of in working dir.
    
  The temporary files are found in _darcs.
  For the commands amend-record, record and tag, the temp file is
patch_description.txt
  and is persistent, ie always have the last message whether failed or
not the command.
  For send, we use two files, darcs-send for the editing and
darcs-send.final for the 
  backup. If all is ok, the files are removed.


and then remove the bundled hashed-storage from my cabal sandbox, and
then fix one line in the code:

ben at sarun[1]: .../darcs/screened > darcs record 
hunk ./src/Darcs/UI/Commands/Record.hs 280
-                 when (isJust logf) $ removeFile (fromJust logf)
+                 case logf of Nothing -> return (); Just f -> removeFile f
Shall I record this change? (1/1)  [ynW...], or ? for more options: y
Do you want to record these changes? [Yglqk...], or ? for more options: y
What is the patch name? fixed missing import of fromJust by not using it
(better style)

then I get a working version that does not choke on my repository.

I suggest that these patches (and/or the bundled hashed-storage version)
need serious review and fixing!

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue2377>
__________________________________


More information about the darcs-devel mailing list