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

Re: Nested projects and changing folder names

From: Hari Kodungallur <hkodungallur_at_gmail.com>
Date: Tue, 29 Apr 2008 12:13:31 -0700

On Tue, Apr 29, 2008 at 6:54 AM, J Hicks <joe.ah_at_att.net> wrote:

> Hello users,
>
> 1st issue: nested related projects.
>
> Many of my projects are set up like:
>
> Mainproject
> /src
> /bin
> /images
> /help
> /helperproject
> /src
> /bin
> /doc
> /ship
> /updater
> /src
> /bin
> /doc
> /images
>
> Now I create an empty structure for this in svn,
>
> I go to checkout the project OVER my existing real code and svn gives
> me this error saying folder already exists /images.
>
> Is there a problem with this structure? Do I have to check in the
> updater or helperproject as separate projects? That would certainly be
> inconvenient. the overall project is a single entity and difficult to
> separate.

When you say you created the empty structure, did you create the empty
structure for just your subproject or the entire "Mainproject"?

If the Mainproject already existed and you just created the empty structure
for your subproject, it is not necessary to do it. You need to checkout your
Mainproject, and do all your new subproject changes there. After that just
'svn add' the subproject and then check it in.

If the Mainproject did not exist, then you need to first create the entire
structure (just once) by doing an 'svn import' or something equivalent
(which is - just create an empty repository and use an existing structure to
'svn add').

>
>
> I'm fairly new to svn and may have to change the way I'm working
> (which has already changed due to svn). Right now I set up the set of
> folders for a new project, start a new project in my ide and save it
> to the new structure, then continue developing. As I need
> sub-projects I add the new sub folders, then create the new project
> in those folders as part of the same project group. When I'm ready
> for the first release, I attempt to get it all into svn at that point
> except I'm having a difficult time getting it into svn. (I'm actually
> using tortoisesvn.)

While there is nothing wrong with checking in all your changes at once at
the time of release, that is not really the point of a version control
system. You would want to check in to your files often. This way, at any
point of time, you want to go back to a previous change or undo a change,
you can do it with the help of the version control system.

>
>
> Do I have to check out the whole project into a new folder, then
> copy the files from my working project into those and then check it
> all back in? That would be a pain as well.
>
> Should I just make a new project folder in svn and
> trunk/branches/tags folders with no sub folders and then check that
> out into my project, and then commit my project back in to the trunk
> folder?

See my first point above. It depends on what you already have in your svn
repository. Whatever the case may be, you will need to create the structure
and check it out once. After that all you need is check in changes as often
as you think it is feasible.

>
>
> the trouble is I'm a single developer and I only do the svn
> interaction when I'm done with something or have to stop or switch
> projects for a while. That might be a week or two between steps.
>
> 2. I started out with maybe a sub-project folder name of
> xyzUpdaterProject, then I change it later to xyzUpdater to shorten
> the path. I get all kinds of problems with svn on this. It keeps
> saying the xyzupdaterProject folder is missing. I end up changing
> things often in development. I thought I could just rename the folder
> (or filename) in svn and it would handle it but I must be wrong.

If you just rename a folder using the windows explorer, svn will not know
about it. You need to use the svn menu provided by tortoisesvn (right click
on the folder and you will see it) and rename the folder using the option
that you see there. And when you do that, svn does indeed handle the
renames, and handle it really well.

Regards,
-Hari
Received on 2008-04-29 21:14:09 CEST

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.