I tried to push a change to the wiki.
First, it fails because _darcs/index is not writable. Have you (Ganesh)
set your umask to 0002? I fixed the permissions manually. Then I pushed
again and it says:
darcs: /opt/gitit/data/wikidata/filecache-tmp-66:
renameDirectory:renamePath:rename: unsatisfied constraints (Directory
not empty)
Apply failed!
Then I set the whole repo recursively to g+w. Push again, now it tells
me
No recorded local patches to push!
But the page is still at 2.18.2. So I look at what's in there and see my
changes reverted. So I do darcs revert -a. But that doesn't fix it
either.
Can we get this to work a bit more reliably?
Okay, I solved the problem with my patch to the FrontPage not being
visible. Turns out we were missing the _darcs/prefs/defaults which
enables running the posthook.sh as apply posthook. Furthermore, the
script had a bug (it still had the cache directory from the old vm).
Anyway, a better way to invalidate cache entries in the posthook is to
run
expireGititCache http://localhost:5001 $DARCS_FILES
The permission problem is a bug in darcs (it ignores the corretly set
umask for _darcs/index). My current workaround is to push as user gitit.
ganesh's umark on darcs.net is 0002, and according to the defaultrepo
in the place I normally work on the wiki locally, I'm pushing to
gitit@ rather than ganesh@
But I can't remember exactly what I do, I think it's a bit of a
struggle to figure it out each time.
Interesting that you also push as gitit@. I just checked that the user
gitit also has umask 0002, and still _darcs/index (and only that file)
becomes g-w. The darcs version used by gitit (i.e. /usr/bin/darcs) is
2.14 which is quite old. I have install a current darcs and a current
cabal into /usr/local/bin and it looks as if the permissions are okay
now.