简体   繁体   English

SVN每次提交或合并都添加文件,即使未更改

[英]SVN Add file every commit or merge, even if not changed

Can I force SVN to commit/merge a specific file every time even if the file doesn't change? 我可以强迫SVN每次提交/合并一个特定的文件,即使该文件没有更改?

I know you can ignore a file but what about something like 'Always Commit' option? 我知道您可以忽略文件,但是“始终提交”选项之类的东西呢?

I'm using the revision number SVN Tags $Revision$ in one file, I parse the file and use that revision number as a variable as I wanted to eliminate doing this manually before a merge. 我在一个文件中使用修订号SVN标签$Revision$ ,我解析该文件并将该修订号用作变量,因为我想避免在合并之前手动执行此操作。 I wanted just to have the Revision number update as it does what it is committed. 我只想更新修订版本号,因为它可以完成它所做的事情。 Only problem is I still need to manually do this and I would like to automate this, thoughts? 唯一的问题是我仍然需要手动执行此操作,并且我想使它自动化,想法?

Using SVN not in its way is wrong, means updating the version though the file is not actully updated. 不按原样使用SVN是错误的,这意味着尽管文件没有被严格更新,但仍会更新版本。

Solution i feel is taht , if the file isunchandes for somany release , tag it separatly. 我认为解决方案是合理的,如果该文件无法大量发布,请分别对其进行标记。

when you do automatic build use both the tags, thus u dont need to update the version of that file. 当您执行自动构建时,请同时使用两个标签,因此您无需更新该文件的版本。

You shouldn't use the file from a file, cause SVN only updates this revision if the file has really been changed. 您不应该使用文件中的文件,因为SVN仅在确实更改了文件的情况下才更新此修订版。 The best thing is to use svnversion on command line to get the information you need. 最好的办法是在命令行上使用svnversion获得所需的信息。 Furthermore eliminating it before the merge is not needed, cause SVN will handle that for you...cause the expansion of the Keyword into the revision number is done by the SVN client which means in other words the file is stored in the repository with not expanded keywords. 此外,在不需要合并之前将其消除,因为SVN会为您处理...因为将关键字扩展到修订号是由SVN客户端完成的,也就是说,文件存储在版本库中,而没有扩展关键字。 I don't know in which programming language you are working but usually this should be done by a build system. 我不知道您使用哪种编程语言,但是通常这应该由构建系统完成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM