From 33d753f9feb215359aaa1f3e82c253586e74a000 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawmj9PMP_cTZvlEbxJ1eqeLCb25bTU6o1pg" Date: Wed, 5 Feb 2014 22:24:08 +0000 Subject: [PATCH] --- ..._path_to_file_in_rsync_special_remote.mdwn | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 doc/bugs/Can__39__t_get_path_to_file_in_rsync_special_remote.mdwn diff --git a/doc/bugs/Can__39__t_get_path_to_file_in_rsync_special_remote.mdwn b/doc/bugs/Can__39__t_get_path_to_file_in_rsync_special_remote.mdwn new file mode 100644 index 0000000000..2340f87f0f --- /dev/null +++ b/doc/bugs/Can__39__t_get_path_to_file_in_rsync_special_remote.mdwn @@ -0,0 +1,45 @@ +I would like to use git-annex to place files on a remote server using rsync and then use another app to generate links to them. +However, the remote path cannot be derived from the local path because certain intermediate directories on the remote system are different from those on the local system. +There doesn't seem to be a way to ask git-annex for remote file paths. + +I know that git-annex knows how to find the files on the remote system because separate git-annex repositories can both reach the same files (or else the whole transfer repository idea would not work). + +On LOCAL_A (Debian 7.3): + + $ git annex version + git-annex version: 3.20120629 + ... + $ mkdir LOCAL_REPOSITORY + $ cd LOCAL_REPOSITORY + $ git init + $ git annex init "local A" + $ cp /tmp/MYFILE.png . + $ git annex add MYFILE.png + $ git commit -m "initial commit" + $ git annex initremote rsyncremote type=rsync encryption=none rsyncurl=USER@REMOTE_HOST:~/REMOTE_DIR + $ git annex copy --to rsyncremote . + $ ls -l + total 8 + lrwxrwxrwx 1 me me 184 Feb 5 13:01 MYFILE.png -> .git/annex/objects/j5/FV/SHA256-s82130--0f4a2c2ae46d17277188b9ce93d9cc1a033b84e57a30abce7ccce792852ed2cc/SHA256-s82130--0f4a2c2ae46d17277188b9ce93d9cc1a033b84e57a30abce7ccce792852ed2cc + +On LOCAL_B (CrunchBang Linux 11 "Waldorf", derived from Debian Wheezy): + + $ git annex version + git-annex version: 4.20131002~bpo70+1 + ... + $ git clone USER@LOCAL_A:/PATH/TO/LOCAL_REPOSITORY + $ cd LOCAL_REPOSITORY + $ git annex init "local B" + $ git annex enableremote rsyncremote + $ git annex copy --from rsyncremote . + $ ls -l + total 8 + lrwxrwxrwx 1 me me 184 Feb 5 13:09 MYFILE.png -> .git/annex/objects/j5/FV/SHA256-s82130--0f4a2c2ae46d17277188b9ce93d9cc1a033b84e57a30abce7ccce792852ed2cc/SHA256-s82130--0f4a2c2ae46d17277188b9ce93d9cc1a033b84e57a30abce7ccce792852ed2cc + +On REMOTE_HOST (Debian 7.3): + + $ cd ~/REMOTE_DIR + $ find . -type f -print + ./25b/bff/SHA256-s82130--0f4a2c2ae46d17277188b9ce93d9cc1a033b84e57a30abce7ccce792852ed2cc/SHA256-s82130--0f4a2c2ae46d17277188b9ce93d9cc1a033b84e57a30abce7ccce792852ed2cc + +The difference is the `../j5/FV/..` on the local systems versus the `../25b/bff/..` on the remote system.