From 57b601e384cd2814160fd1ccfc4d2f5d0d242a1f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 6 Mar 2013 22:18:44 -0400 Subject: [PATCH] assistant: Fix syncing after XMPP pairing. A missing uuid broke this, and also caused a UI glitch in the webapp's remote list. --- Assistant/XMPP/Git.hs | 7 ++++++- debian/changelog | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Assistant/XMPP/Git.hs b/Assistant/XMPP/Git.hs index bdb68eea18..0a452154ba 100644 --- a/Assistant/XMPP/Git.hs +++ b/Assistant/XMPP/Git.hs @@ -25,6 +25,8 @@ import Git import qualified Git.Branch import Locations.UserConfig import qualified Types.Remote as Remote +import qualified Remote as Remote +import Remote.List import Utility.FileMode import Utility.Shell @@ -53,7 +55,10 @@ makeXMPPGitRemote buddyname jid u = do remote <- liftAnnex $ addRemote $ makeGitRemote buddyname $ gitXMPPLocation jid liftAnnex $ storeUUID (remoteConfig (Remote.repo remote) "uuid") u - syncNewRemote remote + liftAnnex $ void remoteListRefresh + remote' <- liftAnnex $ fromMaybe (error "failed to add remote") + <$> Remote.byName (Just buddyname) + syncNewRemote remote' return True {- Pushes over XMPP, communicating with a specific client. diff --git a/debian/changelog b/debian/changelog index 26d4fc76b0..2facb33a05 100644 --- a/debian/changelog +++ b/debian/changelog @@ -29,6 +29,7 @@ git-annex (4.20130228) UNRELEASED; urgency=low and on startup. * assistant: XMPP git pull and push requests are cached and sent when presence of a new client is detected. + * assistant: Fix syncing after XMPP pairing. -- Joey Hess Wed, 27 Feb 2013 23:20:40 -0400