]> sipb.mit.edu Git - ikiwiki.git/commitdiff
* Always call rcs_update after a commit during a web edit, to work around
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 28 Jan 2007 00:26:55 +0000 (00:26 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 28 Jan 2007 00:26:55 +0000 (00:26 +0000)
  the problem described in bugs/svn_fails_to_update. Thanks to Ethan for the
  analysis and patch.

IkiWiki/CGI.pm
debian/changelog
doc/bugs/svn_fails_to_update.mdwn

index 96b9dab6193f94cb07cc4f420288b33e93134640..0c66705469185954acf8eadf4200bb17e0e18d36 100644 (file)
@@ -507,6 +507,12 @@ sub cgi_editpage ($$) { #{{{
                                print $form->render(submit => \@buttons);
                                return;
                        }
+                       else {
+                               # Make sure that the repo is up-to-date;
+                               # locking prevents the post-commit hook
+                               # from updating it.
+                               rcs_update();
+                       }
                }
                else {
                        require IkiWiki::Render;
index 7a0e362d3fc5371838d0b1330d43a3b91f428fa1..cd134a2c7607b2c286b15e83040a1405f5f54515 100644 (file)
@@ -11,8 +11,11 @@ ikiwiki (1.41) UNRELEASED; urgency=low
   * Improve use of svn merge, by specifying the file to merge, rather than
     chdiring to the srcdir (which wasn't right when merging in a subdir).
     Thanks Ethan.
+  * Always call rcs_update after a commit during a web edit, to work around
+    the problem described in bugs/svn_fails_to_update. Thanks to Ethan for the
+    analysis and patch.
 
- -- Joey Hess <joeyh@debian.org>  Sat, 27 Jan 2007 19:01:27 -0500
+ -- Joey Hess <joeyh@debian.org>  Sat, 27 Jan 2007 19:18:27 -0500
 
 ikiwiki (1.40) unstable; urgency=low
 
index 015ab5a2b3f696863eb6bd106d1136d2645f3d7c..6ed839cf6d52138ee497cd7e9318a30c64f17e99 100644 (file)
@@ -76,4 +76,14 @@ 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
\ No newline at end of file
+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]]