[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] automate inventory
From: |
Stephen Leake |
Subject: |
Re: [Monotone-devel] automate inventory |
Date: |
Thu, 13 Sep 2007 04:46:11 -0400 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/22.1 (windows-nt) |
Derek Scherger <address@hidden> writes:
> I vaguely recall some mention of a restricted inventory case where only
> one side of a rename was listed in the inventory. Is there a test for
> this?
Yes; see tests/automate_inventory_restricted/__driver__.lua, search
for the comment:
-- Rename a file from dir_a to dir_b, bookkeep-only; inventory dir_a
> Is it still a problem?
It reports the correct results.
> I wonder if this case is the one that is fixed in the
> net.venge.monotone.experiment.restricted_rosters branch.
I fixed this purely in the automate inventory code; we just had to
pay attention to this case. See automate.cc, inventory_rosters; there
is a comment:
// There is no new node available; this is either a drop or a
// rename to outside the current path restriction.
and later a similar comment for the reverse case:
// There is no old node available; this is either added or a
// rename from outside the current path restriction.
> BTW, has anyone looked at this branch? I think it's an improvement
> and fixes a couple of invariant failures. Please see my earlier
> emails for details.
I just looked thru the log and the code. I gather the main point is
the function make_restricted_roster. There are no comments saying what
it does or why it is there (vis-a-vis Richard's recent complaint :).
I'm guessing it builds a roster representing the changes from 'from' to
'to', but including only those nodes that match 'mask'; is that right?
The names certainly suggest that, and if in general names in monotone
are accurate, perhaps it does not need a comment saying this.
It may be that automate inventory could use make_restricted_roster
rather than doing the same work itself. It depends on whether the
make_restriced_roster handles the renames (and other off-nominal)
cases the way inventory needs to. That definitely should be stated in
a comment; "both sides of renames to/from outside the restriction are
mentioned in the `restricted' roster" (or "not mentioned", as the case
may be).
make_restricted_roster appears to be more efficient than the automate
inventory code; make_restricted_roster does one pass thru the parents,
and one thru the result, while automate inventory does several loops
thru several lists. But there may be hidden costs that I don't see;
I'd have to run some timing tests to tell which is better.
It also detects (and fails on) some "problems" that inventory ignores;
I'm not clear whether inventory should ignore them.
I see make_restricted_roster is used in diff and merge, as an
intermediate to makeing the restriced csets. I guess the new code is
faster? Or fixes some bugs?
In any case, I think the way forward here is to merge
basic_io.inventory to main, then propagate main to
experiment.restricted_rosters, and then try using
make_restricted_roster in automate inventory in that branch.
--
-- Stephe
- Re: [Monotone-devel] automate inventory, (continued)
- Re: [Monotone-devel] automate inventory, Richard Levitte, 2007/09/05
- Re: [Monotone-devel] automate inventory, Derek Scherger, 2007/09/05
- Re: [Monotone-devel] automate inventory, Stephen Leake, 2007/09/11
- Re: [Monotone-devel] automate inventory, Derek Scherger, 2007/09/12
- Re: [Monotone-devel] automate inventory, Stephen Leake, 2007/09/12
- Re: [Monotone-devel] automate inventory, Thomas Keller, 2007/09/12
- Re: [Monotone-devel] automate inventory, Derek Scherger, 2007/09/12
- Re: [Monotone-devel] automate inventory, Stephen Leake, 2007/09/13
- Re: [Monotone-devel] automate inventory, Thomas Keller, 2007/09/06
- Re: [Monotone-devel] automate inventory, Derek Scherger, 2007/09/12
- Re: [Monotone-devel] automate inventory,
Stephen Leake <=
- Re: [Monotone-devel] automate inventory, Thomas Keller, 2007/09/13
- [Monotone-devel] restriction fixes, Derek Scherger, 2007/09/15
- Re: [Monotone-devel] restriction fixes, Stephen Leake, 2007/09/16
- Re: [Monotone-devel] restriction fixes, Derek Scherger, 2007/09/28
- Re: [Monotone-devel] automate inventory, Derek Scherger, 2007/09/13
- Re: [Monotone-devel] automate inventory, Stephen Leake, 2007/09/13
- Re: [Monotone-devel] automate inventory, Derek Scherger, 2007/09/15
Re: [Monotone-devel] New commands (for mtn, in lua), Nathaniel Smith, 2007/09/04