[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Use of svn_client_updatex

From: Adam Root <adamroot_at_live.com>
Date: Sat, 31 Jan 2009 14:23:03 -0700

I'm learning/using the svn client APIs to write a couple of power tools. I've got a couple of usage questions. I am using the 1.5.5 binary release on Win32.
(After typing this out, I realized I don't fully understand the usage/meaning of peg_revision in the svn_client_checkout3 call... you might consider that in my questions below)
--Question 1--
I'm trying to use svn_client_update3 to update folders selectively after I do a checkout at the root (non-recursively). I know the folder exists in the repo. From the command line, I would do:
svn co -N http://server/repo <srcroot>
svn up -N <srcroot>\dir
This works fine, bringing down the HEAD revision of http://server/repo/dir to <srcroot>\dir
However, using the APIs, like:
svn_client_checkout3(&rev_result, "http://server/repo", "<srcroot>", (unspecified revision), (head revision), svn_depth_empty, FALSE, FALSE, ctx, pool);
svn_client_update3(&result_revs, paths ("<srcroot>\dir"), (head revision), svn_depth_empty, FALSE, FALSE, FALSE, ctx, pool);
The returned revision in result_revs is -1. I take that to mean that the unversioned path was ignored, as the documentation states it could be. However, because the direct parent of that unversioned directory is a working copy, the documentation says it will update it, as the command line does. This doesn't seem to be the case. Am I doing something wrong?
I tried using svn_client_update because it returns errors. It returned an error about the directory not being a working copy (I forget the exact verbage).
--Question 2--
After I have updated/checked out a folder, I am trying to schedule an add on a subdirectory. The command line is simply something like:
svn add -N <srcroot>\dir\subdir
This works as expected. Using the APIs, like:
svn_client_add4("<srcroot>\dir\subdir", svn_depth_empty, FALSE, FALSE, FALSE, ctx, pool);
I get an error: '.' is not a working copy. If I replace the add_parents with TRUE, this succeeds. What have I done wrong here? Note, that because of Question 1, I am actually using svn_client_checkout3 to update <srcroot>\dir to HEAD.
Windows Live™ Hotmail®…more than just e-mail.


To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-01-31 22:44:50 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.