SVN 修订版本关键字

来自阿里的一道测试题目,刚好了解下 SVN 中修订版本关键字,评论留言你的答案

题目

【单选题】关于SVN中修订版本关键字,描述错误的是?

A. HEAD工作拷贝中的最新的版本

B. BASE工作拷贝中一个条目的修订版本号,如果这个版本在本地修改了,则“BASE版本’就是这个条目在本地未修改的版本

C. COMMITTED项目最近修改的修订版本,与BASE相同或更早

D. PREV一个项目最后修改版本之前的那个版本,技术上可以认为是COMMITTED-1

Revision Keywords

The Subversion client understands a number of revision keywords. These keywords can be used instead of integer arguments to the --revision (-r) option, and are resolved into specific revision numbers by Subversion:

Subversion客户端可以理解一些修订版本关键字,这些关键字可以用来代替 --revision (r) 的数字参数,这会被Subversion解释到特定修订版本号:

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

版本库中最新的(或者是“最年轻的”)版本

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.

工作拷贝中一个条目的修订版本号,如果这个版本在本地修改了,则“BASE版本”就是这个条目在本地未修改的版本

COMMITTED

The most recent revision prior to, or equal to, BASE, in which an item changed.

项目最近修改的修订版本,与 BASE 相同或更早

PREV

The revision immediately before the last revision in which an item changed. Technically, this boils down to COMMITTED-1.

一个项目最后修改版本 之前 的版本,技术上可以认为是 COMMITTED -1

As can be derived from their descriptions, the PREV , BASE , and COMMITTED revision keywords are used only when referring to a working copy path—they don’t apply to repository URLs. HEAD, on the other hand, can be used in conjunction with both of these path types.

因而可以从描述中得到,关键字PREVBASECOMMITTED只在引用工作拷贝路径时使用,而不能用于版本库URL, 而关键字 HEAD 则可以用于两种路径类型


参考资料

  • Version Control with Subversion For Subversion 1.7