Merge branch 'master' of ssh://git-annex.branchable.com

This commit is contained in:
Joey Hess 2014-03-13 09:40:06 -04:00
commit 80c8ebbf98
2 changed files with 65 additions and 0 deletions

View file

@ -0,0 +1,27 @@
[[!comment format=mdwn
username="https://www.google.com/accounts/o8/id?id=AItOawm3vKzS4eOWYpKMoYXqMIjNsIg_nYF-loU"
nickname="Konubinix"
subject="That does it but not totally"
date="2014-03-13T11:36:02Z"
content="""
I agree with the fact that it answers my initial question.
Nevertheless, I guess it is really annoying to have to change the preferred content in two locations each time I change want to modify what is on my phone.
Indeed, I quite often change what should be really present on my phone, depending on several factors (my mood, the time I will have in transports and the phase of the moon).
The reason why I use \"git annex wanted\" is that it is straightforward: I just launch : \"git annex wanted phone include=some/file\" and that's all.
With the solution you propose, I would have to each time additionally launch \"git annex wanted here '(not inallgroup=phones and (include=some/file)) or ($desktop_preferred_content)'\"
Where I probably have to previously launch \"git annex wanted here\" to remember what is the preferred content of my computer (and put it in $desktop_preferred_content).
Another option would be to run \"git annex vicfg\" and edit both fields manually, but IMHO this appears also to be too complicated relatively to the use case.
About your second comment, I really enjoy the idea if \"git annex sync --content\", but it is really long in big repositories. I guess it is because I cannot restrict the command to a directory like I do with get, drop, move and copy.
Besides, the use case wants to get the files whenever they are and copy them only to the phone. With git annex sync --content, the files are also put in the other repositories.
For the time being, I prefer falling back to explicit commands that are much faster when I know a directory to sync \"git annex get --auto directory && git annex copy --auto --to phone directory\".
For example, I just tried \"git annex sync --content phone\" and I killed it after 5 minutes and nothing was copied yet. With the set of two commands above, the synchronization of directory (get --to phone directory + drop --from here directory) took about 3 minutes.
"""]]

View file

@ -0,0 +1,38 @@
[[!comment format=mdwn
username="https://www.google.com/accounts/o8/id?id=AItOawm3vKzS4eOWYpKMoYXqMIjNsIg_nYF-loU"
nickname="Konubinix"
subject="Precision of the use case"
date="2014-03-13T11:47:59Z"
content="""
I realized that the directory restriction described earlier is not clear. Let me explain it.
Say I have a big repository of files with the following structure.
A/...
B/...
C/...
D/D1/...
D/D2/...
D/D3/...
Imagine that each of A, B, C and D contains a lot of files.
Now imagine that I have often put in the preferred content of my phone files in one of D1, D2 or D3. (for instance, include=D/D1/*)
I implicitly know that I can restrict the command to D, and I can rely on preferred content to know what file from D I have to put into my phone.
Then, I can run
$ git annex get --auto D
$ git annex copy --auto --to phone D
$ git annex drop --auto D
This in my use case takes 3 minutes.
When I run
$ git annex sync --content phone
git annex goes recursively through A, B and C and that takes a long time (much more than 3 minutes). This time is really wasted since I know I only want to sync files from D.
I cannot test the behavior of \"git annex sync --content\", but if I restrict the sync to phone, will it take the files from the NAS to put them on the phone?
If I don't precise phone in the command line, it will try to sync with other repositories not in sync that I don't want to be in sync for the time being.
"""]]