[svk-devel] path-specific user configuration

Michael Hendricks michael at ndrix.org
Sat Nov 11 21:08:44 EST 2006


At clkao's request, I'm updating my user configuration patch to allow
configuration directives to apply only to specific depot paths.  For
instance, you should be able to say "under //foo, I want 'push' to
default to '--verbatim'"

To do this we have to know the depot path before parsing the
command-line arguments, but we can't know the depot path until we parse
the arguments.  An obvious way around would be to parse the command
arguments once to determine the applicable depot path, then add the
defaults and parse the arguments again.  But that makes my spidey sense
tingle.  Is there a better way to do this?

A second issue is determining which depot path should be used for
configuration questions when a command accepts multiple depot paths.
Using a command's target depot path seems useful for most cases, but
for "switch" and "diff" the target is less obvious.

For configuration information used inside a command's C<run> method,
there's no problem.  The issue arises when looking for config info
before the command object gets control.  Should each command just have a
method for answering "which depot path do you want to use for pre-run
configuration questions?"

-- 
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://lists.bestpractical.com/pipermail/svk-devel/attachments/20061111/51698e2b/attachment.pgp


More information about the svk-devel mailing list