darcs

Issue 2670 failing patch-index tests

Title failing patch-index tests
Priority bug Status resolved
Milestone Resolved in
Superseder Nosy List bfrk
Assigned To
Topics

Created on 2020-12-18.08:45:38 by bfrk, last changed 2023-03-27.16:25:57 by bfrk.

Messages
msg22544 (view) Author: bfrk Date: 2020-12-18.08:45:34
I thought I ran all tests after fixing issue2668 but apparently I 
did not. Many of the patch-index tests fail now with darcs issuing 
an an error message like

darcs: /tmp/./_darcs/patch_index-f79eaa0fcf98d8b8: createDirectory: 
does not exist (No such file or directory)

This is because withPermDir (like withDelayedDir and withTempDir) 
interprets relative file paths as relative to /tmp. (This is stupid 
IMO, but that's another issue.) It turns out that in the patch index 
code we pass a path that starts with (repoLocation repo), which, for 
newly created repos, seems to be ".". Which is bad: the repoLocation 
of a repo should be an absolute path or URL, never a relative path. 
The fix is to convert "." into an absolute path in 
Darcs.Repository.Create.
msg22967 (view) Author: bfrk Date: 2022-04-12.13:12:01
resolved by

patch e71832422d19674725e1034a29eca4c8fbc644b1
Author: Ben Franksen <ben.franksen@online.de>
Date:   Fri Dec 18 10:03:31 CET 2020
  * resolve issue2670: convert "." to absolute path when creating a 
repo
  
  Note that this is what we also do in Darcs.Repository.Identify.
msg23206 (view) Author: bfrk Date: 2023-03-27.16:25:57
See patch2124
History
Date User Action Args
2020-12-18 08:45:38bfrkcreate
2022-04-12 13:12:01bfrksetstatus: unknown -> has-patch
messages: + msg22967
2022-04-12 13:12:09bfrksetpriority: bug
2023-03-27 16:25:57bfrksetstatus: has-patch -> resolved
messages: + msg23206