On 5/25/2006 11:55 AM, Nico Kadel-Garcia wrote:
> Jim Sheldon wrote:
>> Hello everyone, this is my first post to this mailing list.
>>
>> I have encountered a problem at work where we user subversion for our
>> software projects. The problem arises when the following occurs:
>>
>> 1. file1.txt is moved/renamed (using subversion commands, not the
>> local filesystem) on system A to file2.txt.
>>
>> 2. System B then makes changes to file1.txt and commits them.
>>
>> 3. System A runs 'svn update' before commiting its changes. file1.txt
>> is retreived from the server with modifications from System B.
>>
>> At this point users of both System A and B have to communicate to
>> merge their changes into file2.txt.
>
> This is why the ghods invented branches: so that System A and B can each
> have their own branches, so they can each avoid stepping on each other this
> way. Then when they're done, they merge their changes back to the trunk.
No, I think you misunderstood. This is simply a conflict between what
happened on A and what happened on B. A deleted the file, B modified
some lines in it. The net effect is that they have made incompatible
changes to the file. I don't know what happens if A commits first, but
if B commits first (the case Jim was talking about), this happens:
When A updates:
- the file is resurrected with B's changes in it, but no warning.
When A commits:
- the file is deleted, losing B's changes.
When A updates, svn should report it as a conflict that needs to be
resolved before A is allowed to commit his delete.
Duncan Murdoch
>
>> My question is, shouldn't subversion be smart enough to know that when
>> the user on System A runs 'svn update', file1.txt should not be
>> downloaded, the user should be warned that a modification was made to
>> file1.txt after it was moved file2.txt, but before the move was
>> committed to the repository?
>
> Not really, in my personal opinion: it's very difficult for Subversion and
> its ancester, CVS, to know who might have something checked out or all the
> different possible locations of checkouts, on the same system or on
> different systems, which might need to be cross-notified this why. If
> you're going to do this, you really need to do "svn update" before doing
> "svn commit" of anything.
>
>> I hope this makes sense. If this is a known problem, I was unable to
>> find anything relating to it in the manual, or in various google
>> searches.
>>
>> Thanks!
>
> That's why, if you have to both work on the same branch at the same time,
> both systems should do an update *before* comtting.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu May 25 20:21:26 2006