[darcs-users] Which commands can change output of darcs query contents for a particular hash?
greenrd at greenrd.org
Mon Jul 6 12:59:38 UTC 2009
Hi Eric, Ian,
I've cc'd Ian as this is a patch theory question.
On Tue, 7 Jul 2009 21:07:33 +0100
Eric Kow <kowey at darcs.net> wrote:
> On Mon, Jul 06, 2009 at 04:33:13 +0100, Robin Green wrote:
> > However, I know that darcs' patch theory allows patches to be
> > reordered. This could mean that the output of darcs query contents
> > "--match=hash foo" could vary over time - or have I misunderstood?
> > Then, if that's the case, which commands might potentially cause
> > this output to change? i.e. could a push into the repository cause
> > this to happen?
> I think this can only happen with obliterate (or the variants
> unrecord, amend-record [rollback on the other hand is fine as it just
> creates a new patch]).
> Push just calls darcs apply.
Right, so let's just talk about darcs apply. Assume you only have
one file added to the repository, so we're talking about the same file
throughout. What if you start with a patch tree that looks like this to
darcsit (which has to linearise the history somehow - presumably it
just uses the order of patches darcs changes gives it):
and then you pull a copy and add C:
and meanwhile back in the original repository you add D:
and now you send patch C to the maintainer of the original, who
Is is possible that darcs could reorder the patches such that when you
darcs query contents "--match=hash $HASH_OF_C"
you now get *all* the changes, i.e. the patches are ordered like this:
instead of like this:
And even if that's not possible in this merge example, are there any
possible merge scenarios in which you would see a change in the output
of identical "darcs query contents" commands after the merge? What if
there are conflicts that have to be solved manually?
More information about the darcs-users