[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] listing unknown directories
From: |
Rob Schoening |
Subject: |
Re: [Monotone-devel] listing unknown directories |
Date: |
Mon, 27 Nov 2006 10:55:28 -0800 |
The current behavior is entirely consistent with what I would expect.
My goal is always to have "mtn ls unknown" to produce no output: a file in a workspace should either be known or it should be ignored. But I can see that in your case (where you're not tracking project source code), this might not be the case.
If this patch could be optionally enabled with "--no-recurse-uknown" or similar, that would be fine. Or alternately if the current behavior was supported with a swtich, that might be OK too.
The reason the current behavior is important is that it is very easy to look at the output and determine whether a directory listed is empty or full of files. One's next action (whether to add, drop, or ignoore) usually depends on this fact.
* * *
Incidentally, the 0.31 change where mtn add is non-recursive by default is much welcomed. This was causing me to have to undo a lot of "mtn add" operations by editing the files in _MTN. For anyone that is interested, the situation usually went like this:
You have the following directory structure:
a/
a/b
a/c
And then create a directory x, which is a sibling of a:
x/
And then move b and c into x
x/b
x/c
And then want to commit. Monotne would tell me "x is unknown" so then I would add x, only to realize moments later that it had added b and c, when what I really wanted it to do was add x and *move* b and c.
Since switching to 0.31, I have not had this problem. ;-)
This use-case turns up a lot in the early stages of java development when packages tend to get renamed.
RS
On 11/25/06, Derek Scherger <address@hidden> wrote:
Does it make sense to anyone that 'mtn ls unknown' lists the entire tree
below an unknown directory?
I keep a very small part of my home directories in monotone and mtn ls
unknown takes a very long time to run, and produces volumes of output,
mainly because it's listing everything in and below all the unknown
directories. It seems to me that, in this case at least, it might be
better to list just the unknown directories and to not recurse into them
to see what they contain.
Attached is a patch that changes things so that ls unknown does not
recurse into unknown directories and only lists the directories. This
also changes the behavior of 'mtn ls ignored' similarly as it uses
pretty much the same code).
I'm sure there are possible down-sides to this change. For example it
changes the semantics of things like 'mtn ls unknown | mtn xargs add'
and 'mtn add --unknown'. However, add recently became non-recursive and
I wonder if this makes more sense with that change anyway.
Cheers,
Derek
_______________________________________________
Monotone-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/monotone-devel
- Re: [Monotone-devel] Re: listing unknown directories, (continued)
- Re: [Monotone-devel] Re: listing unknown directories, hendrik, 2006/11/30
- Re: [Monotone-devel] Re: listing unknown directories, hendrik, 2006/11/30
- Re: [Monotone-devel] Re: listing unknown directories, Derek Scherger, 2006/11/30
- Re: [Monotone-devel] Re: listing unknown directories, Thomas Moschny, 2006/11/30
- Re: [Monotone-devel] Re: listing unknown directories, Patrick Mauritz, 2006/11/30
- Re: [Monotone-devel] Re: listing unknown directories, Thomas Moschny, 2006/11/29
- Re: [Monotone-devel] Re: listing unknown directories, Brian May, 2006/11/29
- Re: [Monotone-devel] Re: listing unknown directories, hendrik, 2006/11/29
- Re: [Monotone-devel] Re: listing unknown directories, Brian May, 2006/11/29
- Re: [Monotone-devel] Re: listing unknown directories, Thomas Moschny, 2006/11/29
Re: [Monotone-devel] listing unknown directories,
Rob Schoening <=