[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: changing the structure of code in public repo

From: Ulrich Eckhardt <ulrich.eckhardt_at_dominolaser.com>
Date: Wed, 22 Dec 2010 15:36:34 +0100

On Wednesday 22 December 2010, mark jason wrote:
> I am relatively new to subversion and version control systems in
> general..

Read the introduction in the book (see my signature). Set up a toy repository
for testing things. You can even clone the life repository if you want to
check how things work.

> the source tree structure in repo is
> svn/trunk/src/myproject/One.java
> /Two.java
> I thought of changing the package structure of code as follows,
> myproject/
> /build.xml
> /src
> /packageone/NewOne.java
> /packagetwo/Two.java
> /lib
> /images
> How should I go about this? should I checkout into a work dir and then
> delete all of its contents ,then create the new code structure and
> then commit ? Or should I delete the directories from repo first?

Neither. ;) If you just delete things, you will lose the history, but I guess
you only want to move/rename/restructure.

Here's what I would do:

1. Check out the 'myproject' folder first.
2. Then, inside that working copy, create the new folders and add them to
Subversion (svn add).
3. Then, move the two Java files into their target folders. Note that renaming
and moving is the same for Subversion.
4. Then, check the state (svn state) of the working copy, you should have the
two Java files in their original place marked as deleted and the new/moved
files and folders as added.
5. If that is as you expect it to be, commit to the repository (svn commit).
6. Lastly, check out the whole folder again (to a different location) and
verify that the content is as you expected it to be.

Good luck!


ML: http://subversion.apache.org/docs/community-guide/mailing-lists.html
FAQ: http://subversion.apache.org/faq.html
Docs: http://svnbook.red-bean.com/
Domino Laser GmbH, Fangdieckstraße 75a, 22547 Hamburg, Deutschland
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
Visit our website at <http://www.dominolaser.com/>
Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen, weitergeleitet, veröffentlicht oder anderweitig benutzt werden.
E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte Änderungen enthalten. Domino Laser GmbH ist für diese Folgen nicht verantwortlich.
Received on 2010-12-22 15:36:31 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.