You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Hadmut Danisch <ha...@danisch.de> on 2006/08/27 11:31:21 UTC

Making a copy that follows?

Hi,

when I copy a file or directory from A to B with svn copy, 
then changes to A do not apply to B, it is like a branch.


Is there any way to have files or directories appear at several
locations in the repository tree and to have changes applied to all
locations at the same time?

(symbolic links don't do the task, since I look for something that
still works when checking out one subtree only...)


regards
Hadmut

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

Re: Making a copy that follows?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Aug 27, 2006, at 13:31, Hadmut Danisch wrote:

> when I copy a file or directory from A to B with svn copy,
> then changes to A do not apply to B, it is like a branch.
>
>
> Is there any way to have files or directories appear at several
> locations in the repository tree and to have changes applied to all
> locations at the same time?
>
> (symbolic links don't do the task, since I look for something that
> still works when checking out one subtree only...)

No, I don't think so.



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

Re: Making a copy that follows?

Posted by Hadmut Danisch <ha...@danisch.de>.
Blair Zajac wrote:

> 
> That's actually a safety feature.  Most of the time you don't want any
> outstanding changes in the externals committed just because you commit
> at the containing working copy.  If the external exists because you want
> to share a piece of code with multiple projects, you do also want
> separate commits for the external and the code that uses the external.


That's absolutely okay and it is the way it should be.

But that's one more reason why svn:externals is not the solution to the
class of problem I am dealing with. It just is a solution to a very
different problem.

I'd still would prefer a way of simply having one repository file
appearing at several locations.


Something like


svn link  pathA/fileA  pathB/fileB

and then having both plain files with the same content.

If I understand subversion correctly, then this should be possible
without to many changes.


The only problem I see is when fileA and fileB are changed differently
within the same revision. This could require to simply commit them
separately, e.g.  fileA as revision n and then an update for fileB, then
commit at n+1.


regards
Hadmut

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

Re: Making a copy that follows?

Posted by Blair Zajac <bl...@orcaware.com>.
Hadmut Danisch wrote:
> On Wed, Aug 30, 2006 at 02:54:50PM -0500, Johnathan Gifford wrote:
>> As Blair point out the other day, have you looked at the svn:externals
>> property?
>>
>> >From what you are describing, this will work exactly as your expecting,
>> but with one advantage.  Your letting Subversion handle the whole
>> thing.
> 
> 
> Nope, that's not what I am looking for. I am using svn:externals
> already somewhere else, so I do know it and have some experience with it.
> 
> 
> Problems of svn:externals :
> 
> 
...
> - svn commit does not work on svn:externals directories. You'd have to 
>   manually step into every single subdirectory and commit manually. 
>   Error prone.

That's actually a safety feature.  Most of the time you don't want any 
outstanding changes in the externals committed just because you commit at the 
containing working copy.  If the external exists because you want to share a 
piece of code with multiple projects, you do also want separate commits for the 
external and the code that uses the external.

Regards,
Blair

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

RE: Making a copy that follows?

Posted by Johnathan Gifford <jg...@wernervas.com>.
Not all of us live under a Windows dominated world.  An more
importantly, the powers at be where I work will not support any computer
with TortoiseSVN because it is an enhancement to the Explorer shell.

>>> On Thu, Aug 31, 2006 at  5:39 PM, in message
<01...@gavinlpc>, "Gavin Lambert"
<ga...@compacsort.com> wrote: 
> Quoth Johnathan Gifford <ma...@wernervas.com>:
>> Thats great from the command line but 99% of my Subversion
>> users are GUI guys.  Try doing that through Subclipse on
>> Eclipse!  Even then, throw a series of UNIX command line
>> stuff at them (no matter how simple it is) and it's like deer
>> in headlights.  Thanks for the tip though, that's one to remember
>> when needed. 
> 
> Well, from TortoiseSVN you can just right- click- drag a single file
to
> wherever and then choose SVN Export to here.  Although that only
works
> if you have it in a working copy already.  One workaround is that
you
> could open the file directly from the Repo- Browser and then save it
> wherever you want.
> 
>
---------------------------------------------------------------------
> 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

RE: Making a copy that follows?

Posted by Gavin Lambert <ga...@compacsort.com>.
Quoth Johnathan Gifford <ma...@wernervas.com>:
> Thats great from the command line but 99% of my Subversion
> users are GUI guys.  Try doing that through Subclipse on
> Eclipse!  Even then, throw a series of UNIX command line
> stuff at them (no matter how simple it is) and it's like deer
> in headlights.  Thanks for the tip though, that's one to remember
> when needed. 

Well, from TortoiseSVN you can just right-click-drag a single file to
wherever and then choose SVN Export to here.  Although that only works
if you have it in a working copy already.  One workaround is that you
could open the file directly from the Repo-Browser and then save it
wherever you want.

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

RE: Making a copy that follows?

Posted by Johnathan Gifford <jg...@wernervas.com>.
Thats great from the command line but 99% of my Subversion users are GUI
guys.  Try doing that through Subclipse on Eclipse!  Even then, throw a
series of UNIX command line stuff at them (no matter how simple it is)
and it's like deer in headlights.  Thanks for the tip though, that's one
to remember when needed.

Johnathan

>>> On Wed, Aug 30, 2006 at  8:32 PM, in message
<01...@gavinlpc>, "Gavin Lambert"
<ga...@compacsort.com> wrote: 
> Quoth Johnathan Gifford <ma...@wernervas.com>:
>> Argh... the whole 'need only' a file thing.  Export has the
>> same 'feature'.  Yes, this can be a pain to deal with.  Only
>> suggestion I can offer up is to change your directory
>> structure to accommodate this 'feature' of Subversion.  Yo'
>> Subversion developers, if you're reading this, this would be
>> a very nice improvement for the externals and export functionality!
> 
> If you want to export a single file:
> 
>   svn cat filename- in- working- copy- or- url > exported- filename
> 
>
---------------------------------------------------------------------
> 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

Re: Making a copy that follows?

Posted by Jeremy Pereira <je...@jeremyp.net>.
On 1 Sep 2006, at 08:47, Hadmut Danisch wrote:

> On Fri, Sep 01, 2006 at 12:52:02AM +0200, Ryan Schmidt wrote:
>>
>> And the enhancement request to be able to check out a single file has
>> already been filed (over four years ago):
>>
>> http://subversion.tigris.org/issues/show_bug.cgi?id=823
>
>
>
> But if it has been filed four years ago, the request can be considered
> as ignored or non-existing.

Or is perceived to be less important than other enhancements, or too  
hard to implement for the amount of benefit that would be gained.

>

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

Re: Making a copy that follows?

Posted by Karl Fogel <kf...@google.com>.
hadmut@danisch.de (Hadmut Danisch) writes:
> On Fri, Sep 01, 2006 at 12:52:02AM +0200, Ryan Schmidt wrote:
>> 
>> And the enhancement request to be able to check out a single file has  
>> already been filed (over four years ago):
>> 
>> http://subversion.tigris.org/issues/show_bug.cgi?id=823
>
> But if it has been filed four years ago, the request can be considered
> as ignored or non-existing.
>
> Sorry, but this sound a little bit like 'it has been ignored for four
> years, but don't file another, we already have one to be ignored...'

I think he was just trying to say "please don't file another issue" --
i.e., if you can raise the priority of the existing issue, then great,
but filing another one wouldn't be a legitimate means of doing that.

Best,
-Karl

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

Re: Making a copy that follows?

Posted by Hadmut Danisch <ha...@danisch.de>.
On Fri, Sep 01, 2006 at 12:52:02AM +0200, Ryan Schmidt wrote:
> 
> And the enhancement request to be able to check out a single file has  
> already been filed (over four years ago):
> 
> http://subversion.tigris.org/issues/show_bug.cgi?id=823



But if it has been filed four years ago, the request can be considered
as ignored or non-existing.


Sorry, but this sound a little bit like 'it has been ignored for four
years, but don't file another, we already have one to be ignored...'



(And again:  svn:externals would not be the solution of the problem,
even if it was possible for files. The solution has to solve the
problem. It is not the problem's task to adapt to existing solutions.)


regards
Hadmut

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

Re: Making a copy that follows?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 1, 2006, at 00:41, Gavin Lambert wrote:

> Hadmut Danisch wrote:
>
>> This does not solve the commit problem at all, and generates
>> a lot of overhead. How should one commit something like this
>> back into the repository? And how should one know to do this after
>> svn checkout?
>
> Well, you said "export", which means that the file is disconnected  
> from
> the repository.  So of course you can't commit it after that.  That's
> the whole point.  If you want to commit stuff then you need a working
> copy, of which the minimum unit is a folder.

And the enhancement request to be able to check out a single file has  
already been filed (over four years ago):

http://subversion.tigris.org/issues/show_bug.cgi?id=823


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

RE: Making a copy that follows?

Posted by Gavin Lambert <ga...@compacsort.com>.
Quoth Hadmut Danisch <ma...@danisch.de>:
> This does not solve the commit problem at all, and generates
> a lot of overhead. How should one commit something like this
> back into the repository? And how should one know to do this after
> svn checkout? 

Well, you said "export", which means that the file is disconnected from
the repository.  So of course you can't commit it after that.  That's
the whole point.  If you want to commit stuff then you need a working
copy, of which the minimum unit is a folder.

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

Re: Making a copy that follows?

Posted by Hadmut Danisch <ha...@danisch.de>.
On Thu, Aug 31, 2006 at 01:32:35PM +1200, Gavin Lambert wrote:
> 
> If you want to export a single file:
> 
>   svn cat filename-in-working-copy-or-url > exported-filename



Arrghl.

This does not solve the commit problem at all, and generates a lot of
overhead. How should one commit something like this back into the
repository? And how should one know to do this after svn checkout?



regards
Hadmut


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

Re: Making a copy that follows?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Aug 30, 2006, at 22:52, Johnathan Gifford wrote:

>> -  svn:externals works only for a complete directory, but not for a
>>   single file.
>
> Argh... the whole 'need only' a file thing.  Export has the same
> 'feature'.  Yes, this can be a pain to deal with.  Only suggestion  
> I can
> offer up is to change your directory structure to accommodate this
> 'feature' of Subversion.  Yo' Subversion developers, if you're reading
> this, this would be a very nice improvement for the externals and  
> export
> functionality!

Yes, the developers are aware; the enhancement request was filed four  
years ago:

http://subversion.tigris.org/issues/show_bug.cgi?id=937


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

RE: Making a copy that follows?

Posted by Gavin Lambert <ga...@compacsort.com>.
Quoth Johnathan Gifford <ma...@wernervas.com>:
> Argh... the whole 'need only' a file thing.  Export has the
> same 'feature'.  Yes, this can be a pain to deal with.  Only
> suggestion I can offer up is to change your directory
> structure to accommodate this 'feature' of Subversion.  Yo'
> Subversion developers, if you're reading this, this would be
> a very nice improvement for the externals and export functionality!

If you want to export a single file:

  svn cat filename-in-working-copy-or-url > exported-filename

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

Re: Making a copy that follows?

Posted by Johnathan Gifford <jg...@wernervas.com>.
> -  with svn:externals you need to give a full URL, and thus have to
>   enforce a particular access method. I do access my repository
>   through different methods, and SSL tunnels, so the front part of
the 
>   URL differs from time to time, e.g. tunneling
>   svn://localhost:xxxx/... with different ports at xxxx.
svn:externals 
>   does not work with this.

Change the external property as needed.  Simple as a commit to the
repository directory your wanting to get.  Better yet, standardize your
access protocol then you won't have to change those external properties
as much.

> -  svn:externals works only for a complete directory, but not for a
>   single file.

Argh... the whole 'need only' a file thing.  Export has the same
'feature'.  Yes, this can be a pain to deal with.  Only suggestion I can
offer up is to change your directory structure to accommodate this
'feature' of Subversion.  Yo' Subversion developers, if you're reading
this, this would be a very nice improvement for the externals and export
functionality!

> -  svn commit does not work on svn:externals directories. You'd have
to 
>   manually step into every single subdirectory and commit manually. 
>   Error prone.

Actually, this does work in in Eclipse with the Subclipse plugin.  I
can't verify that with the command line (never tried), but I know it
does work with Subclipse without errors.


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

Re: Making a copy that follows?

Posted by Hadmut Danisch <ha...@danisch.de>.
On Wed, Aug 30, 2006 at 02:54:50PM -0500, Johnathan Gifford wrote:
> As Blair point out the other day, have you looked at the svn:externals
> property?
> 
> >From what you are describing, this will work exactly as your expecting,
> but with one advantage.  Your letting Subversion handle the whole
> thing.


Nope, that's not what I am looking for. I am using svn:externals
already somewhere else, so I do know it and have some experience with it.


Problems of svn:externals :


- with svn:externals you need to give a full URL, and thus have to
  enforce a particular access method. I do access my repository
  through different methods, and SSL tunnels, so the front part of the 
  URL differs from time to time, e.g. tunneling
  svn://localhost:xxxx/... with different ports at xxxx. svn:externals 
  does not work with this.


- svn:externals works only for a complete directory, but not for a
  single file.

  I have configuration directories with several files, where some need
  to be shared and some not. Can't build that with svn:externals



- svn commit does not work on svn:externals directories. You'd have to 
  manually step into every single subdirectory and commit manually. 
  Error prone.

regards
Hadmut

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

Re: Making a copy that follows?

Posted by Johnathan Gifford <jg...@wernervas.com>.
As Blair point out the other day, have you looked at the svn:externals
property?

Re: Making a copy that follows?

Posted by Hadmut Danisch <ha...@danisch.de>.
On Wed, Aug 30, 2006 at 08:41:15AM -0500, Ted Dennison wrote:
>
> Well, both hardlinks and softlinks would behave as described. The only 
> real difference between the two from a user perspective is what happens 
> when a file is moved or deleted. (OK...and the ability to cross drive 
> boundaries)


That's the main problem. 

I am currently dealing with several software configuration files 
grouped in directories for different machines. Some of the files must
be the same for all machines, other files are different.

Softlinks don't do the task, since 

- You need to check out all directories
- The local software always removes the old files and writes a new one
  when doing any configuration changes. So any link would be replaced
  with a plain file.


That thought of having hardlinks in the file system is not important. 

The important thing is to be able to checkout the same file at
different paths in the SVN tree. Every checkout of a subtree should
have an up-to-date copy of the same file. This would make sense for
many uses, e.g. README, Makefile, COPYRIGHT files and things like
that. 

Under CVS I could have this simply by putting soft- and hardlink
in the CVS repository itself. But with the migration from CVS to SVN I
ran into the problem that this does not work anymore.


If I understand the internal structure of SVN correctly, it should be
possible to implement such a feature. 



regards
Hadmut



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

Re: Making a copy that follows?

Posted by Ted Dennison <de...@ssd.fsi.com>.
Ryan Schmidt wrote:
>
> On Aug 30, 2006, at 13:58, Hadmut Danisch wrote:
>
>> I'd therefore like to prose a new feature: SVN Copies of files, that
>> keep following. When I change one, all other copies change as
>> well. Like a hard link inside the repository. Would be really useful.
>> (And maybe the checkout should produce real hardlinks...)
>
> Your last parenthetical thought is incompatible with filesystems that 
> do not support hardlinks, of which I believe there are a few (on 
> Windows?).
Well, both hardlinks and softlinks would behave as described. The only 
real difference between the two from a user perspective is what happens 
when a file is moved or deleted. (OK...and the ability to cross drive 
boundaries)

Also, Windows does support both types of links (on NTFS drives).See 
http://shell-shocked.org/article.php?id=284 . We use them for our 
product here at work to easily switch between different installed 
versions of our software. But you are right that there are probably some 
SVN-supported platforms somewhere that don't support them.

-- 
T.E.D.   Work     -  mailto:dennison@ssd.fsi.com
         Home     -  mailto:dennison@telepath.com (Yahoo: Ted_Dennison)
         Homepage -  http://www.telepath.com/~dennison/Ted/TED.html

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

Re: Making a copy that follows?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Aug 30, 2006, at 13:58, Hadmut Danisch wrote:

> I'd therefore like to prose a new feature: SVN Copies of files, that
> keep following. When I change one, all other copies change as
> well. Like a hard link inside the repository. Would be really useful.
> (And maybe the checkout should produce real hardlinks...)

Your last parenthetical thought is incompatible with filesystems that  
do not support hardlinks, of which I believe there are a few (on  
Windows?).

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

Re: Making a copy that follows?

Posted by Hadmut Danisch <ha...@danisch.de>.
On Sun, Aug 27, 2006 at 11:19:01PM -0700, Blair Zajac wrote:
> 
> You can't use svn:externals for files.


Beyond that, externals have a different problem: I always have to
enclose the access method in the externals definition. I can't access
them with a different method (svn, ssh, file, dav,...) then.



I'd therefore like to prose a new feature: SVN Copies of files, that
keep following. When I change one, all other copies change as
well. Like a hard link inside the repository. Would be really useful. 
(And maybe the checkout should produce real hardlinks...)

regards
Hadmut

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

Re: Making a copy that follows?

Posted by Blair Zajac <bl...@orcaware.com>.
Hadmut Danisch wrote:
> Hi,
> 
> when I copy a file or directory from A to B with svn copy, 
> then changes to A do not apply to B, it is like a branch.
> 
> 
> Is there any way to have files or directories appear at several
> locations in the repository tree and to have changes applied to all
> locations at the same time?
> 
> (symbolic links don't do the task, since I look for something that
> still works when checking out one subtree only...)

If you need to have the same directory be checked out at different locations in 
your checkouts, say you have a common library shared by multiple projects, then 
look at the svn:externals feature.

See

http://svnbook.red-bean.com/en/1.2/svn.advanced.externals.html

You can't use svn:externals for files.

Regards,
Blair

-- 
Blair Zajac, Ph.D.
<bl...@orcaware.com>
Subversion training, consulting and support
http://www.orcaware.com/svn/

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