README
1NAME
2 SVN::Log - Extract change logs from a Subversion server.
3
4SYNOPSIS
5 use SVN::Log;
6
7 my $revs = SVN::Log::retrieve ("svn://host/repos", 1);
8
9 print Dumper ($revs);
10
11DESCRIPTION
12 SVN::Log retrieves and parses the commit logs from Subversion
13 repositories.
14
15VARIABLES
16 $FORCE_COMMAND_LINE_SVN
17 If this is true SVN::Log will use the command line svn client instead of
18 the subversion perl bindings when it needs to access the repository.
19
20FUNCTIONS
21 retrieve
22 retrieve('svn://host/repos', $start_rev, $end_rev);
23
24 Retrieve one or more log messages from a repository. If a second
25 revision is not specified, the revision passed will be retrieved,
26 otherwise the range of revisions from $start_rev to $end_rev will be
27 retrieved.
28
29 One or both of $start_rev and $end_rev may be given as "HEAD", meaning
30 the most recent (youngest) revision in the repository. To retrieve all
31 the log messages in the repository.
32
33 retrieve('svn://host/repos', 1, 'HEAD');
34
35 To do the same thing, but retrieve the log messages in reverse order
36 (i.e., most recent log message first):
37
38 retrieve('svn://host/repos, 'HEAD', 1);
39
40 The revisions are returned as a reference to an array of hashes. Each
41 hash contains the following keys:
42
43 revision
44 The number of the revision.
45
46 paths
47 A hashref indicating the paths modified by this revision. Each key
48 is the name of the path modified in this revision. The value is a
49 reference to another hash, with the following possible keys.
50
51 action
52 The activity that happened to this path. One of "A", "M", or
53 "D", for "Added", "Modified", or "Deleted" respectively. This
54 key is always present.
55
56 copyfrom_path
57 If the action was "A" or "M" then this path may have been copied
58 from another path in the repository. If it was then this key
59 contains the path in the repository that the file was originally
60 copied from.
61
62 copyfrom_rev
63 If "copyfrom_path" is set then this value contains the revision
64 that the path in "copyfrom_path" was copied from.
65
66 author
67 The author of the revision. May legitimately be undefined if the
68 repository allows unauthenticated commits (e.g., over WebDAV).
69
70 date
71 The date of this revision.
72
73 message
74 The commit message from this revision.
75
76 Alternatively, you can pass "retrieve()" a hash containing the
77 repository, start and end revisions, and a callback function which will
78 be called for each revision, like this:
79
80 retrieve ({ repository => "svn://svn.example.org/repos",
81 start => 1,
82 end => 2,
83 callback => sub { print @_; } });
84
85 The callback will be passed a reference to a hash of paths modified, the
86 revision, the author, the date, and the message associated with the
87 revision.
88
89 See SVN::Log::Index for the cannonical example of how to do this.
90
91SEE ALSO
92 SVN::Log::Index
93
94BUGS
95 Please report any bugs or feature requests to "bug-svn-log@rt.cpan.org",
96 or through the web interface at
97 <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=SVN-Log>. I will be
98 notified, and then you'll automatically be notified of progress on your
99 bug as I make changes.
100
101AUTHOR
102 The current maintainer is Nik Clayton, <nikc@cpan.org>.
103
104 The original author was Garrett Rooney, <rooneg@electricjellyfish.net>.
105 Originally extracted from from SVN::Log::Index by Richard Clamp,
106 <richardc@unixbeard.net>
107
108COPYRIGHT
109 Copyright 2005 Nik Clayton. All Rights Reserved.
110
111 Copyright 2004 Garrett Rooney. All Rights Reserved.
112
113 Copyright 2004 Richard Clamp. All Rights Reserved.
114
115 This program is free software; you can redistribute it and/or modify it
116 under the same terms as Perl itself.
117
118