D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] real life use of SVN

 

On Mon, Jan 26, 2009 at 3:26 PM, John Clarke <gototheant@xxxxxxxxx> wrote:

> JC Question 1>: Step number 5 troubles me - why can this branch NOT be
> merged back into the trunk (and deleted) once a release has been taken
> and rolled out? (I know it could be done, but just need to know why
> they suggest keeping the branch hanging around for so long).
> The problem I see is that after a while I could have loads of branches
> lying around that if I find a bug somewhere in the trunk later on - I
> have to merge it back to all the branches that exist ? (whether  they
> are "active in production" branches or branches like this that are for
> release purposes.
>

It is very very useful to have a hard record of exactly what source
code made a release. You may just need to reference it, but may be in
6 months time, trunk has wondered off into new incompatable features
and you find a security issue with your previous release. You may want
to just patch the security up on that release and add no new features.
Which you can do very easily as you have a fixed reference of that
release and the exact code used.

In many cases you may not ever work on the branch again, it is just a
historical reference point and the advantage of the branch over the
tag is just in case you ever need to do something on it again. or may
be fork something off in a different direction.

If you are maintaining a release and you find a bug later on then yes
you will need to also patch any branches that are under maintenance
and then release again on that code base. Of cause if that branch is
now obsolete then there is no point porting the bug fix back to this
branch. You only need to do that if you need to keep updating releases
based on that branch.


> JC Question 2>: How can I do a rollout of code to my website from SVN?
> Currently I work on a subset of files that need changing, say 3 files.
> I then package them into a tar ball, fire it against the live system (
> after testing etc and making a roll back tar ball etc.)
> But using SVN I do not see how I can get individual files for a
> rollout ? say, some files are at different version numbers than others
> that I need to rollout. So how can I be sure that I have the files at
> the version numbers I need in my package to rollout ?
> I am sure I have missed something with the above but if you can point
> me inthe right direction I woul dbe most grateful.
> Please correct me (constructively) here if I am wrong.
>

Well you can checkout the files at any given SVN commit revision, or a
date/time format. every time you commit the revision is incremented so
you may want to check out r965 for example.

If you look at this svn browser
http://svn.secondlife.com/trac/linden/browser you will see trunk is at
1696, so if you checkout r1696 you get everything as it was when the
last file checked in caused the repository to bump version to 1696. If
you look inside the trunk folder you will see different revisions
against each of those file. That does not matter they are all inside
trunk at revision r1696, that just shows you at what revision that
folder/file was last updated. The total repository is at r1696 even
though libraries is only at r714

Hope this helps a little

Robin

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html