[GLLUG] More Subversion

Clay Dowling clay at lazarusid.com
Mon Feb 4 15:16:30 EST 2008


Okay, the way subversion is normally used day to day varies a little
depending on what you are doing and on your site policies.


** Starting a new project **

I check out the source code from the repository.  This sets up all of the
magic subversion dust that marks my local folder as a subversion checkout.

For example, if I am starting my bulkloader project, I would create a
folder "bulkloader" under "My Documents".  Then I would right click on
that folder, choose "checkout" and check out the following URL:

http://mark.lazarusid.com/svn/bulkloader/trunk

That gets me the main development trunk in my bulkloader folder.

If I have just started the project probably I don't actually get any
source code files, just the magic subversion dust for the folder.

I then create the initial files for my project, which might be design
documents in a subfolder, or might be a couple of header files to define
my interfaces.

When I'm happy with this files, I right click on them (or on whole
folders) and choose Add from the tortoise SVN context menu.  A little
magic happens behind the scenes, and in my explorer window they pick up
the blue plus sign that indicates a file is marked for adding.  BTW, don't
get hung up on the tortoise icons in explorer.  Sometimes they don't
update right away, but subversion actually handles everything right.

Once I'm done with the files, or done for now, I right click on the whole
folder (or maybe just on specific files, if I'm not done with everything)
and choose "Commit".  A dialog pops up asking me for a comment about what
I did (initial creation).  I fill it in, check OK, and the changed bits of
the files are sent off to the server.

In my case I also have my subversion repository tied to a CVSTrac bug
tracking database.  Chances are really good that the file I created was
covered by a specific ticket in the database (if it wasn't, it probably
should have been), so in my comment would include "for #3" assuming that I
was doing this for ticket number 3.  The magic incantation for your bug
tracker will vary, but you want to tie checkins to tickets whenever you
can.  Now when I look at ticket #3 I will also see a link to this checkin,
including the comments and a diff showing me specific changes for this
file.


** On a Normal Day **

I right click on the project folder that I'll be working in and choose
"SVN Update".  I get everybody's changes from the previous day.  When I've
completed my changes, either because I've fixed the bug or implmented the
feature, or it's just time for everyone to be able to see my changes, I
commit my changes.  Do that by right clicking on the folder with your
changes and choosing "SVN Commit".  You'll be asked for a comment just
like before, and all the same rules apply.

Sometimes, if somebody has made a big change that affects other people,
it's good to send word around so that people can update their local copies
with your changes.


As for all the branching and merging of software, don't sweat it too much.
 It's important and properly used will make your life a lot easier.  But
you don't do it every day.  Typically only when you release your software.

Clay
-- 
Lazarus Registration
http://www.lazarusid.com/registration.shtml



More information about the linux-user mailing list