With SVN, how can I get another developer to rewrite me?

I am not sure how to do this. I just started using SVN in a real project. Everything works for me correctly. But I'm the only one who uses it. Now I want to introduce a second person to the process.

I downloaded tortoisesvn to my windows car and checked on the main trunk. I can edit the file and transfer the new file. Everything works.

Now, I want the second guy to do this while I'm doing something. Usually it can work on another file, and we agreed on the time to export our files to the test server (in my opinion, one way or another), but what if we work on the same file? for example, a configuration file. Perhaps we need to change it. How can I (or he) leave the other of him, and someone else will change him. If one of us makes a new update, he will delete what one of us just launched. Not sure what to do here.

+4
source share
5 answers

No, nothing will erase.

If two people change the file and try to commit it, the second person who needs to make an error will receive an error message stating that the file has been modified since the last update.

This second person is updating. If SVN can do this, it will combine them, saving the changes of both people. If it cannot (usually only if you change something in the same place in the file), it will tell you and you will have to handle the conflicts.

+6
source

With SVN, the goal is not to capture the file and say, "This is mine, do not touch it." The goal is to SAVE your changes when both of you are done. The number of cases when two people really make incompatible changes is small, and when this happens, developers need to get together to merge them, as opposed to having a race who first wins the file lock.

Always upgrade to Commit so that you combine your changes with yours.

+9
source

This problem cannot occur due to the fact that Subversion (any decent SCM in fact) will allow you to complete AFTER you have performed the update. If Subversion cannot merge your changes, this will cause a conflict, which you must resolve manually.

+2
source

SVN has locks in the rare case that you need to use. Read more in the Blocking section of the SVN book.

+2
source

It sounds like you need to understand how SVN works. I suggest you read the Version Models section of book .

+2
source

Source: https://habr.com/ru/post/1303607/


All Articles