[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] Changes in nvm.basic_io.inventory
From: |
Thomas Keller |
Subject: |
Re: [Monotone-devel] Changes in nvm.basic_io.inventory |
Date: |
Mon, 07 May 2007 16:58:21 +0200 |
User-agent: |
Thunderbird 2.0.0.0 (X11/20070326) |
Stephen Leake schrieb:
$ 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"
I'm not sure what the problem is here. Are you saying that 'newdir' is
in fact a "new directory", and all files in it should be listed as
"unknown"?
If you compare that output to the former, you see that newdir/foooo is
recognized as added, obviously it should have been recognized as "renamed".
All this is actually not a bug in the recently committed code, but
rather a bug in the restrictions code.
Ok. We need to add tests for these cases.
No, we should rather fix that bug =) I asked Derek Scherger about it
(because its beyond my knowledge), but he's a bit out of time. The
discussion can be read here [0].
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.
I don't understand why the old_path for "blubba" is not "fooo", and
vice-versa.
If you look at the output it actually is:
path "blubba"
[...]
old_path "foooo"
But yes, this is confusing. This is because inventory just outputs two
stanzas per rename action here instead of four. Sometimes I stare at it
for minutes and say "wait, its wrong", but then, a bit later I could
persuade myself that it is correct =)
This also needs a test case. What is the sequence of commands for this?
Given the fact you have two files foo and bar, which should be swapped:
$ mtn rename foo tmp
$ mtn rename bar foo
$ mtn rename tmp bar
Actually, I'm looking for "no-ignored" and "no-unchanged".
"no-unknown" might also be desirable in some situations.
Looking thru the code briefly, it seems options are declared in
options_list.hh.
We could use the existing "brief" to mean "no-ignored" and
"no-unchanged".
Derek brought up the following: Lets have unknown and ignored files
excluded by default and add two options, --(include-|show-|)unknown and
--(include-|show-|)ignored, to include them. While I'm absolutely not
biased about what this command should output by default, I'd vote
against --brief, because I think this option name is a bit too vague.
We also need:
d) Updated tests/automate_inventory
I have not made much progress on this.
Before the format isn't set in stone, there is no need to rush here.
Thomas.
[0]
http://colabti.de/irclogger/irclogger_log/monotone?date=2007-05-03,Thu&sel=38#l77
--
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
- Re: [Monotone-devel] Changes in nvm.basic_io.inventory, Stephen Leake, 2007/05/07
- Re: [Monotone-devel] Changes in nvm.basic_io.inventory,
Thomas Keller <=
- Message not available
- Message not available
- Re: [Monotone-devel] Changes in nvm.basic_io.inventory, Stephen Leake, 2007/05/10
- Re: [Monotone-devel] Changes in nvm.basic_io.inventory, Thomas Keller, 2007/05/10
- Re: [Monotone-devel] Changes in nvm.basic_io.inventory, Stephen Leake, 2007/05/10
- Re: [Monotone-devel] Changes in nvm.basic_io.inventory, Derek Scherger, 2007/05/11
- Re: [Monotone-devel] Changes in nvm.basic_io.inventory, Stephen Leake, 2007/05/11
- Re: [Monotone-devel] Changes in nvm.basic_io.inventory, Thomas Keller, 2007/05/11
- Re: [Monotone-devel] Changes in nvm.basic_io.inventory, Stephen Leake, 2007/05/12
- Re: [Monotone-devel] Changes in nvm.basic_io.inventory, Thomas Keller, 2007/05/12
- Re: [Monotone-devel] Changes in nvm.basic_io.inventory, Stephen Leake, 2007/05/12
- Re: [Monotone-devel] Changes in nvm.basic_io.inventory, Derek Scherger, 2007/05/13