Hi,
I managed to get the following perl code work to mimic the output
of svn log -v:
$repos->get_logs((), 1, $headrev , 1, 1, 1,
sub { my $paths = shift;
print '-' x 72;
printf "rev %d: %s | %s\nChanged paths:\n", @_[0..2];
while (my ($path, $info) = each %$paths) {
print ' '.$info->action.' '.$path.
($info->copyfrom_path ?
" (from: ".$info->copyfrom_path.
':'.$info->copyfrom_rev.')' : '')
}
print $_[3];
},
$pool);
while there is an issue with the current swig interface definition.
the gluing callback thunk_receiver tries to create a object of
svn_log_changed_path_t * for the target language. But it was declared
in svn_types.c, which all its wrappers are created in core.i. while
the thunk_receiver is working under namespace of svn_repos, it can't
resolve svn_log_changed_path_t * in runtime. my current workaround
is to paste the struct definition into svn_repos.i, before %import
svn_types.i. but this is definitely not the way since there are
probaby other cases like this. one possible solution is to build
all wrapper in one package, and each module just imports the symbols
it is interested in. another way is to move the typedef into svn_repos.h.
btw, in swigutil_py.c:svn_swig_py_thunk_log_receiver, it tries to
resolve SWIGTYPE_p_svn_log_changed_path_t instead of
svn_log_changed_path_t *.
Cheers,
CLK
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jul 17 18:30:30 2003