TortoiseSVN: What is head revision

SvnVersion ControlTortoisesvn

Svn Problem Overview


I'm a VSS user learning how to use SVN, and I have selected TortoiseSVN as my platform. Can someone tell me what the term "HEAD Revision" means?

Svn Solutions


Solution 1 - Svn

It means the Latest Revision.

Getting the HEAD Revision from SVN would be like doing a 'Get Latest...' in VSS.

Solution 2 - Svn

Since your question is Subversion-specific, here is what the SVN book says:

> HEAD > > The latest (or “youngest”) revision in the repository.

For comparison, here are the other revision keywords:

> BASE > > The revision number of an item in a working copy. If the item has > been locally modified, this refers to > the way the item appears without those > local modifications. >
> COMMITTED > > The most recent revision prior to, or equal to, BASE, in which an item changed. >
> PREV > > The revision immediately before the last revision in which an item changed. Technically, > this boils down to COMMITTED−1.

Solution 3 - Svn

It is the very latest/current revision of the project.

Solution 4 - Svn

Wikipedia defines it as:

> Head The most recent commit.

See Common_vocabulary.

Solution 5 - Svn

The latest revision that you committed to the repository.

Example: If your last commit created revision 15, then 15 is the HEAD revision

Solution 6 - Svn

The Tortoise help file is well worth a read. From the Glossary:

> HEAD revision
> The latest revision of > a file or folder in the repository.

Solution 7 - Svn

In Subversion, the repository has a sequentially numbered revision that marks each state. HEAD is an alias for the latest revision of the repository. When a revision is not specified, HEAD is assumed.

File and directory content are referenced by path and revision. The reference is to the content at the path when the repository was changed to that revision—whether the content at that path was changed or not.

Note: If the last action at a path was to delete it, that path does not have a HEAD revision (nor the repository revision created when the deletion was committed, nor any thereafter).

[So, contrary to some other answers and some cited documentation, HEAD does not refer to the latest revision of a file. You would have to go back to at least just before it was deleted for that.]

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJohn MichaelsView Question on Stackoverflow
Solution 1 - SvnJustin NiessnerView Answer on Stackoverflow
Solution 2 - SvnDavidView Answer on Stackoverflow
Solution 3 - SvnMike WellerView Answer on Stackoverflow
Solution 4 - SvnMizipzorView Answer on Stackoverflow
Solution 5 - SvnTrevorView Answer on Stackoverflow
Solution 6 - SvnanonView Answer on Stackoverflow
Solution 7 - SvnTom BlodgetView Answer on Stackoverflow