monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] auto updates


From: Timothy Brownawell
Subject: Re: [Monotone-devel] auto updates
Date: Fri, 20 Oct 2006 12:53:29 -0500

On Fri, 2006-10-20 at 13:27 +1000, Brian May wrote:
> Hello.
> 
> Is possible to get something like this to work?
> 
> address@hidden:/tmp$ cat /home/brian/.monotone/monotonerc
> function note_netsync_end(nonce)
>         chdir("/home/brian/tree/config")
>         execute("mtn","update")
> end
> 
> Ideally I would like it only to update if a specific branch (possible)
> in a specific db file is touched (not sure if this is possible).

It's possible to have it only run if a specific branch is updated (make
note of that from note_netsync_revision_received). I don't think you can
make it select by db, but that only matters if you have the same branch
in several dbs.

You'd also probably want to check for multiple heads, which would make
the update fail, and maybe check for uncommitted work that could
potentially be garbled by a failed update merge.

> However, the initial problem I face is that the chdir call doesn't
> work:
> 
> mtn: warning: /home/brian/.monotone/monotonerc:3: attempt to call global 
> 'chdir' (a nil value)
> 
> My understanding of lua isn't very strong at the moment, how do I
> change the current directory?

I'm not sure you can, and if you can I'm not sure that things would work
as expected (monotone probably wouldn't like suddenly finding itself
somewhere it didn't think it was).

Really, that'd be a good place for the --working-directory (should
probably actually be --workspace) parameter you suggested.

-- 
Timothy

Free (experimental) public monotone hosting: http://mtn-host.prjek.net





reply via email to

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