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

Re: restrict copy from to

From: Olivier Dagenais <olivier.dagenais_at_formark.com>
Date: 2007-05-09 00:33:23 CEST

> So I have this:
> /trunk/
> -------RealContent
> -------file1.txt
> /mirrored/
> ----------staged/RealContent
> ----------live/ver-1/RealContent
> ----------live/ver-2/RealContent
> ----------live/ver-3/RealContent

I'm not sure I understand everything you're trying to do, but it sounds like
you want there to be a controlled release process

> Now I am going to mirror the branch 'mirrored' to a svn repos on another
> server.
> And I am going to deploy a 'ver-N' tag in the subbranch 'live' from that
> remote svn repos using 'svn switch' command.
> '/mirrored/live/ver-N' are tags of various versions of '/mirrored/staged'
>
> Now everyone knows that 'svn switch' will not work unless there is a
> common ancestry.
> So, since I am mirroring only '/mirrored/' branch to the remote server, in
> order to perform 'svn switch' with say '/mirrored/live/ver-1' to
> '/mirrored/live/ver-2' the common ancestry must be from within
> '/mirrored/'.
> I have chosen the common ancestry to be '/mirrored/staged' which gets
> tagged out to an appropriate ver-N tag in '/mirrored/live'.
>
> This means 'svn switch' will NOT work if the content of
> '/mirrored/live/ver-N' has an immediate ancestry in '/trunk/'.
>
> Therefore, I want to restrict any 'svn copy' commands to '/mirrored/live'
> to only allow a copy from '/mirrored/staged'
>
> This would force developers to copy/merge/import changes to
> '/mirrored/staged' in order to tag it out to '/mirrored/live/ver-N'
>
>
> I know svn history can be used to find ancestry of a file or directory
> which you can compare to discover a COPY.
> However, since I want to deny the COPY command to be successful if the
> ancestry is not from an approved location, I need to know the ancestry of
> a file as it is found in the transaction.
>
> What tool command will tell me this?
>
> looking at the transaction, I could see that the following might be
> occurring:
> A /mirrored/live/ver-5/file1.txt
> But it does not tell me if that file1.txt is new, copied from
> /mirrored/staged, or copied from /trunk/.
>
> What tool command can I use to tell me (or help me find out) that this
> file is being copied from '/mirrored/staged' and not some other location?
> I want to do this during the transaction, then allow or deny the commit
> based on this.
>
> -RG
>
>
>
> Russell E Glaue wrote:
>> Has anyone tried this before?
>>
>> Say I have a svn repos with a branch and trunk like this
>>
>> /repos/
>> -------trunk/calc1/lib/eng1/af
>> -------trunk/calc1/lib/eng1/zz
>> -------branches/calc1-lib-eng-af
>> -------branches/calc1-lib-eng-zz
>>
>> And I want to restrict any "copy" from "branches/calc1-lib-eng-af" to
>> "trunk/calc1/lib/eng1/af" only.
>>
>> So a committer who has commit access to all of branches and trunk would
>> not be able to perform this funtion:
>>
>> svn copy branches/calc1-lib-eng-zz/file1.txt
>> trunk/calc1/lib/eng1/af/file1.txt
>>
>> This is a hypothetical scenerio.
>>
>>
>> What can I use to discover the copy history in a transaction?
>> svnlook?
>> How can this show me it is a copy from an allowed or not allowed source?
>>
>> -RG
>>
>> ---------------------------------------------------------------------
>> 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
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed May 9 00:33:44 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.