Patch 2239 simplify getDefaultRepo (and 1 more)

Title simplify getDefaultRepo (and 1 more)
Superseder Nosy List bfrk
Related Issues
Status accepted Assigned To

Created on 2022-04-28.11:01:29 by bfrk, last changed 2023-06-25.22:39:21 by ganesh.

File name Status Uploaded Type Edit Remove
patch-preview.txt bfrk, 2022-04-28.11:01:28 text/x-darcs-patch
simplify-getdefaultrepo.dpatch bfrk, 2022-04-28.11:01:28 application/x-darcs-patch
See mailing list archives for discussion on individual patches.
msg22997 (view) Author: bfrk Date: 2022-04-28.11:01:28
2 patches for repository http://darcs.net/screened:

patch a628ba1d4b060c15a153f1de645778b74fe786fe
Author: Ben Franksen <ben.franksen@online.de>
Date:   Wed Apr 27 11:16:59 CEST 2022
  * simplify getDefaultRepo

patch 6362f3254af6238e8b235705dac02315f398a2f5
Author: Ben Franksen <ben.franksen@online.de>
Date:   Wed Apr 27 11:17:36 CEST 2022
  * simplify addRepoSource by using getDefaultRepo
msg23383 (view) Author: ganesh Date: 2023-06-24.15:31:21
>   * simplify getDefaultRepo

Why doesn't this call `fixRepoPath` any more?

>  * simplify addRepoSource by using getDefaultRepo

This looks good if the removal of the call to `fixRepoPath` above is
msg23418 (view) Author: bfrk Date: 2023-06-25.16:26:49
I think it's okay. Whatever gets written to _darcs/prefs/defaultrepo 
should already be "fixed" i.e. converted to an absolute path unless 
it's a URL. The only place where we write that file is in 
addRepoSource. The value is either its first argument (the local 
repodir) or (for --inherit-default) the defaultrepo of the remote. I 
just checked that in all cases addRepoSource gets the repodir in 
"fixed" form (using fixUrl). BTW, the remaining place where 
fixRepoPath is called is redundant, too.

This could be improved by replacing String with AbsoluteOrRemotePath 
which has this invariant baked in. I have a few improvements for 
D.R.Prefs in my working branch and would like to send them first 
before making such a change.
msg23419 (view) Author: ganesh Date: 2023-06-25.16:31:47
OK, thanks.
Date User Action Args
2022-04-28 11:01:29bfrkcreate
2022-04-28 11:07:44bfrksetstatus: needs-screening -> needs-review
2023-06-24 15:31:21ganeshsetstatus: needs-review -> review-in-progress
messages: + msg23383
2023-06-25 16:26:50bfrksetmessages: + msg23418
2023-06-25 16:31:47ganeshsetstatus: review-in-progress -> accepted-pending-tests
messages: + msg23419
2023-06-25 22:39:21ganeshsetstatus: accepted-pending-tests -> accepted