Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Recommended project structure

 
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have read in the free book that the recommended structure of a project is
/project1/branches
/project1/tags
/project1/trunk

I have expected that this must be applyed to all projects going to the same repository, but it seems I was wrong (I got an error on duplicate paths).

Pls enlighten me: when I have 2 different projects in the repo, should i have for each of them branches and tags directories? The main project directory should finally be named as the project, ain't it?

tia
--
./pope
[the_mindstorm]
 
Craig Demyanovich
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The recommendation in the SVN book goes something like this for a single-project repository:



and something like this for a multi-project repository:



Note that other nesting approaches are possible. See the "Choosing a Repository Layout" in Chapter 5 "Repository Administration" of the SVN book for details.

Craig
[ January 21, 2005: Message edited by: Craig Demyanovich ]
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the info is not correct. I have tried exactly the same but got the duplicate path error. I guess the project name is a record in one table and the subdirs are records in another table, and so resulting in a duplicate path error.


Update: i have rechecked the documentation and the info is correct. However I do not understand what was the error I got (subversion 1.1.3 on win xp machine, direct access).

--
./pope
[the_mindstorm]
[ January 21, 2005: Message edited by: Ali Pope ]
 
Craig Demyanovich
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't had any problems with the multi-project repository layout example that I showed. It was hosted on a Fedora Core 2 (Red Hat linux) server, and it was accessed via the svn+ssh (svnsever + SSH tunneling) protocol via the Windows command-line client and TortoiseSVN.

Craig
[ January 21, 2005: Message edited by: Craig Demyanovich ]
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for not trusting you. I have double checked the doc and you seem very right. I will do it again on my machine and afterwards I will update this.


--
./pope
[the_mindstorm]

[created response: January 21, 2005: Message edited by: Ali Pope ]
[ January 21, 2005: Message edited by: Ali Pope ]
 
Craig Demyanovich
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, let's not worry very much, if at all, about trust here. We should check answers against documentation and our own experiences. When all doesn't agree, we double-check our sources, try again and ask questions until we succeed. This is how JavaRanch has worked for me, and I think it's what makes JavaRanch such a great place for learning!

Best of luck,
Craig
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
wierd. Not working.

Initial directory structure:
C:\tmp\proj1\branches
C:\tmp\proj1\tags
C:\tmp\proj1\trunk\docs

command: svn import C:\tmp\proj1 file:///D:/reporoot -m"import1"
success

C:\tmp\proj2\branches
C:\tmp\proj2\tags
C:\tmp\proj2\trunk\src

command: svn import C:\tmp\proj2 file:///D:/reporoot -m"import2"
svn: File already exists: filesystem 'D:/vcs/svnrepositories/repo0001/db', transaction '2' , path 'trunk'
 
Craig Demyanovich
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could the errors have anything to do with the approach that you wrote about in the thread on multi-project repositories?

After importing one project, try this command:

svnlook tree <path-to-repository>

It will show you the structure of the projects in your repository.

Based on your command, I expect it will show

You'll need to do an import like this:

svn import c:\tmp <path-to-repository> -m "import project1"

So you won't want to have anything else in c:\tmp other than your project1 folder (and below that, of course, you'll have trunk, branches and tags).

Hope that helps,
Craig
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not related to that thread. Working an a clean solution. But you are right: the repo is broken, because the command was wrong :-). Evidently an import of C:\tmp\proj1 will import whatever is under proj1 directly in the repo root. Either I use C:\tmp in import, or i use C:\tmp\proj1 <repo_url>/proj1

thanks for helping me! Probably i should recheck the solution in the other thread, as I expect the links to be created on level deeper in this case.

--
./pope
[the_mindstorm]
[ January 21, 2005: Message edited by: Ali Pope ]
 
Craig Demyanovich
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're most welcome! Both of us benefit from these exchanges in that we sharpen our skills in preparation for the next issue!

Craig
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic