darcs

Issue 2731 darcs 2.18 can no longer pull: "allStack (from HasCallStack): error, called at src/Darcs/Patch/Conflict.hs"

Title darcs 2.18 can no longer pull: "allStack (from HasCallStack): error, called at src/Darcs/Patch/Conflict.hs"
Priority critical Status unknown
Milestone Resolved in
Superseder Nosy List bortzmeyer
Assigned To
Topics

Created on 2024-08-30.13:15:56 by bortzmeyer, last changed 2024-10-14.09:06:27 by bfrk.

Messages
msg24077 (view) Author: bortzmeyer Date: 2024-08-30.13:15:50
% darcs pull
Pulling from "REPOS"...
patch 1f20d9756fd50d9b86c0c92e3e7671c6d261de22
Author: stephane...
Date:   Fri Aug 30 11:04:14 CEST 2024
  * Tout début rédaction article
Shall I pull this patch? (1/2) 
...

This is a bug! Please report it at http://bugs.darcs.net or via email to bugs@darcs.net:
precondition violated:
[First "entry" document
bortzmeyer@batilda.nic.fr**20050708135337] {
adddir ./entries
addfile ./entries/Makefile
hunk ./entries/Makefile 1
...
CallStack (from HasCallStack):
  error, called at src/Darcs/Patch/Conflict.hs:103:5 in darcs-2.18.3-5469898435c90cc53ddbdb01f4c15ff1619487ab9ba0b191543e64ba814b25a2:Darcs.Patch.Conflict

It is a large repository (8.3 GB, 20,705 patches) but darcs 2.16 has no problem with it.

%                    darcs --version
2.18.3 (release)

(Ubuntu/Linux)

I tried: 
* darcs optimize clean (no error but changes nothing)
* darcs get REPOS in an empty directoty (same error message)
msg24078 (view) Author: bortzmeyer Date: 2024-08-30.15:40:31
Retrieving the patches one by one (with darcs pull -h HASH) works...
msg24084 (view) Author: bfrk Date: 2024-10-14.09:06:23
This is bad, but there is probably not much we can do about it. The 
patches that make up your two repositories violate a certain global 
invariant. This is usually caused by bugs in the darcs-1 or darcs-2 
patch formats. An unfortunate side-effect of some refactors we made 
since 2.16 is that darcs is now more likely to "notice" violation of 
such invariants. In such a case there is really nothing we can do other 
than crashing.

However, there are things you can do to mitigate the situation.

My guess is that the repo you are pulling from ("REPOS") either has 
unresolved conflicts, in which case it may help to resolve these 
conflicts first. Otherwise, i.e. if the conflict is with patches in the 
repo into which you pull, you could try `darcs rebase pull`. This 
suspends any local patches that conflict. You can then `darcs rebase 
unsuspend` them one at a time, resolve the conflicts, and `darcs amend` 
those resolutions into the patch. (This works somewhat similar to `git 
pull --rebase`, in case you happen to be familiar with that.)
History
Date User Action Args
2024-08-30 13:15:56bortzmeyercreate
2024-08-30 15:40:31bortzmeyersetmessages: + msg24078
2024-10-14 09:06:27bfrksetmessages: + msg24084