[darcs-devel] Re: darcs patch: make dangers and recommended use
of "Amend" clearer in...
Tommy Pettersson
ptp at lysator.liu.se
Thu Dec 15 03:32:47 PST 2005
On Thu, Dec 15, 2005 at 01:38:10AM +0100, Juliusz Chroboczek wrote:
> > but perhaps it will only result in a harmless "unable to apply
> > patch".
>
> I would expect to get the ``perhaps this is a partial repository''
> error.
I tried to fake it by backing up the inventory before amending,
then restoring the "previous" inventory and pulling, and I got:
darcs failed: user error (Error applying patch to recorded.
Running 'darcs repair' on the target repo may help.
user error (Error applying hunk to file ./f))
Your repository is now in an inconsistent state.
This must be fixed by running darcs repair.
$ darcs check
Applying patch 2 of 2... done.
different file lengths for /home/tommy/kod/darcs/foo/m/_darcs/current/f and /tmp/checking/f
Looks like we have a difference...
Just {
hunk ./f 4
+QQQQ
+XXXX
}
Inconsistent repo!
'darcs repair' fixed it, but I think I can device a patch
configuration where it couldn't.
I have not checked that this faked race condition can happen
in reality, but since Pull doesn't lock the repo, "anything"
could happen if the repo is altered concurrently.
--
Tommy Pettersson <ptp at lysator.liu.se>
More information about the darcs-devel
mailing list