darcs

Patch 2208 setCurrentDirectory: call error if argum... (and 2 more)

Title setCurrentDirectory: call error if argum... (and 2 more)
Superseder Nosy List bf
Related Issues
Status review-in-progress Assigned To
Milestone

Created on 2021-07-08.18:55:00 by bf, last changed 2023-03-18.20:30:21 by ganesh.

Files
File name Status Uploaded Type Edit Remove
patch-preview.txt bf, 2021-07-08.18:54:59 text/x-darcs-patch
setcurrentdirectory_-call-error-if-argument-is-a-remote-url.dpatch bf, 2021-07-08.18:54:59 application/x-darcs-patch
See mailing list archives for discussion on individual patches.
Messages
msg22906 (view) Author: bf Date: 2021-07-08.18:54:59
This fixes the Windows regression I mentioned on IRC that was flagged by our
CI. It turned out that the bug is not Windows specific at all, it's just
that on Windows setCurrentDirectory with a http URL fails because that is
not a valid path name. Calling error in such cases lets us catch this when
testing on Linux, too.

A more principled solution would be to parse arguments that denote a repo
location immediately in the frontend and use the parsed form in the rest of
the code instead of the raw string.

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

patch d7a11386d72441f3a00aa876360bdd8de21f3b4e
Author: Ben Franksen <ben.franksen@online.de>
Date:   Thu Jul  8 10:33:14 CEST 2021
  * setCurrentDirectory: call error if argument is a remote URL

patch 46c59a13b975e80ed869082745f09b423a4febee
Author: Ben Franksen <ben.franksen@online.de>
Date:   Sun Feb 28 11:44:48 CET 2021
  * fix in checkSuspendedStatus and maybeDisplaySuspendedStatus

  We must not try to access either of the rebase patch files if the repo
  location is a remote URL.

patch b2775f40b6521e2df3f555361b4ff9de6f4fc25c
Author: Ben Franksen <ben.franksen@online.de>
Date:   Thu Jul  8 20:37:14 CEST 2021
  * HasCallStack: withCurrentDirectory, withRepoDir
Attachments
msg23147 (view) Author: ganesh Date: 2023-03-18.20:30:19
Looks good - one question:

>   * fix in checkSuspendedStatus and maybeDisplaySuspendedStatus

>  We must not try to access either of the rebase patch files if the repo
>  location is a remote URL.

Are there scenarios in which we call these functions for a remote repo?
Maybe those could be explained in a comment on the `isValidLocalPath`
guards if so.
History
Date User Action Args
2021-07-08 18:55:00bfcreate
2021-07-08 18:56:37bfsetstatus: needs-screening -> needs-review
2023-03-18 20:30:21ganeshsetstatus: needs-review -> review-in-progress
messages: + msg23147