darcs

Issue 635 darcs add --quiet is not quiet

Title darcs add --quiet is not quiet
Priority bug Status resolved
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, kowey, markstos, thorkilnaur, tommy
Assigned To droundy
Topics Darcs2

Created on 2008-02-01.01:44:06 by markstos, last changed 2009-08-27.14:08:36 by admin.

Messages
msg3011 (view) Author: markstos Date: 2008-02-01.01:44:04
The tab completion for darcs2 looks broken because the current line gets
overwritten.

This could be solved by adding --quiet in the right place in
tools/darcs_completion, assuming all commands take a "--quiet" option. 

However, as you can see by testing on the darcs repo itself, the "--quiet"
option is not currently quiet when used with the "add" command. It still outputs
a progress report, which looks rather broken it is being used as the backend to
the tab completion trick:

 cd tools/
 darcs add --quiet --list-options
msg3025 (view) Author: droundy Date: 2008-02-01.14:50:54
Hi Mark,

I'm pushing a patch that disables progress reporting when --list-options is
specified.  I think this is the nicest approach.  I'll close this for now,
although I'd appreciate confirmation that this works.  And even better if you
can figure out how to write a test.

David
msg3048 (view) Author: markstos Date: 2008-02-02.01:58:09
After trying this, I got an unexpected result:

cd tests/
darcs add <tab> 

It returned over 1,000 possible completions, including some like these:

.darcs/cache
.darcs/cache/pristine.hashed
.darcs/cache/pristine.hashed/c2c9ec37603f8960774e4ff0deff2a28ef5f96ac

It seems like something changed about the --list-options command works.
msg3061 (view) Author: markstos Date: 2008-02-03.01:22:37
This is resolved now, I just didn't understand the correct result that was being
returned earlier. I was seeing files that had been created in the tests
directory, including ".darcs", which had been created but not cleaned up. It was
correct for tab-completion to offer to add these, if surprising. 

As an edge case, that darcs recursively looked in all the directories could be a
performance problem. Perhaps it should act more like the shell and only complete
one directory level at a time, rather than doing a slower recursive search up
front. That's a different bug report if someone wants to to re-open it..
History
Date User Action Args
2008-02-01 01:44:06markstoscreate
2008-02-01 14:50:56droundysetstatus: unread -> resolved
nosy: droundy, tommy, beschmi, kowey, markstos
messages: + msg3025
2008-02-01 15:42:13markstossetstatus: resolved -> testing
nosy: droundy, tommy, beschmi, kowey, markstos
assignedto: markstos
2008-02-02 01:58:11markstossetstatus: testing -> has-patch
nosy: droundy, tommy, beschmi, kowey, markstos
messages: + msg3048
assignedto: markstos -> droundy
2008-02-03 01:22:38markstossetstatus: has-patch -> resolved-in-unstable
nosy: droundy, tommy, beschmi, kowey, markstos
messages: + msg3061
2008-09-04 21:32:17adminsetstatus: resolved-in-unstable -> resolved
nosy: + dagit
2009-08-06 17:53:00adminsetnosy: + jast, Serware, dmitry.kurochkin, darcs-devel, zooko, mornfall, simon, thorkilnaur, - droundy
2009-08-06 20:56:12adminsetnosy: - beschmi
2009-08-10 22:12:49adminsetnosy: - darcs-devel, zooko, jast, Serware, mornfall
2009-08-11 00:05:48adminsetnosy: - dagit
2009-08-25 18:04:28adminsetnosy: + darcs-devel, - simon
2009-08-27 14:08:36adminsetnosy: tommy, kowey, markstos, darcs-devel, thorkilnaur, dmitry.kurochkin