monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Server-initiated sync (or push or pull)


From: Richard Levitte
Subject: Re: [Monotone-devel] Server-initiated sync (or push or pull)
Date: Sat, 23 Jun 2007 01:52:40 +0200 (CEST)

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?

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 ;)

Cheers,
Richard

-----
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.

-- 
Richard Levitte                         address@hidden
                                        http://richard.levitte.org/

"When I became a man I put away childish things, including
 the fear of childishness and the desire to be very grown up."
                                                -- C.S. Lewis




reply via email to

[Prev in Thread] Current Thread [Next in Thread]