svn - trunk in all the wrong places

Have some non-FreeBSD related questions, or want just to chit-chat about anything that is not related to FreeBSD? This is the forum for you. Note: this is NOT a forum for technical questions about non-FreeBSD operating systems!

svn - trunk in all the wrong places

Postby dvl@ » 20 Jan 2014, 15:58

Hi,

I converted a cvs repo to svn a few months back. It looks like this

Code: Select all
project
  www
    branches
    tag
    trunk
  config
    branches
    tag
    trunk
...etc


The problem? Checking out the repo is a multi-step process.

Code: Select all
svn co project/www/trunk
svn co project/config/trunk


What I want to do is:

svn co project/trunk

I'm thinking about svn merge and maybe svn cp. Preserving history is a good thing.

I could create a new project, and then svn cp the above.

NOTE: there are no branches which need to be preserved.



Ideas? Suggestions? Any suggestions as to how to get to that point?
Last edited by wblock@ on 20 Jan 2014, 16:05, edited 1 time in total.
Reason: tags, please read http://forums.freebsd.org/showthread.php?t=8816
User avatar
dvl@
 
Posts: 411
Joined: 16 Nov 2008, 20:22
Location: Near Philadelphia PA, USA

Re: svn - trunk in all the wrong places

Postby trh411 » 22 Jan 2014, 17:57

It seems a structure like:
Code: Select all
projects
    project1
        trunk
            config
            www
        branches
        tags
    project2
        etc.

would better suite your needs. With this structure you could easily checkout project1/trunk and get all the code associated with that project in a single working copy, which I think is what you want.

You can easily restructure your existing repository using the svn mkdir. svn mv, and svn delete commands. Or as an alternative, you could create a whole new projects-new with the correct structure and move your existing stuff accordingly, and then just rename it when you're done.
User avatar
trh411
Member
 
Posts: 866
Joined: 17 Dec 2012, 20:49
Location: Valley of Death

Re: svn - trunk in all the wrong places

Postby dpejesh » 22 Jan 2014, 18:06

Have a look at http://svnbook.red-bean.com/en/1.7/svn.advanced.externals.html. It might suit your needs depending on how your projects are setup. In short, you could setup an external in your www project which will automatically checkout your config project into it.
dpejesh
Junior Member
 
Posts: 68
Joined: 20 Jan 2014, 21:51

Re: svn - trunk in all the wrong places

Postby dvl@ » 23 Jan 2014, 22:50

I have used external before, but someone else had set them. I was able to figure out how to do that with this URL: http://beerpla.net/2009/06/20/how-to-pr ... mand-line/ (I had searched for: defining svn externals

I'll see how this goes. I have some work backlogged, so I should get to this soon.
User avatar
dvl@
 
Posts: 411
Joined: 16 Nov 2008, 20:22
Location: Near Philadelphia PA, USA

Re: svn - trunk in all the wrong places

Postby dvl@ » 24 Jan 2014, 00:05

Initial impressions:

- you have to be in the external dir to do a commit (that is, you can't just commit everything in one go)
- that can mean several cd dir; svn ci; cd ../dir2; svn ci
User avatar
dvl@
 
Posts: 411
Joined: 16 Nov 2008, 20:22
Location: Near Philadelphia PA, USA


Return to Off-Topic

Who is online

Users browsing this forum: No registered users and 2 guests