0

I am using tortoise svn.

When I update the svn trunk directory, it updates to svn branch's head revision.

Does anyone know why this is happening?

Yeti
  • 1,108
  • 19
  • 28
user1164199
  • 359
  • 4
  • 12
  • 1
    Please do a svn log on the repository as a whole. Which revision is the most recent? Is it a commit in the trunk or a commit in the branch? – Yeti Apr 20 '18 at 21:26
  • Yeti: the branch shows the most recent commit of the whole repo. The trunk's head revision is earlier than the branches head revision. – user1164199 Apr 21 '18 at 00:22
  • Yeti: I examined the trunk and it doesn't have the branch changes.. Then why does the svn client say "Completed At revision: XXX" where XXX is the revision # of the branch's head after I perform an update on the truck? – user1164199 Apr 21 '18 at 00:26
  • Possible duplicate of [Why revision # different between show log and svn update?](https://stackoverflow.com/questions/35263986/why-revision-different-between-show-log-and-svn-update) – royalTS Apr 23 '18 at 14:01

1 Answers1

1

When you are updating a working copy it is update to the HEAD revisions unless you specify a specific revision.

svn update

svn update brings changes from the repository into your working copy. If no revision is given, it brings your working copy up to date with the HEAD revision.

As revision numbers apply to the whole repository, is it completely normal that you see the most recent revision when updating your trunk.

Global Revision Numbers

Unlike most version control systems, Subversion's revision numbers apply to the entire repository tree, not individual files. Each revision number selects an entire tree, a particular state of the repository after some committed change. Another way to think about it is that revision N represents the state of the repository filesystem after the Nth commit.

Yeti
  • 1,108
  • 19
  • 28
  • In my case, the trunk's head revision is 738 and the branch's head revision is 740. When I update the truck's working directory,svn say "Completed At revision: 740"; however, it hasn't updated to revision 740, it has updated to the trunk's head revision (i.e. 738), which is what it suppose to do. Are you saying the truck should update to revision 740? – user1164199 Apr 22 '18 at 15:24
  • @user1164199 Your trunk and your branch don't have a HEAD revision. But your repository does. As I wrote: When you do an update without any options svn update will update to the most recent revisions of the repository which is the HEAD revisions of the repository. – Yeti Apr 22 '18 at 20:26
  • Yeti: I am still confused. If I update the trunk's working directory, it updates to the most recent revision of the trunk and not the head revision of the repository. In my case, the most recent revision of the trunk was 738 (which was not the HEAD revision of the repository). However, tortoisesvn says "Completed At revision: 740", which is the HEAD revision of the repository. Also, when I update a branch, it updates to the most recent revision of that branch (which may or may not be the HEAD revision of the repository). – user1164199 Apr 23 '18 at 21:12
  • Yeti: Ok, I read through the svn-book.pdf. I'll just have to accept that update will show that it has updated to the latest revision of the repo even though I might have only updated a specific part of the repo. Thanks for the help. – user1164199 Apr 24 '18 at 03:52
  • @user1164199 No problem. I know that svn can be confusing on the beginning. If your question is answered please be so kind and mark my answer as accepted. – Yeti Apr 24 '18 at 07:12