Automatically Update SVN working copy after commit

0

We have team of 125+ people and we are using tortoise SVN for version control. we have one excel sheet where every user have to update their daily work by end of the day but thing is that no body is updating (SVN update) excel file before making their changes and due to that person who had added his details went missing. so to avoid this i want one svn post commit script which force svn update command to everyone's working copy so whenever they open their working copy it will be up to date. please help me to apply this to my repository

we are using tortoise svn with windows clients and we had integrated tortoise svn with collabnet team-forge

Dushyant Padhya

Posted 2015-08-13T12:08:41.053

Reputation: 1

Have you tried to create any scripts so far? Is there a particular part of a script that isn't working? – panhandel – 2015-08-13T19:51:23.723

Cross-posted to Stack Overflow: http://stackoverflow.com/q/31987458/1390430

– Ben – 2015-09-06T21:49:30.790

Similar question: http://superuser.com/q/701136/233630 I don't think it's a duplicate, because this question is more of an XY problem which is really asking "how do I share an excel spreadsheet so that people don't remove each-others' work"?

– Ben – 2015-09-06T22:25:34.077

Answers

0

Copied from my answer to the exact same question on stack overflow:


No, you don't want that. This could obliterate work in progress. And it won't help if multiple people try to edit at the same time.

What you want, is a way to tell users "someone else is editing this file now, don't touch it".

The way to do this is to set the svn:needs-lock property on any binary files, such as Excel spreadsheets.

With this property, the file becomes read-only on everybody's working copy. To edit the file, you first use svn lock which makes the file writeable, and prevents anyone else from locking or committing the file. Then, when your changes are done, and you commit, the lock goes away and others can get lock and make changes.

Getting a lock will fail, if your version of the file is out of date, forcing an update.

But be careful not to have the file open when you do an update, or you may write over the incoming changes.

Ben

Posted 2015-08-13T12:08:41.053

Reputation: 2 050