2013/8/21 Stephan Beal <[email protected]>:
> Here's the algo fossil(3) uses to figure the artifact type out at
> parse-time. So far i haven't been able to fool it using exported manifests:
>
> http://fossil.wanderinghorse.net/repos/f2/index.cgi/artifact/53a6ffa8e3f2c499cc2531d3201b98f1bc32a0dc?ln=2901-2933
Well, here is an artifacts which will fool this algoithm:
<http://www.fossil-scm.org/fossil/info/2a4e4cf03e>
Better would be something like this:
if(L('M')) return FSL_CATYPE_CLUSTER;
else if(L('L') || L('W')) return FSL_CATYPE_WIKI;
else if(L('J') || L('K')) return FSL_CATYPE_TICKET;
else if(L('E')) return FSL_CATYPE_EVENT;
else if(L('A')) return FSL_CATYPE_ATTACHMENT;
else if((L('B') || L('F') || L('P') || L('Q') || L('R')) return
FSL_CATYPE_MANIFEST;
else if(L('D') && L('T') && L('U')) return FSL_CATYPE_CONTROL;
It appears that discrimination on the MANIFEST and CONTROL types
are most difficult to get right........ doing the CONTROL last makes
things easier.
Regards,
Jan Nijtmans
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users