[darcs-users] Re: [darcs-devel] [darcs #280] Bug when pulling a patch
ptp at lysator.liu.se
Tue Mar 15 11:41:30 UTC 2005
On Mon, Mar 14, 2005 at 06:48:39PM -0500, Baruch Even via RT wrote:
> I had a repository which I wanted to amend a record of, I pushed the
> content to a new repository, unpulled the top two patches and amended
> the top patch by removing a file that was untouched by any of the
> patches I unpulled.
> When trying to pull back the patches, I got the following bug:
> We have conflicts in the following files:
> ./config ./instrument/kprobes_ret.patch ./instrument/relay-apps.patch
> ./instrument/relayfs_tracer.patch ./kprobes_ret.patch ./series
> Fail: bug in darcs!
> There was an attempt to write an invalid pending!
> The patches that were removed and pulled back were depending on the
> patch that I amended.
If I guess right what you tried to do, it won't work as you
Here's my guess:
Let's call the three top most patches 1, 2 and 3, where you
want to change patch 3 but can't because patch 1 and 2 depend
on it. So you pushed them (1 and 2) to a safe place where
you could get them back, and then unpulled them to "release"
patch 3. You made the changes to patch 3 with amend-record,
and pulled patch 1 and 2 back in again.
This is what happend:
Patch 1 and 2 are describing changes in a way that presumes
patch 3 is applied. That's why there is a dependency, and
darcs won't let you (it can't let you) skip that dependency.
So when you pushed patch 1 and 2, patch 3 was pushed along.
Amend-record then deleted patch 3 and inserted patch 3' with
almost the same changes. Now, dracs doesn't care much about
what the changes look like, it just works with the type of
changes and where the changes happens.
So when you pulled back patch 1 and 2, darcs noticed that the
required patch 3 was not in the repo and pulled that along as
well. Darcs knows it is needed because 1 and 2 are described
in a way that only make sense if the changes that patch 3
makes have been applied. It won't find out that patch 3'
makes these changes as well. It just cares that in this case
two patches (3 and 3') both want to change the same lines.
So there is a conflict (as you noticed).
The only way to change patch 3 is to change patch 1 and 2
I can't tell why the bug happens, but some "invalid pending"
bug has been fixed since 1.0.2 and it could be this bug.
Tommy Pettersson <ptp at lysator.liu.se>
More information about the darcs-users