Suppose you make changes to button.c. Since the .svn directory remembers the file's modification date and original contents, Subversion can tell that you've changed the file. However, Subversion does not make your changes public until you explicitly tell it to. The act of publishing your changes is more commonly known as committing (or checking in) changes to the repository. To publish your changes to others, you can use Subversion's commit command. Now your changes to button.c have been committed to the repository; if another user checks out a working copy of /calc, they will see your changes in the latest version of the file. Suppose you have a collaborator, Sally, who checked out a working copy of /calc at the same time you did. When you commit your change to button.c, Sally's working copy is left unchanged; Subversion only modifies working copies at the user's request. To bring her project up to date, Sally can ask Subversion to update her working copy, by using the Subversion update command. This will incorporate your changes into her working copy, as well as any others that have been committed since she checked it out.
2.3.2. Revisions修正 www.shengfang.org In the repository, each commit is treated as an atomic transaction: either all the commit's changes take place, or none of them take place. Subversion tries to retain this atomicity in the face of program crashes, system crashes, network problems, and other users' actions. Each time the repository accepts a commit, this creates a new state of the filesystem tree, called a revision. Each revision is assigned a unique natural number, one greater than the number of the previous revision. The initial revision of a freshly created repository is numbered zero, and consists of nothing but an empty root directory. A nice way to visualize the repository is as a series of trees. Imagine an array of revision numbers, starting at 0, stretching from left to right. Each revision number has a filesystem tree hanging below it, and each tree is a “snapshot” of the way the repository looked after each commit. www.shengfang.org Global Revision Numbers www.shengfang.org 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 mean ``foo.c as it appears in revision 5.'' Notice that in general, revisions N and M of a file do not necessarily differ! 全球性版本号 www.shengfang.org 不同于那些许多其他版本管理系统, Subversion的版本号适用于 整个树, 不仅仅各自的文件。 各版本号选择一棵整个树, 特殊性贮藏库的状态在一些做的变动以后。 其它方式认为是, 修正N 以后代表贮藏库filesystem 的状态 n 做。 当Subversion用户谈论"修正5 foo 。c ", 他们真正地意味"foo 。c 如同看起来在修正5 。"注意那总之, 修正N 和M 文件 不是 必要不同! 使用了微软的 Office 2003的翻译服务 以不加密的 HTML 格式通过 Internet 发送文档以获得翻译服务 字体:大 中 小 |
![]() | 永久地址 http://www.shengfang.org/blog/p/tsvnhlprev.php |
![]() | 引用地址 http://www.shengfang.org/blog/tb.php?tb_id=1127225023 |
2005年9月20日22:03星期二 [English]





