[英]Will a merge always update the revision number of a file?
Lets say that I'm merging a directory from branch-alpha
into trunk
. 可以说我正在将一个目录从branch-alpha
合并到trunk
。 There is a new file called phi.txt
in branch-alpha
that will be merged into trunk. 在branch-alpha
中有一个名为phi.txt
的新文件,它将被合并到主干中。 Will the revision of phi.txt
change? phi.txt
的修订版phi.txt
更改吗?
I sense terminological/conceptual problem ;-) 我感觉到术语/概念问题;-)
In Subversion, files do not have revision numbers (as opposed to, say, CVS). 在Subversion中,文件没有修订号(例如CVS)。 Revision number is a property of a commit. 修订号是提交的属性。
But, any given file might be present or absent in a particular revision, and have a particular state in it. 但是,任何给定的文件在特定版本中可能存在或不存在,并且其中具有特定状态。
Say, given a series of revisions …→ @10
→ @11
→ @12
…, a particular file might have been changed in the @11
th revision, but you still are able to refer to the contents of that file using any of these revision numbers, just referring to that via @10
will give the "old" contents, and via @11
and @12
will give the "new" (and the same) contents—that is, until some future revision, @N
in which that file will be changed again. 假设给出了一系列修订…→ @10
→ @11
→ @12
…,某个特定文件可能已在第@11
个修订中进行了更改,但是您仍然可以使用以下任意文件来引用该文件的内容版本号,仅通过@10
引用将给出“旧”内容,而通过@11
和@12
给出“新”(且相同)内容-也就是说,直到将来的某个修订, @N
该文件将再次更改。 And then referring to it via some past revision @P
P<N will refer to the file's contents as found in rev. 然后通过以前的修订版本@P
P <N引用它,将引用在rev中找到的文件内容。 @11
, and using future revision numbers @F
F>N will refer to its contents as recorded in @N
. @11
,并使用将来的修订版本号@F
F> N将引用@N
记录的内容。
Answering the question directly now: 现在直接回答问题:
Just in case you didn't know, you can refer to the state of a particular file as found in a particular revision using path/to/the/file@rev
like in app/js/foo.js@12345
. 以防万一,您可以使用app/js/foo.js@12345
path/to/the/file@rev
app/js/foo.js@12345
在特定修订版中找到的特定文件的状态。
Is it clear now? 现在清楚了吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.