1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

svn - trunk in all the wrong places

Discussion in 'Off-Topic' started by dvl@, Jan 20, 2014.

  1. dvl@

    dvl@ Member Developer

    Messages:
    419
    Thanks Received:
    18
    Hi,

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

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


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

    Code:
    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?
     
  2. trh411

    trh411 New Member

    Messages:
    866
    Thanks Received:
    32
    It seems a structure like:
    Code:
    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.
     
  3. dpejesh

    dpejesh New Member

    Messages:
    70
    Thanks Received:
    1
  4. dvl@

    dvl@ Member Developer

    Messages:
    419
    Thanks Received:
    18
    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.
     
  5. dvl@

    dvl@ Member Developer

    Messages:
    419
    Thanks Received:
    18
    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