summaryrefslogtreecommitdiff
path: root/doc/todo
diff options
context:
space:
mode:
authorGravatar https://www.google.com/accounts/o8/id?id=AItOawlrnOT_XLcNNtmIwVdAJCJYu1BwAAOYtBI <Federico@web>2011-12-22 19:21:50 +0000
committerGravatar admin <admin@branchable.com>2011-12-22 19:21:50 +0000
commit1071a3cf02a2be9b8fd7ec2222e80f6090c4b053 (patch)
treef148960a8696dc29633df4fd5e85ea9ba59c2ef4 /doc/todo
parent30cf6ce81ca8ff99f5284c5b991e546eb1da72ae (diff)
Diffstat (limited to 'doc/todo')
-rw-r--r--doc/todo/link_file_to_remote_repo_feature.mdwn48
1 files changed, 48 insertions, 0 deletions
diff --git a/doc/todo/link_file_to_remote_repo_feature.mdwn b/doc/todo/link_file_to_remote_repo_feature.mdwn
new file mode 100644
index 000000000..4bbd2b1a8
--- /dev/null
+++ b/doc/todo/link_file_to_remote_repo_feature.mdwn
@@ -0,0 +1,48 @@
+I have two repos, using SHA1 backend and both using git.
+The first one is a laptop, the second one is a usb drive.
+
+When I drop a file on the laptop repo, the file is not available on that repo until I run *git annex get*
+But when the usb drive is plugged in the file is actually available.
+
+How about adding a feature to link some/all files to the remote repo?
+
+e.g.
+We have *railscasts/196-nested-model-form-part-1.mp4* file added to git, and only available on the usb drive:
+
+ $ git annex whereis 196-nested-model-form-part-1.mp4
+ whereis 196-nested-model-form-part-1.mp4 (1 copy)
+ a7b7d7a4-2a8a-11e1-aebc-d3c589296e81 -- origin (Portable usb drive)
+
+I can see the link with:
+
+ $ cd railscasts
+ $ ls -ls 196*
+ 8 lrwxr-xr-x 1 framallo staff 193 Dec 20 05:49 196-nested-model-form-part-1.mp4 -> ../.git/annex/objects/Wz/6P/SHA256-s16898930--43679c67cd968243f58f8f7fb30690b5f3f067574e318d609a01613a2a14351e/SHA256-s16898930--43679c67cd968243f58f8f7fb30690b5f3f067574e318d609a01613a2a14351e
+
+I save this in a variable just to make the example more clear:
+
+ ID=".git/annex/objects/Wz/6P/SHA256-s16898930--43679c67cd968243f58f8f7fb30690b5f3f067574e318d609a01613a2a14351e/SHA256-s16898930--43679c67cd968243f58f8f7fb30690b5f3f067574e318d609a01613a2a14351e"
+
+The file doesn't exist on the local repo:
+
+ $ ls ../$ID
+ ls: ../$ID: No such file or directory
+
+however I can create a link to access that file on the remote repo.
+First I create a needed dir:
+
+ $ mkdir ../.git/annex/objects/Wz/6P/SHA256-s16898930--43679c67cd968243f58f8f7fb30690b5f3f067574e318d609a01613a2a14351e/
+
+Then I link to the remote file:
+
+ $ ln -s /mnt/usb_drive/repo_folder/$ID ../$ID
+
+now I can open the file in the laptop repo.
+
+
+I think it could be easy to implement. Maybe It's a naive approach, but looks apealing.
+Checking if it's a real file or a link shouldn't impact on performance.
+The limitation is that it would work only with remote repos on local dirs
+
+Also allows you to have one directory structure like AFS or other distributed FS. If the file is not local I go to the remote server.
+Which is great for apps like Picasa, Itunes, and friends that depends on the file location.