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

RE: encouraging users to switch

From: John Kristian <John.Kristian_at_Siebel.com>
Date: 2005-02-11 03:36:54 CET

Good idea! On further reflection, it seems to me that `svn move` is the
wrong tool for moving a branch. A better choice is `svn copy`. That
is, one should copy the branch to its new name, and immediately install
a pre-commit hook script that prevents commits to the old branch and
instructs users to switch. (A cautious user would then merge from the
old name to the new, just in case some changes snuck in after the copy.)

`svn move` is relatively harmful for this use case, because the implied
`svn delete` causes subsequent updates to do relatively harmful things
(such as delete working copies, and forget uncommitted additions and
deletions).

It's sad that such a routine chore is so complicated to perform with
subversion. Isn't there a simpler way? Perhaps I'll submit a request
to implement one ...

- John Kristian

-----Original Message-----
From: news [mailto:news@sea.gmane.org] On Behalf Of Norbert Unterberg
Sent: Saturday, February 05, 2005 2:13 AM
To: users@subversion.tigris.org
Subject: Re: encouraging users to switch

John Kristian schrieb:

> Can you recommend a way to encourage users to execute `svn switch`
> after a branch is moved?

You could write a pre-commit hook script chat checks the path. If
someone tries to check in to the "old" branch then you can output an
error message to stderr, which subversion shows to the user.

The other way I might think of is using permissions. Deny write access
to the old branch. Commits to the old branch will fail, and people might
ask you what to do next.

Norbert

------------------------------------------------------------------------------
Siebel CRM OnDemand. Proven Results for Any Size Company. www.crmondemand.com

This e-mail message is for the sole use of the intended recipient(s) and contains confidential and/or privileged information belonging to Siebel Systems, Inc. or its customers or partners. Any unauthorized review, use, copying, disclosure or distribution of this message is strictly prohibited. If you are not an intended recipient of this message, please contact the sender by reply e-mail and destroy all soft and hard copies of the message and any attachments. Thank you for your cooperation.
====================================================

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Feb 11 03:39:21 2005

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.