[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-devel] Changes in nvm.basic_io.inventory
From: |
Thomas Keller |
Subject: |
[Monotone-devel] Changes in nvm.basic_io.inventory |
Date: |
Mon, 30 Apr 2007 17:21:23 +0200 |
User-agent: |
Thunderbird 2.0.0.0 (X11/20070326) |
Hi all!
I just pushed 0472d09c092424674bae4acfced5c51dc51de408 which drops the
file ids and rather displays old and new path of an item together with a
status string. Example output:
$ mtn automate inventory
path ""
old_type "directory"
new_type "directory"
fs_type "none"
status "missing"
path "blubba"
old_type "file"
new_type "file"
fs_type "file"
status "known"
path "foooo"
old_type "file"
new_path "newdir/foooo"
fs_type "none"
status "renamed"
path "newdir"
old_type "directory"
new_type "directory"
fs_type "directory"
status "known"
path "newdir/foooo"
new_type "file"
old_path "foooo"
fs_type "file"
status "renamed" "known"
Here, the file "foooo" has been renamed/moved to "newdir/foooo". Both
nodes show the "renamed" status as well as the corresponding old_path
and new_path. Note that new_path and old_path are actually only
outputted if a rename is found, if not, these are simply omitted to
dense the total amount of output bytes.
However, there is a bug in the current format I'm unsure how to fix: if
inventory is restricted to newdir/, newdir/foooo's state is outputted
wrongly as "added" as well as there is no "foooo" node:
$ mtn automate inventory newdir
path "newdir"
old_type "directory"
new_type "directory"
fs_type "directory"
status "known"
path "newdir/foooo"
new_type "file"
fs_type "file"
status "added" "known"
On the other hand, depth-restricting the root directory produces similar
false results by omitting newdir/foooo:
$ mtn automate inventory --depth 0
path ""
old_type "directory"
new_type "directory"
fs_type "none"
status "missing"
path "blubba"
old_type "file"
new_type "file"
fs_type "file"
status "known"
path "foooo"
old_type "file"
fs_type "none"
status "dropped"
path "newdir"
old_type "directory"
new_type "directory"
fs_type "directory"
status "known"
All this is actually not a bug in the recently committed code, but
rather a bug in the restrictions code.
Apart from that, the following open bugs/things to implement for
inventory remain:
a) The "" (root) node is outputted as fs_type "none" and status
"missing", this is clearly not true, but on the other hand the root node
is a special node, so we might find some special workaround here to
either omit it or output it differently? (I.e. the only thing that can
actually happen to a workspace' root node is that it is renamed by
pivot_root'ing or attributes are attached to it; all other things just
don't make sense for it, unless I forgot something)
b) Currently, my new code seems to produce a bit irritating output when
it comes to cyclic renames:
path "blubba"
old_type "file"
new_path "foooo"
new_type "file"
old_path "foooo"
fs_type "file"
status "renamed" "known"
path "foooo"
old_type "file"
new_path "blubba"
new_type "file"
old_path "blubba"
fs_type "file"
status "renamed" "known"
Here, blubba and foooo are swapped, but you can't easily determine that
from scanning over it, because both paths, old_path and new_path, are
equal for each item, but of course point to the correct nodes for the
respective roster.
c) Since this has been requested alot recently, we need to implement
some option to hide unknown and/or ignored files from inventory's output
to speed up the whole thing for people who're calling this very often on
very big workspaces.
Thomas.
--
ICQ: 85945241 | SIP: 1-747-027-0392 | http://www.thomaskeller.biz
> Guitone, a frontend for monotone: http://guitone.thomaskeller.biz
> Music lyrics and more: http://musicmademe.com
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Monotone-devel] Changes in nvm.basic_io.inventory,
Thomas Keller <=