subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r1240860 - /subversion/site/publish/docs/release-notes/1.8.html
Date Sun, 05 Feb 2012 23:30:13 GMT
Author: danielsh
Date: Sun Feb  5 23:30:13 2012
New Revision: 1240860

Document r1240856 (post-commit hook += txn-name argument).

* docs/release-notes/1.8.html
  (hooks): New section.


Modified: subversion/site/publish/docs/release-notes/1.8.html
--- subversion/site/publish/docs/release-notes/1.8.html (original)
+++ subversion/site/publish/docs/release-notes/1.8.html Sun Feb  5 23:30:13 2012
@@ -408,6 +408,26 @@ mergeinfo.</p>
 </div>  <!-- merge-tracking-enhancements -->
+<div class="h3" id="hooks">
+<h3>Hook scripts improvements (<em>server</em>)
+  <a class="sectionlink" href="#hooks"
+    title="Link to this section">&para;</a>
+<p>The <tt>post-commit</tt> hook has grown a <tt>txn-name</tt>
argument as the
+third positional argument (<tt>argv[3]</tt>).  This argument is the name of the
+transaction that has become the revision triggering the <tt>post-commit</tt>
+hook; it is the same as the second positional argument to the
+<tt>pre-commit</tt>, and thus enables the <tt>pre-commit</tt> and
+<tt>post-commit</tt> hooks to easily transfer state between them.</p>
+<p>For example, if the <tt>pre-commit</tt> hook makes an expensive computation
+against the would-be-revision, it can store the result of that computation in a
+persistent hash keyed by the transaction name, which the <tt>post-commit</tt>
+hook will use to avoid re-doing the computation.</p>
+</div>  <!-- hooks -->
 </div>  <!-- enhancements -->
 <div class="h2" id="svn-1.6-deprecation">

View raw message