1 In poking around at the svn backend I found that the svn post-commit
2 hook calls to svn update fail regularly with an error code of 256.
3 Apparently during the post-commit hook can't update because the
4 working copy is locked from the commit. Since the post-commit hook doesn't send
5 errors anywhere and svn update runs with --quiet anyhow, this error
6 isn't usually visible, but on my system:
8 ethan@sundance:~/tests/webtemplates/ikiwiki3/wc$ svn commit -m "Blah.."
10 Transmitting file data .
13 #verifying output was created
14 ethan@sundance:~/tests/webtemplates/ikiwiki3/wc$ less ../dest/index.html
16 ethan@sundance:~/tests/webtemplates/ikiwiki3/wc$ svn info
18 URL: file:///home/ethan/tests/webtemplates/ikiwiki3/svn/trunk
19 Repository Root: file:///home/ethan/tests/webtemplates/ikiwiki3/svn
20 Repository UUID: f42bb0d6-3c1e-0410-b2d4-aeaad48dd6c4
24 Last Changed Author: ethan
26 Last Changed Date: 2006-09-24 21:15:55 -0400 (Sun, 24 Sep 2006)
28 A sample error message (obtained through file redirection) is:
30 svn: Working copy '.' locked
31 svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
33 Did I do something stupid again or is this the case on your system too?
36 Additional note: this doesn't happen when performing svn commits from another wc,
37 but *does* happen when committing from the web.
40 > Yeah, this makes sense now that you bring it up. Perhaps I should make
41 > ikiwiki skip the update when called from the post-commit hook if the repo
42 > is locked, although this could mask other problems.. --[[Joey]]
44 >> I don't think it's (yet) a serious problem, because any commit to the repo
45 >> either comes from another WC, in which case, no problem, or it is committed by
46 >> ikiwiki through its own WC, in which case that WC is "the newest". The only problem
47 >> is that ikiwiki's rcs information for web commits gets screwed up. I think the
48 >> correct fix is to call rcs_update from rcs_commit in svn.pm, if
49 >> the commit succeeds. I'm not sure whether this ought to happen for all RCSes
50 >> or just svn. --Ethan
52 >>> You say that the rcs information for web commits is screwed up .. how?
53 >>> Does this affect something that I'm not seeing? --[[Joey]]
55 I just meant that when you call ikiwiki.cgi?do=edit, it gets the
56 "current" RCS revision, and uses that in the merges later if there
57 are other edits in the meantime. So I guess if you have a file a.mdwn,
58 and at revision X it contains the list:
65 And then one user edits it by removing "c" from web, and
66 then starts editing it again, ikiwiki.cgi will think the edit "started"
67 at revision X (although it's really X+1). So if another user edits via
68 web in the meantime, the subsequent merge will try to remove "c" again.
69 To be honest I don't know what will happen in this case (svn merge fails?
70 conflict markers?), but I'm pretty sure it's a problem. Anyhow, I think we
71 should call update manually after commit, I just don't know if this should
72 be RCS-specific, or whether it's safe to update after commit on all RCSes.
75 Hmm, turns out that isn't the case! svn's prepedit function calls svn info
76 which gets the "right" information even when the WC isn't current. I am
77 having problems merging but that probably has nothing to do with this bug.
78 [This patch](http://ikidev.betacantrips.com/patches/update.patch) calls
79 rcs_update after commit in CGI.pm, it might be a good idea anyhow. --Ethan