I have various projects that had files with SVN history in them. I recently moved those projects to a Mercurial repository so now that history within the file is useless. Is there a way to remove those which is not by hand?
Here's an example:
/*
* $Rev:x$
* $LastChangedDate:x$
* $LastChangedBy:x$
*/
Where x is a value in the files. I assume some sort of regex would help. Any idea?
Edit:
This is the working answer:
<target name="remove-svn-history">
<replaceregexp byline="false" match="\A/\*.*?\*/" replace="">
<file开发者_StackOverflow社区set dir="src" includes="**/*.java"/>
</replaceregexp>
</target>
Assuming that's at the beginning of the file, you could match it with the following regex:
\A/\*.*?\*/
精彩评论