0

Unfortunately, the answer to this question isn't quite as simple as it sounds... but I hope it can still be relatively simple. Please read all the way through before telling me that the answer is: "svnadmin create... duh"

I'm working for a company that set up their SVN server in an odd way (at least in terms of what I'm used to). We've all been there, right?

Rather than giving each project a separate repository... they have a folder on the server called "/var/www/svn/repos/" which is the actual SVN repo (has conf/, db/, README.txt, etc. in it). Then they distinguish their projects by adding top level folders into the ONE repository (ex: Project1, Project2, etc.)

I don't like this setup and might one day get around to converting the setup to what I'm used to, where each project is its own repository (with separate logs, dbs, etc.)

But my question is this: What is the best way to add a new empty project to the current setup? Is there anyway to add a new top level folder/project to the repo through use of svnadmin? It can/should just be an empty folder that I'll start building a new project in.

I know that I could do this by checking out the whole singular repository and then adding a new top level folder into my local checkout, then re-committing. But I'd really prefer not to do this because someone has created folders/projects that are just GBs of log data... and I don't want to wait through the download of this just to add a single empty folder.

Let me know if there is any more info you'd need to know. I do have root/sudo access on the server in question.

Thanks in advance for your help!

Dave

EDIT: The way that SVN is used at this company, no one checks out the full repo... they just check out the folder/project they are interested in. So I don't have a local checkout available anywhere that goes "high" enough in the SVN repo directory structure to just run a "svn mkdir" command.

1 Answers1

0

Well, this is actually a common practice. To create a new project path, just use the Subversion client of choice to create a new path at the same level with the rest of the projects with the name of the new project.

Jeremy Whitlock
  • 3,808
  • 26
  • 16
  • Just to explain, if your repo is at http://hostname/svn, you'd probably do something like "svn mkdir http://hostname/svn/new_project -m 'Creating the new project location.'". – Jeremy Whitlock Feb 22 '11 at 23:23
  • hmm... perhaps I'm misunderstanding... I'm getting an error when trying something like this because hostname/svn (or /var/www/svn/repos/ in my situation) isn't a "working copy"... which makes sense, it's not, it's the actual repository (with conf, db, etc.) on the server – Dave Masselink Feb 23 '11 at 00:01
  • It would be great to see the command(s) and error(s) being output. What is the base url of your repository as well? – Jeremy Whitlock Feb 23 '11 at 00:15
  • I was wrong... I was trying to do this on the server side, directly to the repo. It worked exactly as advertised once I tried from another machine as a client. I hadn't found any indication online elsewhere that "svn mkdir" would work if you weren't in a working copy and passed it a location in a repo that doesn't yet exists. But I guess this functionality makes more sense, the more I think about it. Thank you! – Dave Masselink Feb 23 '11 at 00:49
  • If you don't mind my asking, why would someone prefer this sort of monolithic repository and folder per project setup vs. the repository per project setup I'm more used to? In this setup, I get confused by commit logs and commit numbers that are completely un-related to the project I'm working on (they relate to other projects that happen to be in the repo). – Dave Masselink Feb 23 '11 at 00:52