When svn BASE becomes equal to HEAD

I have a question about the BASE version in svn. I know this is the original version of the item since the last update, and svn diff and status mostly work against this version. When is BASE updated? Is it updated in HEAD when the update starts? Is this always true, even if there was a conflict during the update? What does BASE have a conflict? Does it have a version from my last update (to the most recent update that caused the conflict) or will it be updated to HEAD, even if there is a conflict?
Also, when svn commit is executed, I assume that BASE is updated with my local changes, and at the moment BASE, HEAD and my local copy are all the same? If the commit is successful.

+25
svn
Apr 13 '09 at 1:17
source share
4 answers

HEAD is the latest revision in the repository. BASE is the last revision you received in the repository. They are the same after a successful commit or update.

When making changes, your files are different from BASE copies. When you return, they will return to matching BASE version. When you get a conflict, you are not updating the repository. Rather, your files are considered β€œeditable,” as if you were making changes. After you resolve the conflicts, you have essentially decided what the final files will look like, and then you will complete them as usual. So, conflicts are similar to the case of special editing.

+38
Apr 13 '09 at 7:14
source share
β€” -

BASE is a revision of your working copy as it exists in the repository. In other words, your revision is unchanged. So, if you are an svn update file or folder for HEAD, then BASE and HEAD are equal.

When a conflict arises, BASE becomes a revision before commit, which is contrary to your working copy.

Run svn info on the element to see its version of BASE.

Edition Specifications

+7
Apr 13 '09 at 6:20
source share

This is important when you look at the logs because svn log without url shows your BASE log, but with the URL of your HEAD log, so I always use "svn log -rHEAD: 1" to see all the changes.

+3
Oct 14 '09 at 8:44
source share

Theory : after a successful recursive update or switching the base version of all your files, it becomes the head. After fixing or a partial update, some files may be in the HEAD edition, but only after an update that does not skip files, you can be sure that all files are in the same version. (The reasons for skipping are unbelieving obstacles or conflicts).

But why do you need to know this. Subversion should know this internally, but this knowledge should not be of much importance to the user in most cases. (Subversion automatically warns you when files are out of date).

As far as I can tell, the only time you really need to make sure that you are in a stable version is when you create a branch from a working copy.

0
Apr 13 '09 at 20:26
source share



All Articles