Do you think you are fooling SVN to complete step # 6? It seems you misunderstood what went wrong. SVN will never commit from a working copy that is not being updated , so step 6 will not work without first updating user B and merging the changes of user A. Honestly. Give it a try.
I guess what happens instead:
- Verification of the project.
- B checks the same project.
- A adds the file.
- A makes a change.
- B adds the file, but forgets to save the project / solution.
- B tries to commit the changes and receives a message that he should update first.
- B.
- B switches back to VS. VS tells him that the project / solution has been changed on the disk and asks if he wants to: a) reboot from the disk and lose its changes; b) override the version on disk.
- B does not understand, does not try to understand, considers his changes valuable and chooses b), redefining the changes on the disk.
- B still does not try to understand and, therefore, does not differ in the version that he has on the disk, with the last fixed, and thus skips the fact that he turned over the changes of A.
- B Checks, discards the changes.
I saw this from time to time, usually with user B, who really does not understand the SVN workflow (or CVS, FTM).
So here are some tips:
Do not update if you have not saved everything ("File" → "Save All", for me it is Ctrl + Shift + S). If you make this mistake and get stuck, override the changes on the disk, and then manually merge the lost changes. (Perhaps this will also help update the project / solution file to version N-1, and then press HEAD again so that SVN performs the merge.)
Don't commit without checking which files you changed , and quickly look through diffs to see if the changes are what you expect.
Commit in advance, often complete . The more developers work on the same code base, the greater the likelihood of conflicts. The longer you change your working copy without updating, the greater the likelihood of conflicts. Since the number of developers is usually not in your hands, the refresh rate is one thing you can use to reduce the likelihood of conflicts.
sbi
source share