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

Re: howto? specify non-mergability for a file

From: Cory Omand <comand_at_blastwave.org>
Date: 2005-09-29 17:58:54 CEST

Assaf Lavie wrote:
> I have a text file under source control that keeps the build numbers
> (auto-incremented every build).
> The problem is this file is _always_ conflicted when more than one
> person works on the project.
> Can I mark this file as "always use newer version - never merge" somehow?

You could set svn:needs-lock on this file, which would prevent more than
one person editing the file at a time:

$ svn propset svn:needs-lock true build.properties

... then, the file is normally read-only, until someone gets a lock on
the file:

$ svn lock build.properties

... now the file is read/write for the current user -- commit it and
unlock ...

$ svn commit -m "new build" build.properties
$ svn unlock build.properties

You need a recent version of Subversion to do this (1.2.x, 1.2.3
recommended). There is more information in the subversion book nightly
build:

http://svnbook.red-bean.com/nightly/en/svn.advanced.locking.html

Regards,
Cory.

-- 
Cory Omand <comand@blastwave.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Sep 29 19:36:05 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.