[darcs-devel] [patch1730] add RepoPatchV3 aka camp conflictors, now with almost complete integration

Ben Franksen bugs at darcs.net
Fri Jun 14 16:21:18 UTC 2019


Ben Franksen <ben.franksen at online.de> added the comment:

Am 14.06.19 um 15:56 schrieb Ganesh Sittampalam:
> 
> Ganesh Sittampalam <ganesh at earth.li> added the comment:
> 
>>  * add RepoPatchV3 aka camp conflictors
>> -- | Signed patch identity.
>> -- The 'SHA1' hash of the non-inverted meta data ('PatchInfo') 
> plus
>> -- an 'Int' for the sequence number within the named patch.
>> -- The 'Int' gets inverted together with the patch.
>> data PrimPatchId = PrimPatchId !Int !SHA1
>>   deriving (Eq, Ord, Show)
>> instance SignedId PrimPatchId where
>>   positiveId (PrimPatchId i _) = i > 0
>>   invertId (PrimPatchId i h) = PrimPatchId (- i) h
> 
> Is it illegal for the Int to be 0?

Yes.

> If so this should be documented
> and ideally tested. (I haven't read a lot of the rest of the 
> relevant code yet, so this might already be tested.)

Good point. No, i don't think this is tested nor documented. Will do.

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1730>
__________________________________


More information about the darcs-devel mailing list