You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Ramachandran, Vishwanath(IE10)" <Vi...@Honeywell.com> on 2009/05/08 05:37:31 UTC

Need possibilities to set Subversion property for keyword expansion

Hi There

I need to know if it would be possible to make modifications on the
subversion server side for the repository in a way that everytime a new
item is added to the repository it will get added (automatically on
server side) the property svn:needs-lock .

I think that it is possible to locally set on the Tortoise client a
special setting in the config file in the section "auto-props". The
disadvantage with that is that each client has to do this on his machine
seperately.

First i need to have this information if this is possible to implement
on the server (and if you could do this)-> Pls let me know. Also i need
the information if there are any side effects or disadvantages of doing
this on the server.

Before really setting up the repository i have to confirm you that we
really want to go this way

I know that Keyword expansion is a client-side operation, and your
client only "knows" about changes which have occurred in the repository
when you update your working copy to include those changes

But What i want to get is just to get for each file the properties for
keyword expansion set ->directly on the server -> same as the property
snv:Need-lock has been set.

We want just to add the property "snv:keyword URL Rev Author Date" for
the file types *.doc, *.xls, *.mm, *.mpp, *. ppt. directly during
commiting (same as it is done for snv:need-lock).

The description in the attached word file was just a "workaround" which
we used today to reach that.

Please share your thoughts

Regards
R.R.Vishwanath

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2106211

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].


Re: Need possibilities to set Subversion property for keyword expansion

Posted by David Weintraub <qa...@gmail.com>.
> -> desired would be solution c [:)]

This is NOT the desired solution. Doing "C" will result in your having
to do another commit in your repository in order to set up the
property. Thus, your pre-commit hook script will create another
repository revision. This means:

* You must CAREFULLY write your pre-commit hook not to execute when
your pre-commit hook tries to do a commit itself. Recursive pre-commit
executions is a good way to not only bring down your server, but to
corrupt your repository with thousands of revisions as your pre-commit
hook triggers itself over and over.

* Let developers know that they will now have to do an "svn update"
after each commit because what they have on their system after a
commit is not the latest and greatest revision. Now, instead of doing
a simple commit, they must now remember to do an update too which can
take another few minutes to do. If they don't, their commits will
fail, and they'll have to do an update.

This will cause the developers to make fewer big potentially build-
breaking commits instead of a bunch of small ones, and this is the
exact opposite you want your developers to be doing. Developers should
be making a series of small verifiable and testable changes -- changes
that do not break the build.

So, your attempt to "help" the developers do their work may end up
making them frustrated and causing issues in the development cycle.

And one more scenario which actually took place: There was a
pre-commit hook script that made sure that svn:keywords was set to
"Author Date". A developer added a file, and then set the svn:keyword
property to "Date Author". The developer then made a few more changes
in the recently added file and attempted to do another commit. Commit
failed because the developer didn't do an update.

The developer was then upset about that because doing an update will
take a few extra minutes, breaking his concentration. Now, when he did
an update, he got a change conflict. Developer then spends the next
few minutes comparing the revisions of the file looking for the
conflict. He can't find them. After a few more attempts, he realizes
the conflict was in the property setting. He compares the property
setting, and then loses it.

The developer had wasted about half an hour on this problem, and in
the end, the pre-commit hook made a change not because the developer
forgot to add the property. Not because the developer didn't put in
the two required properties, but because the developer didn't list the
two properties in the required order.

I was hired to replace that previous build manager who had setup that
pre-commit hook. He had left because he didn't get along with the
developers. My job was to remove the awful Subversion revision control
system and replace it with ClearCase which some of the developers were
pushing because it is a REAL revision control system and not some
piece of open source crap like Subversion.

And, even before I started the developers had already decided they
were not too fond of me either. I was going to be another build
manager who got in the way of their work.

I was able to delay the replacing of Subversion with ClearCase which
gave me time to remove most of the pre-commit hooks. We then trained
developers on using Subversion and sought out their opinions on how
they could best do their job. In the end, the developers were finally
more accepting of Subversion although still hated it because of their
earlier experience. At least the pressure to install ClearCase had
abated.

No, the proper way to handle this is to train the developers. Let them
know about the Subversion configuration file and how auto-properties
work. Give them a configuration file that sets all the needed
auto-properties. Let the developers install it. Let them know that if
they create a file and it doesn't have the property set, their commit
will fail. Let them know how to diagnose the failure and how to fix
the failure.

It's the way Subversion was meant to work, and trying to get around
this will cause a lot of heartaches and bad blood.

On Wed, May 13, 2009 at 3:36 AM, Ramachandran, Vishwanath(IE10)
<Vi...@honeywell.com> wrote:
> Hi Ryan
>
> Pls confirm my assumption:
>
> 1 .Keyword expansion will be done on client side. (Replacing in
> "committed" document the "placeholder" with the keywords).
> 2. The client will do this action only if the svn property is set
> (stored in repository). If the svn-property is not set client is not
> doing any keyword expansion.
> 3. This property can be created in different ways:
> a.) manually (e.g. on client subversion -> property dialog -> new
> property -> snv: keyword expansion)
> b.) automated on client: -> if in autoprops the corresponding entries
> are set the property will be set once the first commit happens.
> c.) The way you proposed it -> on the server with a script which checks
> if the property is not already set -> and if not set -> set the
> property.
>
> ->a.) and b.) we are doing already and we know that it works ->
> disadvantage: For a.) -> manual work, for b.) -> all clients need to get
> the autoprops set -> which is also manual work on each client -> error
> prone.
>
> -> desired would be solution c [:)]
>
> Regards
> R.R.Vishwanath
> Desk: +91 80 26588360 Extn: 44211
> Cell: +91 9632243577
> ========================================================================
> ========================================================================
> ========
> -----Original Message-----
> From: Ryan Schmidt [mailto:subversion-2009a@ryandesign.com]
> Sent: Friday, May 08, 2009 3:20 PM
> To: Ramachandran, Vishwanath(IE10)
> Cc: Campbell Allan; users@subversion.tigris.org
> Subject: Re: Need possibilities to set Subversion property for keyword
> expansion
>
> On May 8, 2009, at 00:37, Ramachandran, Vishwanath(IE10) wrote:
>
>> I need to know if it would be possible to make modifications on the
>> subversion server side for the repository in a way that everytime a
>> new
>> item is added to the repository it will get added (automatically on
>> server side) the property svn:needs-lock .
>>
>> I think that it is possible to locally set on the Tortoise client a
>> special setting in the config file in the section "auto-props". The
>> disadvantage with that is that each client has to do this on his
>> machine
>> seperately.
>>
>> First i need to have this information if this is possible to implement
>> on the server (and if you could do this)-> Pls let me know. Also i
>> need
>> the information if there are any side effects or disadvantages of
>> doing
>> this on the server.
>>
>> Before really setting up the repository i have to confirm you that we
>> really want to go this way
>
> Yes, you can do it on the server, but it is not recommended. You
> cannot (well, with language bindings maybe you can, but in any case
> you absolutely must not) change the incoming transaction. Therefore,
> your only option is to immediately commit a second revision to fix a
> preceding revision that does not have the correct properties set.
> This is difficult because the server must maintain a working copy in
> which to perform these changes, and there are race conditions to
> think about, not to mention the fact that a developer's working copy
> will be immediately outdated after committing, which the developer
> would not ordinarily expect.
>
> The better and recommended way is to do it on the client side in auto-
> props, as you already found, and then install a pre-commit hook on
> the server which rejects any commit which does not conform to your
> requirements. Developers will realize after the second or third time
> that maybe they should set up their auto-props.
>
>
>> I know that Keyword expansion is a client-side operation, and your
>> client only "knows" about changes which have occurred in the
>> repository
>> when you update your working copy to include those changes
>>
>> But What i want to get is just to get for each file the properties for
>> keyword expansion set ->directly on the server -> same as the property
>> snv:Need-lock has been set.
>
> Keyword expansion does not happen on the server. It happens on the
> client. This cannot be changed.
>
>
>> We want just to add the property "snv:keyword URL Rev Author Date" for
>> the file types *.doc, *.xls, *.mm, *.mpp, *. ppt. directly during
>> commiting (same as it is done for snv:need-lock).
>
> Do it as explained above. Use a combination of auto-props on the
> client for convenience and a pre-commit hook on the server to
> enforce. The property will be saved in the repository, and the
> keyword expansion will be done by the client on checkout or update.
>
> Note that the Subversion properties begin with "svn:" (for
> "SubVersioN"), not "snv:".
>
>
>> The description in the attached word file was just a "workaround"
>> which
>> we used today to reach that.
>
> I did not find an attachment on your email. If you do attach
> something, better not use Word format, as many here probably don't
> have Word. Text files are best, or for more complex documents a PDF
> would be ok.
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2231298
>
> To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
>



-- 
David Weintraub
qazwart@gmail.com

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2239395

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Need possibilities to set Subversion property for keyword expansion

Posted by Ryan Schmidt <su...@ryandesign.com>.
On May 13, 2009, at 05:32, Andy Levy wrote:

> On Wed, May 13, 2009 at 06:25, Ramachandran, Vishwanath(IE10) wrote:
>
>> Thanks for the reply. Please find the description in the attached  
>> word
>> file was just a "workaround" which we used today to reach that.
>
> Not everyone has (or wants to load) MS Word to read your email. Did
> you get the information from someplace online?

The Word file appears to be documentation for your team explaining  
how to set automatic keywords properties on Word, Excel and  
PowerPoint files, and how to enter fixed-width keywords into such  
documents. It looks like you documented it fine. Was there a question?

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2235115

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Need possibilities to set Subversion property for keyword expansion

Posted by Andy Levy <an...@gmail.com>.
On Wed, May 13, 2009 at 06:25, Ramachandran, Vishwanath(IE10)
<Vi...@honeywell.com> wrote:
> Hi Ryan
>
> Thanks for the reply. Please find the description in the attached word
> file was just a "workaround" which we used today to reach that.

Not everyone has (or wants to load) MS Word to read your email. Did
you get the information from someplace online?

> -----Original Message-----
> From: Ryan Schmidt [mailto:subversion-2009b@ryandesign.com]
> Sent: Wednesday, May 13, 2009 2:30 PM
> To: Ramachandran, Vishwanath(IE10)
> Cc: Ryan Schmidt; Campbell Allan; users@subversion.tigris.org
> Subject: Re: Need possibilities to set Subversion property for keyword
> expansion
>
> On May 13, 2009, at 02:36, Ramachandran, Vishwanath(IE10) wrote:
>
>> Pls confirm my assumption:
>>
>> 1 .Keyword expansion will be done on client side. (Replacing in
>> "committed" document the "placeholder" with the keywords).
>
> Yes, keyword expansion happens on the client.
>
>
>> 2. The client will do this action only if the svn property is set
>> (stored in repository). If the svn-property is not set client is not
>> doing any keyword expansion.
>
> Yes, keyword expansion will only happen if the svn:keywords property
> is set, and then only for those keywords listed in that property.
>
>
>> 3. This property can be created in different ways:
>> a.) manually (e.g. on client subversion -> property dialog -> new
>> property -> snv: keyword expansion)
>
> It's "svn:keywords". It sounds like you are describing the procedure
> for setting this property in some GUI client (perhaps TortoiseSVN).
> Of course you can also set it using the command line client with "svn
> propset svn:keywords '<list of keywords>' <file>".
>
>
>> b.) automated on client: -> if in autoprops the corresponding entries
>> are set the property will be set once the first commit happens.
>
> Basically right. I think the properties are actually set the moment
> you "svn add" the file.
>
>
>> c.) The way you proposed it -> on the server with a script which
>> checks
>> if the property is not already set -> and if not set -> set the
>> property.
>>
>> ->a.) and b.) we are doing already and we know that it works ->
>> disadvantage: For a.) -> manual work, for b.) -> all clients need
>> to get
>> the autoprops set -> which is also manual work on each client -> error
>> prone.
>
> It is not error prone if you install a pre-commit hook to reject any
> commit that does not conform to your requirements. Yes, there is a
> little manual work, but only once for each client (until you change
> your policy...)
>
>
>> -> desired would be solution c [:)]
>
> Someone else mentioned this can be done even without a server-side
> working copy, so you're welcome to implement this if you feel it's a
> better fit for you.
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2234569
>
> To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2234639

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: Need possibilities to set Subversion property for keyword expansion

Posted by "Ramachandran, Vishwanath(IE10)" <Vi...@Honeywell.com>.
Hi Ryan

Thanks for the reply. Please find the description in the attached word
file was just a "workaround" which we used today to reach that.

Regards
R.R.Vishwanath
Desk: +91 80 26588360 Extn: 44211
Cell: +91 9632243577

-----Original Message-----
From: Ryan Schmidt [mailto:subversion-2009b@ryandesign.com] 
Sent: Wednesday, May 13, 2009 2:30 PM
To: Ramachandran, Vishwanath(IE10)
Cc: Ryan Schmidt; Campbell Allan; users@subversion.tigris.org
Subject: Re: Need possibilities to set Subversion property for keyword
expansion

On May 13, 2009, at 02:36, Ramachandran, Vishwanath(IE10) wrote:

> Pls confirm my assumption:
>
> 1 .Keyword expansion will be done on client side. (Replacing in
> "committed" document the "placeholder" with the keywords).

Yes, keyword expansion happens on the client.


> 2. The client will do this action only if the svn property is set
> (stored in repository). If the svn-property is not set client is not
> doing any keyword expansion.

Yes, keyword expansion will only happen if the svn:keywords property  
is set, and then only for those keywords listed in that property.


> 3. This property can be created in different ways:
> a.) manually (e.g. on client subversion -> property dialog -> new
> property -> snv: keyword expansion)

It's "svn:keywords". It sounds like you are describing the procedure  
for setting this property in some GUI client (perhaps TortoiseSVN).  
Of course you can also set it using the command line client with "svn  
propset svn:keywords '<list of keywords>' <file>".


> b.) automated on client: -> if in autoprops the corresponding entries
> are set the property will be set once the first commit happens.

Basically right. I think the properties are actually set the moment  
you "svn add" the file.


> c.) The way you proposed it -> on the server with a script which  
> checks
> if the property is not already set -> and if not set -> set the
> property.
>
> ->a.) and b.) we are doing already and we know that it works ->
> disadvantage: For a.) -> manual work, for b.) -> all clients need  
> to get
> the autoprops set -> which is also manual work on each client -> error
> prone.

It is not error prone if you install a pre-commit hook to reject any  
commit that does not conform to your requirements. Yes, there is a  
little manual work, but only once for each client (until you change  
your policy...)


> -> desired would be solution c [:)]

Someone else mentioned this can be done even without a server-side  
working copy, so you're welcome to implement this if you feel it's a  
better fit for you.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2234569

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Need possibilities to set Subversion property for keyword expansion

Posted by Ryan Schmidt <su...@ryandesign.com>.
On May 13, 2009, at 02:36, Ramachandran, Vishwanath(IE10) wrote:

> Pls confirm my assumption:
>
> 1 .Keyword expansion will be done on client side. (Replacing in
> "committed" document the "placeholder" with the keywords).

Yes, keyword expansion happens on the client.


> 2. The client will do this action only if the svn property is set
> (stored in repository). If the svn-property is not set client is not
> doing any keyword expansion.

Yes, keyword expansion will only happen if the svn:keywords property  
is set, and then only for those keywords listed in that property.


> 3. This property can be created in different ways:
> a.) manually (e.g. on client subversion -> property dialog -> new
> property -> snv: keyword expansion)

It's "svn:keywords". It sounds like you are describing the procedure  
for setting this property in some GUI client (perhaps TortoiseSVN).  
Of course you can also set it using the command line client with "svn  
propset svn:keywords '<list of keywords>' <file>".


> b.) automated on client: -> if in autoprops the corresponding entries
> are set the property will be set once the first commit happens.

Basically right. I think the properties are actually set the moment  
you "svn add" the file.


> c.) The way you proposed it -> on the server with a script which  
> checks
> if the property is not already set -> and if not set -> set the
> property.
>
> ->a.) and b.) we are doing already and we know that it works ->
> disadvantage: For a.) -> manual work, for b.) -> all clients need  
> to get
> the autoprops set -> which is also manual work on each client -> error
> prone.

It is not error prone if you install a pre-commit hook to reject any  
commit that does not conform to your requirements. Yes, there is a  
little manual work, but only once for each client (until you change  
your policy...)


> -> desired would be solution c [:)]

Someone else mentioned this can be done even without a server-side  
working copy, so you're welcome to implement this if you feel it's a  
better fit for you.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2232846

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: Need possibilities to set Subversion property for keyword expansion

Posted by "Ramachandran, Vishwanath(IE10)" <Vi...@Honeywell.com>.
Hi Ryan

Pls confirm my assumption:

1 .Keyword expansion will be done on client side. (Replacing in
"committed" document the "placeholder" with the keywords).
2. The client will do this action only if the svn property is set
(stored in repository). If the svn-property is not set client is not
doing any keyword expansion.
3. This property can be created in different ways:
a.) manually (e.g. on client subversion -> property dialog -> new
property -> snv: keyword expansion)
b.) automated on client: -> if in autoprops the corresponding entries
are set the property will be set once the first commit happens.
c.) The way you proposed it -> on the server with a script which checks
if the property is not already set -> and if not set -> set the
property.

->a.) and b.) we are doing already and we know that it works ->
disadvantage: For a.) -> manual work, for b.) -> all clients need to get
the autoprops set -> which is also manual work on each client -> error
prone.

-> desired would be solution c [:)]

Regards
R.R.Vishwanath
Desk: +91 80 26588360 Extn: 44211
Cell: +91 9632243577
========================================================================
========================================================================
========
-----Original Message-----
From: Ryan Schmidt [mailto:subversion-2009a@ryandesign.com] 
Sent: Friday, May 08, 2009 3:20 PM
To: Ramachandran, Vishwanath(IE10)
Cc: Campbell Allan; users@subversion.tigris.org
Subject: Re: Need possibilities to set Subversion property for keyword
expansion

On May 8, 2009, at 00:37, Ramachandran, Vishwanath(IE10) wrote:

> I need to know if it would be possible to make modifications on the
> subversion server side for the repository in a way that everytime a  
> new
> item is added to the repository it will get added (automatically on
> server side) the property svn:needs-lock .
>
> I think that it is possible to locally set on the Tortoise client a
> special setting in the config file in the section "auto-props". The
> disadvantage with that is that each client has to do this on his  
> machine
> seperately.
>
> First i need to have this information if this is possible to implement
> on the server (and if you could do this)-> Pls let me know. Also i  
> need
> the information if there are any side effects or disadvantages of  
> doing
> this on the server.
>
> Before really setting up the repository i have to confirm you that we
> really want to go this way

Yes, you can do it on the server, but it is not recommended. You  
cannot (well, with language bindings maybe you can, but in any case  
you absolutely must not) change the incoming transaction. Therefore,  
your only option is to immediately commit a second revision to fix a  
preceding revision that does not have the correct properties set.  
This is difficult because the server must maintain a working copy in  
which to perform these changes, and there are race conditions to  
think about, not to mention the fact that a developer's working copy  
will be immediately outdated after committing, which the developer  
would not ordinarily expect.

The better and recommended way is to do it on the client side in auto- 
props, as you already found, and then install a pre-commit hook on  
the server which rejects any commit which does not conform to your  
requirements. Developers will realize after the second or third time  
that maybe they should set up their auto-props.


> I know that Keyword expansion is a client-side operation, and your
> client only "knows" about changes which have occurred in the  
> repository
> when you update your working copy to include those changes
>
> But What i want to get is just to get for each file the properties for
> keyword expansion set ->directly on the server -> same as the property
> snv:Need-lock has been set.

Keyword expansion does not happen on the server. It happens on the  
client. This cannot be changed.


> We want just to add the property "snv:keyword URL Rev Author Date" for
> the file types *.doc, *.xls, *.mm, *.mpp, *. ppt. directly during
> commiting (same as it is done for snv:need-lock).

Do it as explained above. Use a combination of auto-props on the  
client for convenience and a pre-commit hook on the server to  
enforce. The property will be saved in the repository, and the  
keyword expansion will be done by the client on checkout or update.

Note that the Subversion properties begin with "svn:" (for  
"SubVersioN"), not "snv:".


> The description in the attached word file was just a "workaround"  
> which
> we used today to reach that.

I did not find an attachment on your email. If you do attach  
something, better not use Word format, as many here probably don't  
have Word. Text files are best, or for more complex documents a PDF  
would be ok.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2231298

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].


Re: Need possibilities to set Subversion property for keyword expansion

Posted by km...@rockwellcollins.com.
Ryan Schmidt <su...@ryandesign.com> wrote on 05/08/2009 
04:49:44 AM:

> On May 8, 2009, at 00:37, Ramachandran, Vishwanath(IE10) wrote:
> 
> > I need to know if it would be possible to make modifications on the
> > subversion server side for the repository in a way that everytime a 
> > new
> > item is added to the repository it will get added (automatically on
> > server side) the property svn:needs-lock .
> >
> > I think that it is possible to locally set on the Tortoise client a
> > special setting in the config file in the section "auto-props". The
> > disadvantage with that is that each client has to do this on his 
> > machine
> > seperately.
> >
> > First i need to have this information if this is possible to implement
> > on the server (and if you could do this)-> Pls let me know. Also i 
> > need
> > the information if there are any side effects or disadvantages of 
> > doing
> > this on the server.
> >
> > Before really setting up the repository i have to confirm you that we
> > really want to go this way
> 
> Yes, you can do it on the server, but it is not recommended. You 
> cannot (well, with language bindings maybe you can, but in any case 
> you absolutely must not) change the incoming transaction. Therefore, 
> your only option is to immediately commit a second revision to fix a 
> preceding revision that does not have the correct properties set. 
> This is difficult because the server must maintain a working copy in 
> which to perform these changes, and there are race conditions to 
> think about, not to mention the fact that a developer's working copy 
> will be immediately outdated after committing, which the developer 
> would not ordinarily expect.

You don't need a working copy on the server.  Here is a script I
wrote using the python api to add the missing svn:needs-lock properties
as a new transaction in a post-commit hook script:

http://svn.collab.net/repos/svn/trunk/contrib/server-side/add-needs-lock.py

Even though I created that, I would still recommend configuring auto-props
on all the clients if possible.  The extra transactions created with
the above script will confuse some users.  (And it has never been
extended for arbitrary properties, so there would be work to do if
you want/need more than just svn:needs-lock.)

Kevin R.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2113398

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Need possibilities to set Subversion property for keyword expansion

Posted by Ryan Schmidt <su...@ryandesign.com>.
On May 8, 2009, at 00:37, Ramachandran, Vishwanath(IE10) wrote:

> I need to know if it would be possible to make modifications on the
> subversion server side for the repository in a way that everytime a  
> new
> item is added to the repository it will get added (automatically on
> server side) the property svn:needs-lock .
>
> I think that it is possible to locally set on the Tortoise client a
> special setting in the config file in the section "auto-props". The
> disadvantage with that is that each client has to do this on his  
> machine
> seperately.
>
> First i need to have this information if this is possible to implement
> on the server (and if you could do this)-> Pls let me know. Also i  
> need
> the information if there are any side effects or disadvantages of  
> doing
> this on the server.
>
> Before really setting up the repository i have to confirm you that we
> really want to go this way

Yes, you can do it on the server, but it is not recommended. You  
cannot (well, with language bindings maybe you can, but in any case  
you absolutely must not) change the incoming transaction. Therefore,  
your only option is to immediately commit a second revision to fix a  
preceding revision that does not have the correct properties set.  
This is difficult because the server must maintain a working copy in  
which to perform these changes, and there are race conditions to  
think about, not to mention the fact that a developer's working copy  
will be immediately outdated after committing, which the developer  
would not ordinarily expect.

The better and recommended way is to do it on the client side in auto- 
props, as you already found, and then install a pre-commit hook on  
the server which rejects any commit which does not conform to your  
requirements. Developers will realize after the second or third time  
that maybe they should set up their auto-props.


> I know that Keyword expansion is a client-side operation, and your
> client only "knows" about changes which have occurred in the  
> repository
> when you update your working copy to include those changes
>
> But What i want to get is just to get for each file the properties for
> keyword expansion set ->directly on the server -> same as the property
> snv:Need-lock has been set.

Keyword expansion does not happen on the server. It happens on the  
client. This cannot be changed.


> We want just to add the property "snv:keyword URL Rev Author Date" for
> the file types *.doc, *.xls, *.mm, *.mpp, *. ppt. directly during
> commiting (same as it is done for snv:need-lock).

Do it as explained above. Use a combination of auto-props on the  
client for convenience and a pre-commit hook on the server to  
enforce. The property will be saved in the repository, and the  
keyword expansion will be done by the client on checkout or update.

Note that the Subversion properties begin with "svn:" (for  
"SubVersioN"), not "snv:".


> The description in the attached word file was just a "workaround"  
> which
> we used today to reach that.

I did not find an attachment on your email. If you do attach  
something, better not use Word format, as many here probably don't  
have Word. Text files are best, or for more complex documents a PDF  
would be ok.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2109039

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Need possibilities to set Subversion property for keyword expansion

Posted by David Weintraub <qa...@gmail.com>.
Don't do this on the server side. Instead:

* Create a Subversion configuration file that has the autoprops you
want set. Then, publish this, so all the developers can see it.  I put
ours on the company Wiki.

* Use a pre-commit trigger to reject the transaction if the
transaction in question has a file that doesn't have this property
configured.

It will only take one or two failed commits before the developers
setup their autoconfig properties themselves -- especially since you
provided them with a good Subversion configuration file.

If you want a pre-commit trigger that can do this, you can borrow mine
at <http://dl.getdropbox.com/u/433257/hooks.zip>. It's a Perl script
and you need the Config::IniFile module.

On Fri, May 8, 2009 at 1:37 AM, Ramachandran, Vishwanath(IE10)
<Vi...@honeywell.com> wrote:
> Hi There
>
> I need to know if it would be possible to make modifications on the
> subversion server side for the repository in a way that everytime a new
> item is added to the repository it will get added (automatically on
> server side) the property svn:needs-lock .
>
> I think that it is possible to locally set on the Tortoise client a
> special setting in the config file in the section "auto-props". The
> disadvantage with that is that each client has to do this on his machine
> seperately.
>
> First i need to have this information if this is possible to implement
> on the server (and if you could do this)-> Pls let me know. Also i need
> the information if there are any side effects or disadvantages of doing
> this on the server.
>
> Before really setting up the repository i have to confirm you that we
> really want to go this way
>
> I know that Keyword expansion is a client-side operation, and your
> client only "knows" about changes which have occurred in the repository
> when you update your working copy to include those changes
>
> But What i want to get is just to get for each file the properties for
> keyword expansion set ->directly on the server -> same as the property
> snv:Need-lock has been set.
>
> We want just to add the property "snv:keyword URL Rev Author Date" for
> the file types *.doc, *.xls, *.mm, *.mpp, *. ppt. directly during
> commiting (same as it is done for snv:need-lock).
>
> The description in the attached word file was just a "workaround" which
> we used today to reach that.
>
> Please share your thoughts
>
> Regards
> R.R.Vishwanath
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2106211
>
> To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
>



-- 
David Weintraub
qazwart@gmail.com

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2115489

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].