Comments on “
How I Use Subversion
”http://robwilkerson.org/2008/04/10/how-i-use-subversion/feed2008-08-18T18:07:46-04:00Chyrp
How I Use Subversion
tag:robwilkerson.org,2008-08-18:/id/46//comment_1942008-08-18T18:07:46-04:002008-08-18T18:07:46-04:00Rob Wilkersonhttp://robwilkerson.org
<p>@Chad </p>
<p>I think of it as being a little like denormalizing a database. It’s not strictly necessary, but it can be a useful convenience. I like having a tag I can reference at any time. This is particularly true for releases (whose tags I keep around forever), but I also throw in build tags so that I can easily track variations between any given build of the same release.</p>
<p>Like it sounds like you’re planning, I give each release a version number like 1.1.3.2390 (major.minor.maintenance.revision). I could always track down any given version number, extract the revision number from the version (assuming it’s available somewhere in the code base) then perform whatever operation I need, but I’d rather just open my tags directory in the repository and do what I need to do.</p>
<p>Call me lazy. :-)</p>
How I Use Subversion
tag:robwilkerson.org,2008-08-18:/id/46//comment_1932008-08-18T17:39:11-04:002008-08-18T17:39:11-04:00Chad Kiefferhttp://2tbsp.com
<p>Hey Rob, another pesky question for you. I’m still green in the area of build/release management so forgive me in advance if there’s an obvious answer :)</p>
<p>I think I’d rather not store builds in my repository. I’ll just package them up and give them a unique name based on <span class="caps">HEAD</span>’s rev number + the <span class="caps">DATE</span>/TIME built. <span class="caps">IMO</span>, committing builds seems to unnecessarily clutter the revision history.</p>
<p>What are the benefits of committing build revisions for you?</p>
How I Use Subversion
tag:robwilkerson.org,2008-08-15:/id/46//comment_1912008-08-15T14:44:17-04:002008-08-15T14:44:17-04:00Chad Kiefferhttp://2tbsp.com
<p>Well, I’m a lazy, er, I mean literal kind of guy :) You present a great example here for folks to get started with, thanks again :)</p>
How I Use Subversion
tag:robwilkerson.org,2008-08-15:/id/46//comment_1902008-08-15T14:02:51-04:002008-08-15T14:02:51-04:00Rob Wilkersonhttp://robwilkerson.org
<p>Hey Chad – </p>
<p>To be honest, my intention wasn’t for the nomenclature to be quite so literal. I used <span class="technical">.template</span> somewhat symbolically (because it’s indicative of the idea that the project isn’t a “working” project, per se), but mostly so that it would sit atop any svn directory listing (remember, my template isn’t in it’s own repository). </p>
<p>My checked out version actually lives in a directory named <span class="technical">svn_template</span> where I make the few changes that I want/need to make as my process evolves.</p>
<p>I’m a pretty simple guy and my motives often underscore that simplicity. :-)</p>
How I Use Subversion
tag:robwilkerson.org,2008-08-15:/id/46//comment_1892008-08-15T13:49:56-04:002008-08-15T13:49:56-04:00Chad KIefferhttp://2tbsp.com
<p>Hey Rob, I’m finally getting around to building my own project template. Why do you hide your project template directory, why name it .template. I realize that the template probably doesn’t change that often. Do you just not want to see it your project <br />
directory list?</p>
How I Use Subversion
tag:robwilkerson.org,2008-06-06:/id/46//comment_1612008-06-06T09:34:23-04:002008-06-06T09:34:23-04:00Benjamin Sterlinghttp://benjaminsterling.com
<p>Rob you are awesome; after I posted the comment last night a just thru caution to the wind and did exactly what you just said and it worked well. It is amazing what happens when you just do. I am using the on repository approach and I think that will fit my needs.</p>
<p>I’ve got everything set up in a /root/company/client/project structure (I do a lot of freelance work for a couple of clients hense the structure) and basically svn is a mirror of my test server and that seems to be working well. I will be working on a few projects today so I will see exactly how well it works as the day goes on.</p>
<p>Thanks for the help, I truly appreciate it.</p>
How I Use Subversion
tag:robwilkerson.org,2008-06-06:/id/46//comment_1602008-06-06T07:43:31-04:002008-06-06T07:43:31-04:00Rob Wilkersonhttp://robwilkerson.org
<p>Okay, that should be pretty simple. If I understand you correctly, you want to do <em>exactly</em> what I do, so I’ll lay out the steps I took/take:</p>
<ol>
<li>In some directory on your local machine, create a template directory. On my work machine (Windows), my path is <span class="technical">C:\Projects\.template</span>.</li>
<li>In that directory, create your top-level structure (/branches, /tags and /trunk). I’ve zipped up <a href="/_resources/hotlink/blog/svn_template.zip">my entire template structure</a> for your use, if you care to just unzip that into your new directory. Note that several directories contain empty text files that can be removed. They were added so that empty directories would be included in the zip file.</li>
<li>Import that directory structure to <span class="technical"><path to your repository>/.template</span>.</li>
<li>To create a real project, as you already stated, <span class="technical">svn cp -m “Creating initial project structure from template.” <path to your template directory> <path to your target directory></span>. The target directory should <em>not</em> exist before copying. Subversion will create it. If it already exists, you’ll get unexpected results.</li>
</ol>
<p>I should also state that for my purposes, I have one repository containing multiple projects. One of those “projects” is my template. If you’re trying to create a one-project-one-repository structure, this won’t work in exactly the same way.</p>
How I Use Subversion
tag:robwilkerson.org,2008-06-05:/id/46//comment_1592008-06-05T21:44:29-04:002008-06-05T21:44:29-04:00Benjamin Sterlinghttp://benjaminsterling.com
<p>Yeah, you answered the question and yes, this is on windows :(</p>
<p>I am just having a hard time visualizing everything I need to do/want to do. If you don’t mind me picking your brain a little more, I have a scenario that I want to achieve. I’ve been reading thru the svnbook and not getting a true picture of how to approach.</p>
<p>Basically I am already doing more or less the structure you have above minus the svn. And every thing is ran on my local machine and when a project is completed, I ftp it to where ever it is hosted. I would like to set things up so that when I create a new project I get the template you have, but not sure how to do that. Or am I being dense and it is as simple as creating the folders and doing svn cp trunk/ tags/ to move the files around?</p>
<p>Thanks for your feedback, it’s been a while since I’ve been this lost :)</p>
How I Use Subversion
tag:robwilkerson.org,2008-06-05:/id/46//comment_1582008-06-05T21:03:12-04:002008-06-05T21:03:12-04:00Rob Wilkersonhttp://robwilkerson.org
<p>Hey Ben – </p>
<p>You must be installing on Windows. Doing so on Linux is quite simple (although that may seem counterintuitive). :-)</p>
<p>Using my own (perhaps half-baked) terminology, /trunk is my “project root”. /trunk/html is my web root as you suggest. I checkout a copy of /trunk to my development environment. When development is complete, I <em>export</em> a copy of /trunk to my production environment. Since everything is just a copy, the code bases “co-exist” happily (mostly because they’re not co-existing at all).</p>
<p>From the way you’ve worded it, it sounds like you might be trying to point your web root directly to your trunk. If so, that’s not going to work. You really want to be running your production site against a snapshot created by an export.</p>
<p>I hope I understood your question correctly, but feel free to follow up if I didn’t.</p>
How I Use Subversion
tag:robwilkerson.org,2008-06-05:/id/46//comment_1562008-06-05T20:43:33-04:002008-06-05T20:43:33-04:00Benjamin Sterlinghttp://benjaminsterling.com
<p>Rob, I know this is an old post but I finally got subversion and trac installed on my pc, figuring out what version of what apps goes together was a pain.</p>
<p>Anyway, I’m trying to figure out how you are doing things, you say that the trunk/html is where the website resides. But when you set a site live and need to develop next version and are still working on the trunk, where is the live site residing? Ultimately we don’t people see our work in progress so I am assuming you do something to point to a branch, is this correct?</p>
<p>Thanks.</p>
How I Use Subversion
tag:robwilkerson.org,2008-04-14:/id/46//comment_1272008-04-14T10:44:21-04:002008-04-14T10:44:21-04:00Chad Kiefferhttp://2tbsp.com
<p>Of course! After a week or two of markup we’ll move onto <span class="caps">CSS</span>. He already has a project in mind. Should be fun for him, and me :)</p>
How I Use Subversion
tag:robwilkerson.org,2008-04-12:/id/46//comment_1222008-04-12T05:53:12-04:002008-04-12T05:53:12-04:00Rob Wilkersonhttp://robwilkerson.org
<p>Ha! Nothing like a good sweatshop joke to elicit a belly laugh at 5:45am. Hopefully you’re teaching him standards via <span class="caps">XHTML</span> or HTML5, though. And to separate his presentation from content.</p>
How I Use Subversion
tag:robwilkerson.org,2008-04-12:/id/46//comment_1212008-04-12T00:51:37-04:002008-04-12T00:51:37-04:00Chad Kiefferhttp://2tbsp.com
<p>Ya, I know. I’m starting to teach my oldest son <span class="caps">HTML</span>. A little child labor will do him good and free me up to write again :)</p>
How I Use Subversion
tag:robwilkerson.org,2008-04-11:/id/46//comment_1202008-04-11T18:35:39-04:002008-04-11T18:35:39-04:00Rob Wilkersonhttp://robwilkerson.org
<p>Quite right. My intent was to loosely document my end-to-end process, but that shouldn’t have been done at the expense of an appropriate focus on committing. The rest (branching, tagging, etc.) is useful to me in my own workflow, but utterly useless without a proper strategy for commits.</p>
<p>And, by the way, it’s about time you start writing again. :-)</p>
How I Use Subversion
tag:robwilkerson.org,2008-04-11:/id/46//comment_1192008-04-11T18:11:36-04:002008-04-11T18:11:36-04:00Chad Kiefferhttp://2tbsp.com
<p>Excellent article Rob. As a frontend developer/designer first, I can say that the points in your “Committing Changes” section are the points to stress to those new to source control. Committing in small increments, writing meaningful commit annotations, and committing only working code that’s been thoroughly tested is paramount to the source control process.</p>
<p>I hope to write a similar post focusing on my experience adapting to a source control workflow.</p>