X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/142afcc6ac16f701d750c037b682dc25addfd2ad..dc0409b4a717da9926e618341cbd96ab1c4cb763:/doc/todo/mercurial.mdwn diff --git a/doc/todo/mercurial.mdwn b/doc/todo/mercurial.mdwn index 0a1098f70..9635b6880 100644 --- a/doc/todo/mercurial.mdwn +++ b/doc/todo/mercurial.mdwn @@ -1,6 +1,3 @@ -* Need to get post commit hook working (or an example of how to use it.) - * See below. --[[bma]] -* rcs_notify is not implemented (not needed in this branch --[[Joey]]) * 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? @@ -32,6 +29,27 @@ This should update the working directory and run ikiwiki every time a change is > 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. + +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 --refresh + post-commit = ikiwiki --setup path.to.setup.file --refresh + +I tried the follwing commands in $SRC: + + touch deadlocktest.mdwn + hg add + hg ci + +No deadlock happens. (Also I push to the $SRC from another machine, again, no deadlock. If there is conflicts between $SRC and my own repo, hg pull will abort. You have to pull, merge and push again.) + + + +Of course these tests are too simple. The problem is I have no idea when the deadlock will happen. If someone is kind enough to point out, I will run more test. + + *** I have a few notes on mercurial usage after trying it out for a while: