如果文件只更改过一次,为什么 Subversion/TortoiseSVN 会跳过修订号?
我对 Subversion/TortoiseSVN 相当陌生,我想知道是否有一种方法可以防止 Subversion 跳过文件的修订号,以便我可以根据文件的修订号跟踪文件更改的时间:
示例:我有A.txt、B.txt 和 C.txt 修订版 1:(将文件添加到存储库) A.txt:1 B.txt:1 C.txt :1
修订版 2:(编辑文件:A.txt 和 B.txt) A.txt:2 B.txt:2 C.txt :1
修订版 3:(编辑文件:A.txt 和 C.txt) A.txt:3 B.txt:2 C.txt :3 <---------我希望这个“3”成为 2************
******** 我对 C 做了一项更改.txt,我希望修订号增加一倍(不是跳过 2 直接转到 3)。我理解为什么 Subversion/TortoiseSVN 这样做以及如何遵循它,但是对于我正在从事的项目,我想以不同的方式做到这一点。我到处都读过,似乎找不到其他人有这个问题。有什么建议吗?
谢谢
,我是新来的
I am fairly new to Subversion/TortoiseSVN and I want to know if there is a way to prevent Subversion from skipping revision numbers on files so that I can track the amount of time a file is changed based on it's revision number:
Example: I have A.txt, B.txt, and C.txt
Revision 1: (added the files to repository)
A.txt :1
B.txt :1
C.txt :1
Revision 2: (edited files: A.txt and B.txt)
A.txt :2
B.txt :2
C.txt :1
Revision 3: (edited files: A.txt and C.txt)
A.txt :3
B.txt :2
C.txt :3 <---------I want this "3" to be a 2**********
******** I made one change to C.txt and I want the revision number to increase one time (not skip 2 and go straight to 3). I understand why Subversion/TortoiseSVN does it this way and how to follow it, but for the project I am working on, I want to do this a different way. I have read everywhere and can't seem to find anyone else with this issue. Any suggestions?
Thanks
I am new at this
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
修订号不计算特定受控工件被修改的频率。相反,他们跟踪整个工件集的版本。通过这种方式,您可以检索版本 96,并根据该数字知道您确实拥有所需的文件集。
这与 CVS 或 VSS 不同,CVS 或 VSS 的版本号是基于每个文件进行跟踪的,并且您需要不同的技术来获得一致的整个项目视图。 (例如,VSS 中的“标签”)
Revision numbers do not count how often a particular controlled artifact has been modified. Rather, they track a version of the entire set of artifacts. This way you can retrieve, say, version 96 and know based on that number that you have exactly the set of files that you need.
This is different from CVS or VSS where version numbers are tracked on a per-file basis and you need a different technique to get a consistent entire-project view. (E.g., "labels" in VSS)
subversion 处理每个项目的修订号,而不是像 cvs 那样处理每个文件的修订号
subversion handles the revision number per project not per file as cvs used to
正如其他人所说,你不能在 Subversion 中做到这一点。你不需要这样做。如果您想知道对特定文件进行了多少次修订,请使用 svn log。
As others have said, you can't do that in Subversion. And you don't need to. If you want to know how many revisions have been made to a particular file, use
svn log
.