[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-devel] adding note_netsync_revision_sent
From: |
Stephen Leake |
Subject: |
[Monotone-devel] adding note_netsync_revision_sent |
Date: |
Thu, 22 May 2008 05:26:46 -0400 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/22.1 (windows-nt) |
I'm using examples/display_branches.lua, and I find it very useful.
It would be even better if it would display a count of sent revisions
by branch.
So I'd like to add a new Lua hook note_netsync_revision_sent.
Looking thru netsync.cc, the point where a revision is queued to be
sent is in session::note_rev. We could call the new hook there.
However, the current hook note_netsync_revision_received is not called
at the point when the revision is received, but later in
session::~session. I assume there is some rationale for that; not
tying up the server longer than necessary? Or maybe calling Lua hooks
must/should be done outside a db transaction guard? I'd like to
document that rationale.
I think I should add an object 'vector<revision_id> received_revisions'
to session, add revisions to that in session::note_rev, and call the
Lua hook note_netsync_revision_sent in session::~session.
Comments?
--
-- Stephe
- [Monotone-devel] adding note_netsync_revision_sent,
Stephen Leake <=