[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] Merging suspend branch
From: |
William Uther |
Subject: |
Re: [Monotone-devel] Merging suspend branch |
Date: |
Sat, 14 Jul 2007 13:59:37 -0700 |
On Thu, 12 Jul 2007 09:56:32 +0200, Thomas Moschny wrote:
On Thursday 12 July 2007, William Uther wrote:
Given that, I'm going to merge the branch back into the n.v.m
trunk next week unless I hear objections.
We really should release 0.36 beforehands, shouldn't we?
I'm happy to wait a little while, but not too long. :)
I've been playing with the branch, and it does slow down listing
branches quite a bit. Listing branches isn't too common an
operation, but I switched things up to try to help this:
- The main 'suspend' cert change is now in
project_t::get_branch_heads().
- I've added a new lua function: get_branch_heads() which gets the
branch heads :)
- I've added a default ignore_branch() lua hook which checks if
there are any branch heads and
ignores the branch if there are not.
The result is basically the same as before, except that you can
choose to switch off the checking for heads behaviour when listing
branches (by changing the lua hook), which makes makes quite a speed
difference (if you do this operation a lot).
These changes have another nice side effect - in the previous code,
mtn was finding the heads of all branches before listing any of
them. Now I'm finding the heads of each branch as I list it. This
is not faster, but it is incremental and so it feels like it is doing
something now.
I then started looking at why finding branch heads is so slow. The
answer is simple: project_t::get_branch_heads() first gets every
revision in the branch, then erases ancestors. Getting the heads of
every branch means considering every revision in the DB. It might be
nice
some time in the future to cache the heads of each branch in the db.
On Sat, 14 Jul 2007 11:28:30 +0200, Lapo Luchini wrote:
William Uther wrote:
Most of the comments I got on my RFC about the suspend
functionality
were positive. The few that weren't seemed to be satisfied with
followup discussion.
An UI doubt just occurred to me: what about a branch that is merged on
the mainline and has no new revisions on it?
Does it have sense to still show it in the branch list?
It has "nothing new", in fact its full history is available from the
mainline, isn't that so?
Or should someone suspend his last branch-only revision?
In some cases, like "experimental feature that is nowadays a common
feature" showing the branch is useless, in other cases it may well
be not.
At the moment there is no 'auto-suspend'. I suspect that most
branchs are merged back into the trunk multiple times in their life.
You only want to suspend it the last time.
We can always change this in future if we find we should.
Cheers,
Will :-}