11 |
|
namespace Subversion |
12 |
|
{ |
13 |
|
|
14 |
– |
namespace |
15 |
– |
{ |
16 |
– |
|
17 |
– |
::svn_error_t *GetEntryCommittedDate_(void *date, const char *path, const ::svn_info_t *info, ::apr_pool_t *pool) |
18 |
– |
{ |
19 |
– |
*reinterpret_cast<std::time_t *>(date) = apr_time_sec(info->last_changed_date); |
20 |
– |
|
21 |
– |
return SVN_NO_ERROR; |
22 |
– |
} |
23 |
– |
|
24 |
– |
} |
25 |
– |
|
14 |
|
Client::Client() |
15 |
|
{ |
16 |
|
CheckError(::svn_client_create_context(&context, pool)); |
17 |
|
} |
18 |
|
|
19 |
< |
cse::String Client::GetProperty(const cse::String &property, const cse::String &target) |
19 |
> |
cse::String Client::GetProperty(const cse::String &property, const cse::String &target) const |
20 |
|
{ |
21 |
|
::apr_hash_t *hash; |
22 |
|
::svn_opt_revision_t revision = { ::svn_opt_revision_unspecified }; |
35 |
|
return cse::EmptyString; |
36 |
|
} |
37 |
|
|
38 |
< |
std::time_t Client::GetEntryCommittedDate(const cse::String &target) |
38 |
> |
_L<Entry> Client::GetEntries(const cse::String &target) const |
39 |
|
{ |
40 |
< |
std::time_t date; |
40 |
> |
::apr_hash_t *hash; |
41 |
> |
::svn_opt_revision_t revision = { ::svn_opt_revision_unspecified }; |
42 |
> |
|
43 |
> |
//#if (SVN_VER_MAJOR == 1) && (SVN_VER_MINOR == 2) |
44 |
> |
CheckError(::svn_client_ls2(&hash, target.NullTerminate(), &revision, &revision, false, context, pool)); |
45 |
> |
/*#else |
46 |
> |
CheckError(::svn_client_ls3(&hash, NULL, target.NullTerminate(), &revision, &revision, false, context, pool)); |
47 |
> |
#endif*/ |
48 |
> |
|
49 |
> |
_L<Entry> entries; |
50 |
|
|
51 |
< |
CheckError(::svn_client_info(target.NullTerminate(), NULL, NULL, &GetEntryCommittedDate_, &date, false, context, pool)); |
51 |
> |
for (::apr_hash_index_t *index(::apr_hash_first(pool, hash)); index; index = apr_hash_next(index)) |
52 |
> |
{ |
53 |
> |
const char *string; |
54 |
> |
::apr_ssize_t size; |
55 |
> |
::svn_dirent_t *entry; |
56 |
> |
|
57 |
> |
::apr_hash_this(index, reinterpret_cast<const void **>(&string), &size, reinterpret_cast<void **>(&entry)); |
58 |
> |
|
59 |
> |
entries.InsertLast(Entry(cse::String(string, size), entry)); |
60 |
> |
} |
61 |
|
|
62 |
< |
return date; |
62 |
> |
return entries; |
63 |
|
} |
64 |
|
|
65 |
|
} |