You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by 宋哲 <so...@cintel.net.cn> on 2011/05/25 09:26:35 UTC
can I use post-commit hook to produce a C header file?
I want to use post-commit hook to produce a c header file, so I can get the latest revision number from my c codec. But I can not do that because in post-commit hook script, I don't known how to put a header file into the repo.
$Rev$ can get a paiticular file's revision number, but I want to get the whole repo's.
Does it is possible? thanks!
Re: can I use post-commit hook to produce a C header file?
Posted by Ryan Schmidt <su...@ryandesign.com>.
Remember to Reply All when you reply so this discussion stays on the mailing list so others can benefit and participate.
On May 25, 2011, at 03:40, 宋哲 wrote:
> Ryan Schmidt:
> thanks for your reply.
>
> If use work copy, that will work fine.
>
> But when I distribute my stuff, I prefer use "svn export", which will not contain svn infomation in source file tree(for some configure file, it's strange with svn infomation).
>
> Iin this case, svnversion only output "exported", and no revision info.
I'm sure you can come up with a short script that you can use to create your distribution, which operates on a working copy (and thus can use svnversion), and ends up using "svn export" to, from that working copy, create an export that you can distribute.
Re: can I use post-commit hook to produce a C header file?
Posted by Ryan Schmidt <su...@ryandesign.com>.
On May 25, 2011, at 02:26, 宋哲 wrote:
> I want to use post-commit hook to produce a c header file, so I can get the latest revision number from my c codec. But I can not do that because in post-commit hook script, I don't known how to put a header file into the repo.
In your post-commit you could create such a header file, but you're right, you cannot then write it into the repository. Well, you could commit it as a second revision, but that's fraught with problems.
> $Rev$ can get a paiticular file's revision number, but I want to get the whole repo's.
>
> Does it is possible? thanks!
The typical answer to this problem is:
http://subversion.apache.org/faq.html#version-value-in-source
Re: couldn't svn rm a file aa@bb.com
Posted by Ryan Schmidt <su...@ryandesign.com>.
On May 25, 2011, at 21:00, wangbin wrote:
>
> I intend to svn rm a file named likes aa@bb.com, svn could find this file
>
> $svn rm "scmtools\@tc-cm-et18.tc.baidu.com"
> svn: 'scmtools\' does not exist
> $svn rm "*.tc.baidu.com"
> svn: '*.tc.baidu.com' does not exist
> $ svn info "scmtools@tc-cm-et18.tc.baidu.com"
> svn: Try 'svn help' for more info
> svn: Syntax error parsing revision 'tc-cm-et18.tc.baidu.com'
> $ svn info "scmtools\@tc-cm-et18.tc.baidu.com"
> svn: Try 'svn help' for more info
> svn: Syntax error parsing revision 'tc-cm-et18.tc.baidu.com'
> $svn st
> $
Right, you're running into a conflict with Subversion's peg revision notation. Add an extra @ at the end to overcome this.
svn rm "scmtools@tc-cm-et18.tc.baidu.com@"
couldn't svn rm a file aa@bb.com
Posted by wangbin <cl...@163.com>.
I intend to svn rm a file named likes aa@bb.com, svn could find this file
$svn rm "scmtools\@tc-cm-et18.tc.baidu.com"
svn: 'scmtools\' does not exist
$svn rm "*.tc.baidu.com"
svn: '*.tc.baidu.com' does not exist
$ svn info "scmtools@tc-cm-et18.tc.baidu.com"
svn: Try 'svn help' for more info
svn: Syntax error parsing revision 'tc-cm-et18.tc.baidu.com'
$ svn info "scmtools\@tc-cm-et18.tc.baidu.com"
svn: Try 'svn help' for more info
svn: Syntax error parsing revision 'tc-cm-et18.tc.baidu.com'
$svn st
$
Thanks
Wang,bin