<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Setting up SVNSync and SVN-Notify</title>
	<atom:link href="http://josephscott.org/archives/2010/01/setting-up-svnsync-and-svn-notify/feed/" rel="self" type="application/rss+xml" />
	<link>http://josephscott.org/archives/2010/01/setting-up-svnsync-and-svn-notify/</link>
	<description></description>
	<lastBuildDate>Wed, 28 Jul 2010 19:47:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
	<item>
		<title>By: Joseph Scott</title>
		<link>http://josephscott.org/archives/2010/01/setting-up-svnsync-and-svn-notify/#comment-27185</link>
		<dc:creator>Joseph Scott</dc:creator>
		<pubDate>Mon, 29 Mar 2010 22:05:50 +0000</pubDate>
		<guid isPermaLink="false">http://josephscott.org/?p=1627#comment-27185</guid>
		<description>Yeah, I need to play with this a bit more and see if I can make it work again.</description>
		<content:encoded><![CDATA[<p>Yeah, I need to play with this a bit more and see if I can make it work again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: westi</title>
		<link>http://josephscott.org/archives/2010/01/setting-up-svnsync-and-svn-notify/#comment-27169</link>
		<dc:creator>westi</dc:creator>
		<pubDate>Mon, 29 Mar 2010 18:46:58 +0000</pubDate>
		<guid isPermaLink="false">http://josephscott.org/?p=1627#comment-27169</guid>
		<description>You may need a longer delay before the notifier runs so as to ensure you are not catching the svnsync username.

You could make it check the username and loop if the username for the revision is still svnsync.</description>
		<content:encoded><![CDATA[<p>You may need a longer delay before the notifier runs so as to ensure you are not catching the svnsync username.</p>
<p>You could make it check the username and loop if the username for the revision is still svnsync.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: westi</title>
		<link>http://josephscott.org/archives/2010/01/setting-up-svnsync-and-svn-notify/#comment-27168</link>
		<dc:creator>westi</dc:creator>
		<pubDate>Mon, 29 Mar 2010 18:45:27 +0000</pubDate>
		<guid isPermaLink="false">http://josephscott.org/?p=1627#comment-27168</guid>
		<description>If you enable the ability to edit rev-props using a hook in the repo (which I think you have to do for svnsync anyway) then you can easily change the username associated with a log message.

You can do this as a one time script which runs through each revision on write a hook to do it for each revision as it is synced (as long as you can hook in after svnsync has set the username)</description>
		<content:encoded><![CDATA[<p>If you enable the ability to edit rev-props using a hook in the repo (which I think you have to do for svnsync anyway) then you can easily change the username associated with a log message.</p>
<p>You can do this as a one time script which runs through each revision on write a hook to do it for each revision as it is synced (as long as you can hook in after svnsync has set the username)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph Scott</title>
		<link>http://josephscott.org/archives/2010/01/setting-up-svnsync-and-svn-notify/#comment-27146</link>
		<dc:creator>Joseph Scott</dc:creator>
		<pubDate>Mon, 29 Mar 2010 15:05:06 +0000</pubDate>
		<guid isPermaLink="false">http://josephscott.org/?p=1627#comment-27146</guid>
		<description>Peter Westwood&#039;s suggestion worked for awhile, but for some reason has stopped working for me.  This could be due to changes on the main repo, I&#039;m not sure.

I&#039;m not aware of specific method for changing usernames with svn hooks, but I wouldn&#039;t be surprised if someone has done that before.</description>
		<content:encoded><![CDATA[<p>Peter Westwood&#8217;s suggestion worked for awhile, but for some reason has stopped working for me.  This could be due to changes on the main repo, I&#8217;m not sure.</p>
<p>I&#8217;m not aware of specific method for changing usernames with svn hooks, but I wouldn&#8217;t be surprised if someone has done that before.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Øystein K. Stephansen</title>
		<link>http://josephscott.org/archives/2010/01/setting-up-svnsync-and-svn-notify/#comment-27128</link>
		<dc:creator>Øystein K. Stephansen</dc:creator>
		<pubDate>Mon, 29 Mar 2010 12:33:34 +0000</pubDate>
		<guid isPermaLink="false">http://josephscott.org/?p=1627#comment-27128</guid>
		<description>Hi! 

Did you sort the issue regarding that all commits where done by the user running svnsync? 

I&#039;m trying to move my subversion from an online service to our own local network and all commits are done by the user running the svnsync. And to make it even harder all the usernames have changed from the old repository to the new one. 

Do you know of any way to change the usernames with svn hooks? On the external online service we use our complete mail address as usernames but the local one only use the domain username. So I need to strip away &quot;@domain.com&quot; in the username that does the commit......

Any ideas?</description>
		<content:encoded><![CDATA[<p>Hi! </p>
<p>Did you sort the issue regarding that all commits where done by the user running svnsync? </p>
<p>I&#8217;m trying to move my subversion from an online service to our own local network and all commits are done by the user running the svnsync. And to make it even harder all the usernames have changed from the old repository to the new one. </p>
<p>Do you know of any way to change the usernames with svn hooks? On the external online service we use our complete mail address as usernames but the local one only use the domain username. So I need to strip away &#8220;@domain.com&#8221; in the username that does the commit&#8230;&#8230;</p>
<p>Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: westi</title>
		<link>http://josephscott.org/archives/2010/01/setting-up-svnsync-and-svn-notify/#comment-19719</link>
		<dc:creator>westi</dc:creator>
		<pubDate>Sat, 16 Jan 2010 23:05:57 +0000</pubDate>
		<guid isPermaLink="false">http://josephscott.org/?p=1627#comment-19719</guid>
		<description>Cool.

I guess the output redirect difference may be just a shell configuration thing.

I just googled what to use as I can never remember ;-)</description>
		<content:encoded><![CDATA[<p>Cool.</p>
<p>I guess the output redirect difference may be just a shell configuration thing.</p>
<p>I just googled what to use as I can never remember ;-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph Scott</title>
		<link>http://josephscott.org/archives/2010/01/setting-up-svnsync-and-svn-notify/#comment-19718</link>
		<dc:creator>Joseph Scott</dc:creator>
		<pubDate>Sat, 16 Jan 2010 23:02:35 +0000</pubDate>
		<guid isPermaLink="false">http://josephscott.org/?p=1627#comment-19718</guid>
		<description>Nice!
I had to make just one small fix, I changed the last line to:

&lt;code&gt;delayed_notify $1 $2 &gt;&amp;2 /dev/null &amp;&lt;/code&gt;

Without that I&#039;d get an error, post-commit: 28: Syntax error: Bad fd number
I guess it doesn&#039;t assume STDERR.

Not a big deal, but I usually do the ordering on this differently: &lt;code&gt;&gt; /dev/null 2&gt;&amp;1&lt;/code&gt;
so that it reads out loud like, redirect STDOUT to /dev/null and redirect STDERR to STDOUT

Thanks again, I just confirmed that this works.  I now get the correct username in the commit emails.  I&#039;ll update the post with your example.</description>
		<content:encoded><![CDATA[<p>Nice!<br />
I had to make just one small fix, I changed the last line to:</p>
<p><code>delayed_notify $1 $2 &gt;&amp;2 /dev/null &amp;</code></p>
<p>Without that I&#8217;d get an error, post-commit: 28: Syntax error: Bad fd number<br />
I guess it doesn&#8217;t assume STDERR.</p>
<p>Not a big deal, but I usually do the ordering on this differently: <code>&gt; /dev/null 2&gt;&amp;1</code><br />
so that it reads out loud like, redirect STDOUT to /dev/null and redirect STDERR to STDOUT</p>
<p>Thanks again, I just confirmed that this works.  I now get the correct username in the commit emails.  I&#8217;ll update the post with your example.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: westi</title>
		<link>http://josephscott.org/archives/2010/01/setting-up-svnsync-and-svn-notify/#comment-19686</link>
		<dc:creator>westi</dc:creator>
		<pubDate>Sat, 16 Jan 2010 12:11:41 +0000</pubDate>
		<guid isPermaLink="false">http://josephscott.org/?p=1627#comment-19686</guid>
		<description>This will do it.

This will fork and sleep before doing the notify so that you catch the revprop changes as well.

You need to tune the sleep time based on how big the revprop changes take.  10 seconds is probably far too long.

&lt;code&gt;
#!/bin/sh

delayed_notify() {
        sleep 10
        /usr/bin/svnnotify --repos-path &quot;$1&quot; --revision &quot;$2&quot; \
        --to commit-list@example.com \
        --from commit-list@example.com \
        --with-diff \
        --subject-cx \
        --subject-prefix &#039;REPO-NAME &#039; \
        --handler HTML::ColorDiff
}

delayed_notify $1 $2 &gt;&amp; /dev/null &amp;
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>This will do it.</p>
<p>This will fork and sleep before doing the notify so that you catch the revprop changes as well.</p>
<p>You need to tune the sleep time based on how big the revprop changes take.  10 seconds is probably far too long.</p>
<p><code><br />
#!/bin/sh</p>
<p>delayed_notify() {<br />
        sleep 10<br />
        /usr/bin/svnnotify --repos-path "$1" --revision "$2" \<br />
        --to <a href="mailto:commit-list@example.com">commit-list@example.com</a> \<br />
        --from <a href="mailto:commit-list@example.com">commit-list@example.com</a> \<br />
        --with-diff \<br />
        --subject-cx \<br />
        --subject-prefix 'REPO-NAME ' \<br />
        --handler HTML::ColorDiff<br />
}</p>
<p>delayed_notify $1 $2 &gt;&amp; /dev/null &amp;<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph Scott</title>
		<link>http://josephscott.org/archives/2010/01/setting-up-svnsync-and-svn-notify/#comment-19647</link>
		<dc:creator>Joseph Scott</dc:creator>
		<pubDate>Fri, 15 Jan 2010 23:39:30 +0000</pubDate>
		<guid isPermaLink="false">http://josephscott.org/?p=1627#comment-19647</guid>
		<description>So your thought is that SVN-Notify is running late enough to pick up the commit, but not late enough to pick prop changes, interesting.  I wonder if there is something in svnsync that I could use to call SVN-Notify directly, after svnsync has completed replaying all of the changes.

I&#039;ll have to explore this further, I&#039;d really like to get all of the accurate information in the commit emails when using this setup.</description>
		<content:encoded><![CDATA[<p>So your thought is that SVN-Notify is running late enough to pick up the commit, but not late enough to pick prop changes, interesting.  I wonder if there is something in svnsync that I could use to call SVN-Notify directly, after svnsync has completed replaying all of the changes.</p>
<p>I&#8217;ll have to explore this further, I&#8217;d really like to get all of the accurate information in the commit emails when using this setup.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: westi</title>
		<link>http://josephscott.org/archives/2010/01/setting-up-svnsync-and-svn-notify/#comment-19641</link>
		<dc:creator>westi</dc:creator>
		<pubDate>Fri, 15 Jan 2010 22:13:07 +0000</pubDate>
		<guid isPermaLink="false">http://josephscott.org/?p=1627#comment-19641</guid>
		<description>The trick to get the correct usernames and dates is going to be to run your script later.

svnsync works by doing a commit and then playing with the revprops to set username, date etc which is why it needs the pre-revprop-change hook.

You want svn-notify to run after it has done all this.

You probably need something which runs n-seconds after the commit triggered from post-revprop-change and does the notify that way.

Barry may have some hints as the WP.org trac runs against an svnsync&#039;d copy of the code.</description>
		<content:encoded><![CDATA[<p>The trick to get the correct usernames and dates is going to be to run your script later.</p>
<p>svnsync works by doing a commit and then playing with the revprops to set username, date etc which is why it needs the pre-revprop-change hook.</p>
<p>You want svn-notify to run after it has done all this.</p>
<p>You probably need something which runs n-seconds after the commit triggered from post-revprop-change and does the notify that way.</p>
<p>Barry may have some hints as the WP.org trac runs against an svnsync&#8217;d copy of the code.</p>
]]></content:encoded>
	</item>
</channel>
</rss>