185 |
06 Sep 06 |
jari |
1 |
#ifndef _theplu_svndigest_svnproperty_ |
185 |
06 Sep 06 |
jari |
2 |
#define _theplu_svndigest_svnproperty_ |
185 |
06 Sep 06 |
jari |
3 |
|
185 |
06 Sep 06 |
jari |
// $Id$ |
185 |
06 Sep 06 |
jari |
5 |
|
185 |
06 Sep 06 |
jari |
6 |
/* |
978 |
12 Dec 09 |
peter |
Copyright (C) 2006 Jari Häkkinen |
1635 |
30 Mar 23 |
peter |
Copyright (C) 2007 Peter Johansson |
1635 |
30 Mar 23 |
peter |
Copyright (C) 2008 Jari Häkkinen, Peter Johansson |
1515 |
26 Sep 12 |
peter |
Copyright (C) 2010, 2011, 2012 Peter Johansson |
185 |
06 Sep 06 |
jari |
11 |
|
687 |
04 Aug 08 |
peter |
This file is part of svndigest, http://dev.thep.lu.se/svndigest |
185 |
06 Sep 06 |
jari |
13 |
|
185 |
06 Sep 06 |
jari |
svndigest is free software; you can redistribute it and/or modify it |
185 |
06 Sep 06 |
jari |
under the terms of the GNU General Public License as published by |
693 |
11 Sep 08 |
jari |
the Free Software Foundation; either version 3 of the License, or |
185 |
06 Sep 06 |
jari |
(at your option) any later version. |
185 |
06 Sep 06 |
jari |
18 |
|
185 |
06 Sep 06 |
jari |
svndigest is distributed in the hope that it will be useful, but |
185 |
06 Sep 06 |
jari |
WITHOUT ANY WARRANTY; without even the implied warranty of |
185 |
06 Sep 06 |
jari |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
185 |
06 Sep 06 |
jari |
General Public License for more details. |
185 |
06 Sep 06 |
jari |
23 |
|
185 |
06 Sep 06 |
jari |
You should have received a copy of the GNU General Public License |
693 |
11 Sep 08 |
jari |
along with svndigest. If not, see <http://www.gnu.org/licenses/>. |
185 |
06 Sep 06 |
jari |
26 |
*/ |
185 |
06 Sep 06 |
jari |
27 |
|
1438 |
20 Dec 11 |
peter |
28 |
#include "yat/SegmentSet.h" |
1438 |
20 Dec 11 |
peter |
29 |
|
1438 |
20 Dec 11 |
peter |
30 |
#include <subversion-1/svn_types.h> |
1438 |
20 Dec 11 |
peter |
31 |
|
185 |
06 Sep 06 |
jari |
32 |
#include <map> |
185 |
06 Sep 06 |
jari |
33 |
#include <string> |
185 |
06 Sep 06 |
jari |
34 |
|
185 |
06 Sep 06 |
jari |
35 |
namespace theplu { |
185 |
06 Sep 06 |
jari |
36 |
namespace svndigest { |
185 |
06 Sep 06 |
jari |
37 |
|
185 |
06 Sep 06 |
jari |
38 |
class SVN; |
185 |
06 Sep 06 |
jari |
39 |
|
185 |
06 Sep 06 |
jari |
40 |
/// |
185 |
06 Sep 06 |
jari |
/// The SVNproperty class is a utility class for taking care of 'svn |
185 |
06 Sep 06 |
jari |
/// property' information. An 'svn property' is non-recursively |
185 |
06 Sep 06 |
jari |
/// performed on an item. |
185 |
06 Sep 06 |
jari |
44 |
/// |
185 |
06 Sep 06 |
jari |
45 |
class SVNproperty { |
185 |
06 Sep 06 |
jari |
46 |
public: |
185 |
06 Sep 06 |
jari |
47 |
|
185 |
06 Sep 06 |
jari |
48 |
/// |
185 |
06 Sep 06 |
jari |
/// @brief The contructor. |
185 |
06 Sep 06 |
jari |
50 |
/// |
185 |
06 Sep 06 |
jari |
/// The constructor performs an 'svn property' on \a path. |
185 |
06 Sep 06 |
jari |
52 |
/// |
185 |
06 Sep 06 |
jari |
53 |
explicit SVNproperty(const std::string& path); |
185 |
06 Sep 06 |
jari |
54 |
|
185 |
06 Sep 06 |
jari |
55 |
/** |
185 |
06 Sep 06 |
jari |
@brief Check whether item used to create this object is binary. |
185 |
06 Sep 06 |
jari |
57 |
|
185 |
06 Sep 06 |
jari |
@return True if item is binary. |
185 |
06 Sep 06 |
jari |
59 |
*/ |
1356 |
17 May 11 |
peter |
60 |
bool binary(void) const; |
185 |
06 Sep 06 |
jari |
61 |
|
185 |
06 Sep 06 |
jari |
62 |
/** |
185 |
06 Sep 06 |
jari |
@brief Check if item used to create this object has been |
185 |
06 Sep 06 |
jari |
assigned property svndigest:ignore. |
185 |
06 Sep 06 |
jari |
65 |
|
185 |
06 Sep 06 |
jari |
Currently files with property svndigest:ignore are to be |
185 |
06 Sep 06 |
jari |
ignored by svndigest. It is the responsibility of the |
185 |
06 Sep 06 |
jari |
statistics implementer to obey the ignore state. |
185 |
06 Sep 06 |
jari |
69 |
|
185 |
06 Sep 06 |
jari |
@return True if item property svndigest:digest was set. |
185 |
06 Sep 06 |
jari |
71 |
*/ |
1356 |
17 May 11 |
peter |
72 |
bool svndigest_ignore(void) const; |
1478 |
29 May 12 |
peter |
73 |
svn_revnum_t svndigest_ignore_rev(void) const; |
185 |
06 Sep 06 |
jari |
74 |
|
185 |
06 Sep 06 |
jari |
75 |
/** |
1137 |
18 Jul 10 |
peter |
\return true if propert svncopyright::ignore has been set |
1137 |
18 Jul 10 |
peter |
77 |
|
1137 |
18 Jul 10 |
peter |
\see svndigest_ignore |
1137 |
18 Jul 10 |
peter |
79 |
*/ |
1137 |
18 Jul 10 |
peter |
80 |
bool svncopyright_ignore(void) const; |
1137 |
18 Jul 10 |
peter |
81 |
|
1137 |
18 Jul 10 |
peter |
82 |
/** |
1438 |
20 Dec 11 |
peter |
\return revs that svncopyright should ignore |
1438 |
20 Dec 11 |
peter |
84 |
*/ |
1438 |
20 Dec 11 |
peter |
85 |
const yat::utility::SegmentSet<svn_revnum_t>& |
1438 |
20 Dec 11 |
peter |
86 |
svncopyright_ignore_rev(void) const; |
1438 |
20 Dec 11 |
peter |
87 |
|
1438 |
20 Dec 11 |
peter |
88 |
/** |
185 |
06 Sep 06 |
jari |
@brief Get the list of properties for item used to creat this |
185 |
06 Sep 06 |
jari |
SVNproperty object. |
185 |
06 Sep 06 |
jari |
91 |
*/ |
1356 |
17 May 11 |
peter |
//const std::map<std::string, std::string>& |
1356 |
17 May 11 |
peter |
//properties(void) const { return property_; } |
185 |
06 Sep 06 |
jari |
94 |
|
185 |
06 Sep 06 |
jari |
95 |
private: |
185 |
06 Sep 06 |
jari |
96 |
/// |
185 |
06 Sep 06 |
jari |
/// @brief Copy Constructor, not implemented. |
185 |
06 Sep 06 |
jari |
98 |
/// |
185 |
06 Sep 06 |
jari |
99 |
SVNproperty(const SVNproperty&); |
185 |
06 Sep 06 |
jari |
100 |
|
1357 |
18 May 11 |
peter |
101 |
void add(std::map<std::string, std::string>::const_iterator first, |
1357 |
18 May 11 |
peter |
102 |
std::map<std::string, std::string>::const_iterator last); |
1357 |
18 May 11 |
peter |
103 |
|
1438 |
20 Dec 11 |
peter |
104 |
void add_svncopyright_ignore(const std::string& value); |
1478 |
29 May 12 |
peter |
105 |
void add_svndigest_ignore(const std::string& value); |
1438 |
20 Dec 11 |
peter |
106 |
|
185 |
06 Sep 06 |
jari |
107 |
bool binary_; |
1356 |
17 May 11 |
peter |
108 |
bool svncopyright_ignore_; |
1438 |
20 Dec 11 |
peter |
109 |
yat::utility::SegmentSet<svn_revnum_t> svncopyright_ignore_rev_; |
1478 |
29 May 12 |
peter |
110 |
svn_revnum_t svndigest_ignore_rev_; |
185 |
06 Sep 06 |
jari |
111 |
}; |
185 |
06 Sep 06 |
jari |
112 |
|
185 |
06 Sep 06 |
jari |
113 |
}} // end of namespace svndigest and namespace theplu |
185 |
06 Sep 06 |
jari |
114 |
|
185 |
06 Sep 06 |
jari |
115 |
#endif |