u123
u123

Reputation: 16329

Understanding SVN history on branches

I am trying to understand the history in a SVN repository. Below I have used the TortoiseSVN revision graph on a branch (lets call it X):

enter image description here

So a branch was branched off from trunk at revision 924. Now when I look at the history on the branch I get this:

enter image description here

From that we can see that the checkin at revision 941 modified a path in the /branches/... folder.

But when I select the check-ins previous to 941 (still on the branch) I get: enter image description here

All those check-ins modify paths starting from /trunk/...

How is that possible? That check-ins on a branch modifies paths on trunk?

Or that check-ins on trunk pops up in the history of the branch?

Upvotes: 0

Views: 1318

Answers (1)

Ben
Ben

Reputation: 8905

You branched from revision 936. Thus the history of your branch starts based on revision 936 on trunk. Anything on trunk before that point is conceptually an ancestor of your branch, so logically it will show up in the history. Anything after that point on trunk is not an ancestor of your branch, so it will not be present.

Anyway, you can hide ancestors on trunk if you only care about revisions on your branch. There is a "stop on copy/rename" checkbox in the log dialog exactly for that purpose. With this checkbox selected, you will only see revisions created by commits on your branch.

Note, you seem unclear on a very important SVN concept, namely: every revision in a repository contains every path on every branch of the repository at that point in time. For example in your version tree, although revision 971 only modifies artifacts on trunk, you are still able to checkout your branch at revision 971. You could not checkout your branch at revision 934, because the branch had not been created yet. In other words, revisions contain branches; branches do not contain revisions. Each revision is a snapshot of the entire repository.

Upvotes: 3

Related Questions