You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Luca Zorzi <lz...@atomat.com> on 2009/05/28 14:44:32 UTC

SVN question

Good morning,

I need help support.

Info: Windows XP Sp3, TortoiseSVN 1.6.2.16344, VisualSVN-Server-1.7.2.

I have to put under version control four projects: a main project and three
sub-projects. Every project has its repository, cause we need different
revision numbers between projects. Main project is composed by some files
from other subprojects: this seems to be unattainable.

Let me explain a simplified sample, the project/subproject structure is a
bit complex compared to the samples that I've seen (comments are pre-fixed
with # character). 

 

 

# Main project which refers to:

#    -libraries (single file es. scripting.dll)

#    -features (composed by files stored in a specific structure es.
Features)

\MainProject

   Application.exe

   Application.ini

   scripting.dll                                        # This is the
library generated by ScriptingProject 

   \Features

      \Feature1

         fea1main.ini                                 # Only this file
belong to MainProject, the others below are references from other projects

         fea1main.bat                               # >From BatProject

         \sub-features1                             #

            fea1sub1globals.bat                  # >From BatProject

            fea1sub1functions.bat               # >From BatProject

            fea1sub1others.com                  # >From ComProject

         \sub-features2                             #

..

 

 

# Scripting project which generates library scripting.dll needed by
Application.exe (without dll Application.exe won't run!)

\ScriptingProject

   Scripting.sln

   Scripting.cs

   \Release

      scripting.dll                                    # This library is
referenced in MainProject (note1)

..

 

 

# Com project which contains com files

\ComProject

   \Features                                          # >From here, the
structure corrispond to MainProject\Features (note2)

      \Feature1                                       # 

         \sub-features1                             #

            fea1sub1others.com                  #

..

 

 

# Bat project which contains bat files

\BatProject

   \Features                                          # >From here, the
structure corrispond to MainProject\Features (note2)

      \Feature1                                       #

         fea1main.bat                               # 

         \sub-features1                             #

            fea1sub1globals.bat                  #

            fea1sub1functions.bat               #

..

 

Notes

Question1 (refer to Note1): I need to refer to a specific file revision,
with svn:externals there's a problem: MainProject needs to refer to
scripting.dll stored in ScriptingProject, external files references works
only in the same repository. I found only an alternative solution but it
refers to a kind of links that Windows doesn't support. Any suggestions?

Question2 (refer to Note2): I need to refer to a specific folder revision
and the destination for BatProject and ComProject is the same, with
svn:externals there's a problem: can't exists the destination folder
(doesn't matter I can move fea1main.ini within BatProject or ComProject) and
the last external were updated correctly but the previous were removed.
Alternatively, I've tried to use svn switch instruction, but it updates
files contents only if the file exists in both repositories (from .. to ..)!
It's really a hard solution to maintain, we go a lot of files and the number
of them could often change. Any suggestions?

 

Thanks for all.

 

Luca Zorzi.


Questo messaggio e' di carattere riservato ed e' indirizzato esclusivamente al destinatario specificato. L'accesso, la divulgazione, la copia o la diffusione sono vietate a chiunque altro ai sensi delle normative vigenti, e possono costituire una violazione penale. Nel caso abbiate ricevuto questo messaggio per errore siete tenuti a cancellarlo immediatamente confermando al mittente, a mezzo e-mail, l'avvenuta cancellazione. (Legge Italiana 196/2003). This e-mail is confidential and is for the intended recipient only. Access, disclosure, copying, distribution or reliance on any of it by anyone else is prohibited and may be a criminal offence. Please delete if obtained in error and email confirmation to sender. (Italian Law 196/2003).

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2356196

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: SVN question

Posted by Bob Archer <bo...@amsi.com>.
>I have to put under version control four projects: a main project and three sub-projects. Every project has >its repository, cause we need different revision numbers between projects.

Perhaps this is your main problem. Why do you need separate revisions for each project? Perhaps you have blinders on for this issue and putting all the projects in the same repo so you can use file externals will ease your pain. That said...

># Main project which refers to:
>#    -libraries (single file es. scripting.dll)
>#    -features (composed by files stored in a specific structure es. Features)
>\MainProject
>   scripting.dll                                        # This is the library generated by ScriptingProject


>Question1 (refer to Note1): I need to refer to a specific file revision, with svn:externals there's a >problem: MainProject needs to refer to scripting.dll stored in ScriptingProject, external files references >works only in the same repository. I found only an alternative solution but it refers to a kind of links that >Windows doesn't support. Any suggestions?

First, I would not store scripting.dll in svn for the ScriptingProject. This is a binary build from this source. You should control the source not the binary. My suggestion don't use an external here. Have your build system check in a scripting.dll file into your MainProject when it is built, or when it is appropriate.

Is it at all possible to put the scripting.dll into a folder (lib) in main project. This would allow you to use externals easily. You could pin the external to a specific revision if you wanted, or not. I expect that in trunk you don't want it pinned, then in tag you do want it pinned.

>Question2 (refer to Note2): I need to refer to a specific folder revision and the destination for BatProject >and ComProject is the same, with svn:externals there's a problem: can't exists the destination folder >(doesn't matter I can move fea1main.ini within BatProject or ComProject) and the last external were >updated correctly but the previous were removed. Alternatively, I've tried to use svn switch instruction, >but it updates files contents only if the file exists in both repositories (from .. to ..)! It's really a hard >solution to maintain, we go a lot of files and the number of them could often change. Any suggestions?

I can only assume that the Bat and Com projects are shared with projects other than MainProject? If not, why the heck are they separate projects? If they aren't shared I would just source then as sub-folders of the MainProject folder. You can still restrict access at the folder level if that is what you need. If this is not possible I don't see another way to do it other than checking in the .bat files into MainProject from a post commit script in the Bat/Com repos. (Yuck!)

If there is in any way possible to have these as sub-folders in MainProject that would make using externals doable?

In my opinion FileExternals are not really useable as they are implemented right now, unless you are referring to the same file multiple places in a single project folder that you know your devs will always have checked out. Because if the file is not in the working copy then the file externals don't work.

BOb

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2356258

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].