tags:

views:

51

answers:

2
+1  Q: 

Subversion Help?

I have a project that I've checked into my SVN repo. Now I've created a second version of the project located in a different folder. I want to check this folder in as well, without interfering with the original project. Looking at my repo, it doesn't look as though I have the typical trunk/branches/tags folders, for whatever reason. So,

  1. How do I move the original project into a subfolder, like trunk?
  2. How can I create a folder for, and check all the v2 files into a new folder like branches/v2
  3. When I want v2 to replace the trunk completely, how can I do that?

SVN has caused me all sorts of nightmares in the past, so I want to make sure I do this correctly.

+1  A: 

You have to make the trunk/branches/tags folders yourself.

  1. svn mv original trunk (where original is your original code folder, you might have multiple files).
  2. Just create this new folder in your original checkout, and move the v2 files into it. Add them using svn add.
  3. Read about joining branches in the SVN book (or somewhere else) and join the v2 branch into trunk.
muksie
The two projects are in two completely different folders in the file system; they don't mimic the SVN structure and it's necessary to have it this way because of the way apache is set up. Can't I create folders in the repo, without moving my actual files around?
Mark
@Mark: To move things in the repository, just provide svn mv with urls instead of filenames.
R. Bemrose
+1  A: 

How do I move the original project into a subfolder, like trunk?

  1. Check out the first repository to my_rep
  2. Create trunk, branches, tags sub folders in my_rep
  3. Copy files from my_rep to my_rep/trunk manually
  4. Delete files in my_rep (using svn delete!)
  5. Commit changes in my_rep - Now you have trunk

How can I create a folder for, and check all the v2 files into a new folder like branches/v2?

  1. Checkout the second repository to my_rep2
  2. Create folder my_rep/branches/v2 and copy manually files from my_rep2 there
  3. Commit my_rep - Now you have one branch in my_rep

When I want v2 to replace the trunk completely, how can I do that?

You need to merge my_rep/branches/v2 to my_rep/trunk using any diff tool.

Pmod