darcs

Patch 2231 option not to fill _darcs/prefs/* files with templates

Title option not to fill _darcs/prefs/* files with templates
Superseder Nosy List ki11men0w
Related Issues
Status accepted Assigned To
Milestone

Created on 2022-02-22.22:34:49 by ki11men0w, last changed 2023-06-24.16:16:10 by ganesh.

Files
File name Status Uploaded Type Edit Remove
option-not-to-fill-_darcs_prefs__-files-with-templates.dpatch dead ki11men0w, 2022-02-22.22:34:44 application/octet-stream
option-not-to-fill-_darcs_prefs__-files-with-templates_0.dpatch bfrk, 2022-06-13.08:37:19 application/x-darcs-patch
patch-preview.txt bfrk, 2022-06-13.08:37:19 text/x-darcs-patch
See mailing list archives for discussion on individual patches.
Messages
msg22950 (view) Author: ki11men0w Date: 2022-02-22.22:34:44
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.
Attachments
msg22953 (view) Author: ki11men0w Date: 2022-02-23.22:31:16
Sorry, I accidentally provided a link to a closed clone of the repository.
The correct link with rationale is: https://hub.darcs.net/ki11men0w/profile/browse/presentations/darcs-boring-files.
To avoid confusion, I made the link given earlier also available.
msg22963 (view) Author: bfrk Date: 2022-04-12.11:03:37
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.
msg22964 (view) Author: bfrk Date: 2022-04-12.11:13:59
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.
msg22990 (view) Author: bfrk Date: 2022-04-14.16:11:33
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?
msg23015 (view) Author: bfrk Date: 2022-06-13.08:37:19
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.
Attachments
msg23032 (view) Author: ki11men0w Date: 2022-06-19.13:46:00
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.
msg23033 (view) Author: bfrk Date: 2022-06-19.18:13:59
> 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!
msg23063 (view) Author: ganesh Date: 2022-12-31.12:59:01
> 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.
History
Date User Action Args
2022-02-22 22:34:49ki11men0wcreate
2022-02-23 22:31:17ki11men0wsetmessages: + msg22953
2022-04-12 11:03:37bfrksetmessages: + msg22963
2022-04-12 11:13:59bfrksetmessages: + msg22964
2022-04-14 16:11:33bfrksetmessages: + msg22990
2022-06-13 08:37:20bfrksetfiles: + patch-preview.txt, option-not-to-fill-_darcs_prefs__-files-with-templates_0.dpatch
messages: + msg23015
2022-06-13 08:39:25bfrksetstatus: needs-screening -> accepted-pending-tests
2022-06-19 13:46:00ki11men0wsetmessages: + msg23032
2022-06-19 18:13:59bfrksetmessages: + msg23033
2022-12-31 12:59:01ganeshsetmessages: + msg23063
2023-06-24 16:16:10ganeshsetstatus: accepted-pending-tests -> accepted