当前位置:首页 > 开发 > IT生活 > 正文

SVN Base and head revision

发表于: 2013-03-01   作者:darrenzhu   来源:转载   浏览次数:
摘要: revision是修订版本的意思,别误当成reversion 简单的说,当你checkout一个版本下来,然后在本地做了修改,并且还没有提交代码,此时base代表没有本地修改的你刚才checkout的那个版本,head代表repository里面的最新版本(其它人可能有提交),当你提交后,并且没有他人提交,此时base应该与head相等。 HEAD is the latest revi
revision是修订版本的意思,别误当成reversion
简单的说,当你checkout一个版本下来,然后在本地做了修改,并且还没有提交代码,此时base代表没有本地修改的你刚才checkout的那个版本,head代表repository里面的最新版本(其它人可能有提交),当你提交后,并且没有他人提交,此时base应该与head相等。


HEAD is the latest revision in the repository. BASE is the last revision you have obtained from the repository. They are the same after a successful commit or update.

When you make changes, your files differ from the BASE copies. When you revert, they go back to matching the BASE revision. When you get a conflict, you do not update the repository. Rather, your files are considered to still be "being edited" as if you were making changes. After you resolve conflicts, you have in essence decided what the final files will look like and you then commit them as you would have normally. So, conflicts are like a case of special editing.


Revision reference:
http://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html

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:

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

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.

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.

Here are some examples of revision keywords in action:

$ svn diff -r PREV:COMMITTED foo.c
# shows the last change committed to foo.c

$ svn log -r HEAD
# shows log message for the latest repository commit

$ svn diff -r HEAD
# compares your working copy (with all of its local changes) to the
# latest version of that tree in the repository

$ svn diff -r BASE:HEAD foo.c
# compares the unmodified version of foo.c with the latest version of
# foo.c in the repository

$ svn log -r BASE:HEAD
# shows all commit logs for the current versioned directory since you
# last updated

$ svn update -r PREV foo.c
# rewinds the last change on foo.c, decreasing foo.c's working revision

$ svn diff -r BASE:14 foo.c
# compares the unmodified version of foo.c with the way foo.c looked
# in revision 14
Revision Dates
Revision numbers reveal nothing about the world outside the version control system, but sometimes you need to correlate a moment in real time with a moment in version history. To facilitate this, the --revision (-r) option can also accept as input date specifiers wrapped in curly braces ({ and }). Subversion accepts the standard ISO-8601 date and time formats, plus a few others. Here are some examples.

$ svn update -r {2006-02-17}
$ svn update -r {15:30}
$ svn update -r {15:30:00.200000}
$ svn update -r {"2006-02-17 15:30"}
$ svn update -r {"2006-02-17 15:30 +0230"}
$ svn update -r {2006-02-17T15:30}
$ svn update -r {2006-02-17T15:30Z}
$ svn update -r {2006-02-17T15:30-04:00}
$ svn update -r {20060217T1530}
$ svn update -r {20060217T1530Z}
$ svn update -r {20060217T1530-0500}

SVN Base and head revision

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

编辑推荐
方法一: 2、在设置 -- SVN设置 里把里面的勾都去掉 方法二: 1.只需将上图中的Subversion configurat
每日一贴,今天的内容关键字为svn判断 在java下,已经有一个非常壮大的工具,svnkit,为我们封装了非
由于多次涉及到了这个东东,又不是很理解机制,决定深入研究下。 what   django-revision到底啥玩
Change-set base merge 名词: CollabNet 引用 CollabNet公司创始人   公司创始人兼CTO Brian Behl
用Android自带的SDK Manager更新SDK时,更新到revision 7就报错,如下: 但用eclipse中的ADT进行更
Mobile Safari是开源的Mac Safari的iOS版本,然而iOS WebKit并不完全开源,只公开了部分的WebCore和
Mobile Safari是开源的Mac Safari的iOS版本,然而iOS WebKit并不完全开源,只公开了部分的WebCore和
SDK Build Tools revision (19.0.3) is too low for project Min(转) 如果你正在使用Android Stud
为了迎接Windows 2008 R2的正式发布,特将本人去年写的《 Windows 2008 实战之KMS实施》重新整理并
2008年4月写了篇如何升级Symantec Endpoint Protection的文档,因为这2年的工作中一直需要升级,时
版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号