After an hour or so of reading tutorials and trawling Google I'm still stuck
on something.
Suppose I want to call my current software tree "v1", and create a copy to
become "v2". The software is a PHP web library and basically the purpose of v2
is to start removing all the old PHP3/PHP4 compatibility code, and tidy things
up, thus breaking backwards compatibility.
I think I start with something like:
svn copy -m "v2" <svnrepo> <svnrepo>/tags/v1
svn copy -m "v2" <svnrepo> <svnrepo>/tags/v2
My current code is already in a directory ~/mylib/v1, and I want to keep that
as it is (several apps on the server are using it), and checkout v2 directory
~/mylib/v2; new apps will start to use that version.
So far so good. Where I'm stuck is how to make sure that ~/mylib/v1 stays on
the v1 branch so I can continue to fix bugs and add features (unlikely but
possible) to it if I need to, and ~/mylib/v2 similarly stays on the v2 branch.
Both will have regular commits to their respective branches, and I may want to
merge fixes from v1 into v2 (and vice versa). In other words v1 will become
v1.0.1, v1.0.2, ... and v2 will independently become v2.0.1, v2.0.2, ...
whilst sharing common history and allowing me to migrate some changes between
branches.
I think all I need to do is make sure in each directory I switch to the right
branch and then any commits/copys will apply to that branch only, but
everything I've read talks in terms of the branch being temporary while a new
feature is added, rather than permanent with the intention of maintaining v1
and v2 as separate versions going forward (and no doubt spawning v3 from v2 at
some point down the line).
Before I go too far I just want to be sure I'm on the right track.
--
Mark Rogers // More Solutions Ltd (Peterborough Office) // 0844 251 1450
Registered in England (0456 0902) @ 13 Clarke Rd, Milton Keynes, MK1 1LG