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

RE: Roadmap for 1.1 (locking)

From: <andy.glew_at_amd.com>
Date: 2004-04-02 20:11:45 CEST

> >>I have a question on locking and svn in general:
> >>when locking a single file, you would only lock
> >>for example
> >>
> >> /trunk/foo.txt
> >>
> >>but all other branches that contain this file
> >>
> >> /bar/Branch01/foo.txt
> >> /bar/Branch02/foo.txt
> >>
> >>would remain unlocked, since svn is unable
> >>to detect that these are branches and are related.
> >>
> >>Or do I misunderstand that?
> >
> >
> > Correct. That is my common usage of locking in other SCM systems.
> > The primary purpose of locking is to prevent collisions.
> > Editing the same file in two different branches doesn't cause a collision.
> but how will this work if the locking is intended to prevent
> collisions between unmergable binary files?

You have to distinguish between a file being on a branch,
versus a file itself being branched. And locked.

The same file-revision (I actually want to say object revision,
but since subversion is file oriented we'll leave it at that)
may belong to many different system-branches.

However, if somebody wants to edit this file, then file
itself must branch. There will then be at least two or
more current versions of the file, one on the branch,
one not.

If you want all the branches to then share this same
updated revision of the unmergeable binary file, then
you "merge" the branched revision back to the trunk
- by copying, since it is unmergeable - and then
update it to all branches thatr care. Actually, you ask
the guys managing the branches to update at their convenience.

You don't make the new version instantly available
to all branches, because that can produce inconsistencies.

You can use locking to reducer the chance of the file shared
between all brancges from being modified by accident.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Apr 2 20:12:37 2004

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.