开发者

SVN Update, What happens to a local file with uncommitted changes?

开发者 https://www.devze.com 2023-03-22 18:50 出处:网络
Suppose I have a local file that I am working on that is part of a repository. The local file has changes that are local and have been saved to the local file and have yet to be committed.

Suppose I have a local file that I am working on that is part of a repository. The local file has changes that are local and have been saved to the local file and have yet to be committed. What happens when I go to update the whole repository?

Is it the case that SVN will try and merge the HEAD with the local copy (hopefully sans conflicts) or will SVN just leave the 开发者_运维百科local copy alone until it is committed later?


Just an extra note that could be helpful - though the question was already answered properly.

After you update and merging is done, if there are any conflicts you'll get extra files in your directory stating the conflicting versions and showing their original sources. Your "local copy" will have =============== signs by the actual conflict(s) and will show the contents of the two versions at the conflicting area, and you have to look at them and combine them into what you actually wanted / think was intended.

You then back out to the directory the conflicting file was in and type "svn resolved " to inform SVN the the conflict is no longer an issue - it will be reflected when you do svn status calls thereon.


It will merge HEAD with your local copy. If the changes collide - you get a nice conflict.


It will quite happily try to merge the HEAD revision with your local, uncommitted changes. If there are any conflicts, you will most certainly be notified.


As others already said, it will merge against the HEAD. You'll know which files this affected because instead of a U symbol for "updated" they will be identified with a G:

At revision 1445.
U       include/js/common.js
U       include/js/view.js
G       include/js/list.js <-- merged 
0

精彩评论

暂无评论...
验证码 换一张
取 消