darcs repository web UI and hosting app. This is the main darcsden trunk, which also runs hub.darcs.net. (https://hub.darcs.net)
#133The "branches" feature no longer works
See, e.g. http://hub.darcs.net/darcs/darcs-screened/patches:
> user error (Not a repository: ./users/darcs/darcs-reviewed (./Users/darcs/darcs-reviewed/_darcs> /inventory does not exist) > > HINT: Do you have the right URI for the repository? > )
The exception is raised not because darcs cannot find the inventory file, but primary because darcs cannot find the format file. The root of the problem is that the /patches handler calls getForkChanges
from Forks.hs, which changes the home directory:
getForkChanges :: BP bp => Repository bp -> Repository bp -> IO (OneSidedFork bp)
getForkChanges rOther r = do
let pdir = repoDir (view rOwner rOther) (view rName rOther)
cdir = repoDir (view rOwner r) (view rName r)
withCurrentDirectory pdir $ withRepoLock DRF.NoDryRun DRF.YesUseCache DRF.YesUpdateWorking DRF.NoUMask $ RepoJob $ \(pr :: R.Repository p wR wU wR) -> do
The rest of the code eventually makes calls to tryIdentifyRepoFormat
from Darcs.Repository.Format, which raises the exception, because our current directory is not darcsden root, but rather ./users/darcs/darcs-screened
.
IMHO, the proper solution to this would be to add
withRepoLockDirectory
(I was thinking about this anyway, not having the..Directory
version breaks symmetry in a way) and call that one, instead of dealing with current directorieswithRepoLockDirectory is part of Darcs.Repository.Job btw
I cannot quite follow. I only see "withRepoLock" and "withRepositoryDirectory" in Darcs.Repository.Job.
https://hackage.haskell.org/package/darcs-2.10.0/docs/Darcs-Repository-Job.html
Yeah, when I set homeDir to an absolute Path, then the issue is gone.
- status set to closed
Seems fixed, thanks!