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

Re: Update before commit

From: Ryan Schmidt <subversion-2007a_at_ryandesign.com>
Date: 2007-02-14 22:23:05 CET

On Feb 14, 2007, at 14:35, lightbulb432 wrote:

> Could two developers who have just done an update to their working
> copy and
> are doing two different parts of the code (with a dependency to
> each other
> though) do a build/test cycle locally and determine their changes
> are good.
>
> Developer 1 commits his changes, then developer 2. Because developer 2
> didn't modify the same files that developer 1 did, this second
> commit goes
> through successfully. But because those files are dependent on each
> other,
> the repository doesn't build?
>
> Of course the odds of this happening aren't great, but is what I've
> described a possible scenario (or am I missing something)? How
> would you get
> around this or handle this when it happens?

Yes, that's technically possible. If the changes are in different
files, then Subversion will happily let you commit the changes.
However, I cannot think of a way that doing so could break a project.
Well, maybe I could...

developers 1 and 2 get working copies.

file foo contains a function foo() that does something, and various
files in the project use foo().

developer 1 renames function foo() to bar() and updates the reference
in all files that used foo() so that they now use bar().

developer 2 writes a new file which uses foo().

Both developers commit. Now, what's in the repository doesn't work --
developer 2's code uses foo() which is not called that anymore.

But I would think this situation wouldn't occur that often. I would
think that developers should communicate with one another, via email
or meetings or similar, letting one another know what they're doing.
If developer 1 planned to rename the function, this should have been
a consensus among the developers. Or the other developers should at
least have been informed that a public function was about to change
names. And so forth.

-- 
To reply to the mailing list, please use your mailer's Reply To All  
function
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Feb 14 22:23:44 2007

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.