* Is the code sufficiently robust? It just warns when mercurial fails. * When rcs_commit is called with a $user that is an openid, it will be passed through to mercurial -u. Will mercurial choke on this? * Nope. Mercurial doesn't expect any particular format for the username, though "Name
" is standard. --[[bma]] * The way `-u $user` is passed to `hg commit`, there's no way to tell if a given commit came in over the web or was done directly. So rcs_recentchanges hardcodes 'committype => "mercurial"'. See the monotone backend for an example of one that does this right. * The rcs_commit implementation seems not to notice if the file has been changed since a web edit started. Unlike all the other frontends, which use the rcstoken to detect if the web commit started editing an earlier version of the file, and if so, merge the two sets of changes together. It seems that with the current mercurial commit code, it will always blindly overwrite the current file with the web edited version, losing any other changes. Posthook: in `$srcdir/.hg/hgrc`, I have the following [hooks] incoming.update = hg up update.ikiwiki = ikiwiki --setup /path/to/ikiwiki.setup --refresh This should update the working directory and run ikiwiki every time a change is recorded (someone who knows mercurial better than I do may be able to suggest a better way, but this works for me.) > Try running it with --post-commit instead of --refresh. That should > work better, handling both the case where the edit was made via the web > and then committed, and the case where a commit was made directly. > It can deadlock if the post-commit hook runs with --refresh in the > former case. --[[Joey]] The problem with --post-commit is that if you delete some pages in $SRC, ikiwiki --setup setupfile --post-commit will not delete them in $DEST. --[[users/weakish]] > You should really be using a setup file that has `mercurial_wrapper` > set, and running the wrapper generated by that from your hook. > That will work. I think that the `--setup --post-commit` on the command > line is currently broken and does the same expensive rebuild process as --setup > alone (which doesn't delete files from $DEST either). Will fix that. > --[[Joey]] >> Mercurial doesn't support put hooks in .hg/hooks/* (like git). In Mercurial, the only way to run >> your own hooks is specifying them in the hgrc file. (Or write a new extension.) >> I guess use a very long command will work. >> (e.g. ikiwiki --post-commit --a-lot-of-switches --set var=value $SRC $DEST) >> (Fortunately ikiwiki supports --set var=value so without --setup works.) >> >> Alternative is always editing via cgi or pushing. Never work on the $SRC/repo directly. >> --[[users/weakish]] I add the following to .hg/hgrc:(I use changegroup since I don't think we need refresh per changeset, please point out if I am wrong.) [hooks] changegroup = hg update >&2 && ikiwiki --setup path.to.setup.file --refreshpost-commit = ikiwiki --setup path.to.setup.file --refreshThis will cause deadlock! See bleow!