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

AW: Lock working copy and prevent accidental update

From: Niemann, Hartmut <hartmut.niemann_at_siemens.com>
Date: Mon, 27 Mar 2017 08:20:30 +0000

Hello!

> Von: Gavin Lambert [mailto:tsvn_at_mirality.co.nz]
>On 21/03/2017 15:51, Tomislav Kimovski wrote:
>> I think it would be very beneficial to have the ability to lock the
>> working copy and prevent accidental update from the repository.
>>
>> I have both staging and production instances (working copies) of the
>> project on the production server. The staging instance sometimes needs
>> several updates in a day before updating the production instance. It's
>> easy to confuse the two and mistakenly update the production instance
>> when the staging was intended. Since the production instance needs
>> updating from the repository once in a while, it would be beneficial
>> if it could be locked (context menu
>> item?) and report an error when update is requested.

>There isn't really a feature like that, but an alternative you might want to consider is to have staging and production in different branches.
>You can then check out each branch separately on the server. When you commit to the staging branch on your development machine, you can then update both working copies without problems -- the production branch didn't get committed to so it won't change, and the staging branch did so the staging WC will update.
>Once you're happy with the final results, you can switch your local development WC to the production branch, merge the staging branch into it, then commit that and update the production server's WC.
>(Of course, this just moves the problem: now you need to make sure that you're committing to the staging branch rather than the production branch at all times except when you're doing a merge.)

It is quite easy to set up strict commit rules with a precommit hook script, so the merging
and committing to the production branch can be limited to certain people, even to commit
messages containing trigger keywords like "updating production".

Mit freundlichen Grüßen
Dr. Hartmut Niemann

Siemens AG
MO MLT LM EN CCI SRD
Werner-von-Siemens-Str. 67
91052 Erlangen, Deutschland
Mobil: +49 173 5342327
mailto:hartmut.niemann_at_siemens.com
www.siemens.com/ingenuityforlife

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3223358

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2017-03-27 10:20:52 CEST

This is an archived mail posted to the TortoiseSVN Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.