[darcs-users] Which commands can change output of darcs query contents for a particular hash?

Ben Franksen benjamin.franksen at bessy.de
Tue Jul 7 22:43:57 UTC 2009

Eric Kow 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.

To slightly expand on Eric's answer: a re-ordering of patches during a push,
pull, or record does /not/ change the hash (which is made of author, date,
and patch name plus some random number) of any any existing patch, nor does
it change the date of the patch. It /may/ change the content of a patch so
that it 'does the same thing' in its new context (whatever that means
precisely, I am not an expert on patch theory). However, as Eric pointed
out there are some 'destructive' commands, that change or delete patches
(includinhgg their identity); these should not be allowed in a shared repo


More information about the darcs-users mailing list