Tino Schwarze <subversion.li...@tisc.de> писал в своём письме Fri, 26 Mar
2010 12:27:27 +0300:
Hi Роман,
> Additional question: I can't seem to find an equivalent of "svnlook
> cat" anywhere... I wanted to avoid calling external programs - commits
> are slow enough already...
You basically need to apply repos.open, then repos.fs, then
fs.revision_root, then fs.file_contents.
I'm seeing the following example code:
fs_ptr = repos.svn_repos_fs(repos.svn_repos_open(repos_dir, pool))
root = fs.txn_root(fs.open_txn(fs_ptr, txn, pool), pool)
cc = repos.ChangeCollector(fs_ptr, root, pool)
-> shall I use fs.txn_root or fs.revision_root (the revision is not
complete yet, it's just being committed)
If you want the behaviour of svnlook cat -t XXX, then sure, use txn_root.
When in doubt, read svnlook's source - it's rather trivial.
HTH,
Roman.