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

RE: RE: Subversion's repositories

From: <Chris.Fouts_at_qimonda.com>
Date: 2006-12-05 15:42:34 CET

In a normal development environment, trunk and branch dev/v1 (or any branch) are "parallel" development cycles, meaning, new code may be submitted to both in parallel. So once the trunk changes, it's no longer in "sync" with the branch. Conversely, once the branch changes, it's no longer in sync with the trunk. Ok so far?
 
Even if the trunk does NOT change in parallel, that is, if ALL development is done on dev branch, one will still have to create tags on BOTH trunk and branch since they signify the last the time the branch was merge with trunk (trunk tag), and the last time trunk was merged with branch (branch tag)
 
To resync the branch with the trunk, one would have to "svn merge" the "delta" between the trunk and branch, which is, the code from branch-pont to HEAD. In SVN terms this means
> cd to branch sandbox (important step!!!)
> svn merge //svn_root/project1/tags/trunk-to-dev_v1 //svn_root/project1/trunk
> (resolve conflicts)
> svn commit
Now the branch is in sync with the trunk. For future merges, one will have to move the trunk tag.
> svn del //svn_root/project1/tags/trunk-to-dev_v1
> svn cp //svn_root/project1/tr //svn_root/project1/tags/trunk-to-dev_v1
 
Now to resync the trunk with the branch, the converse operation from above, one would need to "svn merge" the "delta" between branch and trunk, which is, the last time the branch was in sync with trunk to latest branch code. In SVN terms this means
> cd to trunk sandbox (important step!!!)
> svn merge //svn_root/project1/tags/dev_v1-to-trunk //svn_root/project1/branches/dev/v1
> (resolve conflicts)
> svn commit
Now the trunk is in sync with the branch. For future merges, one will have to move the branch tag.
> svn del //svn_root/project1/tags/dev_v1-to-trunk
> svn cp //svn_root/project1/branches/dev/v1 //svn_root/project1/tags/dev_v1-to-trunk
 
Clear as mud?

________________________________

        From: Ignacio Gonzalez T. [mailto:igtorque@eliop.es]
        Sent: Tuesday, December 05, 2006 3:01 AM
        To: users@subversion.tigris.org
        Subject: RE: Subversion's repositories
        
        
        Just a question for Chris, from a green subversioner:
        
        
        Why do you fell necessary to tag trunk-to-dev_v1 AND dev_v1-to-trunk? How does it make it easier to merge between dev_v1 and trunk?
        
        
        Regards,
        
        
        Ignacio González
        
        
        --------------------------------------------------
        El 4 Dec 2006 a las 16:28, Chris.Fouts@qimonda.com escribió:
        
        
        Date sent: Mon, 4 Dec 2006 16:28:57 +0100
        From: <Chris.Fouts@qimonda.com>
        To: <users@subversion.tigris.org>
        Subject: RE: Subversion's repositories
        
        
        
        
        I have a couple of suggestions.
        
        First off, set your repository structure "outside" of Subversion, and then "svn import" it. With this approach, adding and deleting dirs/files is easier since you do NOT have to deal with Subversion yet.
        
        Second, there are 1001 different ways to do the dir structure, but I suggest the following; I'm assuming that priject1, project2, are NOT related
        
        
        svn_root
          project1
             trunk
               web
               job
            branches
               dev
                  v1
                     web
                     job
                   v2
                     web
                     job
                qa
                  v1
                     web
                     job
                   v2
                     web
                     job
            tags
         project2
             (same fundamental structure as for project1)
        
        I'm ONLY suggesting the structure because this facilitates "logical" branching
        and tagging. For example, for branching
        - You set up your trunk structure first
        - Then you "svn copy" your trunk structure to your branch structure
> svn mkdir //svn_root/project1/branches/dev
> svn mkdir //svn_root/project1/branches/qa
> svn cp //svn_root/project1/trunk //svn_root/project1/branches/dev/v1
> svn cp //svn_root/project1/trunk //svn_root/project1/branches/qa/v1
        - Create tags to facilitate merging between trunks and branches, both
          on the trunk and the branches, as soon as you create the branches
> svn cp //svn_root/project1/trunk //svn_root/project1/tags/trunk-to-dev_v1
> svn cp //svn_root/project1/branches/dev/v1 //svn_root/project1/tags/dev_v1-to- trunk
> (similar for qa branch)
        
        Like I said, this is just "a" way to do it, and not necessarily "the" way.
        
        
________________________________

        From: T. Nguyen [mailto:ptn_y2k1@yahoo.com]
        Sent: Sunday, December 03, 2006 12:40 AM
        To: users@subversion.tigris.org
        Subject: Subversion's repositories
        Hi,
        
        I am setting up a Subversion server. As I read several books and searched on the internet, I have not seen any complicated repository structure as my workplace requested. Please see the following structure:
        
        svn_root
               dev
                       project1_root
                                project1_web
                                         project1_web_v1
                                                          trunk
                                                          tags
                                                         branches
                                          project1_web_v2
                                                         (trunk, tags, branches)
                                project1_jobs
                                         project1_jobs_v1
                                                         (trunk, tags, branches)
                                         project1_jobs_v2
                                                         (trunk, tags, branches)
                       project2_root
                                .....
                                         .......
                                .......
                                         ........
                       project3_root
               qa
                     ................(same structure as dev)
        
        Here are my questions that I need your helps.
        
        1. Is it possible to have that kind of structure in Subversion? If yes, is it a good or bad structure? And is it easy to maintain later? If no, please give me your advise what I should do?
        2. If it's possible, which level should I use 'svnadmin create' and which level should I use 'svn mkdir'?
        
        I am looking forward to receiving your response. Thank you very much.
        
        Regards,
        Tracy
        
        
________________________________
Received on Tue Dec 5 15:43:30 2006

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.