Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to branch code to another repository for SVN?

We have two repositories, one for current code and one for project management.

Now we need to branch code to the project management repository.

SVN gives me an error, and I found in the documentation that SVN cannot do this work (different repository),

So I export the code and check in to the project repository.

The questions:

  • how to branch code to another repository?
  • for my case, how can I move the changes back from the project repository to the current repository? (I haven't test it yet, but I think a diff or patch may work)

PS: I know there is a trunk/branch way, but we use two repositories.

like image 921
linjunhalida Avatar asked Dec 23 '22 12:12

linjunhalida


2 Answers

If I got it right you want to add contents already under version control from a repository to another ? If that's it you should probably have a look on svnsync which helps you merging different repositories.

Otherwise it may be simpler to keep the two repositories and add external definitions (links) to make them coexist. This way you won't have to bother to much about breaking anything.

like image 137
Theo.T Avatar answered Jan 02 '23 17:01

Theo.T


TortoiseSVN offers a "copy and add these files here" feature, but as of SVN 1.5.5, this feature was not supported. I have not yet tested it with 1.6.0

right-drag (not a normal left-drag) your files from repo A into a directory within repo B and release the mouse. A menu will appear asking what you want to do. There are, I think, 4 options to choose from (other than the normal OS options). Choose the one that is most appropriate.

like image 42
KOGI Avatar answered Jan 02 '23 17:01

KOGI