darcs

Patch 2270 clarify help for --hash, --from-hash and... (and 2 more)

Title clarify help for --hash, --from-hash and... (and 2 more)
Superseder Nosy List gpiero
Related Issues
Status accepted-pending-tests Assigned To
Milestone

Created on 2022-12-16.18:33:06 by gpiero, last changed 2023-02-20.21:55:10 by bf.

Files
File name Status Uploaded Type Edit Remove
accept-issue2695_-_log-__hash-x_-is-not-equivalent-to-_log-__matches-_hash-x__.dpatch gpiero, 2023-01-30.17:46:39 text/plain
clarify-help-for-__hash_-__from_hash-and-__to_hash-options.dpatch dead gpiero, 2022-12-16.18:33:05 application/x-darcs-patch
clarify-help-for-__hash_-__from_hash-and-__to_hash-options.dpatch dead gpiero, 2022-12-16.18:41:22 text/plain
patch-preview.txt dead gpiero, 2022-12-16.18:33:05 text/x-darcs-patch
See mailing list archives for discussion on individual patches.
Messages
msg23051 (view) Author: gpiero Date: 2022-12-16.18:33:05
Some very old (almost 6-year old) patches that I've just rebased against
screened. Should look at my todo list more often.

Not sure if the help text makes sense in English, looking for your judgement.

The rationale for 9b86a4f2b022bf1387d4d2d5c6c1a54abf7aa536 is that currently:

$ darcs log -h 5d6 --count
1
$ darcs log --matches 'hash 5d6' --count
5

While I don't really expect anyone to select a bunch of patches based on a
common hash prefix, this is for coherence and for honoring the contract with
the user.

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

patch d682cdb483060d25b6921c75360c53cefe52c6eb
Author: Gian Piero Carrubba <gpiero@rm-rf.it>
Date:   Fri Dec 16 18:47:02 CET 2022
  * clarify help for --hash, --from-hash and --to-hash options

patch edabbbd32a9cd4091e4dff2f4f909f15c1446d52
Author: Gian Piero Carrubba <gpiero@rm-rf.it>
Date:   Fri Dec 16 18:59:36 CET 2022
  * mention --from-hash and --to-hash in the output of `darcs help patterns`

patch 9b86a4f2b022bf1387d4d2d5c6c1a54abf7aa536
Author: Gian Piero Carrubba <gpiero@rm-rf.it>
Date:   Fri Dec 16 19:07:43 CET 2022
  * add --hashes option and use it instead of --hash where appropriate
  This way, -h/--hash/--hashes really become aliases for
  --match/--matches 'hash ...', as suggested by `darcs help patterns`.
Attachments
msg23052 (view) Author: gpiero Date: 2022-12-16.18:41:23
mmpf, really need to check I've recorded all the changes before sending 
them...
Attachments
msg23071 (view) Author: ganesh Date: 2023-01-01.02:55:03
The changes make sense to me.

On the English, when you say "a patch whose hash prefix matches HASH" I 
guess this is meant to be parsed as "a patch whose hash (prefix matches) 
HASH"?

The tricky bit is that it probably more naturally parses as "a patch 
whose (hash prefix) matches HASH" which sort of implies the existence of 
a unique hash prefix.

I wonder if renaming the meta-variable and going for something like "a 
patch whose hash starts with HASHPREFIX" would work better?
msg23080 (view) Author: bf Date: 2023-01-14.19:22:56
I agree that the last wording proposed by Ganesh is the best option 
here.

Apart from that I am fine with the 3 patches. The code changes look 
reasonable to me. I would feel safer with a test or two, and would 
like to encourage you to add one, but this is not a requirement. 
(That would be hypocritical, given that we don't have any systematic 
tests for matching options yet.)
msg23084 (view) Author: gpiero Date: 2023-01-30.17:46:52
Updated bundle (with test).
Attachments
msg23093 (view) Author: bf Date: 2023-02-16.09:21:01
I see no tests being added. Have you forgot to add them? Otherwise 
fine.
msg23094 (view) Author: bf Date: 2023-02-16.09:22:56
Can I mark issue2695 as resolved when this is pushed?
msg23105 (view) Author: bf Date: 2023-02-19.08:45:17
Pushed latest bundle to screened.
msg23115 (view) Author: bf Date: 2023-02-20.21:55:09
It does indeed resolve issue2695. Anyway, accepted.
History
Date User Action Args
2022-12-16 18:33:06gpierocreate
2022-12-16 18:41:27gpierosetfiles: + clarify-help-for-__hash_-__from_hash-and-__to_hash-options.dpatch
messages: + msg23052
title: clarify help for --hash, --from-hash and... (and 2 more) -> Re: darcs patch: clarify help for --hash, --from-hash and... (and 2
2023-01-01 02:55:04ganeshsetstatus: needs-screening -> review-in-progress
messages: + msg23071
2023-01-14 19:22:57bfsetmessages: + msg23080
2023-01-30 17:46:54gpierosetfiles: + accept-issue2695_-_log-__hash-x_-is-not-equivalent-to-_log-__matches-_hash-x__.dpatch
messages: + msg23084
2023-02-16 09:21:06bfsetmessages: + msg23093
2023-02-16 09:22:57bfsetmessages: + msg23094
2023-02-19 08:45:19bfsetmessages: + msg23105
title: Re: darcs patch: clarify help for --hash, --from-hash and... (and 2 -> clarify help for --hash, --from-hash and... (and 2 more)
2023-02-20 21:55:10bfsetstatus: review-in-progress -> accepted-pending-tests
messages: + msg23115