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

RE: Can I set the external property on a repository from svn?

From: Méresse Christophe <christophe.meresse_at_nagra.com>
Date: 2007-03-08 18:39:04 CET

Hello,
 
Please don't forget to answer the all mailing list. Your questions will certainly be interesting for other people...

________________________________

        From: Tom Malia [mailto:tommalia@ttdsinc.com]
        Sent: jeudi, 8. mars 2007 18:05
        To: Méresse Christophe
        Subject: RE: Can I set the external property on a repository from svn?
        
        

        Thanks for the information and the passions with a new-bee.

         

        I really appreciate the details of all the mistakes I was making, that's a really big help.

         

        A few follow up questions/comments...

        1) so what you are saying is it is NOT possible to set the externals property without checking the project out first correct? (This really stinks)

         

That's what I think at least (the svn propset and propedit can't be applied to an URL)

         

        2) How do I "(you must have the $SVN_EDITOR variable set)"? Do I just set this to any-old-text editor (I happen to like Textpad.exe myself) in an environment variable for the OS?

         

Yes (if Textpad.exe is in your path) or you can set the full path to Textpad I think. You can also set that in the subversion config file. Look at the documentation for this.

         

        3) If I use the propedit then what happens? Does the given editor pop-up and then I manually make the changes or what? If so, then this would mean that human intervention would be required during my "automated" scripts to build new repositories correct? I was really hoping to get everything done straight through the batch scripts.

         

Ok, so for that you'd better use the propset with the -F (--file) option.

         

        4) If I use svn co -N File:///c:/scc/TTDSProjects/MyNewProject/Trunk <file:///c:\scc\TTDSProjects\MyNewProject\Trunk> what would use suggest? Have my scripts first create a temp directory and cd to that temp directory before executing the co?

         

No, but it may be cleaner... as you want...

         

        Slightly different topic:

        Ideally I'd like to get all the initialization stuff completed and then when I'm done have the revision number be 1. Is that possible?

         

Yes, do everything in local before commiting (but it should really not be important to begin at 1, you'll have full of other reason to have a repository not exactly as you'd like... :) )

         

        While I'm at it.....

        Is there any way to complete "Delete" something from a repository? There's times, particular during this learning curve phase I'm in now, when I really want to remove all traces that a particular thing was ever in a given repository... is this possible?

         

Delete the repository and recreate it... no other way.

 

Regards

Christophe

         

         

        Thanks again,

        Tom Malia

         

         

         

         

         

         

        
________________________________

        From: Méresse Christophe [mailto:christophe.meresse@nagra.com]
        Sent: Thursday, March 08, 2007 11:24 AM
        To: Tom Malia; users@subversion.tigris.org
        Subject: RE: Can I set the external property on a repository from svn?

         

         

                 

                
________________________________

                From: Tom Malia [mailto:tommalia@ttdsinc.com]
                Sent: jeudi, 8. mars 2007 16:30
                To: users@subversion.tigris.org
                Subject: Can I set the external property on a repository from svn?

                I'm trying to create batch scripts that will build new repositories for my projects. In many cases each project needs to have a "canned" setup external references included. I would like to be able to build as much of the initial state of the repository as possible prior to actually having to create any working directories.

                 

                For example, let's assume that I already have several repositories for some vendor products and some internal shared code sets that I use in most of my new programming projects. So let's say I have the following existing repositories:

                 

                File:///c:/scc/Vendors/Solomon/Versions/55 <file:///c:\scc\Vendors\Solomon\Versions\55>

                And

                File:///c:/scc/InternalLibs/SchemaManager/Version/2 <file:///c:\scc\InternalLibs\SchemaManager\Version\2>

                 

                Now, I want to be able to easily build new repositories for new development projects that use the code in the two above listed repositories so I want to do something like:

                 

                Svnadmin create c:\scc\TTDSProjects\MyNewProject

                svn mkdir file:///c:/scc/test01/MyNewProject/Trunk -mInitializtion

                svn mkdir file:///c:/scc/test01/MyNewProject/Branches -mInitializtion

                svn mkdir file:///c:/scc/test01/MyNewProject/Tags -mInitializtion

                 

                svn propset svn:external Solomon File:///c:/scc/Vendors/Solomon/Versions/55 <file:///c:\scc\Vendors\Solomon\Versions\55>

                svn propset svn:external TTDS_LIBS_SchemaManager File:///c:/scc/Vendors/Solomon/Versions/55 <file:///c:\scc\Vendors\Solomon\Versions\55>

                 

                How can I do this? It's the external property setting that is giving me trouble. It tells me I can't perform this operation on a remote repository but rather have to do it to a working directory. Is this true? Isn't there some way around this? I'm trying to create a "Canned" initial state for my repositories to start from.

                 

        1- The property name is svn:externals (note the s) not svn:external

         

        2- You must apply the property to your c:\scc\TTDSProjects\MyNewProject\trunk (I guess)

         

        3-You have to apply it on a workspace, so you'll have to checkout (non recursively (-N) may be the best)

         

        4- Applying a multiline property (as you want 2 different libraries) with propset is not easy, I'd advice you to do it with a propedit.

         

        So:

         

        svn co -N File:///c:/scc/TTDSProjects/MyNewProject/Trunk <file:///c:\scc\TTDSProjects\MyNewProject\Trunk>

        svn propedit svn:externals Trunk

         

        And edit the content likethis (you must have the $SVN_EDITOR variable set):

         

        Solomon File:///c:/scc/Vendors/Solomon/Versions/55 <file:///c:\scc\Vendors\Solomon\Versions\55>

        TTDS_LIBS_SchemaManager File:///c:/scc/Vendors/Solomon/Versions/55 <file:///c:\scc\Vendors\Solomon\Versions\55>

         

        Then:

        svn commit -m "Set the different svn:externals libraries" Trunk

         

        Now you can delete your local temporary Trunk directory.

         

        Further notes:

        Uppercase on Tags, Branches and Trunk directories are not usual (but ok why not, if you are not affraid to use third party tools that will not recognize them...)

         

        Regards

        Christophe

         
Received on Thu Mar 8 18:39:46 2007

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.