Versioning - Order of additions and removals

1 view
Skip to first unread message

mailing...@gmail.com

unread,
Aug 19, 2014, 12:54:25 PM8/19/14
to sta...@clarkparsia.com
Hi,

According to http://docs.stardog.com/man/vcs-commit.html the stardog vcs commit command performs removals before additions.
>> stardog vcs commit —Commits a new version by adding and removing triples specified in files. Different from the 'data add/remove' commands, this command allows one to add and remove triples in one commit and associate a commit message. Removals are performed before additions. <<

I'm trying to use this promissed behavour to implement an update mechanism for some triples.
For simplicity assume we have a file 01.ttl storing some tripple. 
02.ttl is a newer version of this file (with some changes, added or removed triples) 

after:
  stardog-admin db create -o versioning.enabled=true -n vt      
  stardog vcs commit --add 01.ttl -m "added version 1" vt
version 1 of my file was successfully insert into stardog

however if I try to replace the old version 1 with the newer one with:       
  stardog vcs commit --add 02.ttl --remove 01.ttl -m "updated to version 2" vt
stardog promts >> Adding data from file: 02.ttl   Removing data from file: 01.ttl << as a responce and performance the operations (additions and removals) in wrong order.
So the store data in the new version are not (all of) the triples from 02.ttl.

Is this a bug, or is there a possibility to change the order of operation?

Thanks,
Philipp Schindler



=======================================================================================================

01.ttl:
p:P0 p:name  "Frige" .
p:P0 p:price "449" .
p:P1 p:name  "Cooler" .
p:P1 p:price "30" .
p:P0 p:requires p:P1 .
p:P2 p:name "clock" .
p:P2 p:price "50" .

02.ttl:
p:P0 p:name  "Fridge" .
p:P0 p:price "499" .
p:P1 p:name  "Cooler" .
p:P1 p:price "30" .
p:P0 p:requires p:P1 .
p:P3 p:name "glasses" .
p:P3 p:price "120" .

Evren Sirin

unread,
Aug 19, 2014, 2:06:47 PM8/19/14
to Stardog
There is no way to change the order of operations in the commit
command and there seems to be an apparent inconsistency between the
documentation and the way command works. We'll fix this in the next
release. In the meantime, you can use the API directly to do the
commit in the order you want (see VersioningExample that comes in the
distribution) or use the CLI command with files that contain only the
triples that changed.

Best,
Evren
> --
> -- --
> You received this message because you are subscribed to the C&P "Stardog"
> group.
> To post to this group, send email to sta...@clarkparsia.com
> To unsubscribe from this group, send email to
> stardog+u...@clarkparsia.com
> For more options, visit this group at
> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
Reply all
Reply to author
Forward
0 new messages