darcs

Issue 259 improve documentation on boring files

Title improve documentation on boring files
Priority feature Status resolved
Milestone Resolved in
Superseder darcs record --look-for-adds leaves unrecorded adds in pending (1.0.8)
View: 303
Nosy List darcs-devel, dmitry.kurochkin, gaston.kleiman, kowey, thorkilnaur, tommy
Assigned To kowey
Topics ProbablyEasy

Created on 2006-09-05.19:46:43 by gaston.kleiman, last changed 2009-08-27.14:10:56 by admin.

Messages
msg959 (view) Author: gaston.kleiman Date: 2006-09-05.19:46:32
While creating a new repository with "darcs init; darcs record -l", I realized
that I wanted darcs to handle some files as boring. So I answered that I didn't
want to record the addfiles, and added the corresponding regexps to
_darcs/pref/boring.

Then I ran: "darcs what -l" to see if darcs now treated the files as boring,
but it still wanted to add them.

I've managed to reproduce the bug with the following test case:

--------------

$ mkdir test
$ cd test
$ mkdir dir
$ touch dir/foo
$ touch dir/bar
$ darcs --version
1.0.8 (release)
$ darcs init
$ darcs record -l

Darcs needs to know what name (conventionally an email address) to use as the
patch author, e.g. 'Fred Bloggs <fred@bloggs.invalid>'.  If you provide one
now it will be stored in the file '_darcs/prefs/author' and used as a default
in the future.  To change your preferred author address, simply delete or edit
this file.

What is your email address? foo@bar.com
adddir ./dir
Shall I record this change? (1/?)  [ynWsfqadjkc], or ? for help: y
addfile ./dir/bar
Shall I record this change? (2/?)  [ynWsfqadjkc], or ? for help: y
addfile ./dir/foo
Shall I record this change? (3/?)  [ynWsfqadjkc], or ? for help: n
What is the patch name? test
Do you want to add a long comment? [yn]n
Finished recording patch 'test'

$ echo ".*foo$" >>_darcs/prefs/boring
$ darcs what -l
A ./dir/foo
$

--------------

It doesn't happen with one single file, for example:

$ touch test; darcs rec -l (n); echo 'test$' >> _darcs/prefs/boring; darcs what -l
No changes!
$

Deleting _darcs/patches/pending after having done 'darcs record -l', or adding
the regexps to the boring file before "darcs record -l" fixes the problem.

Thanks,

Gastón Kleiman
msg961 (view) Author: kowey Date: 2006-09-05.20:03:23
On Tue, Sep 05, 2006 at 19:46:43 +0000, Gastón Kleiman wrote:
> $ darcs record -l

> Shall I record this change? (3/?)  [ynWsfqadjkc], or ? for help: n
> 
> $ echo ".*foo$" >>_darcs/prefs/boring
> $ darcs what -l
> A ./dir/foo

There's two distinct issues here, in my opinion.

One is that any file that darcs is paying attention to is inherently
interesting despite what the boring file says.  So, for example, if you
do something like

$ darcs add dir/foo
$ echo ".*foo$" >>_darcs/prefs/boring

You would still get

$ darcs what -l
A ./dir/foo

This behaviour is probably desirable... although it is something that
could stand to be more clearly documented or user-interfaced.

On the other hand, the second issue is that darcs treats record -l
as add, even if you choose not to record the patch finally.  That
seems to be not desirable.  I wonder if it would be easy to ensure
that patches found during record -l don't accidentally wind up on
the pending patch, if the user refuses to record them.  I suspect
there might be trickiness involved.

Of course, I might be completely full of it here.  Just a cursory
analysis of the situation.
msg965 (view) Author: droundy Date: 2006-09-05.20:30:47
On Tue, Sep 05, 2006 at 08:03:35PM +0000, Eric Kow wrote:
> Of course, I might be completely full of it here.  Just a cursory
> analysis of the situation.

That makes good sense.  Indeed, the latter (record -l adding files) is
a real bug, albeit one that is perhaps rarely triggered.  It's
definitely solvable with some bookkeeping work, but I'm not sure how
much bookkeeping work would be required.

As you say, the fact that darcs keeps tracking boring files, that is a
documentation issue.
-- 
David Roundy
msg2078 (view) Author: kowey Date: 2007-08-18.15:11:05
The part about record -l being treated as add seems to have been resolved in the
stable branch (see issue303).

Downgrading and retitling; we still ought to make sure that the documentation on
boring files mentions that any file which is added into darcs is inherently
interesting regardless of what the boring file says.
msg2180 (view) Author: kowey Date: 2007-10-28.13:26:27
Resolved in unstable with:

Tue Aug 21 07:41:03 CEST 2007  Eric Kow <eric.kow@loria.fr>
  * [issue259] Documentation: files already being tracked are never boring.
History
Date User Action Args
2006-09-05 19:46:43gaston.kleimancreate
2006-09-05 20:03:34koweysetstatus: unread -> unknown
nosy: + kowey
messages: + msg961
2006-09-05 20:30:52droundysetnosy: droundy, tommy, kowey, gaston.kleiman
messages: + msg965
2007-03-08 11:37:35koweysetnosy: + beschmi
title: darcs refuses to ignore my boring files! -> darcs treats record -l as add
2007-08-18 15:11:13koweysettopic: + ProbablyEasy
title: darcs treats record -l as add -> improve documentation on boring files
nosy: droundy, tommy, beschmi, kowey, gaston.kleiman
messages: + msg2078
priority: bug -> feature
superseder: + darcs record --look-for-adds leaves unrecorded adds in pending (1.0.8)
2007-10-28 13:26:28koweysetstatus: unknown -> resolved-in-unstable
messages: + msg2180
2007-11-17 11:11:59koweysetstatus: resolved-in-unstable -> resolved-in-stable
2008-09-16 21:30:18adminsetstatus: resolved-in-stable -> resolved
nosy: + dagit
2009-08-06 17:31:59adminsetnosy: + markstos, jast, Serware, dmitry.kurochkin, darcs-devel, zooko, mornfall, simon, thorkilnaur, - droundy, gaston.kleiman
2009-08-06 20:28:47adminsetnosy: - beschmi
2009-08-10 21:55:14adminsetnosy: + gaston.kleiman, - markstos, darcs-devel, zooko, jast, Serware, mornfall
2009-08-10 23:56:01adminsetnosy: - dagit
2009-08-25 17:46:45adminsetnosy: + darcs-devel, - simon
2009-08-27 14:10:56adminsetnosy: tommy, kowey, darcs-devel, gaston.kleiman, thorkilnaur, dmitry.kurochkin