Hi,
Could someone please help me to understand how the issues outline below
can be resolved in Subversion.
I am currently evaluating Subversion as our corporate source code
repository. We have a large number of projects and about 20 development
staff.
I have read and understood "Version Control with Subversion for
Subversion 1.1 (book compiled from Revision 1337) by Ben
Collins-Sussman, Brian W.Fitzpatrick and C.Michael Pilato".
I am particularly interested in the branching and merging capability in
Subversion.
I will outline 3 scenarios below that were not covered in the "Common
Use-Cases" section and I would much appreciate if you could suggest how
the following problem could be overcome using Subversion.
Outline
---------
repos/calc/trunk
integer.c
button.c
Makefile
Step 1.
--------
I take a copy at revision 341 from trunk
repos/calc/branches/my-calc-branch
Step 2.
--------
I modify integer.c on my-calc-branch to create revision 342
Sally modifies button.c on the trunk to create revision 343
Scenario 1
------------
One week later I find that I need the changes Sally has made.
Problem: 1
How do I get the changes in button.c into my branch.
Would this copy still be a cheap copy. ?? Should I use svn merge
or svn update. (I
would think svn update).
svn update http::/svn.example.com/repos/calc/trunk button.c
After update
integer.c : 342
button.c : 343
Makefile : 341
Scenario 2.
-------------
On the second week Sally fixes a bug in integer.c.on the trunk to create
revision 344.
Problem: 2
How do I get this change into my branch. (needs merging into my
branch
incorporating my changes). Or should I do a svn update ?
Is it :-
cd calc/branches/my-calc-branch
svn merge -r 341:344 http::/svn.example.com/repos/calc/trunk
or
svn update http::/svn.example.com/repos/calc/trunk integer.c
This version ( I take it ) will be 345 once I commit it to my
branch.
Scenario 3
-------------
2 weeks down the track Sally is still continuing to work on other bug
fixes to integer.c on the trunk and I was enhancing the functionality on
integer.c.
integer.c is now at revision 380.
Problem 3
How do I merge my change into the trunk. Which revision do I use?
Is it 345
cd calc/trunk
svn merge -r 345:380
http::/svn.example.com/repos/calc/branches/my-calc-branch
If it is 345 then would it ignore the first lot of changes Sally
did (344). But carry
into the trunk the changes I did in 342.
Problem 4
What if I was slack and did not commit the changes from Problem 2
above
immediately. My local copy revision will be 342. If I had done a
svn
update then would it be 344.
Either way if I were to check in integer.c into my branch, it will
be at revision
381.
How do I do the Merge into trunk. ie what revision number should I
use.
cd calc/trunk
svn merge -r 381:380
http::/svn.example.com/repos/calc/branches/my-calc-branch
Any assistance in this matter will be very much appreciated.
Thanks
Lakshman
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Dec 8 12:22:19 2005