You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Chris Griffin <cg...@poundhill.com> on 2005/09/14 15:37:25 UTC

Sharing files

I have read some of the posts about sharing files. It sounds like I  
should have the shared files in a separate directory. All the files  
in my project are currently in one directory. The project is  
currently for the Macintosh. I have someone else that is going to  
port it to the PC. What I think I would like to do is have a common  
directory with all the platform independent files. Then two other  
directories for the platform dependent files for each platform. Then  
set an external definition for the common files directory. Does this  
sound correct? If so what is the best way to rearrange the files in  
the repository so that I don't loose my current revision history?

Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: Sharing files

Posted by Bill Arnette <Bi...@signalscape.com>.
Ideally, any changes to the library files (in a working copy) would be
checked
back in to the repository, of course, but I'd be fine without even that -
just
give me a way to do a checkout and populate the project's library directory
with
individual files.

I'd rather have something that works for _some_ cases *now* than wait for it
to
work for _all_ cases years from now.   (i.e., if it doesn't handle checking
back
in, fine.   if it doesn't handle permissions, fine,    if it doesn't handle
whatever, fine...)

- Al -

<bill>
One of our guys wrote a script which uses 'svn cat' to get individual
"shared" files from the repository into a WC.
</bill>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Sharing files

Posted by Alan Jay Weiner <al...@ajw.com>.
>> Sorry to come back with the question but is there any known workaround
>> that I could use to link directly to a file instead of the whole
>> directory ?
>> Also, is there any plan to address the file sharing limitation in future
>> release of svn?
>
>This is at least the second time this issue comes up today! See
>"svn:externals should work with files as well as directories" at
>http://subversion.tigris.org/issues/show_bug.cgi?id=937


This is one of the bigger limitations for me.

I have a library of thousands of routines.  Each is in its own file.

When I write projects for cliients, I want to include *only* the library
routines that project uses.   I certainly don't want to give the client my
entire library, and I really don't want to give them 500 string-parsing
functions (or whatever) when their project only uses 3 of them.
(this is also why each routine is in a separate file, btw - so I don't give them
a single file that contains an additional 497 useful routines that they haven't
"paid for")

Putting all the thousands of individual files in subdirectories (so I can
individually svn:externals them at a directory-level right now) would be absurd.


Ideally, any changes to the library files (in a working copy) would be checked
back in to the repository, of course, but I'd be fine without even that - just
give me a way to do a checkout and populate the project's library directory with
individual files.

I'd rather have something that works for _some_ cases *now* than wait for it to
work for _all_ cases years from now.   (i.e., if it doesn't handle checking back
in, fine.   if it doesn't handle permissions, fine,    if it doesn't handle
whatever, fine...)

- Al -

-- 
--  Alan Weiner  --  alan@ajw.com  --  http://www.ajw.com
Palm OS Certified Developer


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Sharing files

Posted by Aleksey Nogin <al...@nogin.org>.
On 15.09.2005 01:05, Grégoire Welraeds wrote:

> Sorry to come back with the question but is there any known workaround
> that I could use to link directly to a file instead of the whole
> directory ?
> Also, is there any plan to address the file sharing limitation in future
> release of svn?

This is at least the second time this issue comes up today! See
"svn:externals should work with files as well as directories" at
http://subversion.tigris.org/issues/show_bug.cgi?id=937

-- 
Aleksey Nogin

Home Page: http://nogin.org/
E-Mail: nogin@cs.caltech.edu (office), aleksey@nogin.org (personal)
Office: Moore 04, tel: (626) 395-2200

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Sharing files

Posted by Grégoire Welraeds <gr...@side-international.com>.
Ryan Schmidt wrote:
> [...]
> If, on the other hand, you want to have completely seperate project 
> directories...
>
> /projectcommon/
>     trunk/
>         ...common files
> /macproject/
>     trunk/
>         common/
>         ...mac-specific files
> /winproject/
>     trunk/
>         common/
>         ...pc-specific files
>
> ...such that when you check out macproject you only get something that 
> can be built on a mac, and when you check out winproject you only get 
> something that can be built on a pc, then the "common" directories 
> within macproject's trunk and winproject's trunk would both be 
> svn:externals definitions to the projectcommon trunk. Or something 
> like that. [...]
Sorry to come back with the question but is there any known workaround 
that I could use to link directly to a file instead of the whole 
directory ?
Also, is there any plan to address the file sharing limitation in future 
release of svn?

TIA,

-- 
Grégoire Welraeds

All code is not created equal.
Qc engineer, S I D E



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Sharing files

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 14, 2005, at 17:37, Chris Griffin wrote:

> [...] All the files in my project are currently in one directory.  
> The project is currently for the Macintosh. I have someone else  
> that is going to port it to the PC. What I think I would like to do  
> is have a common directory with all the platform independent files.  
> Then two other directories for the platform dependent files for  
> each platform. Then set an external definition for the common files  
> directory. Does this sound correct? [...]

If you're going to have a single project directory for this in your  
repository...

/theproject/
     trunk/
         common/
             ...common files
         mac/
             ...mac-specific files
         win/
             ...pc-specific files

...then when you check out the project's trunk, you get the mac  
files, the pc files, and the common files, can do with them what you  
want, and no externals definition is necessary. This would be a usual  
layout, I would think, based on my experience with a number of open- 
source projects. This would also make it pretty easy, I'd think, to  
svn-move files around between the platform-specific directories and  
the common directory, as it's discovered which parts are generally  
usable and which aren't. Or to svn-copy files from the Mac directory  
to the PC one as a basis for porting a particular module.

If, on the other hand, you want to have completely seperate project  
directories...

/projectcommon/
     trunk/
         ...common files
/macproject/
     trunk/
         common/
         ...mac-specific files
/winproject/
     trunk/
         common/
         ...pc-specific files

...such that when you check out macproject you only get something  
that can be built on a mac, and when you check out winproject you  
only get something that can be built on a pc, then the "common"  
directories within macproject's trunk and winproject's trunk would  
both be svn:externals definitions to the projectcommon trunk. Or  
something like that. But that seems unnecessarily convoluted to me.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Sharing files

Posted by William Nagel <bi...@stagelogic.com>.
On Sep 14, 2005, at 10:37 AM, Chris Griffin wrote:

> I have read some of the posts about sharing files. It sounds like I  
> should have the shared files in a separate directory. All the files  
> in my project are currently in one directory. The project is  
> currently for the Macintosh. I have someone else that is going to  
> port it to the PC. What I think I would like to do is have a common  
> directory with all the platform independent files. Then two other  
> directories for the platform dependent files for each platform.  
> Then set an external definition for the common files directory.  
> Does this sound correct?

Sounds like a very reasonable way to go about organizing your  
repository.

> If so what is the best way to rearrange the files in the repository  
> so that I don't loose my current revision history?

As long as you use "svn mv" to move the files around in your  
repository you are in no danger of losing the history on those  
files.  Of course, even if you don't use svn mv the history won't be  
lost, it just won't remain associated with the files you've moved.

-Bill

>
> Thanks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org