<p>I'm trying to write a tool that among many tasks other features needs to query Subversion for file history. I haven't found a binding library for Go. Does one library exist? I could always fork an svn process but I was hoping for a cleaner solution. Next fall back would be Subversion's C API but I have no experience with cgo. </p>
<hr/>**评论:**<br/><br/>kardianos: <pre><p>I would just exec svn and ask for xml output. But it may depend on your specific use case.</p></pre>egonelbre: <pre><p>Quickly stripped from an internal program using forking <a href="https://play.golang.org/p/p4dUlOV5ml" rel="nofollow">https://play.golang.org/p/p4dUlOV5ml</a> ... (may need some fixes for the imports and may have made a mistake while extracting the relevant pieces.)</p>
<p>There are some bindings <a href="https://godoc.org/?q=svn" rel="nofollow">https://godoc.org/?q=svn</a>, but not clue how well they work.</p></pre>weberc2: <pre><p>The only options I'm aware of are to do the querying in a different SVN process (either call into SVN directly or call into an SVN daemon if such a thing exists), CGo, or writing your own SVN implementation in Go.</p></pre>croninsiglos: <pre><p>This first thing I would do is convert the subversion repo to git via a tool like svn2git to keep the history... then I'd use git :)</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传