There are a couple of points about SVN revision numbering on a branch which are not clear to me:
When I create a branch, does the branch get its own revision number?
No. There is only one global revision number for the whole repository.
The commit that creates the branch will get a revision number.
To clarify, please explain what happens when a commit is done on a branch.
Subversion itself does not really have special support or understanding for branches. This is all conventions built on how to lay out files in a directory structure.
So there is no difference between committing a file on "trunk" and committing a file on a "branch". In fact, the same commit can change files across many branches.
There is no difference to subversion internally between creating a branch and copying a directory. We (as users) just assign a different meaning to it.
Same thing with "tags". Those are just copies of your code at a certain time moved to another directory (just like a branch), that you intend to keep around without ever changing them again (but Subversion itself does not enforce that).
Yes. Revision numbers belong to the repository; every commit gets its own revision number.
The branch is just a subfolder in the repository. It gets revision numbers which are unique across the whole repo, just like every other subfolder. When you commit to a branch, it works exactly the same as when you commit to any other folder of the repo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With