darcs

Patch 2341 remove the --remote-repo option (and 1 more)

Title remove the --remote-repo option (and 1 more)
Superseder Nosy List bfrk
Related Issues
Status accepted Assigned To
Milestone

Created on 2023-07-31.12:26:43 by bfrk, last changed 2024-03-09.18:52:04 by ganesh.

Files
File name Status Uploaded Type Edit Remove
patch-preview.txt bfrk, 2023-07-31.12:26:39 text/x-darcs-patch
remove-the-__remote_repo-option.dpatch bfrk, 2023-07-31.12:26:39 application/x-darcs-patch
See mailing list archives for discussion on individual patches.
Messages
msg23652 (view) Author: bfrk Date: 2023-07-31.12:26:39
Regarding --remote-repo, I think this was a half-hearted attempt to make it
easier to call commands from outside of darcs: instead of passing options
and regular arguments, you could pass only options. The idea is not bad in
principle, so I would not be against restoring it /if/ it were done
consequently for all commands and in such a way that the command
implementations never needs to look at plain arguments (so we can remove
this parameter). This would require unifying the "hooks" that deal with some
of the plain argument handling (commandExtraArgs, commandExtraArgHelp,
commandArgdefaults) to a procedure that completely handles them. This hook
should also ensure that all paths from the command line are converted to
absolute paths, which means we can also eliminate the two AbsolutePath
arguments, so the actual command implementations would have type
[DarcsFlag]->IO().

2 patches for repository http://darcs.net/screened:

patch fa65e78142a790d445d4465fa509d8f723b1f017
Author: Ben Franksen <ben.franksen@online.de>
Date:   Fri Dec  9 19:23:37 CET 2022
  * remove the --remote-repo option

  Passing remote repos via option instead of plain arguments is redundant,
  obscure, and complicates the code.

patch 8c1131290443248d423cabe0b5566f840e6cb3b3
Author: Ben Franksen <ben.franksen@online.de>
Date:   Fri Dec  9 22:26:07 CET 2022
  * remove the set-default hint

  See my comments to issue1898. It is ages ago since --set-default was the
  default for push and pull. And we really need a better way to set
  preferences such as the defaultrepo.
Attachments
msg23658 (view) Author: ganesh Date: 2023-08-06.21:28:18
I'm fine with removing --remote-repo

For the hints, I also personally find them a bit annoying, but on the
other hand git does them too and they do help with discoverability for
new users. I'm not strongly opposed to removing them but I don't think
I would choose to myself.
msg23676 (view) Author: bfrk Date: 2023-08-12.12:19:09
I am not against hints per se and I do apreciate the ones issued by 
git, but this particular one has several issues. It was apparently 
added after changing the default to --no-set-default for push and 
pull and I think we may now safely assume that people have forgotten 
about this.

BTW, if we remove setpref prims for V3 (and I think we should) then 
the setpref command no longer adds prims to pending and we are free 
to add preferences like defaultrepo to that command.
msg23708 (view) Author: ganesh Date: 2023-08-28.14:11:13
The code changes are fine with me. I still don't quite see the rationale
for removing the --set-default hint. Aren't they more about telling
the user that they can avoid repeating the argument all the time, than
about helping them deal with a transition?

If you still prefer to remove it that's fine, just mark this
accepted/accepted-pending-tests.
msg23713 (view) Author: bfrk Date: 2023-08-28.21:39:57
The patch that introduced it is named "Resolve issue1898: notify user when 
they can use set-default." and issue1898 expressly mentions the default 
switch in darcs-2.5 and refers to issue1885 which is about this change 
(and a few other default changes).
msg23714 (view) Author: ganesh Date: 2023-08-28.21:48:54
I agree it was introduced because of the switch, I'm just saying it
wasn't there just to provide transitional help. It's there to provide
help that makes sense because of the new behaviour.

There's a very brief note about the decision at
https://darcs.net/Development/Decisions :

> New defaults for Darcs 2.5
> pull/push/send –no-set-default
> … but add an online reminder whenever you interact with a non-default 
repo about how to set the default
msg23731 (view) Author: ganesh Date: 2024-02-18.14:12:31
Accepting this. Still not too sure about removing the hint,
but slightly swayed by the fact that git doesn't appear to
provide a hint in the same scenario.
msg23782 (view) Author: ganesh Date: 2024-03-09.18:52:04
patch2378 will put back the hint (if merged)
History
Date User Action Args
2023-07-31 12:26:43bfrkcreate
2023-08-06 21:28:18ganeshsetmessages: + msg23658
2023-08-12 12:19:10bfrksetmessages: + msg23676
2023-08-24 07:58:06bfrksetstatus: needs-screening -> needs-review
2023-08-28 14:11:13ganeshsetstatus: needs-review -> review-in-progress
messages: + msg23708
2023-08-28 21:39:58bfrksetmessages: + msg23713
2023-08-28 21:48:58ganeshsetmessages: + msg23714
2024-02-18 14:12:32ganeshsetstatus: review-in-progress -> accepted-pending-tests
messages: + msg23731
2024-02-18 15:47:45ganeshsetstatus: accepted-pending-tests -> accepted
2024-03-09 18:52:04ganeshsetmessages: + msg23782