summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Remote/Rsync.hs18
-rw-r--r--debian/changelog7
-rw-r--r--doc/bugs/rsync_transport:_username_not_respected.mdwn5
3 files changed, 21 insertions, 9 deletions
diff --git a/Remote/Rsync.hs b/Remote/Rsync.hs
index 570725bcf..a905d1be3 100644
--- a/Remote/Rsync.hs
+++ b/Remote/Rsync.hs
@@ -112,26 +112,26 @@ genRsyncOpts c gc transport url = RsyncOpts
| otherwise = True
rsyncTransport :: RemoteGitConfig -> RsyncUrl -> Annex ([CommandParam], RsyncUrl)
-rsyncTransport gc rawurl
- | rsyncUrlIsShell rawurl =
- (\rsh -> return (rsyncShell rsh, resturl)) =<<
+rsyncTransport gc url
+ | rsyncUrlIsShell url =
+ (\rsh -> return (rsyncShell rsh, url)) =<<
case fromNull ["ssh"] (remoteAnnexRsyncTransport gc) of
"ssh":sshopts -> do
let (port, sshopts') = sshReadPort sshopts
- host = takeWhile (/=':') resturl
+ userhost = takeWhile (/=':') url
-- Connection caching
(Param "ssh":) <$> sshCachingOptions
- (host, port)
+ (userhost, port)
(map Param $ loginopt ++ sshopts')
"rsh":rshopts -> return $ map Param $ "rsh" :
loginopt ++ rshopts
rsh -> error $ "Unknown Rsync transport: "
++ unwords rsh
- | otherwise = return ([], rawurl)
+ | otherwise = return ([], url)
where
- (login,resturl) = case separate (=='@') rawurl of
- (h, "") -> (Nothing, h)
- (l, h) -> (Just l, h)
+ login = case separate (=='@') url of
+ (_h, "") -> Nothing
+ (l, _) -> Just l
loginopt = maybe [] (\l -> ["-l",l]) login
fromNull as xs = if null xs then as else xs
diff --git a/debian/changelog b/debian/changelog
index 085f9347d..d39e4fbd1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+git-annex (5.20140222) UNRELEASED; urgency=medium
+
+ * Fix handling of rsync remote urls containing a username,
+ including rsync.net.
+
+ -- Joey Hess <joeyh@debian.org> Fri, 21 Feb 2014 13:03:04 -0400
+
git-annex (5.20140221) unstable; urgency=medium
* metadata: New command that can attach metadata to files.
diff --git a/doc/bugs/rsync_transport:_username_not_respected.mdwn b/doc/bugs/rsync_transport:_username_not_respected.mdwn
index f4db3b70c..467e67643 100644
--- a/doc/bugs/rsync_transport:_username_not_respected.mdwn
+++ b/doc/bugs/rsync_transport:_username_not_respected.mdwn
@@ -36,3 +36,8 @@ Type: prebuilt
# End of transcript or log.
"""]]
+
+> Argh! How did that break? I know it used to work.
+> I have fixed it, unfortunately the fix was too late for today's release,
+> but it will be available in autobuilds shortly.
+> [[fixed|done]] --[[Joey]]