]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/post-commit_hangs.mdwn
there is now a patch for this too, in my repo
[ikiwiki.git] / doc / bugs / post-commit_hangs.mdwn
1 # post-commit hangs
2
3 I installed ikiwiki v3.14159 in /usr/local from tarball (/usr contains an older version). Having done so, and used ikiwiki-transition to update setup file, the post commit hook is now blocking in flock (as seen by ps). I should also mention that I added the goodstuff, attachment and remove plugins (which was the purpose of upgrading to v3). Any clues as how to debug/fix gratefully received. The wiki is publically viewable at wiki.sgcm.org.uk if that helps.
4
5 > It's blocking when you do what? Save a page from the web? Make a commit
6 > to the underlaying VCS? Which VCS? These are all different code paths..
7 > --[[Joey]] 
8
9 >> It's blocking when I run "ikiwiki --setup ikiwiki.setup" (which calls hg update, which calls ikiwiki --post-commit).
10 >> Hmm, maybe it's the recursive call to ikiwiki which is the problem.
11 >> The underlying VCS is mercurial. --Ali
12
13 >>> You're not supposed to run ikiwiki -setup manually in your post commit hook.
14 >>> Doing so will certianly lead to a locking problem; it also forces ikiwiki to rebuild
15 >>> the entire wiki anytime a single page changes, which is very inefficient!
16 >>>
17 >>> Instead, you should use the `mercurial_wrapper` setting
18 >>> in the setup file, which will make ikiwiki generate a small
19 >>> executable expressly designed to be run at post commit time.
20 >>> Or, you can use the `--post-commit` option, as documented
21 >>> in [[rcs/mecurial]] --[[Joey]] 
22
23 >>>> I don't run ikiwiki --setup in the commit hook; I run ikiwiki --post-commit (as mentioned above).
24 >>>> I'm trying to run ikiwiki --setup from the command line after modifying the setup file.
25 >>>> ikiwiki --setup is calling hg update, which is calling ikiwiki --post-commit. Am I not supposed to do that? --Ali
26
27 >>>>> No, I don't think that hg update should call ikiwiki anything. The
28 >>>>> [[hgrc_example|rcs/mercurial]] doesn't seem to configure it to do that? --[[Joey]] 
29
30 >>>>>> Ok, I'm not sure I understand what's going on, but my problem is solved.
31 >>>>>>
32 >>>>>> My hgrc used to say:
33 >>>>>>
34 >>>>>> [hooks]
35 >>>>>>
36 >>>>>> incoming.update = hg up
37 >>>>>>
38 >>>>>> update.ikiwiki = ikiwiki --setup /home/ikiwiki/ikiwiki.setup --post-commit
39 >>>>>>
40 >>>>>> I've now changed it to match the example page and it works. Thanks --Ali.
41
42 >>>>>>> [[done]]
43
44 > Also, how have you arranged to keep it from seeing the installation in /usr? Perl could well be loading
45 > modules from the old installation, and if it's one with a different locking strategy that would explain your problem. --[[Joey]] 
46
47 >> Good point. Not knowing perl, I just assumed /usr/local would take precedence. I've now used "dpkg -r ikiwiki" to remove the problem. --Ali