On Wed, Aug 21, 2013 at 5:13 PM, Jan Nijtmans <jan.nijtm...@gmail.com>wrote:

> I'm looking at the algorithm in fossil now which determines the
> type. Most types are easy to distinguish because they have unique
> cards which only occur in that type. The only difficult types are
> Control artifacts and Manifests: The cards allowed in Manifests
> are a super-set of the cards allowed in Control artifacts. I found
> one example which shows that fossil's method is not 100%
> correct (== assuming the documentation is correct). According
> to the documentation, this artifact should be valid:
>     <http://fossil-scm.org/index.html/info/2a4e4cf03ec12f99>
>

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

i run that each time i see a card for as long as the manifest has an
undefined type. Once we know the type, each card which comes in passes
through an "is the card legal for artifact type xyz" check.

That approach "might" work well for you.


> In stead, fossil handles this one as a valid Control artifact. It
> cannot be a Control artifact because it has self-referential
> T-cards. It has all mandatory cards for a Manifest, so it
> should be handled as one.
>

i still need to port in that particular check (i saw your commit on it).


-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to