I would rather get rid of the setpref command along with the ugly
changepref prim patches.
Instead, let's define a hard-coded directory name (say ".darcs-prefs/")
outside of _darcs/ where users can place prefs files. If such a directory
exists and contains a prefs file, it will take precedence over the same
named file under _darcs/prefs. It is then at user's discretion whether
they choose to create and populate such a directory and whether they want
to version control (parts of) it. The preferences boringfile and
binariesfile are then obsolete, you just create .darcs-prefs/boring or
.darcs-prefs/binaries.
What about files that are modified by commands other than setpref, such
as _darcs/prefs/defaultrepo? My take is that the user should be free to
create a .darcs-prefs/defaultrepo and even version control it (even
though that doesn't make much sense). Darcs should use that file if it
exists but not modify it; instead it should output a warning that --set-
default is not honored and why. Or perhaps --set-default can be
deprecated.
See also Issue2602.
|