[darcs-users] How do patches get ordered within pending?

David Roundy droundy at abridgegame.org
Wed Nov 19 13:56:49 UTC 2003

On Tue, Nov 18, 2003 at 08:39:47PM -0800, Kevin Smith wrote:
> I'm still tracing the addfile code. But I can't see where there is any 
> logic that decides how the patches within pending should be ordered.
> Is it simply true that valid addfile, move, and rmfile/rmdir patches can 
> always be added to the end of the pending composite patch sequence?

No, it's not that they *can* always be added at the end, it's that they
*must* always be added at the end, because they operate on the
slurp_pending version of the tree.  If you try

darcs mv foo bar
darcs remove foo

the second will fail (because foo is no longer in the repository).
Similarly if you do

darcs mv foo bar
darcs remove bar

it is critical that the second patch be done after the first.

The patches can and probably will be reordered when record is run, but this
must be done using appropriate commutes, which can certainly fail.
David Roundy

More information about the darcs-users mailing list