| I think I know roughly what's going on here, and it's a good example of how we don't really track witnesses properly in 
repositories (Ben: another example of where we can't trust them!)
The problem is the tentativelyReplacePatches call made in tentativelyMergePatches_ (in Darcs.Repository.Merge). The 
precondition for the replace is that the patches passed in are already commuted to the end of the repo, so they can be 
used as the properly commuted ones to re-add to the end of the repo after removing the current versions from wherever  
they were before - the type is roughly Repository wR wU wT -> Patch wX wT -> IO ().
The problem in tentativelyMergePatches_ is that while 'r' and 'usi' have the right types at the start of the function, by 
the time we get to the replace call, we've written the recently pulled patches to the repository, but the witnesses 
haven't changed.
Will have to think about how best to fix this... |