With new --no-prefs-templates command line argument you can leave _darcs/prefs/[boring|binaries] files not filled with default templates when creating new repository with initialize, clone or convert import commands.
It is useful when you prefer to mainatin corresponding settings globaly and use repository specific settings only for cases related to that particular repository.
This is one of my two patches that are related to preferences. Patches have no
dependencies on each other, so it will be two separate patches.
The full rationale for both patches can be found here: https://hub.darcs.net/ki11men0w/profile-develop/browse/presentations/darcs-boring-files.
I would go even further and consider removing the default boring
template altogether. Strictly speaking this is incompatible behavior
but in practice every serious project has their own dedicated
boringfile anyway. Projects that rely on the default template must
be adapted to have an explicit boring file; this can be done by
simply copying the template and recording a new preference.
BTW, I think we should have a single tracker entry for both of your
proposed changes. They may not depend on each other but they are
closely related semantically and thus should be designed and discussed
in tandem.
Details aside, I tend to be in favour of both this and the related
patch2230. The UI changes are well designed and "compatible enough"
to not disrupt existing projects.
I was at first concerned about existing projects w/o a binariesfile
setpref patch, but this is actually no issue since --with-prefs-
templates remains the default behavior.
Ganesh, do you have an opinion?
First, (belated) thanks for the contribution!
I amended your patch to
- resolve conflicts (my fault for introducing them)
- fix typos in the long comment
- respect module/subsystem hierarchy:
+ Darcs.Repository.* should never import from Darcs.UI.*
+ move common help for the option to Darcs.UI.Commands.Util
- fix a few minor coding convention issues
Will screen this and the related patch now. Consider as accepted.
1 patch for repository http://darcs.net/screened:
patch 8c656554c74e7c9ac39097b6a6aa3f38a25ce65f
Author: Maksim Golubev <maksim.golubev72@gmail.com>
Date: Sat Dec 25 17:54:28 CET 2021
* option not to fill _darcs/prefs/* files with templates
With new `--no-prefs-templates` command line argument you can
leave `_darcs/prefs/[boring|binaries]` files not filled with
default templates when creating new repository with `initialize`,
`clone`, `convert darcs-2`, or `convert import` commands.
It is useful when you prefer to maintain corresponding settings
globaly and use repository specific settings only for cases
related to that particular repository.
Ben, greetings!
I'm sorry that I didn't react for a long time.
I have taken into account all your amendments. Thank you for your work. Creating patches for darcs turned out to be a pleasant activity.
> Ben, greetings! I'm sorry that I didn't react for a long time.
Hi Maksim, no problem, we all need longer pauses sometimes.
> I have
> taken into account all your amendments. Thank you for your work.
> Creating patches for darcs turned out to be a pleasant activity.
I'm glad to hear that and hope we'll see more of them in the future!
> Ganesh, do you have an opinion?
I'm fine with this and the related change in patch2230. I think the system
for configuring binary/boring files has some nice features but also some
awkward bits and this direction can help make it more ergonomic.