versioned_graph/commit
improved: pldoc
author | Jacco van Ossenbruggen |
---|---|
Mon Jun 23 11:26:52 2014 +0200 | |
committer | Jacco van Ossenbruggen |
Mon Jun 23 11:26:52 2014 +0200 | |
commit | 9fad50ac846b31fe77a167064abd00f9b8f4ae37 |
tree | 8b1dd186046fdab57b89a5699e75679a741b7e50 |
parent | fd81e52684a9dcd375fa85d0ee41e65edb452942 |
Diff style: patch stat
diff --git a/lib/graph_version.pl b/lib/graph_version.pl index c3ee16d..732a811 100644 --- a/lib/graph_version.pl +++ b/lib/graph_version.pl @@ -12,6 +12,11 @@ gv_init/1 % +Options ]). +/** <module> Versioning named graphs + +@author Jacco van Ossenbruggen +*/ + :- use_module(library(semweb/rdf_db)). :- use_module(library(semweb/rdf_label)). :- use_module(library(settings)). diff --git a/lib/parse_git_objects.pl b/lib/parse_git_objects.pl index 67f9cd1..a4c0477 100644 --- a/lib/parse_git_objects.pl +++ b/lib/parse_git_objects.pl @@ -1,11 +1,36 @@ :- module(gv_parse_git_objects, - [ - commit//1, - tree//1 + [ commit//1, + % tag//1, % TODO + tree//1 ]). +/** <module> Parse git commit and tree objects. +Parse commit and tree objects from their git serialisation. Note that +blob objects can be directly parsed using rdf_read_turtle/3. +@todo: parse git tag objects + +@author: Jacco van Ossenbruggen +*/ :- use_module(library(semweb/rdf_db)). +%! tree(List)// is semidet. +% +% List is property list [hash(H), name(N)]. + +tree([H|T]) --> + blobline(H),!, + tree(T). +tree([]) --> []. + +%! commit(Commit)// is semidet. +% +% Commit is a property list consisting of +% * tree(T) +% * parent(P) +% * author(A), +% * committer(C) +% * comment(M). + commit(Commit) --> tree_line(T), parent(P), @@ -138,15 +163,6 @@ xdigit(E) --> { code_type(E, xdigit(_)) }. - - - - -tree([H|T]) --> - blobline(H),!, - tree(T). -tree([]) --> []. - blobline(Blob) --> mode, myblob, diff --git a/lib/url_to_filename.pl b/lib/url_to_filename.pl index c265160..f248cee 100644 --- a/lib/url_to_filename.pl +++ b/lib/url_to_filename.pl @@ -5,7 +5,7 @@ :- use_module(library(url)). :- use_module(library(lists)). -%% url_to_filename(-URL, +FileName) is det. +%! url_to_filename(-URL, +FileName) is det. % % Encode a valid URL into a valid filename and vice versa. Earlier % versions used www_form_encode/2, but this can produce characters