X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/c9153b606b67e79f270cecda37143225e885fced..d4107802bb77a14b3298719e87605f3a34d3905b:/doc/bugs/svn_fails_to_update.mdwn diff --git a/doc/bugs/svn_fails_to_update.mdwn b/doc/bugs/svn_fails_to_update.mdwn index 4fcd94c74..6ed839cf6 100644 --- a/doc/bugs/svn_fails_to_update.mdwn +++ b/doc/bugs/svn_fails_to_update.mdwn @@ -35,4 +35,55 @@ Did I do something stupid again or is this the case on your system too? Additional note: this doesn't happen when performing svn commits from another wc, but *does* happen when committing from the web. ---Ethan \ No newline at end of file +--Ethan + +> Yeah, this makes sense now that you bring it up. Perhaps I should make +> ikiwiki skip the update when called from the post-commit hook if the repo +> is locked, although this could mask other problems.. --[[Joey]] + +>> I don't think it's (yet) a serious problem, because any commit to the repo +>> either comes from another WC, in which case, no problem, or it is committed by +>> ikiwiki through its own WC, in which case that WC is "the newest". The only problem +>> is that ikiwiki's rcs information for web commits gets screwed up. I think the +>> correct fix is to call rcs_update from rcs_commit in svn.pm, if +>> the commit succeeds. I'm not sure whether this ought to happen for all RCSes +>> or just svn. --Ethan + +>>> You say that the rcs information for web commits is screwed up .. how? +>>> Does this affect something that I'm not seeing? --[[Joey]] + +I just meant that when you call ikiwiki.cgi?do=edit, it gets the +"current" RCS revision, and uses that in the merges later if there +are other edits in the meantime. So I guess if you have a file a.mdwn, +and at revision X it contains the list: + + a + b + c + d + +And then one user edits it by removing "c" from web, and +then starts editing it again, ikiwiki.cgi will think the edit "started" +at revision X (although it's really X+1). So if another user edits via +web in the meantime, the subsequent merge will try to remove "c" again. +To be honest I don't know what will happen in this case (svn merge fails? +conflict markers?), but I'm pretty sure it's a problem. Anyhow, I think we +should call update manually after commit, I just don't know if this should +be RCS-specific, or whether it's safe to update after commit on all RCSes. +--Ethan + +Hmm, turns out that isn't the case! svn's prepedit function calls svn info +which gets the "right" information even when the WC isn't current. I am +having problems merging but that probably has nothing to do with this bug. +[This patch](http://ikidev.betacantrips.com/patches/update.patch) calls +rcs_update after commit in CGI.pm, it might be a good idea anyhow. --Ethan + +> Ok, I follow you. I am unsure whether this problem effects other rcses +> besides svn. Depends on how they handle locking, etc. But calling +> rcs_update will always be safe, so I'll do that. [[bugs/done]] +> +> That still leaves the issue that it calls svn update in the post-commit +> hook when it's locked and fails with that error message. Granted svn does +> throw that away by default, but it's still ugly and wasteful. But +> checking for a lock first is even uglier (and racey) and more wasteful, +> so I don't see a fix.. --[[Joey]]