Sorry that I am not stop asking questions - I am trying to wrap my head around annex still - and I do not fully understand the standard groups/preferred contents yet.
First, basic: Is the "preferred content group" an attribute of a repository or of a remote? E.g., when I use assistant, I can set this property for a remote repository. Will this property be synced to all other clients then or is it only valid for this particular client?
Second, I think the standard groups do still not cover what I want and I wonder if this could be done with preferred contents somehow? What I want:
Generally only the structure should be synced, no contents (i.e. "manual" is the closest)
When I (manually) do "git annex get" on a file this file should be synced whenever it changes locally or remotely (until I drop it again). Currently it seems that when it changes remotely, it is "dropped" again so I need to manually use "git annex get" again
When I (manually) do "git annex get" on a directory, it should be (recursively) synced whenever it or any file changes locally or remotely (until I drop it again). Currently nothing seems to sync at all in this case (except the meta data)
Thanks!
Yeah, it syncs the content group between the remotes, so you have to set it only in one repository and the information gets synced across the network.
Well, I guess you have to manually create a git repo (but no annex repo!) on your remote. Once you add the remote the assistant should tell you that he can only sync the metadata, but no contents.
Maybe this could work?
(in preferred content) exclude="*" and present
So that what is present is preferred and not dropped, everything else is not downloaded unless the user explicitly asks to get it.
Unfortunately the same
Testcase: 1.) Create a file 'file' on the server, git annex add/sync etc. 2.) On the client: git annex wanted here 'exclude="*" and present' 3.) On the client: git annex get file . The file is now present on the client 4.) Change the file on the server, git annex sync 5.) git annex sync --content on the client
Result: File is dropped again on client
... and for the directories the same:
1.) Create a (sub-)directory 'subdir' with files and sync everything 2.) On the client: git annex get subdir . The subdirectory is now present, all files under it downloaded. 3.) On the server create a new file in 'subdir' and git annex add; git annex sync --content 4.) git annex sync --content on the client
Result: Content of the files is not synced to client
wait, is the group working together with the preferred content?
Usually you set a repository in a group and then you tell annex that particular group has this preferred content expression (which by default is set to 'standard'). So you could add the repo to 'client' group then set the group 'client' to that preferred content expression. If you only want that particular client to have that expression you can play around with "groupwanted", or even define your own group I guess.
Use "git annex vicfg" to quickly check both "group" and "wanted" settings together.
Hi daniele,
I am not completely sure what you mean but I as far as I understand as soon as I set "wanted" to anything other than "default" the standard groups do not apply at all. I can't use vicfg because I use windows and this command hangs ... probably because there is no vi.
However, I can still check the expressions:
Have you tried this? Does it work in your case? Because the standard preferred contents also contains "present" so I assume it would behave the same. Is maybe "present" broken or the behavior different than expected?