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

This commit is contained in:
Joey Hess 2012-12-30 00:06:17 -04:00
commit 16b2454680
3 changed files with 31 additions and 4 deletions

View file

@ -1,10 +1,10 @@
A few final bits and peices of direct mode. Fixed a few more bugs in the
A few final bits and pieces of direct mode. Fixed a few more bugs in the
assistant. Made all git-annex commands that don't work at
all, or only partially work in direct mode refuse to run at all. Also
all, or only partially work in direct mode, refuse to run at all. Also,
some optimisations.
I'll surely need to revisit direct mode later, and make more commands
support it. `fsck` and `add` especially.
I'll surely need to revisit direct mode later and make more commands
support it; `fsck` and `add` especially.
But the only thing I'd like to deal with before I make a release with direct
mode is the problem of files being able to be modified while they're
being transferred, which can result in data loss.

View file

@ -0,0 +1 @@
I threw together a pair of shell scripts for calculating the cost of a remote using ping times. I don't know how useful this is in practice, but the theory seemed sound to me. If I'm in a hotel room with my two laptops, I'd rather annex try to get a file from the other laptop than from my NAS all the way back home. I'd love to figure out how to also detect if I'm on my VerizonWireless connection at the time and multiply the cost of all connections over the Internet accordingly, but that's down the road. Latest versions of the pair of scripts will be at <https://gist.github.com/4410357>. I'm interested in feedback, so please fork the git repo on gist and send me changes/updates. Also of note is that these were written for MacOSX. If you're interested in using them on a different linux, pay attention to the format of the summary line of your ping command.

View file

@ -0,0 +1,26 @@
I've been doing a sort of experiment but I'm not sure if it's working or, really, how to even tell.
I have two macbooks that are both configured as clients as well as a USB HDD, an rsync endpoint on a home NAS, and a glacier endpoint.
For the purposes of this example, lets call the macbooks "chrissy" and "brodie". Chrissy's was initially configured with a remote for brodie with the url as
ssh://Brodie.88195848.members.btmm.icloud.com./Users/akraut/Desktop/annex
This allows me to leverage the "Back To My Mac" free IPv6 roaming I get from Apple. Now, occasionally, that dns resolution fails. Since I'm frequently on the same network, I can also use the mDNS address of brodie.local. which is much more reliable.
So my brilliant/terrible idea was to put this in my git config:
[remote "brodie"]
url = ssh://Brodie.88195848.members.btmm.icloud.com./Users/akraut/Desktop/annex
fetch = +refs/heads/*:refs/remotes/brodie/*
annex-uuid = BF4BCA6D-9252-4B5B-BE12-36DD755FAF4B
annex-cost-command = /Users/akraut/Desktop/annex/tools/annex-cost6.sh Brodie.88195848.members.btmm.icloud.com.
[remote "brodie-local"]
url = ssh://brodie.local./Users/akraut/Desktop/annex
fetch = +refs/heads/*:refs/remotes/brodie/*
annex-uuid = BF4BCA6D-9252-4B5B-BE12-36DD755FAF4B
annex-cost-command = /Users/akraut/Desktop/annex/tools/annex-cost.sh brodie.local.
Is there any reason why I shouldn't do this? Is annex smart enough to know that it can reach the same remote through both urls? Will the cost calculations be considered and the "local" url chosen if it's cost is less than the other?
(I posted the annex-cost.sh stuff at [[forum/Calculating Annex Cost by Ping Times]].)