Question

In the SVN checkout wizard under the Revision section, the two options available are HEAD / Revision number.

My use case: Developer A checked in 3 files at version 1, Developer B checked in 2 files at version 2, Developer C checked in 2 files at version 3 . In total there are 7 file path revisions but actually 4 files got modified within these revisions.

My problem: I would like to checkout only these 3 revisions in a single checkout transaction.

Issue: When i click show log, i see version 3,2,1 with their respective file path changes. When i select 3,2,1 revision changes and click ok... the revision box shows the version as 1 instead of 1,2,3.

Is there really an option to svn checkout multiple versions in one checkout?? Please help

Was it helpful?

Solution

You're misunderstanding how revisions work in SVN.

When Developer A checks in the first files, they're given revision 1 (and so is the repository itself) Revision 1 becomes the HEAD revision.

Developer B now checks in the files, and the entire repository becomes revision 2 (the second time the repository was changed), even though the individual files in the repo keep their current versions as the last changed revision. So now, we have the following:

DevAFile1     v1.0
DevAFile2     v1.0
DevAFile3     v1.0
DevBFile1     v2.0
DevBFile2     v2.0
HEAD          v2.0

Developer C now checks in two more files, and those files (and the entire repo) are revision 3:

DevAFile1     v1.0
DevAFile2     v1.0
DevAFile3     v1.0
DevBFile1     v2.0
DevBFile2     v2.0
DevCFile1     v3.0
DevCFile2     v3.0
HEAD          v3.0

HEAD is now revision 3, which is made up of the three v1 files from Developer A, the two v2 files from Developer B, and the two v3 files from Developer C. So checking out the HEAD revision gets you the three individual versions of the file from the individual developers, all of which make up the HEAD version.

This is described in the TortoiseSVN help file in Section 2.3.3. Revisions

Global Revision Numbers

Unlike those of many other version control systems, Subversion's revision numbers apply to entire trees, 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. When a Subversion user talks about revision 5 of foo.c'', they really meanfoo.c as it appears in revision 5.'' Notice that in general, revisions N and M of a file do not necessarily differ!

This can be confirmed by using TortoiseSVN's Show log on an individual file in the repository. For instance, looking at DevFileA1 will show you something similar to:

Revision  Action  Author  Date        Message
========  ======  ======  ========    =======
3         ...     DevC    xx/xx/xxxx  Last update message of repo from DevC
1         ...     DevA    xx/xx/xxxx  Checkin message from DevA
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top