Patch 2352 add --reorder-patches option to push (and 1 more)

Title add --reorder-patches option to push (and 1 more)
Superseder Nosy List bfrk
Related Issues
Status accepted Assigned To

Created on 2023-08-24.07:27:04 by bfrk, last changed 2024-02-18.15:47:48 by ganesh.

File name Status Uploaded Type Edit Remove
add-__reorder_patches-option-to-push.dpatch bfrk, 2023-08-24.07:27:01 application/x-darcs-patch
define-_clean-tag_-in-help-for-tag-command.dpatch bfrk, 2023-08-29.13:57:10 application/octet-stream
extend-help-for-push-with-explanation-of-__reorder_patches.dpatch bfrk, 2023-08-29.09:07:21 application/x-darcs-patch
patch-preview.txt bfrk, 2023-08-24.07:27:00 text/x-darcs-patch
patch-preview.txt bfrk, 2023-08-29.09:07:21 text/x-darcs-patch
See mailing list archives for discussion on individual patches.
msg23687 (view) Author: bfrk Date: 2023-08-24.07:27:01
2 patches for repository http://darcs.net/screened:

patch 0893e647430e5d49c5a5d1acef9ae85058e9984a
Author: Ben Franksen <ben.franksen@online.de>
Date:   Sun Aug 20 14:58:44 CEST 2023
  * add --reorder-patches option to push

  It was already supported for apply, so all we need to do is pass it through
  to the remote apply command.

patch 5a6a9fbfbe6c62bd4671099ed105a30066c63995
Author: Ben Franksen <ben.franksen@online.de>
Date:   Sun Aug 20 17:29:28 CEST 2023
  * push: pass through options to apply in all cases

  We previously did not pass --debug and --reorder-patches when we had
  --apply-as in effect. This patch includes a bit of refactoring to unify the
  4 different ways we execute the "remote" darcs apply, depending on whether
  the remote repo is a ssh URL and whether we apply via sudo for --apply-as.
msg23709 (view) Author: ganesh Date: 2023-08-28.14:14:49
> hunk ./src/Darcs/UI/Options/All.hs 1027
> +-- | push; same as 'reorder' but with help descriptions swapped
> +reorderPush :: PrimDarcsOption Reorder
> +reorderPush = withDefault NoReorder
> +  [ RawNoArg [] ["reorder-patches"] F.Reorder Reorder
> +    "put remote-only patches on top of local ones"
> +  , RawNoArg [] ["no-reorder-patches"] F.NoReorder NoReorder
> +    "put local-only patches on top of remote ones" ]

Local and remote are a bit confusing to me here given we're talking
about the other repo. Maybe we should be more explicit by saying
things like "put patches that are only in the other repository on top
of the ones that are present in this repository"? It's a bit verbose though.

Rest of the code looks fine.
msg23715 (view) Author: bfrk Date: 2023-08-29.09:07:21
I agree that the wording of the short help text for the option is not
perfect in this case, but given that we have to find a compromise between
precision and verbosity I think it's okay as is. Instead, here is an
addition to the help text for the push command that is more explicit and
also mentions a possible use case. (In fact, this is what prompted me to
implement this.)

Not yet screened, just in case.

1 patch for repository http://darcs.net/screened:

patch 2ef13f84f9123603abee9607c18204ef777f3ba3
Author: Ben Franksen <ben.franksen@online.de>
Date:   Tue Aug 29 10:58:51 CEST 2023
  * extend help for push with explanation of --reorder-patches
msg23716 (view) Author: ganesh Date: 2023-08-29.10:05:01
That message looks reasonable. Do we already talk about "clean tags"
in our docs? I didn't spot any cases from a quick grep.
msg23720 (view) Author: bfrk Date: 2023-08-29.13:57:10
Following up on your latest observation. Fits nicely in, since we already
talked about the concept without giving it a name.

1 patch for repository https://darcs.net/screened:

patch 11e4fd3514446ec8509f2043713c8018fa91bcd6
Author: Ben Franksen <ben.franksen@online.de>
Date:   Tue Aug 29 15:49:19 CEST 2023
  * define "clean tag" in help for tag command
msg23721 (view) Author: bfrk Date: 2023-08-29.14:01:22
Both follow-ups are screened now.
msg23732 (view) Author: ganesh Date: 2024-02-18.14:14:13
All looks good
Date User Action Args
2023-08-24 07:27:04bfrkcreate
2023-08-24 07:45:52bfrksetstatus: needs-screening -> needs-review
2023-08-28 14:14:50ganeshsetstatus: needs-review -> review-in-progress
messages: + msg23709
2023-08-29 09:07:22bfrksetfiles: + patch-preview.txt, extend-help-for-push-with-explanation-of-__reorder_patches.dpatch
messages: + msg23715
2023-08-29 10:05:02ganeshsetmessages: + msg23716
2023-08-29 13:57:10bfrksetfiles: + define-_clean-tag_-in-help-for-tag-command.dpatch
messages: + msg23720
2023-08-29 14:01:22bfrksetmessages: + msg23721
2024-02-18 14:14:13ganeshsetstatus: review-in-progress -> accepted-pending-tests
messages: + msg23732
2024-02-18 15:47:48ganeshsetstatus: accepted-pending-tests -> accepted