You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by David Weintraub <qa...@gmail.com> on 2008/07/28 15:18:37 UTC
svn:externals no longer "read only"?
The last time I used Subversion (version 1.3), any directory marked
with svn:externals was checked out, but kept "read only". That is, you
could see the code, but not submit the changes. I recently noticed
that this no longer seems true.
I am using Subversion 1.5, on both the repository and the client. I
notice that checking out an svn:externals sub-directory is no longer
checked out "read-only". I also noticed that if I submit a change on
the external directory, the changes get reflected back into the main
directory.
Was this change done on purpose? Is there a way I can emulate the
older behavior? In certain circumstances, I don't want developers
modifying the files for external directories.
--
David Weintraub
qazwart@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: svn:externals no longer "read only"?
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jul 28, 2008, at 20:21, David Weintraub wrote:
> I guess I am mistaken. I could have sworn that svn:externals were
> read-only. In fact, I thought it was a great idea because it meant
> that you were forced to check out and create a separate work area in
> order to change the external code. That would make you think twice for
> touching a common function or class that others depend upon.
>
> How does Subversion treat externals for hooks, then?
>
> For example I have:
>
> svn://projects/foo/trunk and I put on this directory an svn:externals
> property of
>
> common svn://common-projs/common
>
> If I changed the file svn://project/foo/trunk/common/bar.java, would
> that file be recognized by the hook as
>
> svn://common-projs/common/bar.java
>
> Or
>
> svn://projects/foo/trunk/common/bar.java?
>
> If it was the latter, it would make permission pre-commit hooks almost
> impossible to enforce.
The file svn://project/foo/trunk/common/bar.java does not exist and
neither does the directory svn://project/foo/trunk/common. Instead,
the directory svn://project/foo/trunk exists, and on it, you have set
the svn:externals property to "common svn://common-projs/common"
which causes a Subversion client to do special things on checkout.
Namely, if you check out the trunk directory, Subversion will
afterwards check out svn://common-projs/common into a new directory
"common" inside that working copy. That "common" working copy is not
connected to the "trunk" working copy in any real way. Changes you
make and commit to the "common" working copy will of course go to the
repository location from which they came, namely svn://common-projs/
common.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: svn:externals no longer "read only"?
Posted by David Weintraub <qa...@gmail.com>.
I guess I am mistaken. I could have sworn that svn:externals were
read-only. In fact, I thought it was a great idea because it meant
that you were forced to check out and create a separate work area in
order to change the external code. That would make you think twice for
touching a common function or class that others depend upon.
How does Subversion treat externals for hooks, then?
For example I have:
svn://projects/foo/trunk and I put on this directory an svn:externals
property of
common svn://common-projs/common
If I changed the file svn://project/foo/trunk/common/bar.java, would
that file be recognized by the hook as
svn://common-projs/common/bar.java
Or
svn://projects/foo/trunk/common/bar.java?
If it was the latter, it would make permission pre-commit hooks almost
impossible to enforce.
--
David Weintraub
qazwart@gmail.com
On Mon, Jul 28, 2008 at 7:19 PM, Ryan Schmidt
<su...@ryandesign.com> wrote:
>
> On Jul 28, 2008, at 10:18, David Weintraub wrote:
>
>> The last time I used Subversion (version 1.3), any directory marked
>> with svn:externals was checked out, but kept "read only". That is, you
>> could see the code, but not submit the changes. I recently noticed
>> that this no longer seems true.
>
> I don't remember that behavior, but it's been awhile since I used Subversion
> 1.3.
>
>> I am using Subversion 1.5, on both the repository and the client. I
>> notice that checking out an svn:externals sub-directory is no longer
>> checked out "read-only". I also noticed that if I submit a change on
>> the external directory, the changes get reflected back into the main
>> directory.
>>
>> Was this change done on purpose? Is there a way I can emulate the
>> older behavior? In certain circumstances, I don't want developers
>> modifying the files for external directories.
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: svn:externals no longer "read only"?
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jul 28, 2008, at 10:18, David Weintraub wrote:
> The last time I used Subversion (version 1.3), any directory marked
> with svn:externals was checked out, but kept "read only". That is, you
> could see the code, but not submit the changes. I recently noticed
> that this no longer seems true.
I don't remember that behavior, but it's been awhile since I used
Subversion 1.3.
> I am using Subversion 1.5, on both the repository and the client. I
> notice that checking out an svn:externals sub-directory is no longer
> checked out "read-only". I also noticed that if I submit a change on
> the external directory, the changes get reflected back into the main
> directory.
>
> Was this change done on purpose? Is there a way I can emulate the
> older behavior? In certain circumstances, I don't want developers
> modifying the files for external directories.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: svn:externals no longer "read only"?
Posted by Russell Hind <rh...@mac.com>.
This was never the case. Been using svn with externals since pre-1.0
betas and externals have always been writable to.
Externals, for us, are working exactly as they have done since pre-1.0
days.
Cheers
Russell
On 28 Jul 2008, at 16:18, David Weintraub wrote:
> The last time I used Subversion (version 1.3), any directory marked
> with svn:externals was checked out, but kept "read only". That is, you
> could see the code, but not submit the changes. I recently noticed
> that this no longer seems true.
>
> I am using Subversion 1.5, on both the repository and the client. I
> notice that checking out an svn:externals sub-directory is no longer
> checked out "read-only". I also noticed that if I submit a change on
> the external directory, the changes get reflected back into the main
> directory.
>
> Was this change done on purpose? Is there a way I can emulate the
> older behavior? In certain circumstances, I don't want developers
> modifying the files for external directories.
>
> --
> David Weintraub
> qazwart@gmail.com
>
> ---------------------------------------------------------------------
> 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: externals no longer "read only"?
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jul 28, 2008, at 15:40, Erik Hemdal wrote:
> David Weintraub wrote:
>
>> The last time I used Subversion (version 1.3), any directory
>> marked with svn:externals was checked out, but kept "read
>> only". That is, you could see the code, but not submit the
>> changes. I recently noticed that this no longer seems true.
>>
>> I am using Subversion 1.5,
>
> I see the same behavior using v1.4.3. If I define an external from
> a tag,
> the externals reference bypasses the pre-commit hook script on the
> external
> repository. If I try to update the tag itself, the pre-commit hook
> steps in
> and prevents it.
>
> I thought that this was due to some stupid mistake on my part or
> inexperience with svn:externals. The references I read (I checked
> the SVN
> Book as well as Willam Nagel's and Mike Mason's books) didn't give
> a clear
> picture of what is supposed to happen.
>
> Are svn:externals supposed to be read-only, or do I have to set a
> specific
> property to make it so?
I'm not aware of a way to have Subversion make the contents of
external directories read-only.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
RE: externals no longer "read only"?
Posted by Erik Hemdal <er...@comprehensivepower.com>.
> -----Original Message-----
> From: Ryan Schmidt [mailto:subversion-2008c@ryandesign.com]
>
> If it was possible for you to modify the external repository's tag,
> then the remote repository did not have a pre-commit hook that
> prevented you from modifying a tag.
>
There is definitely a pre-commit hook, and when it is used in a WC that is
checked out directly, and not via svn:externals, it correctly prevents
changes to tags. But when it operates through svn:externals, it doesn't.
So it sounds like I need to figure out what's unique about access via
externals.
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: externals no longer "read only"?
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jul 29, 2008, at 15:38, Erik Hemdal wrote:
> Keith Moore wrote:
>
>> when you do a commit on the main working copy it doesn't
>> traverse into the externals directory's, i.e. it doesn't
>> commit any changes.
>
> I tested this and you are completely correct. But I discovered
> that if you
> commit specifically in the directory that you "pulled", that you
> can still
> commit changes. If my svn:externals property is set up to pull in
> a tag
> from another repository, then this will let me modify a tag. I
> found this
> to be true even if I have a pre-commit hook in the external
> repository.
>
> I set a specific rev in the external definition that I wanted. If
> I pulled
> again or did an svn update, then I found I can always get back to
> the right
> revision for the external code. But the underlying tag in the
> expternal
> repository was still modified.
If it was possible for you to modify the external repository's tag,
then the remote repository did not have a pre-commit hook that
prevented you from modifying a tag.
> We use TortoiseSVN, and it will warn you if it thinks you're trying to
> commit to a tag. But I found you can go past that warning dialog
> and go
> change your tag. I didn't expect that to happen.
I didn't know TortoiseSVN provided such a warning. Certainly not all
clients do so, so a client-side warning is not an effective way to
prevent something from happening in a repository. Only a pre-commit
hook can assure that.
> I don't know if this is caused by a mistake I made, if my pre-
> commit script
> isn't robust enough, or if this is just the way that externals work.
At this point it doesn't have much to do with externals. Setting an
externals definition causes a new unrelated working copy to be
checked out. That separate working copy works exactly as it would if
you manually checked out from the external location.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
RE: externals no longer "read only"?
Posted by Erik Hemdal <er...@comprehensivepower.com>.
> -----Original Message-----
> From: Keith Moore [mailto:Keith.Moore@securency.com]
> Sent: Monday, July 28, 2008 6:51 PM
> To: 'Subversion'
> Subject: RE: externals no longer "read only"?
>
> . . . .
> However,
> when you do a commit on the main working copy it doesn't
> traverse into the externals directory's, i.e. it doesn't
> commit any changes.
I tested this and you are completely correct. But I discovered that if you
commit specifically in the directory that you "pulled", that you can still
commit changes. If my svn:externals property is set up to pull in a tag
from another repository, then this will let me modify a tag. I found this
to be true even if I have a pre-commit hook in the external repository.
I set a specific rev in the external definition that I wanted. If I pulled
again or did an svn update, then I found I can always get back to the right
revision for the external code. But the underlying tag in the expternal
repository was still modified.
We use TortoiseSVN, and it will warn you if it thinks you're trying to
commit to a tag. But I found you can go past that warning dialog and go
change your tag. I didn't expect that to happen.
I don't know if this is caused by a mistake I made, if my pre-commit script
isn't robust enough, or if this is just the way that externals work.
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
RE: externals no longer "read only"?
Posted by Keith Moore <Ke...@securency.com>.
The svn:externals simply allows you to 'pull' directory's from another repository/directory into the working copy. I don't think it makes the directory's read-only. However, when you do a commit on the main working copy it doesn't traverse into the externals directory's, i.e. it doesn't commit any changes.
I not sure if the behavior has changed between version 1.3 and our version (1.4.6).
We have a policy here that you only reference externals that have been tagged/released. We also have a pre-commit hook that prevents changes on tag branches. That way we can prevent people from accidentally making changes to released software. We're not completely happy with this solution by the way, maybe relative externals offers a better solution but no one has had a chance to investigate there use.
_________________________________________________________________
Keith Moore
-----Original Message-----
From: Erik Hemdal [mailto:erik@comprehensivepower.com]
Sent: Tuesday, 29 July 2008 6:40
To: 'David Weintraub'; 'Subversion'
Subject: RE: externals no longer "read only"?
> From: David Weintraub [mailto:qazwart@gmail.com]
> Sent: Monday, July 28, 2008 11:19 AM
> Subject: svn:externals no longer "read only"?
>
>
> The last time I used Subversion (version 1.3), any directory
> marked with svn:externals was checked out, but kept "read
> only". That is, you could see the code, but not submit the
> changes. I recently noticed that this no longer seems true.
>
> I am using Subversion 1.5,
I see the same behavior using v1.4.3. If I define an external from a tag,
the externals reference bypasses the pre-commit hook script on the external
repository. If I try to update the tag itself, the pre-commit hook steps in
and prevents it.
I thought that this was due to some stupid mistake on my part or
inexperience with svn:externals. The references I read (I checked the SVN
Book as well as Willam Nagel's and Mike Mason's books) didn't give a clear
picture of what is supposed to happen.
Are svn:externals supposed to be read-only, or do I have to set a specific
property to make it so?
Thanks!
Erik Hemdal
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
#####################################################################################
Attention:
The information contained in this message and or attachments is intended
only for the person or entity to which it is addressed and may contain
confidential and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient
is prohibited. If you received this in error, please contact the sender and
delete the material from any system and destroy any copies.
#####################################################################################
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
RE: externals no longer "read only"?
Posted by Erik Hemdal <er...@comprehensivepower.com>.
> From: David Weintraub [mailto:qazwart@gmail.com]
> Sent: Monday, July 28, 2008 11:19 AM
> Subject: svn:externals no longer "read only"?
>
>
> The last time I used Subversion (version 1.3), any directory
> marked with svn:externals was checked out, but kept "read
> only". That is, you could see the code, but not submit the
> changes. I recently noticed that this no longer seems true.
>
> I am using Subversion 1.5,
I see the same behavior using v1.4.3. If I define an external from a tag,
the externals reference bypasses the pre-commit hook script on the external
repository. If I try to update the tag itself, the pre-commit hook steps in
and prevents it.
I thought that this was due to some stupid mistake on my part or
inexperience with svn:externals. The references I read (I checked the SVN
Book as well as Willam Nagel's and Mike Mason's books) didn't give a clear
picture of what is supposed to happen.
Are svn:externals supposed to be read-only, or do I have to set a specific
property to make it so?
Thanks!
Erik Hemdal
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org