darcs

Issue 1966 version controlled repository-wide preferences

Title version controlled repository-wide preferences
Priority wishlist Status needs-reproduction
Milestone Resolved in
Superseder Nosy List dmitry.kurochkin, kowey
Assigned To
Topics

Created on 2010-10-05.19:19:50 by kowey, last changed 2023-03-29.11:19:38 by bfrk.

Messages
msg12656 (view) Author: kowey Date: 2010-10-05.19:19:49
I think it could be useful to have a notion of repository-wide 
preferences.

The UI I have in mind is something like a changepref patch with the name 
like "repoprefsdir".

By setting this, you can give Darcs one place to look for version-
controlled preferences.

Things which would then go under that directory would be:
 - boring file
 - binaries
 - authorspellings
 - email (this needs another feature, will follow-up with ticket)
 - motd (ditto)

The idea is to avoid having to set a lot of different preference 
settings when really what you want is version-controlled metadata.

If there is a boringfile and binariesfile pref, they would override the 
value of repoprefsdir

Action required to make this idea work in the current form: verify with 
some hand-written patches that old darcsen (say 1.0.9) will cope 
gracefully with new changepref types.
msg23227 (view) Author: bfrk Date: 2023-03-29.11:19:38
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.
History
Date User Action Args
2010-10-05 19:19:50koweycreate
2010-10-05 19:26:50koweylinkissue1960 superseder
2023-03-29 11:19:38bfrksetmessages: + msg23227