Prev: Why does perl allow so many different ways of doing essentially the same thing?
Next: FAQ 8.40 How do I avoid zombies on a Unix system?
From: Ben Morrow on 10 Jun 2010 17:09 Quoth "david.karr" <davidmichaelkarr(a)gmail.com>: > On Jun 10, 10:03�am, Ben Morrow <b...(a)morrow.me.uk> wrote: > > Quoth "david.karr" <davidmichaelk...(a)gmail.com>: > > > > > I've used TortoiseSVN to get all the history entries for a branch. > > > Each entry has a "last action", indicating "added", "modified", or > > > "deleted". �I'd like to have a Perl script using SVN::Client (or any > > > other appropriate module) generate this output instead. �I've used the > > > "log" method of SVN::Client, and I've read through the SVN::Client > > > documentation, but I don't see any way to get this information. �The > > > only reference in the documentation to one of "Add", "Modify", or > > > "Delete" is when committing a change. �What am I missing? > > > > The SVN::Client->log method passes a svn_log_changed_path_t object[0] to > > its callback; this is documented in SVN::Core and tells you what changed > > in that revision. > > Ok, that looks promising. However, when I code this, it seems like > that hash is always empty. > Does it matter that the server is SVN 1.4.x? I've no idea, I'm afraid. I haven't used SVN for quite some time, and I don't think I've even got any repos around any more. I do know I've successfully used code like $SVN->log(cwd, 'HEAD', 1, 1, 0, sub { my ($c, $r, $a, $d, $m) = @_; for (keys %$c) { ... } }); in the past, but I'm not certain which version of svn this was with. I notice I was asking for the log in reverse order (latest to oldest) whereas you are asking for it forwards: does that make any difference? You may have more luck taking this to a SVN list. Ben |