]> sipb.mit.edu Git - ikiwiki.git/commitdiff
* Remove locking code in git rcs_commit. I'm not sure if this was ever
authorJoey Hess <joey@kodama.kitenet.net>
Fri, 7 Mar 2008 17:25:40 +0000 (12:25 -0500)
committerJoey Hess <joey@kodama.kitenet.net>
Fri, 7 Mar 2008 17:25:40 +0000 (12:25 -0500)
  correct, and it's certianly not correct now, since the wiki is locked
  before rcs_commit is ever called, and should not be unlocked by
  rcs_commit either.

IkiWiki/Rcs/git.pm
debian/changelog

index 376d03c780336f6cc4a999fc370143a0d40f8177..9f65e86aa37e3a63738ce3aacf0a1f9496b57daa 100644 (file)
@@ -319,13 +319,6 @@ sub rcs_commit ($$$;$$) { #{{{
                    (length $message ? ": $message" : "");
        }
 
-       # XXX: Wiki directory is in the unlocked state when starting this
-       # action.  But it takes time for a Git process to finish its job
-       # (especially if a merge required), so we must re-lock to prevent
-       # race conditions.  Only when the time of the real commit action
-       # (i.e. git push) comes, we'll unlock the directory.
-       lockwiki();
-
        # Check to see if the page has been changed by someone else since
        # rcs_prepedit was called.
        my $cur    = git_sha1($file);
@@ -340,7 +333,6 @@ sub rcs_commit ($$$;$$) { #{{{
        # so we should ignore its exit status (hence run_or_non).
        $message = possibly_foolish_untaint($message);
        if (run_or_non('git', 'commit', '-q', '-m', $message, '-i', $file)) {
-               unlockwiki();
                if (length $config{gitorigin_branch}) {
                        run_or_cry('git', 'push', $config{gitorigin_branch});
                }
index aa118a6a014fea869f7435f40cf4474cda1aeec3..80d938927e73c63ea375257f2c3f35a1688c3df2 100644 (file)
@@ -18,6 +18,10 @@ ikiwiki (2.41) UNRELEASED; urgency=low
     version 1.0.16 of Text::Markdown.
   * Updated Spanish translation from Victor Moral.
   * Fix example exclude regexp. Closes: #469691
+  * Remove locking code in git rcs_commit. I'm not sure if this was ever
+    correct, and it's certianly not correct now, since the wiki is locked
+    before rcs_commit is ever called, and should not be unlocked by
+    rcs_commit either.
 
  -- martin f. krafft <madduck@debian.org>  Sun, 02 Mar 2008 17:46:38 +0100