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

Re: Lock working copy and prevent accidental update

From: Gavin Lambert <tsvn_at_mirality.co.nz>
Date: Thu, 23 Mar 2017 18:09:11 +1300

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.)

You could even set up scripts to do the updates automatically, either
with a commit hook or just periodically trying to update.

(Although also note that having development resources like SVN servers
accessible from production servers can be a security hazard.)

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2017-03-25 01:29:14 CET

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.