[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] Server-initiated sync (or push or pull)
From: |
Timothy Brownawell |
Subject: |
Re: [Monotone-devel] Server-initiated sync (or push or pull) |
Date: |
Sat, 23 Jun 2007 18:49:32 -0500 |
On Sat, 2007-06-23 at 01:52 +0200, Richard Levitte wrote:
> In message <address@hidden> on Fri, 22 Jun 2007 06:33:04 -0500, Timothy
> Brownawell <address@hidden> said:
>
> tbrownaw> There's a new branch net.venge.monotone.server-initiated-sync which
> adds
> tbrownaw> a new lua function that can be called from hooks.
> tbrownaw>
> tbrownaw> server_request_sync(what, address, include, exclude)
> tbrownaw>
> tbrownaw> "what" is either "sync", "pull", or "push" (or anything
> tbrownaw> else, which is currently treated as "sync"). This adds a
> tbrownaw> request to a queue that is read by the server event loop,
> tbrownaw> and tells the server to start a connection to some other
> tbrownaw> server.
>
> Wow, exactly the kind of function I've wished for lately! Was it my
> moaning on irc a couple of days ago that inspired this?
Partly that, and partly that it seemed suddenly more useful now that we
have multiple servers.
> tbrownaw> If you call this from the netsync notification hooks
> tbrownaw> (probably the best place to call it from), note that it is
> tbrownaw> very easy to start an infinite loop, unless you make sure it
> tbrownaw> doesn't trigger on connections to/from whatever other
> tbrownaw> servers it starts connections to.
>
> Interesting... I'll have to give it a good try ;)
It's on mainline now, since I figured out the one test failure (a test
was committing to a db that had a server running on it, I have no idea
why that was working before now).
--
Timothy
Free (experimental) public monotone hosting: http://mtn-host.prjek.net