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

Correcting an old branching error

From: Robin Cull <phaderunner_at_hotmail.com>
Date: Tue, 3 May 2011 12:39:04 +0000

Hi,

I'm quite new to SVN having previously used CVS many years ago.

I am working on a solo (thankfully) embedded C project which I am using to help me learn the ropes. I do not administer the server I am using, this is done by my workplace, but I do have my own repository space for the project. Several weeks ago, I branched my project so I could port it to a new hardware platform without messing up the main trunk. I now want to merge the branch back onto the trunk. It seems that I have made an error in the directory structure so now I cannot merge it back. I will try to explain in detail what I did. My repository looks like this,

ProjectName
ProjectName
> Module1
ProjectName
> Module2
ProjectName
> branches
ProjectName
> tags

The ModuleX directories contain a large hierarchy of files (source, IDE project and other binary files) and folders. I have eliminated these for brevity.

I realise now that the repository /should/ really look like this but please bear with me:

ProjectName

ProjectName
> trunk

ProjectName > trunk > Module1

ProjectName > trunk > Module2

ProjectName > branches
ProjectName
> tags

I took a branch of my project and used switch on my working copy so it still looked like this:

ProjectName

ProjectName
> Module1

ProjectName
> Module2

ProjectName
> branches

ProjectName
> tags

I have been working on this "branch" for several weeks and committing as I go. But rather than committing onto a branch I have really been committing into a
 subdirectory of the trunk of the main project which contains a
duplicate of the project as due to my mistake my repository actually looks like this:

ProjectName

ProjectName
> Module1
ProjectName

> Module2

ProjectName
> branches
ProjectName
> branches > NewPlatform > Module1

ProjectName
> branches > NewPlatform > Module2

ProjectName
> tags

When I try to merge the "branch" back onto the trunk I end up with two disparate versions of my modules, one in the ProjectName > ModuleX directory containing whatever it was before the branch, and a second in ProjectName
> branches > NewPlatform > ModuleX, containing what I have been working on over the last few weeks. What I really wanted were singular ProjectName > ModuleX directories which have the merged changes from what I was working on before and what I have been on most recently. It is important to note that the NewPlatform "branch" contains a different set of IDE project files etc. I would like to have the merged trunk to contain the superset of files required for each hardware platform.

How can I fix the repository structure so my branch is actually a branch and so I can merge in what I want to?

Thanks and best regards.
                                               
Received on 2011-05-03 14:39:37 CEST

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.