<rdf:RDF
    xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
    xmlns:s='http://snipsnap.org/rdf/snip-schema#'
    xml:base='http://wever.org/java/rdf'>
    <s:Snip rdf:about='http://wever.org/java/rdf#java/Integrating+Subversion+and+S'
         s:cUser='michaelwever'
         s:oUser=''
         s:mUser='michaelwever'>
        <s:name>java/Integrating Subversion and S</s:name>
        <s:content>1 Prerequisites&#xD;&#xA;1.1 Subversion&#xD;&#xA;You need&#xD;&#xA;- to copy __extensions/scripts/scarab-post-commit.py__ into your subversion repository&apos;s hooks directory,&#xD;&#xA;- python with {link:xmlrpclib|http://www.pythonware.com/products/xmlrpc/} and svn libraries (ie the swig.py bindings),&#xD;&#xA;If subversion and scarab will run on seperate machines, you need to:&#xD;&#xA;- check the firewall (outbound-traffic) is open to the machine running your scarab installation to the defined xmlrpc port (the default is 12345),&#xD;&#xA;1.1 Scarab&#xD;&#xA;If subversion and scarab will run on seperate machines, you need to:&#xD;&#xA;- edit __src/conf/conf/componentConfiguration.xml__ so that in &lt;XmlRpcComponent&gt; the element &lt;acceptedClients clientIP=&quot;127.0.0.1&quot;/&gt; allows the ipaddress of your subversion machine to connect. (This is also the file to edit if you want to change the port scarab&apos;s xmlrpc is running on). Scarab will need to be rebuilt and restarted after these changes,&#xD;&#xA;- check the firewall (inbound-traffic) is open from the machine running your subversion installation on the defined xmlrpc port (the default is 12345).&#xD;&#xA;1 Checking Prerequisites&#xD;&#xA;* From your subversion repository&apos;s hooks directory running the scarab-post-commit.py script should give the output:&#xD;&#xA;{code:bash}&#xD;&#xA;user@subversion$ ./scarab-post-commit.py&#xD;&#xA;Publish Subversion commits into to Scarab.&#xD;&#xA;USAGE: ./scarab-post-commit.py REPOS-DIR REVISION&#xD;&#xA;{code} &#xD;&#xA;If this doesn&apos;t work then you need to check the python libraries are installed correctly.&#xD;&#xA;* After restarting Scarab, check scarab/logs/scarab.log contains:&#xD;&#xA;{code:bash}&#xD;&#xA;\[main\] INFO  org.tigris.scarab.util.SimpleHandler - SimpleHandler: loading&#xD;&#xA;{code}&#xD;&#xA;If this is missing, then look closer at the turbine.log to see if the XmlRpc component is being properly initialised. It&apos;ll all look something like:&#xD;&#xA;{code:bash}&#xD;&#xA;\[main\] INFO  ...DefaultXmlRpcServerComponent - Attempting to initialize the XML-RPC server.&#xD;&#xA;\[main\] INFO  ...DefaultXmlRpcServerComponent - We have 1 handlers to configure.&#xD;&#xA;\[main\] INFO  ...DefaultXmlRpcServerComponent - registered: simple with class: org.tigris.scarab.util.SimpleHandler&#xD;&#xA;\[main\] INFO  ...DefaultXmlRpcServerComponent - Operating in a state of paranoia&#xD;&#xA;\[main\] INFO  ...DefaultXmlRpcServerComponent - Accepting client -&gt; 127.0.0.1&#xD;&#xA;{code}&#xD;&#xA;If this doesn&apos;t help then you will atleast have useful information to post to {mailto:dev@scarab.tigris.org} to get further help with.\\&#xD;&#xA;~~Note: {note:Or should it be users@scarab.tigris.org ? I&apos;ve presumed configuring Turbine/Yaafi components within scarab is more dev than user...}~~&#xD;&#xA;1 Setup&#xD;&#xA;The only setup needed, beyond checking the prequisites, is a few variables in the scarab-post-commit.py and finally calling this script from post-commit.sh.&#xD;&#xA;1.1 scarab-post-commit.py variables&#xD;&#xA;There are two sections of variables in the beginning of the script, &quot;basic configuration&quot; and &quot;i18n strings&quot;. We are only interested in the former, the latter is only when you want to localise the output to another language.&#xD;&#xA;1. {code}VIEWCVS_URL = &quot;http://scarab.tigris.org/source/browse/scarab/&quot; {code} The viewcvs or websvn URL base. The comments posted to scarab contain a list of hyperlinks to the diffs committed in that subversion transaction. This is the base URL prepended to those hyperlinks.&#xD;&#xA;1. {code}SCARAB_XMLRPC_URL = &quot;http://localhost:12345&quot;{code} The address of the scarab machine and port running the xmlrpc service. If scarab and subversion are running on the same machine it is sufficient to use the above.&#xD;&#xA;1. {code}DISABLE_EMAILS = 1{code} Each time a comment is added to an issue in scarab by default an email is sent to everyone associated to the issue. The author of the integration didn&apos;t feel it was appropriate that all associated personnel were notified of every commit. Especially since the commit will often be followed by a manual change by the commitor of the status attribute to the issue in question, and associated personnel are more interested in these events. But if this is not the case for you change the variable to __0__.\\&#xD;&#xA;__NOTE__ Only the global setting of email-enabled is checked (and temporarily disabled), so if your modules override this setting emails will continued to be sent. See http://scarab.tigris.org/servlets/ReadMsg?list=dev&amp;msgNo=11971 for more... (This will be fixed in the future).&#xD;&#xA;1.1 Calling scarab-post-commit.py&#xD;&#xA;In your subversion repository&apos;s hooks directory, append to the file post-commit&#xD;&#xA;{code:bash }&#xD;&#xA;REPO=&quot;$1&quot;&#xD;&#xA;REV=&quot;$2&quot;&#xD;&#xA;# Call Scarab integration&#xD;&#xA;cd &lt;your-repository&gt;/hooks/&#xD;&#xA;./scarab-post-commit.py $REPO $REV &gt;&gt; post-commit.log 2&gt;&amp;1&#xD;&#xA;{code}&#xD;&#xA;If the file doesn&apos;t exist, create it from a copy of post-commit.tmpl, and remove the last two lines before appending the above.\\&#xD;&#xA;Note: it&apos;s important to background the call to scarab-post-commit.py to prevent blocking of subversion while xmlrpc tries to connect and communicates with scarab...&#xD;&#xA;1 When it&apos;s working&#xD;&#xA;When its working look in target/scarab/logs/scarab.log&#xD;&#xA;The output should be similar to &#xD;&#xA;{code}&#xD;&#xA;2005-09-03 14:59:31,855 [Thread-9] INFO  org.tigris.scarab.util.SimpleHandler - SimpleHandler: addComment:  issues=SMBW1657 test commit, user=mick, comment=&quot;Subversion commit 6011:    h ttp://samboweb/viewcvs/?view=rev&amp;rev=6011&#xD;&#xA;-------------------------------------------------------------------------&#xD;&#xA;SMBW1657 test commit&#xD;&#xA;-------------------------------------------------------------------------&#xD;&#xA;Modified: trunk/build.xml    h ttp://samboweb/viewcvs/trunk/build.xml?view=diff&amp;rev=6011&amp;p1=trunk/build.xml&amp;r1=6010&amp;p2=trunk/build.xml&amp;r2=6011&#xD;&#xA;, disableEmails=1{code}&#xD;&#xA;1 Subversion -to- Scarab Username mappings&#xD;&#xA;This part of the integration is still primitive. By far the best solution is to enforce subversion and scarab usernames are the same, either manually or via using a LDAP service.&#xD;&#xA;If this is not the case, the currently primitive solution is to enter the mapping relationships manually into scarab-post-commit.py. An example already exists commented under __&quot;### Do any Subversion-to-Scarab author mappings here ###&quot;__.&#xD;&#xA;\\&#xD;&#xA;~~!! The author would like anyone with python experience to separate this mapping into a separate python script that can be easily called if it is present, so that updating scarab-post-commit.py is less error-prone !! \\&#xD;&#xA;See http://www.solitone.org/scarab/issues/id/SCB1436 for more...~~&#xD;&#xA;&#xD;&#xA;1 Credits&#xD;&#xA;The scarab subversion integration was inspired and based upon work originally done by Rob Clark.\\&#xD;&#xA;Next to all of the scarab-post-commit.py was done by C.Michael Pilato, also the author of the subversion-python bindings.</s:content>
        <s:mTime>2005-09-07 10:27:22.0</s:mTime>
        <s:cTime>2005-08-30 12:31:36.0</s:cTime>
        <s:comments
             rdf:type='http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag'/>
        <s:snipLinks>
            <rdf:Bag>
                <rdf:li rdf:resource='http://wever.org/java/rdf#java/Integrating Subversion and Scarab'/>
                <rdf:li rdf:resource='#snipsnap-notfound'/>
                <rdf:li rdf:resource='#snipsnap-search'/>
                <rdf:li rdf:resource='http://wever.org/java/rdf#java/Integrating+Subversion+and+Scarab'/>
                <rdf:li rdf:resource='#java'/>
                <rdf:li rdf:resource='#Java'/>
                <rdf:li rdf:resource='#snipsnap-index'/>
                <rdf:li rdf:resource='http://wever.org/java/rdf#java/Integrating Subversion and scarab'/>
                <rdf:li rdf:resource='http://wever.org/java/rdf#java/'/>
                <rdf:li rdf:resource='http://wever.org/java/rdf#java/Why Eclipse is not opensource'/>
                <rdf:li rdf:resource='http://wever.org/java/rdf#java/Integrating+Subversion+and+S/'/>
                <rdf:li>
                    <s:Snip rdf:about='http://wever.org/java/rdf#java/Integrating+Subversion+and+S'>
                        <s:attachments
                             rdf:type='http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag'/>
                    </s:Snip>
                </rdf:li>
                <rdf:li rdf:resource='http://wever.org/java/rdf#java/integrating subversion and scarab'/>
                <rdf:li rdf:resource='http://wever.org/java/rdf#java/Importing JIRA issues into Scarab'/>
                <rdf:li rdf:resource='http://wever.org/java/rdf#'/>
                <rdf:li rdf:resource='#Oracle'/>
                <rdf:li rdf:resource='http://wever.org/java/rdf#SnipSnap/themes/Blue Life/css/snip.css'/>
                <rdf:li rdf:resource='#michaelwever'/>
                <rdf:li rdf:resource='http://wever.org/java/rdf#start/2008-05-15/1'/>
                <rdf:li rdf:resource='http://wever.org/java/rdf#Music and Dvds'/>
                <rdf:li rdf:resource='http://wever.org/java/rdf#Wever family'/>
                <rdf:li rdf:resource='http://wever.org/java/rdf#java/Integrating Subversion and S/'/>
                <rdf:li rdf:resource='#sitemap'/>
            </rdf:Bag>
        </s:snipLinks>
    </s:Snip>
</rdf:RDF>
