Menu

[r17]: / trunk / src / SVN.h  Maximize  Restore  History

Download this file

102 lines (86 with data), 2.5 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#pragma once
#include <vector>
#include "apr_general.h"
#include "svn_pools.h"
#include "svn_client.h"
#include "svn_path.h"
#include "svn_wc.h"
#include "svn_utf.h"
#include "svn_config.h"
#include "svn_error_codes.h"
#include "svn_subst.h"
#include "svn_repos.h"
#include "svn_time.h"
#include "SVNPool.h"
#include "UnicodeUtils.h"
#include "Registry.h"
typedef std::wstring wide_string;
#ifndef stdstring
# ifdef UNICODE
# define stdstring wide_string
# else
# define stdstring std::string
# endif
#endif
class SVNInfoData
{
public:
SVNInfoData(){}
stdstring url;
svn_revnum_t rev;
svn_node_kind_t kind;
stdstring reposRoot;
stdstring reposUUID;
svn_revnum_t lastchangedrev;
__time64_t lastchangedtime;
stdstring author;
stdstring lock_path;
stdstring lock_token;
stdstring lock_owner;
stdstring lock_comment;
bool lock_davcomment;
__time64_t lock_createtime;
__time64_t lock_expirationtime;
bool hasWCInfo;
svn_wc_schedule_t schedule;
stdstring copyfromurl;
svn_revnum_t copyfromrev;
__time64_t texttime;
__time64_t proptime;
stdstring checksum;
stdstring conflict_old;
stdstring conflict_new;
stdstring conflict_wrk;
stdstring prejfile;
};
class SVN
{
public:
SVN(void);
~SVN(void);
bool Cat(stdstring sUrl, stdstring sFile);
/**
* returns the info for the \a path.
* \param path a path or an url
* \param pegrev the peg revision to use
* \param revision the revision to get the info for
* \param recurse if TRUE, then GetNextFileInfo() returns the info also
* for all children of \a path.
*/
const SVNInfoData * GetFirstFileInfo(stdstring path, svn_revnum_t pegrev, svn_revnum_t revision, bool recurse = false);
size_t GetFileCount() {return m_arInfo.size();}
/**
* Returns the info of the next file in the filelist. If no more files are in the list then NULL is returned.
* See GetFirstFileInfo() for details.
*/
const SVNInfoData * GetNextFileInfo();
private:
apr_pool_t * parentpool; ///< the main memory pool
apr_pool_t * pool; ///< 'root' memory pool
svn_client_ctx_t * m_pctx; ///< pointer to client context
svn_error_t * Err; ///< Global error object struct
svn_auth_baton_t * auth_baton;
std::vector<SVNInfoData> m_arInfo; ///< contains all gathered info structs.
unsigned int m_pos; ///< the current position of the vector
static svn_error_t * infoReceiver(void* baton, const char * path, const svn_info_t* info, apr_pool_t * pool);
};
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.