ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/GoogleTron/Subversion/Client.cpp
(Generate patch)

Comparing GoogleTron/Subversion/Client.cpp (file contents):
Revision 697 by douglas, 2006-03-10T04:17:42-08:00 vs.
Revision 698 by douglas, 2006-03-12T19:28:22-08:00

# Line 11 | Line 11
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 +
26   Client::Client()
27   {
28 <        // XXX: CheckError()
17 <        ::svn_client_create_context(&context, pool);
28 >        CheckError(::svn_client_create_context(&context, pool));
29   }
30  
31   cse::String Client::GetProperty(const cse::String &property, const cse::String &target)
# Line 22 | Line 33 | cse::String Client::GetProperty(const cs
33          return cse::String();
34   }
35  
36 < std::tm Client::GetEntryCommittedDate(const cse::String &target)
36 > std::time_t Client::GetEntryCommittedDate(const cse::String &target)
37   {
38 <        apr_hash_t *hash;
28 <        svn_opt_revision_t revision = { svn_opt_revision_unspecified };
29 <
30 <        // XXX: CheckError()
31 <        ::svn_client_propget2(&hash, SVN_PROP_ENTRY_COMMITTED_DATE, target.NullTerminate(), &revision, &revision, false, context, pool);
32 <
33 <        svn_string_t *value;
34 <
35 <        // XXX: api::Apr::CheckError()
36 <        ::apr_hash_this(::apr_hash_first(pool, hash), NULL, NULL, reinterpret_cast<void **>(&value));
37 <
38 <        cse::String value_(value->data, value->len);
39 <
40 <        api::Cerr << value_ << ios::NewLine;
41 <
42 <        std::tm date;
38 >        std::time_t date;
39  
40 <        ::strptime(value_.NullTerminate(), "", &date);
40 >        CheckError(::svn_client_info(target.NullTerminate(), NULL, NULL, &GetEntryCommittedDate_, &date, false, context, pool));
41  
42          return date;
43   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines