source: trunk/lib/SVNlog.h @ 259

Last change on this file since 259 was 259, checked in by Peter Johansson, 16 years ago

fixed author table fixes #163

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.4 KB
Line 
1#ifndef _theplu_svndigest_svnlog_
2#define _theplu_svndigest_svnlog_
3
4// $Id: SVNlog.h 259 2007-04-30 13:18:51Z peter $
5
6/*
7  Copyright (C) 2007 Peter Johansson
8
9  This file is part of svndigest, http://lev.thep.lu.se/trac/svndigest
10
11  svndigest is free software; you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation; either version 2 of the License, or
14  (at your option) any later version.
15
16  svndigest is distributed in the hope that it will be useful, but
17  WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  General Public License for more details.
20
21  You should have received a copy of the GNU General Public License
22  along with this program; if not, write to the Free Software
23  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
24  02111-1307, USA.
25*/
26
27#include "SVN.h"
28
29#include "Commitment.h"
30
31#include <string>
32#include <vector>
33
34#include <subversion-1/svn_client.h>
35
36namespace theplu {
37namespace svndigest {
38
39  class SVN;
40
41  /**
42     The SVNlog class is a utility class for taking care of 'svn
43     log' information. An 'svn log' is performed on an item, the
44     log information for each revision is stored in vectors.
45  */
46  class SVNlog {
47  public:
48
49    /**
50       \brief The contructor.
51       
52       The constructor performs an 'svn log' on \a path and
53       stores the information for later access.
54    */
55    explicit SVNlog(std::string path);
56
57    /**
58       \brief The destructor.
59    */
60    ~SVNlog(void);
61
62    /**
63       \return Authors
64    */
65    inline const std::vector<std::string>& author(void) const
66    { return lb_.authors; }
67
68    /**
69       \return Dates
70    */
71    inline const std::vector<std::string>& date(void) const
72    { return lb_.commit_dates; }
73
74    /**
75       \return Messages
76    */
77    inline const std::vector<std::string>& message(void) const
78    { return lb_.msg; }
79
80    /**
81       \return Latest commit
82    */
83    Commitment latest_commit(void) const;
84
85    /**
86       \return Latest commit \a author did. If no author is found an
87       empty Commitment (default constructor) is returned.
88    */
89    Commitment latest_commit(std::string author) const;
90
91    /**
92       \return Revisions
93    */
94    inline const std::vector<size_t>& revision(void) const
95    { return lb_.rev; }
96
97  private:
98
99    ///
100    /// @brief Copy Constructor, not implemented.
101    ///
102    SVNlog(const SVNlog&);
103
104    log_receiver_baton lb_;
105
106  };
107
108}} // end of namespace svndigest and namespace theplu
109
110#endif
Note: See TracBrowser for help on using the repository browser.