Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>When writing svn hooks of any type, if you need information about the repository or about a transaction, you want to use the <code>svnlook</code> program from a shell script, or use the svn API in the language of your choice. Using <code>svnlook</code> is faster, as it bypasses all the svn RA (remote access) code, including the layer of authorization checks - because the scripts are being run in the context of the server, this isn't a problem. Additionally, you don't have the additional overhead of updating a working copy that you aren't using for, well, anything other than file type information.</p> <p><code>svnlook</code> contains numerous options for investigating both revisions (for post-* hooks) and transactions (for pre-* transactions). Of particular interest here is the <code>changed</code> option.</p> <pre><blockquote>changed: usage: svnlook changed REPOS_PATH Print the paths that were changed. Valid options: -r [--revision] ARG : specify revision number ARG -t [--transaction] ARG : specify transaction name ARG --copy-info : show details for copies </blockquote></pre> <p>The changes that made up the revision or transaction are displayed, like so:</p> <pre><code>A trunk/src/new-dir/ A trunk/src/new-dir/newheader.h A trunk/src/new-dir/newsrc.c U trunk/src/existingsrc.c </code></pre> <p>Output from svnlook, when referencing a directory, always ends in /. This is an easy discriminator for detection of file or directory.</p> <p>However, things do get a little murkier when dealing with deletes. If a directory is deleted, everything under the directory is also removed and this information isn't displayed in <code>changed</code>. See here:</p> <pre><code>D trunk/src/new-dir/ U trunk/src/existingsrc.c </code></pre> <p>Based on the description of what you are looking at, I'm going to guess that you are looking for some form of post-commit reporting. If so, you may want to check out <a href="http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/mailer/" rel="nofollow">the subversion mailer post-* hook</a>. Even if you don't want to email results, the code demonstrates how to walk through a transaction or revision for changes using the svn API.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload