Support the libsvn 1.4 API, which is what is available shipped with Mac OS-X 10.5 (Leopard)
This commit is contained in:
parent
c1f44b366c
commit
bd60cd21e7
1 changed files with 17 additions and 2 deletions
|
@ -229,16 +229,31 @@ void sync_tree(const char* dir) {
|
||||||
if (mysvn_setup() != EXIT_SUCCESS)
|
if (mysvn_setup() != EXIT_SUCCESS)
|
||||||
exit(1);
|
exit(1);
|
||||||
apr_pool_t *subpool = svn_pool_create(mysvn_pool);
|
apr_pool_t *subpool = svn_pool_create(mysvn_pool);
|
||||||
|
|
||||||
|
#if (SVN_VER_MINOR >= 5)
|
||||||
err = svn_client_checkout3(NULL,
|
err = svn_client_checkout3(NULL,
|
||||||
command,
|
command,
|
||||||
dest_base_dir,
|
dest_base_dir,
|
||||||
mysvn_rev_peg,
|
mysvn_rev_peg,
|
||||||
mysvn_rev,
|
mysvn_rev,
|
||||||
svn_depth_infinity,
|
svn_depth_infinity,
|
||||||
0,
|
0, // ignore-externals = false
|
||||||
0,
|
0, // allow unver obstructions = false
|
||||||
mysvn_ctx,
|
mysvn_ctx,
|
||||||
subpool);
|
subpool);
|
||||||
|
#else
|
||||||
|
// version 1.4 API
|
||||||
|
err = svn_client_checkout2(NULL,
|
||||||
|
command,
|
||||||
|
dest_base_dir,
|
||||||
|
mysvn_rev_peg,
|
||||||
|
mysvn_rev,
|
||||||
|
1, // recurse=true - same as svn_depth_infinity for checkout3 above
|
||||||
|
0, // ignore externals = false
|
||||||
|
mysvn_ctx,
|
||||||
|
subpool);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
// Report errors from the checkout attempt
|
// Report errors from the checkout attempt
|
||||||
cout << "failed: " << endl
|
cout << "failed: " << endl
|
||||||
|
|
Loading…
Add table
Reference in a new issue