Link to home
Start Free TrialLog in
Avatar of theGhost_k8
theGhost_k8Flag for India

asked on

subversion merging two different repository in to one tag:

I've got two completely different repositories.Both have different contents.

svn://url.proj.com/home/cvs/REPO1
svn://url.proj.com/home/cvs/REPO2

REPO1
  |
  |______ trunk
  |
  |_______ branches
           |
           |________D
           |________E
           |________F



REPO2
  |
  |______ trunk
  |
  |_______ branches
           |
           |________A
           |________B
           |________C



Is there any way we can combine branches of these into a single tag?

REPO2
  |
  |_______tags
          |________mixedBD

Is there any other way possible? If not suggest me something similar!
Avatar of sunnycoder
sunnycoder
Flag of India image

A source control tool can tag something that exists in a repository ... If some code is not part of the repository, the tool cannot tag it.

The obvious way is to add the code of one repository in another and then tag it


REPO1
  |
  |______ trunk
  |
  |_______ branches
  |        |
  |        |________D
  |        |________E
  |        |________F
  |
  |____REPO2    >> add all repo2 code here and then tag them.

What exactly are you trying to achieve? There might be a better way to fulfill your real requirements.
Avatar of theGhost_k8

ASKER

I'm thinking of something like:-

Repo1 is dynamic code repository - which all devs can access.
Repo2 is static data files. lets say images, videos category wise branched.

Repo1 extracted to all development machines but to avoid replication on dev server I'm thinking of crating Repo2 for those static data.

REPO2
   |
   |____Static1
   |____Static2
   |____Static3

Idea is to create a merged tag of required static1/2/3 with the code repository[REPO1] branch[D/E/F]

Hence i'm trying to think something like :

REPO2-------->>
|
|__S1 --------------
|__S2 --------------
|__S3 ----->---static data branch----------
                   |
                    |----->> TAG From S3 and A branches required to be co/sw....
                   |
 __A ------>----code branch------------
|__B ---------------
|__C ---------------
|
|
REPO1-------->>

And so on...

Also suggest how you could achieve this in whatever structure you've suggested?
You can have both of them in a single repository

/main/media/      -->> this is where all your static data goes. You can use a more suitable directory name
/main/media/videos
/main/media/images
/main/media/presentations


/main/src     --->> this is where all your dev source code goes.

/branches    -->> all your branches go here
/tags            -->> all your tags go here

Your dev folks can check out /main/src and create a soft link to a single checkout of /main/media which would be managed by you (or the server admin).

Tagging the source now becomes trivial, just copy the /main folder at the desired revision number
couldn't understand that clearly.
Wat i've thought is:
svn://url.proj.com/home/cvs/REPO1
svn://url.proj.com/home/cvs/REPO2

nd what you've suggested is:
svn://url.proj.com/home/cvs/REPO1
svn://url.proj.com/home/cvs/REPO1/REPO2

so, ultimately it will be:
REPO1
  |
  |______ trunk
  |
  |_______ branches
  |        |
  |        |________D
  |        |________E
  |        |________F
  |
  |____REPO2  
               |
               |____branches
                         |_____X
                         |_____Y

 

So how will you merge X and D ? I'd appreciate if you do write commands.
REPO
  |
  |_______REPO1
  |                |
  |                |______ trunk
  |                |
  |                |_______ branches
  |                |
  |                |________D
  |                |________E
  |                |________F
  |
  |________REPO2  
  |                   |
  |                   |____branches
  |                   |_____X
  |                   |_____Y
  |
  |________TAGS
  |                  |
  |                  |______VER1
  |
  |________STAGING_AREA

cd REPO/STAGING_AREA
svn co -r R1 REPO/REPO1/trunk
svn co -r R2 REPO/REPO2/trunk
cd ..
svn copy STAGING_AREA REPO/TAGS/VER1

Note that:
- Your STAGING_AREA can be your working copy.
- You can use different revision numbers of REPO1 and REPO2 and even files/directories within them by using svn update -r command
sorry, couldn't manage to reply in time...!! but lets continue...
I understood these two repo. structure....ur diagrammatic representation....
so i will do something like:-
1.  check out static data @ shared place which is accessible to all users:
cd STATIC_DIR << [SHARED LOCATION for static data]
svn co -r R2 REPO/REPO2/trunk << static data

2.  check out code repository to coder's directory:
cd <CODERS WORKING COPY>
svn co -r R1 REPO/REPO1/trunk

3. create a softlink to static-dir path to access static data - removes duplication:

ln -s /path/to/static/data STATIC_DIR << [SHARED LOCATION for static data]

Now, after commiting all changes to REPO2 => coder's branch, how can i create a mixed tag from both of the repo. locations?

>3. create a softlink to static-dir path to access static data - removes duplication:

you can create the softlink as part of repository and svn will handle it for you. You dont have to set up a link per user (assuming that you are using *nix)

>Now, after commiting all changes to REPO2 => coder's branch, how can i create a mixed tag from both of the repo. locations?

As I said in the previous post ...

cd REPO/STAGING_AREA
svn co -r R1 REPO/REPO1/trunk
svn co -r R2 REPO/REPO2/trunk
cd ..
svn copy STAGING_AREA REPO/TAGS/VER1
yes I have ubuntu.
I thought we need to do a merge from their tags !
For eg.
We have tagged STATIC_DATA with iv_set1 ,iv_set2.
and Code tags: tag1,tag2.
At perticular time if i required to send only one static-data set with respective code set, I must check out that  tag to STAGING_AREA.
What if we can directly be able to merge two tags from both the REPOs? Is that possible?
ASKER CERTIFIED SOLUTION
Avatar of sunnycoder
sunnycoder
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Was some part of your question unanswered? Was there some further information that you desired?
I tried on my own and also tried to follow your suggestions.
The idea was dropped due to time restrictions long back.
The question was open since long and i was just clearing up.
>I tried on my own and also tried to follow your suggestions.
Were there any issues that you faced?
Hi, again late !! Its a pretty old question and I'vent documented that tries..
I tried out with creating different repositories from creating separate branches.. May be lack of knowledge made me fail all the time!!
What by latest i remember is i separated images repository and gave up on ideas as managing STAGGING area will take too much of time as the repository increases !!

**After so long when I gave a thought again on present scenario - I'm again happened to see a problem and hence the question:

https://www.experts-exchange.com/questions/24327586/Copy-part-of-repository-for-switch.html