darcs

Issue 1725 whatsnew -l should not recurse into directories not tracked

Title whatsnew -l should not recurse into directories not tracked
Priority feature Status given-up
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, jaredj, kowey, systemparadox
Assigned To
Topics UI

Created on 2010-01-01.04:28:31 by systemparadox, last changed 2017-07-31.00:37:21 by gh.

Messages
msg9714 (view) Author: systemparadox Date: 2010-01-01.04:28:28
darcs w -l recurses into directories which haven't been added to the repository.
I consider this behaviour to be a bug. My main example is that I use darcs to
manage the config files in my home directory, but this behaviour often annoys me
within specific projects as well- test data for example.

Other than that, good job- thanks very much.
msg9758 (view) Author: kowey Date: 2010-01-09.17:54:30
Thanks, Simon.

So it looks like the subtlety here is that you probably want to display the
directory itself, but not recurse into it.  Sounds like an easy one to
implement.  I think whoever works on this should just submit a patch so that we
can debate the merits of the desired behaviour later.
msg12847 (view) Author: systemparadox Date: 2010-10-30.01:43:10
Having just been hit by issue1645 (following circular symlinks)(yeah I
realise that it's been fixed, but Ubuntu 10.4 still has the older
version), I would like to bump this bug. Also, I strongly object to this
being listed as a 'feature'. This is a *bug*. The behaviour is clearly
and simply incorrect. Please can we get this fixed? Issue1645 may never
have been a problem if it wasn't for this behaviour.

Thanks.
msg12848 (view) Author: mornfall Date: 2010-10-30.09:15:34
Well, this is by far not as black&white as you paint it. The -l (--look-for-
adds) option exists for record as well, not just whatsnew. So your change 
either means that we forego consistency and make it behave differently for 
record than for whatsnew (this is not ProbablyEasy, as it requires possibly 
deep changes in the code to add an extra diffing option). Alternatively, it 
would mean that darcs rec -l does not see files that aren't directly located 
in a directory already version-controlled. This is however sub-optimal: 
historically, people expect this to "just work" -- if they add a directory 
and some files and run darcs rec -l, they expect to see everything that's new 
in the repo. This would stop working and they would need to do as many rounds 
of amend --look as they have unadded directory levels, or do adds manually, 
defeating the purpose of --look.
msg12868 (view) Author: systemparadox Date: 2010-11-02.12:02:30
Oh. It's funny how the way a program is implemented can change bugs into
features.

So rec -l needs the existing behaviour. I definitely think this should
remain consistent with whatsnew -l, and the existing behaviour of
whatsnew -l is *sometimes* useful anyway.

Does this affect add in any way? If so, that might complicate things
further. I sometimes think a warning or even an error when adding a file
in a directory not tracked would be useful.

How hard would it be to add another option alongside -l to give this
behaviour? I haven't thought of a suitable letter to use yet. Maybe -L?
The downside to this is that it might take me years to retrain myself to
type the new option!
msg13015 (view) Author: mornfall Date: 2010-11-13.21:16:48
A new option wouldn't be un-doable but still somewhat tricky due to the 
way we do diffs. Filtering the resulting diff is not going to work since 
it could easily take hours to compute it. Also, it is not exactly "never 
recurse" kind of option, it's a somewhat special, do not recurse into 
unknowns. We don't differentiate the unknowns very well in existing 
code, from the knowns. So it could be still tricky, even if we agree on 
an interface. (I have thought of --no-recurse, or --recurse=[yes|no] 
defaulting to yes, but that exactly fails to capture the above 
distinction: you would expect that to also avoid *tracked* 
subdirectories... maybe --look-recurse=[yes|no] although it is a bit 
awkward and generally points out lack of UI cohesion. I guess it needs 
some more thinking.)
msg15202 (view) Author: mndrix Date: 2012-03-02.22:14:41
Removed ProbablyEasy, per mornfall's comment in msg12848
History
Date User Action Args
2010-01-01 04:28:31systemparadoxcreate
2010-01-09 17:54:37koweysetstatus: unknown -> needs-implementation
priority: bug -> feature
title: darcs w -l recurses into dirs not in the repo -> darcs w -l should not recurse into directories not tracked
nosy: + kowey, jaredj
messages: + msg9758
topic: + ProbablyEasy, UI
2010-02-19 14:33:03koweysettitle: darcs w -l should not recurse into directories not tracked -> whatsnew -l should not recurse into directories not tracked
2010-10-30 01:43:11systemparadoxsetpriority: feature -> bug
messages: + msg12847
2010-10-30 09:15:35mornfallsetmessages: + msg12848
2010-11-02 12:02:31systemparadoxsetpriority: bug -> feature
messages: + msg12868
2010-11-13 21:16:49mornfallsetmessages: + msg13015
2012-03-02 22:14:42mndrixsettopic: - ProbablyEasy
messages: + msg15202
2017-07-31 00:37:21ghsetstatus: needs-implementation -> given-up