<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Julian Rex &#187; perforce</title>
	<atom:link href="http://julianrex.com/tag/perforce/feed/" rel="self" type="application/rss+xml" />
	<link>http://julianrex.com</link>
	<description>iPhone and iPad Apps and Game Development</description>
	<lastBuildDate>Wed, 23 Mar 2011 22:35:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Fix for FogBugz/Perforce integration on OSX</title>
		<link>http://julianrex.com/2009/12/quick-fix-for-fogbugz-and-perforce-integration-on-osx/</link>
		<comments>http://julianrex.com/2009/12/quick-fix-for-fogbugz-and-perforce-integration-on-osx/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 04:24:27 +0000</pubDate>
		<dc:creator>Julian</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[fogbugz]]></category>
		<category><![CDATA[perforce]]></category>
		<category><![CDATA[scm]]></category>

		<guid isPermaLink="false">http://rexy.co.uk/?p=121</guid>
		<description><![CDATA[The Short Answer Add --no-check-certificate to the wget call in logBugDataP4.pl The Waffle On the recommendation of Kirby, I&#8217;ve been trying out FogBugz for task and bug tracking. I&#8217;d dismissed FogBugz assuming the cost would be too much (and for the daft name), but, amazingly, it has a free startup edition &#8211; good for 2 [...]]]></description>
			<content:encoded><![CDATA[<h2>The Short Answer</h2>
<p>Add <code>--no-check-certificate</code> to the wget call in logBugDataP4.pl</p>
<h2>The Waffle</h2>
<p>On the recommendation of <a href="http://twitter.com/kirbyt">Kirby</a>, I&#8217;ve been trying out FogBugz for task and bug tracking. I&#8217;d dismissed FogBugz assuming the cost would be too much (and for the daft name), but, amazingly, it has a <a href="http://www.fogcreek.com/FogBugz/StudentAndStartup.html">free startup edition</a> &#8211; good for 2 users. (One of the most interesting features is the Evidence Based Scheduling i.e using historical metrics for better estimates. I&#8217;ll be very interested to see how it works out.)</p>
<p>FogBugz <a href="http://www.fogcreek.com/FogBugz/Integration.html">integrates</a> with a number of SCM packages. In my case I&#8217;m also running the free 2-user Perforce install, and of course wanted to link the two. (I&#8217;ll get around to SVN and Git too but for now it looks like I&#8217;ll have to sort myself out for integration with AccuRev).</p>
<p>For Mac OS X, FogBugz has a Perl script (logBugDataP4.pl) which scans your changelist description for lines like:</p>
<p><code>BugzIDs: 1234<br />
</code></p>
<p>This allows FogBugz to link back to the Perforce changelist (if you&#8217;re running P4Web). By default though, the script appears to fail when issuing the wget.</p>
<p>The answer is to add &#8211;no-check-certificate to the wget calls, so that:</p>
<p><code> system("wget '$url' -q -O /dev/null");</code></p>
<p>becomes</p>
<p><code> system("wget '$url' -q -O /dev/null --no-check-certificate");</code></p>
<p>In my version I&#8217;ve removed the -q and the /dev/null preferring to dump the output and logging to files, so I can see what&#8217;s going on.</p>
<p>(There are two calls around lines 134 and 165.)</p>
]]></content:encoded>
			<wfw:commentRss>http://julianrex.com/2009/12/quick-fix-for-fogbugz-and-perforce-integration-on-osx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Old Develop articles posted</title>
		<link>http://julianrex.com/2009/02/old-develop-articles-posted/</link>
		<comments>http://julianrex.com/2009/02/old-develop-articles-posted/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 21:46:58 +0000</pubDate>
		<dc:creator>Julian</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[enums]]></category>
		<category><![CDATA[perforce]]></category>
		<category><![CDATA[ps3]]></category>
		<category><![CDATA[wii]]></category>

		<guid isPermaLink="false">http://rexy.co.uk/?p=62</guid>
		<description><![CDATA[I&#8217;ve posted some of the old articles I wrote for Develop way back in 2007. It&#8217;s interesting re-reading what I wrote nearly 2 years ago, and as ever your experiences and opinions change. I&#8217;ll try and get round to writing an update to each. Opinions change and I&#8217;m not sure how I feel about these [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve posted some of the old articles I wrote for <a href="http://www.developmag.com">Develop</a> way back in 2007. It&#8217;s interesting re-reading what I wrote nearly 2 years ago, and as ever your experiences and opinions change. I&#8217;ll try and get round to writing an update to each. Opinions change and I&#8217;m not sure how I feel about these anymore, but they&#8217;re reproduced here (with permission) for your reading pleasure.</p>
<p>The articles are:</p>
<ul>
<li><a href="/articles/dealing-with-new-gen/">Dealing with new-gen</a> &#8211; I didn&#8217;t want to use the word &#8220;next-gen&#8221;, but I&#8217;ve ended up with something that sounds worse! Inspired by the launch of the PS3.</li>
<li><a href="/articles/losing-control/">Losing Control</a> &#8211; ramblings about control devices, inspired by the launch of the Wii.</li>
<li><a href="/articles/private-brancher/">Private Brancher</a> &#8211; pun based title for an article about private workspaces in Perforce.</li>
<li><a href="/articles/troublesome-enums/">Troublesome enums</a> &#8211; I&#8217;m no C++ mastermind, but here I talk about enums in C++. Hopefully it&#8217;s correct <img src='http://julianrex.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ul>
<p>The articles are pretty much in the form they were in the magazine, but with some errors removed.</p>
]]></content:encoded>
			<wfw:commentRss>http://julianrex.com/2009/02/old-develop-articles-posted/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up a Perforce proxy server on Ubuntu</title>
		<link>http://julianrex.com/2007/01/setting-up-a-perforce-proxy-server-on-ubuntu/</link>
		<comments>http://julianrex.com/2007/01/setting-up-a-perforce-proxy-server-on-ubuntu/#comments</comments>
		<pubDate>Mon, 15 Jan 2007 13:00:08 +0000</pubDate>
		<dc:creator>Julian</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[perforce]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://rexy.co.uk/wordpress/?p=13</guid>
		<description><![CDATA[One of the more important things I&#8217;ve been wanting to do, is to set up a perforce proxy to connect to the work server. That way, it can sit in the background periodically updating itself (not quite but see below), and when I want to sync, it should be nice and fast. In theory. In [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.perforce.com/perforce/products/p4p.html"><img class="aligncenter" src="/images/p4p.gif" alt="" /></a></p>
<p>One of the more important things I&#8217;ve been wanting to do, is to set up a perforce proxy to connect to the work server.</p>
<p>That way, it can sit in the background periodically updating itself (not quite but see below), and when I want to sync, it should be nice and fast. In theory. In reality I suspect it won&#8217;t be so clear cut.</p>
<p>Running a perforce proxy is easy, it&#8217;s just a case of choosing a root for the cache, telling it what port to listen on, and what the target server is:</p>
<div class="codey">
<pre>p4p -p 1667 -t workserver:1666 -r /perforce/p4p/cache -L /perforce/p4p/p4p.log</pre>
</div>
<p>That&#8217;s nice, but I want this to start automatically when I boot up, and an easy way to quickly stop and start it. I need a script in /etc/init.d. Here&#8217;s mine:</p>
<div class="codey">
<pre>#! /bin/sh
# p4pinit
# Startup script for Perforce Proxy server.
# Check out the man page for start-stop-daemon. Notice
# I use -b to run p4p in the background. p4p has a similar
# option, but I didn't have as much success.

DAEMON=/usr/local/bin/p4p
P4P_NAME=p4p
P4P_DESC="Perforce Proxy"
P4P_CACHE=/perforce/p4p/cache
P4P_PORT=1667
P4P_TARGET=workserver.somewhere.co.uk:1666
P4P_LOG=/perforce/p4p/p4p.log

# Check p4p exists
test -x $DAEMON || exit 0

case "$1" in

  start)
	echo -n "Starting $P4P_DESC: "
	start-stop-daemon --start -b -m
                --pidfile /var/run/$P4P_NAME.pid
                --exec $DAEMON
                -- -p $P4P_PORT -t $P4P_TARGET
                -r $P4P_CACHE -L $P4P_LOG
	echo "$P4P_NAME."
	;;

  stop)
	echo -n "Stopping $P4P_DESC: "
	start-stop-daemon --stop
                --pidfile /var/run/$P4P_NAME.pid
                --signal KILL
                --exec $DAEMON
                --oknodo
	echo "$P4P_NAME."
	;;

  *)
	echo "Usage: $0 {start|stop}"
	exit 1
	;;
esac

exit 0</pre>
</div>
<p>Once you&#8217;ve done this, you need to call <code>update-rc.d p4pinit defaults</code>. This will ensure that p4p is started when you boot up. This will create symlinks to p4pinit in the directories /etc/rcX.d etc&#8230;</p>
<p>Now synching is just a case of pointing the client at homeserver:1667, rather than the default <img src='http://julianrex.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  However, you need to pre-load the cache and ideally keep it synched regularly after that.</p>
<p>Unfortunately this is where Perforce falls down, as the proxy has no means to do this itself; You&#8217;re required to set up another client spec, and use that to sync and fill the proxy&#8217;s cache. This could mean double the files on your server, which isn&#8217;t great.</p>
<p>What you can do, rather cunningly, is set your client root to /dev/null. When you sync you&#8217;ll get errors that it can&#8217;t write the file/create the directory, but by that point the file has been downloaded to the cache. To quote Tim O&#8217;Mahony of Perforce support:</p>
<p><em>&#8230;The errors mean that you can&#8217;t write anything to db.have for those files, but by this time you already have downloaded them to the proxy. That means that every time you then run a p4 sync on this client it is the same as running a full &#8220;p4 sync&#8221;. Files that aren&#8217;t on the proxy will simply be got from the server&#8230;</em></p>
<p>In other words, if you sync later, p4 will want to re-grab those files. However it will take them from the proxy, so it will only download genuinely new files. If you don&#8217;t want the output in your logs (like me), then you can run p4 flush immediately after the sync, to convince the server that you really do have those files:</p>
<div class="codey">
<pre>p4 sync //depot/something/to/sync/...
p4 flush //depot/something/to/sync/...</pre>
</div>
<p>Hope this helps someone.</p>
<div class="updated">Since writing, I found that in some situations (that I&#8217;ve yet to fathom) the proxy server delivers files from the server rather than itself. To see where your files are coming from, you can use the <code>-Zproxyverbose</code> flag to your p4 command.</div>
]]></content:encoded>
			<wfw:commentRss>http://julianrex.com/2007/01/setting-up-a-perforce-proxy-server-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

