summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Remote/Rsync.hs22
-rw-r--r--Remote/Rsync/RsyncUrl.hs46
-rw-r--r--debian/changelog1
-rw-r--r--doc/bugs/__92____92___instead_of___47___on_rsync_special_remote_on_linux_accessed_from_a_windows_git-annex.mdwn2
-rw-r--r--doc/design/caching_database.mdwn2
-rw-r--r--doc/todo/Feature_Request:_Sync_Now_Button_in_Webapp.mdwn (renamed from doc/forum/Feature_Request:_Sync_Now_Button_in_Webapp.mdwn)2
-rw-r--r--doc/todo/Feature_Request:_Sync_Now_Button_in_Webapp/comment_1_0d5c90eb0e8fe61b82a19c5fea343613._comment (renamed from doc/forum/Feature_Request:_Sync_Now_Button_in_Webapp/comment_1_0d5c90eb0e8fe61b82a19c5fea343613._comment)0
-rw-r--r--doc/todo/Feature_Request:_Sync_Now_Button_in_Webapp/comment_2_196552002d70390e8b52b4af61dca903._comment (renamed from doc/forum/Feature_Request:_Sync_Now_Button_in_Webapp/comment_2_196552002d70390e8b52b4af61dca903._comment)0
-rw-r--r--doc/todo/add_an_icon_for_the_.desktop_file.mdwn2
-rw-r--r--doc/todo/wishlist:_An_option_like_--git-dir.mdwn2
-rw-r--r--doc/todo/wishlist:_a_spec.remote_for_network_directories_that_would_mount_them_whenever_needed___40__e.g.__44___with_WebDAV__41__.mdwn4
-rw-r--r--doc/todo/wishlist:_assistant_autostart_port_and_secret_configuration.mdwn3
-rw-r--r--doc/todo/wishlist:_define_remotes_that_must_have_all_files.mdwn4
-rw-r--r--doc/todo/wishlist:_git-annex_replicate.mdwn10
14 files changed, 79 insertions, 21 deletions
diff --git a/Remote/Rsync.hs b/Remote/Rsync.hs
index 8f00a767e..7d051d6cd 100644
--- a/Remote/Rsync.hs
+++ b/Remote/Rsync.hs
@@ -28,6 +28,7 @@ import Annex.UUID
import Annex.Ssh
import Remote.Helper.Special
import Remote.Helper.Encryptable
+import Remote.Rsync.RsyncUrl
import Crypto
import Utility.Rsync
import Utility.CopyFile
@@ -40,16 +41,6 @@ import Types.Creds
import qualified Data.ByteString.Lazy as L
import qualified Data.Map as M
-type RsyncUrl = String
-
-data RsyncOpts = RsyncOpts
- { rsyncUrl :: RsyncUrl
- , rsyncOptions :: [CommandParam]
- , rsyncUploadOptions :: [CommandParam]
- , rsyncDownloadOptions :: [CommandParam]
- , rsyncShellEscape :: Bool
-}
-
remote :: RemoteType
remote = RemoteType {
typename = "rsync",
@@ -148,17 +139,6 @@ rsyncSetup mu _ c = do
gitConfigSpecialRemote u c' "rsyncurl" url
return (c', u)
-rsyncEscape :: RsyncOpts -> String -> String
-rsyncEscape o s
- | rsyncShellEscape o && rsyncUrlIsShell (rsyncUrl o) = shellEscape s
- | otherwise = s
-
-rsyncUrls :: RsyncOpts -> Key -> [String]
-rsyncUrls o k = map use annexHashes
- where
- use h = rsyncUrl o </> h k </> rsyncEscape o (f </> f)
- f = keyFile k
-
store :: RsyncOpts -> Key -> AssociatedFile -> MeterUpdate -> Annex Bool
store o k _f p = sendAnnex k (void $ remove o k) $ rsyncSend o p k False
diff --git a/Remote/Rsync/RsyncUrl.hs b/Remote/Rsync/RsyncUrl.hs
new file mode 100644
index 000000000..61bbe2f3f
--- /dev/null
+++ b/Remote/Rsync/RsyncUrl.hs
@@ -0,0 +1,46 @@
+{- Rsync urls.
+ -
+ - Copyright 2014 Joey Hess <joey@kitenet.net>
+ -
+ - Licensed under the GNU GPL version 3 or higher.
+ -}
+
+{-# LANGUAGE CPP #-}
+
+module Remote.Rsync.RsyncUrl where
+
+import Types
+import Locations
+import Utility.Rsync
+import Utility.SafeCommand
+
+import System.FilePath.Posix
+#ifdef mingw32_HOST_OS
+import Data.String.Utils
+#endif
+
+type RsyncUrl = String
+
+data RsyncOpts = RsyncOpts
+ { rsyncUrl :: RsyncUrl
+ , rsyncOptions :: [CommandParam]
+ , rsyncUploadOptions :: [CommandParam]
+ , rsyncDownloadOptions :: [CommandParam]
+ , rsyncShellEscape :: Bool
+}
+
+rsyncEscape :: RsyncOpts -> RsyncUrl -> RsyncUrl
+rsyncEscape o u
+ | rsyncShellEscape o && rsyncUrlIsShell (rsyncUrl o) = shellEscape u
+ | otherwise = u
+
+rsyncUrls :: RsyncOpts -> Key -> [RsyncUrl]
+rsyncUrls o k = map use annexHashes
+ where
+ use h = rsyncUrl o </> hash h </> rsyncEscape o (f </> f)
+ f = keyFile k
+#ifndef mingw32_HOST_OS
+ hash h = h k
+#else
+ hash h = replace "\\" "/" (h k)
+#endif
diff --git a/debian/changelog b/debian/changelog
index 3cb751eec..8fde3c704 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -26,6 +26,7 @@ git-annex (5.20140307) UNRELEASED; urgency=medium
* metadata: Support --key option (and some other ones like --all)
* map: Fix crash when one of the remotes of a repo is a local directory
that does not exist, or is not a git repo.
+ * rsync special remote: Fix slashes when used on Windows.
-- Joey Hess <joeyh@debian.org> Thu, 06 Mar 2014 16:17:01 -0400
diff --git a/doc/bugs/__92____92___instead_of___47___on_rsync_special_remote_on_linux_accessed_from_a_windows_git-annex.mdwn b/doc/bugs/__92____92___instead_of___47___on_rsync_special_remote_on_linux_accessed_from_a_windows_git-annex.mdwn
index c89b89d7a..5f6d35fad 100644
--- a/doc/bugs/__92____92___instead_of___47___on_rsync_special_remote_on_linux_accessed_from_a_windows_git-annex.mdwn
+++ b/doc/bugs/__92____92___instead_of___47___on_rsync_special_remote_on_linux_accessed_from_a_windows_git-annex.mdwn
@@ -23,3 +23,5 @@ ygdrive/c/Users/pablo/Desktop/Nouveau dossier/InnerResult/.git/annex/tmp/SHA256E
# End of transcript or log.
"""]]
+
+> [[fixed|done]] --[[Joey]]
diff --git a/doc/design/caching_database.mdwn b/doc/design/caching_database.mdwn
index 5223fa933..9d688a9d4 100644
--- a/doc/design/caching_database.mdwn
+++ b/doc/design/caching_database.mdwn
@@ -1,6 +1,8 @@
* [[metadata]] for views
* [direct mode mappings scale badly with thousands of identical files](/bugs/__34__Adding_4923_files__34___is_really_slow)
* [[bugs/incremental_fsck_should_not_use_sticky_bit]]
+* [[todo/wishlist:_pack_metadata_in_direct_mode]]
+* [[todo/cache_key_info]]
What do all these have in common? They could all be improved by
using some kind of database to locally store the information in an
diff --git a/doc/forum/Feature_Request:_Sync_Now_Button_in_Webapp.mdwn b/doc/todo/Feature_Request:_Sync_Now_Button_in_Webapp.mdwn
index 01bec0e21..e224215fc 100644
--- a/doc/forum/Feature_Request:_Sync_Now_Button_in_Webapp.mdwn
+++ b/doc/todo/Feature_Request:_Sync_Now_Button_in_Webapp.mdwn
@@ -1 +1,3 @@
One Problem I am having is that I could never get the xmpp pairing to work so whenever I switch machines I have to manually run sync once on the command line to get the changes. Is it possible to have a sync now button of some sort that will trigger a sync on the repos?
+
+> moved from forum; [[done]] --[[Joey]]
diff --git a/doc/forum/Feature_Request:_Sync_Now_Button_in_Webapp/comment_1_0d5c90eb0e8fe61b82a19c5fea343613._comment b/doc/todo/Feature_Request:_Sync_Now_Button_in_Webapp/comment_1_0d5c90eb0e8fe61b82a19c5fea343613._comment
index a5f631d50..a5f631d50 100644
--- a/doc/forum/Feature_Request:_Sync_Now_Button_in_Webapp/comment_1_0d5c90eb0e8fe61b82a19c5fea343613._comment
+++ b/doc/todo/Feature_Request:_Sync_Now_Button_in_Webapp/comment_1_0d5c90eb0e8fe61b82a19c5fea343613._comment
diff --git a/doc/forum/Feature_Request:_Sync_Now_Button_in_Webapp/comment_2_196552002d70390e8b52b4af61dca903._comment b/doc/todo/Feature_Request:_Sync_Now_Button_in_Webapp/comment_2_196552002d70390e8b52b4af61dca903._comment
index 41e05bf6e..41e05bf6e 100644
--- a/doc/forum/Feature_Request:_Sync_Now_Button_in_Webapp/comment_2_196552002d70390e8b52b4af61dca903._comment
+++ b/doc/todo/Feature_Request:_Sync_Now_Button_in_Webapp/comment_2_196552002d70390e8b52b4af61dca903._comment
diff --git a/doc/todo/add_an_icon_for_the_.desktop_file.mdwn b/doc/todo/add_an_icon_for_the_.desktop_file.mdwn
index 3be158a0a..56428ff4b 100644
--- a/doc/todo/add_an_icon_for_the_.desktop_file.mdwn
+++ b/doc/todo/add_an_icon_for_the_.desktop_file.mdwn
@@ -1 +1,3 @@
Maybe add the icon /usr/share/doc/git-annex/html/logo.svg to the .desktp file.
+
+> [[done]] long ago.. --[[Joey]]
diff --git a/doc/todo/wishlist:_An_option_like_--git-dir.mdwn b/doc/todo/wishlist:_An_option_like_--git-dir.mdwn
index cb9d374b3..0582d9892 100644
--- a/doc/todo/wishlist:_An_option_like_--git-dir.mdwn
+++ b/doc/todo/wishlist:_An_option_like_--git-dir.mdwn
@@ -1,3 +1,5 @@
I'm currently integrating git-annex support into a filesystem synchronization tool that I use, and I have a use case where I'd like to run "git annex sync' on a local directory, and then automatically ssh over to remote hosts and run "git annex sync" in the related annex on that remote host. However, while I can easily "cd" on the local, there is no really easy way to "cd" on the remote without a hack.
If I could say: git annex --annex-dir=PATH sync, where PATH is the annex directory, it would solve all my problems, and would also provide a nice correlation to the --git-dir option used by most Git commands. The basic idea is that I shouldn't have to be IN the directory to run git-annex commands, I should be able to tell git-annex which directory to apply its commands to.
+
+> AFAIK this is fully supported for some time, so [[done]] --[[Joey]]
diff --git a/doc/todo/wishlist:_a_spec.remote_for_network_directories_that_would_mount_them_whenever_needed___40__e.g.__44___with_WebDAV__41__.mdwn b/doc/todo/wishlist:_a_spec.remote_for_network_directories_that_would_mount_them_whenever_needed___40__e.g.__44___with_WebDAV__41__.mdwn
index f2c4254ad..df589be93 100644
--- a/doc/todo/wishlist:_a_spec.remote_for_network_directories_that_would_mount_them_whenever_needed___40__e.g.__44___with_WebDAV__41__.mdwn
+++ b/doc/todo/wishlist:_a_spec.remote_for_network_directories_that_would_mount_them_whenever_needed___40__e.g.__44___with_WebDAV__41__.mdwn
@@ -23,3 +23,7 @@ whenever I wanted to update the revisions of the textbooks (or to download them
So, this differs from [[tips/using box.com as a special remote]] in that the tip for WebDAV suggest to handle the mounting manually, and git-annex knows nothing about the WebDAV URL where the content comes from.
So here's my wish: a [[special remote|special remotes]] to track the WebDAV URLs in the repo, and mount the remote directory automatically under the hood, whenever one wants to get a file from there. (Then I assume it should also unmount it immediately in order to clean up after itself, despite possible inefficiencies).
+
+> I think the hooks are enough.. If not, you can use a hook special remote
+> or the external special remote protocol to make your own custom special
+> remote. So, [[done]] --[[Joey]]
diff --git a/doc/todo/wishlist:_assistant_autostart_port_and_secret_configuration.mdwn b/doc/todo/wishlist:_assistant_autostart_port_and_secret_configuration.mdwn
index f0d27d0b1..a1aec1d49 100644
--- a/doc/todo/wishlist:_assistant_autostart_port_and_secret_configuration.mdwn
+++ b/doc/todo/wishlist:_assistant_autostart_port_and_secret_configuration.mdwn
@@ -1 +1,4 @@
When starting the assistant when logging in to the system (`--autostart`) it choses a new port an secret everytime. Having the assistant open in a pinned firefox tab which automatically restores when firefox starts we need to get the url from `.git/annex/url` and copy/paste it into the pinned tab. It would be very nice to have a configuration option which assigns a fixed port and secret so everytime the assistant is autostarted it uses the same settings and firefox is happy to open it automatically on start.
+
+> Closing, I've removed the option to choose webapp ports entirely.
+> [[done]] --[[Joey]]
diff --git a/doc/todo/wishlist:_define_remotes_that_must_have_all_files.mdwn b/doc/todo/wishlist:_define_remotes_that_must_have_all_files.mdwn
index 156cfb009..a3beaadae 100644
--- a/doc/todo/wishlist:_define_remotes_that_must_have_all_files.mdwn
+++ b/doc/todo/wishlist:_define_remotes_that_must_have_all_files.mdwn
@@ -16,3 +16,7 @@ Based on existing output, this is what a warning message could look like:
Warning
What do you think?
+
+> I think that [[required_content]] will make it easy to configure
+> such remotes, so this is another reason to build that. Closing
+> this bug as a dup of that one; [[done]] --[[Joey]]
diff --git a/doc/todo/wishlist:_git-annex_replicate.mdwn b/doc/todo/wishlist:_git-annex_replicate.mdwn
index 0d926b337..9ac6ade75 100644
--- a/doc/todo/wishlist:_git-annex_replicate.mdwn
+++ b/doc/todo/wishlist:_git-annex_replicate.mdwn
@@ -10,3 +10,13 @@ There might be the need to have a 'replication_priority' option for each remote
* maxspace - A self imposed quota per remote machine. git-annex replicate should try to replicate files first to machines with more free space. maxspace would change the free space calculation to be `min(actual_free_space, maxspace - space_used_by_git_annex)
* bandwidth - when replication files, copies should be done between machines with the highest available bandwidth. ( I think this option could be useful for git-annex get in general)
+
+> `git annex sync --content` handles this now. [[done]]
+>
+> You do need to run it, or the assistant, on each node that needs
+> to copy files to spread them through the network.
+>
+> A `git annex rebalance`
+> is essentially the same as sshing to the remote and running `git annex
+> sync --content` there. Assuming the remote repository itself has enough
+> remotes set up that git-annex is able to copy files around. --[[Joey]]