[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Creating Branch of a mixed Revision WC without local Changes

From: Benjamin Adlung <BAdlung_at_gmx.de>
Date: 2007-05-31 12:02:35 CEST

The Problem
Creating a Branch of a mixed Revision WC without all local changes which
already saved to the WC. The local changes will be commited later to
create the Changeset. The Branch should follow the common Branching-Patters.

This Post will show my thoughts, solutions about the Problem and the
conclusion, that the powerfull svn copy command needs an upgrade. If
there is anything that ist wrong in my thoughs and i just did NOT see
the right way, please be kindly to me ;-)

Recapitulation of common Branching-Patterns:
The common way to make a branch is just to copy the Revision you want to
work on. If you already have lokal Modifications just copy the URL ->
URL with the Revision of your WC. The main Problem is, that you maybe
see to late that you need a Branch in the first case this is not bad but
what is if you work with mixed Revisions?
Usually you will create a branch if you working with mixed Revisions,
cause your not able to commit changes with older Revisions, but what
happens if you just thought "i only want to do one or two tests"? You
don't make a Branch! After the tests you noticed, that a Branch would be
nice. And now we have the Problem:
How can i make a Branch of a mixed Revision WC without the local Changes
that already saved?

- If you make a Branch of the WC you got the lokal changes, so there is
no former Revision which you can diff. No diff - no merge. But i want
the Changeset!
- If you create a Branch with any Revision you got the wrong Changeset.

I thought of 2 Solution, that NOT satisfy me:
Option A)
1. copy (normal) the WC with local Changes into a different Directory
2. revert all changes, create a Branch of the WC
3. copy (force) back the copy with the local Changes, switch and commit
to the branch

Option B)
1. copy mixed Revision WC with local Changes to a 'Second Branch'
2. revert all local changes and copy the mixed Revision WC to a 'First
3. now switch to the 'Second Branch' and make additional Changes as required
4. to merge Changes made, just do:
svn merge firstbranch secondbranch

Option A is not really fast and proper. As bigger the WC as longer the
time needed to do this. It seems not proper to manipulate the WC in such
a way. The good is, that we will have a structure in the Repository that
looks like a common Branching-Pattern.
Option B will be fast and proper in the case of the WC. But what we
create in the Repository is a mess. It does NOT look like a common
Branching-Pattern. We create a 'First Branch' which refer to the
original mixed Revisions, and these are connected to the 'Second Branch'
where in the start Revision are already Changes commited.

Another Thought i had was to copy just the BASE of the WC. But to bad
the Revision Keywords for WC Items do NOT work with the copy command.
But if they would work the Problem will be solved simple and proper with
1. svn copy WC@BASE URL
OR svn copy -r BASE WC URL
2. switch to the Branch with the local Changes
3. commit the first Changset in the Branch

As i said, maybe i not see the wood for the trees...
Yours faithfully
Benjamin Adlung

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu May 31 12:03:52 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.