1 | // $Id: SVNproperty.cc 978 2009-12-12 20:09:41Z peter $ |
---|
2 | |
---|
3 | /* |
---|
4 | Copyright (C) 2006 Jari Häkkinen |
---|
5 | Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson |
---|
6 | |
---|
7 | This file is part of svndigest, http://dev.thep.lu.se/svndigest |
---|
8 | |
---|
9 | svndigest is free software; you can redistribute it and/or modify it |
---|
10 | under the terms of the GNU General Public License as published by |
---|
11 | the Free Software Foundation; either version 3 of the License, or |
---|
12 | (at your option) any later version. |
---|
13 | |
---|
14 | svndigest is distributed in the hope that it will be useful, but |
---|
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
17 | General Public License for more details. |
---|
18 | |
---|
19 | You should have received a copy of the GNU General Public License |
---|
20 | along with svndigest. If not, see <http://www.gnu.org/licenses/>. |
---|
21 | */ |
---|
22 | |
---|
23 | #include "SVNproperty.h" |
---|
24 | #include "SVN.h" |
---|
25 | |
---|
26 | #include <string> |
---|
27 | |
---|
28 | namespace theplu { |
---|
29 | namespace svndigest { |
---|
30 | |
---|
31 | |
---|
32 | SVNproperty::SVNproperty(const std::string& path) |
---|
33 | : binary_(false), svndigest_ignore_(false) |
---|
34 | { |
---|
35 | SVN::instance()->client_proplist(path, property_); |
---|
36 | std::map<std::string, std::string>::const_iterator i = property_.begin(); |
---|
37 | std::map<std::string, std::string>::const_iterator e = property_.end(); |
---|
38 | for ( ; i!=e ; ++i) |
---|
39 | if (i->first == "svndigest:ignore") |
---|
40 | svndigest_ignore_=true; |
---|
41 | else |
---|
42 | if ((i->first == "svn:mime-type") && |
---|
43 | (svn_mime_type_is_binary(i->second.c_str()))) |
---|
44 | binary_=true; |
---|
45 | } |
---|
46 | |
---|
47 | |
---|
48 | }} // end of namespace svndigest and namespace theplu |
---|