开发者

TortoiseSVN: What is head revision

I'm a VSS user learning how to use SVN, and I have selected TortoiseSVN as my p开发者_StackOverflow中文版latform. Can someone tell me what the term "HEAD Revision" means?


It means the Latest Revision.

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


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.


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


Wikipedia defines it as:

Head The most recent commit.

See Common_vocabulary.


The latest revision that you committed to the repository.

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


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.


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.]

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜