[darcs-devel] Re: darcs patch: fix get over sftp using the putty sftp c... (and 1 more)

David Roundy droundy at abridgegame.org
Sun Feb 20 04:33:52 PST 2005


On Sat, Feb 19, 2005 at 09:10:24PM +0100, Benedikt Schmidt wrote:
> Dave Roberts <ldave at droberts.com> writes:
> > I would point out one other thing. While most of the first message you
> > will see is now obsolete with this change, I think there is still a need
> > to implement the second suggestion in that message: a --debug switch or
> > something like it that prints out all sorts of diagnostic information,
> > including which subprograms are being invoked and all the command line
> > parameters used to do so. My sleuthing last night would have been a lot
> > easier had such a switch existed.
> 
> I have used some wrapper scripts that save "$@" to a file and copy the
> file with the batch commands (using DARCS_SFTP). But printing the invoked
> commands would be nice. I'm not sure if 3 verbosity levels (quiet,
> standard and verbose) aren't enough and verbose should just print some
> more info.

For now, we could stick with a three-level verbosity, and it wouldn't be
hard to change later if verbose becomes *too* verbose.  I imagine we'd just
have to add a [DarcsFlag] parameter to exec and exec_interactive, and then
check in exec or exec_interactive whether or not to print the external
command that is being called.  It'd be pretty easy then to switch to fourth
verbosity level.  The hard part would be threading the [DarcsFlag] all the
way down to the call to exec in each case.  It may be that this would turn
out to be infeasible, but we won't know until someone tries.

The other option, which I'd *really* love to avoid, would be to introduce a
global verbosity level.  The problem is that as soon as you did that, you'd
find that there is some function that you'd like to call occasionally
without providing any verbosity (e.g. a function that calls exec 10,000
times, and doesn't want to produce 10,000 lines of verbosity).
-- 
David Roundy
http://www.darcs.net




More information about the darcs-devel mailing list