LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-12-2014, 08:44 AM   #1
rshepard
Member
 
Registered: Oct 2007
Location: Troutdale, Oregon
Distribution: Slackware
Posts: 435

Rep: Reputation: 28
Subversion-1.7.16: How to Add Subdirectories to Existing Projects?


There is one old project in my local svn repository and yesterday I added a new project using 'svn import'. While the book recommends adding the subdirectories trunk/, branches/, and tags/ to a project's root directory I could not find how to do this.

Two questions:

1) Can I use admin tools to retroactively add the subdirectories to the old project? If so, what is the correct syntax to add them and put existing files in the trunk/ subdirectory?

2) How do I initially set up the project directory structure while adding a new project to the repository?
 
Old 07-14-2014, 05:05 PM   #2
rshepard
Member
 
Registered: Oct 2007
Location: Troutdale, Oregon
Distribution: Slackware
Posts: 435

Original Poster
Rep: Reputation: 28
The answers are "No" and "Use the svnadmin tools."

Despite my reading Chapter 5 of the svn-1.7 doc multiple times the process was not clearly apparent. However, a helpful subscriber to the subversion mail list pointed me to the solution which follows.

1. Use 'svnadmin create /path/to/my/repository/' to create the repository itself. In my case, I had to delete the original repository and the associated .svn file since they had been created with a subversion less than 1.2.

2. Create project root directories using 'svn mkdir project-name /path/to/my/repository/'.

3. Under each project root directory create branches/, tags/, and trunk/ as above. When I tried to create the subdirectories prior to the root directory, by using the --parent option to mkdir my original source directores were removed. Had to restore them from the backup drive. (You do make daily, incremental backups, don't you?)

4. Now the repository and its directory structure are in place, use 'svn import /path/to/my/repository/project' from the source directory. Add a log comment with the -m option.

5. Remove, or backup with a different name, your original source directory. Then use 'svn checkout /path/to/my/repository/project/trunk/' to produce the working copy in your preferred location. I use the original, empty, source directories for this and they now have a trunk/ subdirectory.
 
  


Reply

Tags
subversion, svn


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Add existing unix user to existing LDAP antoniemail Linux - Server 7 06-23-2010 12:54 PM
add an existing user to an existing group? tramni1980 Slackware 5 05-08-2008 07:28 PM
In a need for Subversion web interface to create projects/add-remove users. blackman890 Linux - Server 1 11-06-2007 03:36 PM
Splitting an Existing Subversion Repository stevec Linux - Software 1 09-21-2007 04:30 PM
how to add existing files to existing imported kdevelop project?? santana Programming 1 05-22-2007 09:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration