[prev in list] [next in list] [prev in thread] [next in thread] 

List:       subversion-users
Subject:    Use of svn_client_updatex
From:       Adam Root <adamroot () live ! com>
Date:       2009-01-31 21:23:03
Message-ID: COL114-W2224C2A0B8AFEF57D596F7ACC70 () phx ! gbl
[Download RAW message or body]

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.  
Thanks,
 
Adam
 
_________________________________________________________________
Windows Liveâ„¢ Hotmail ®â€¦more than just e-mail. 
http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t2_hm_justgotbetter_howitworks_012009


------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1081789

To unsubscribe from this discussion, e-mail: \
[users-unsubscribe@subversion.tigris.org].


[Attachment #3 (text/html)]

<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
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.<BR> \
&nbsp;<BR> (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)<BR> &nbsp;<BR>
--Question 1--<BR>
&nbsp;<BR>
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:<BR> &nbsp;<BR>
svn co -N <A href="http://server/repo">http://server/repo</A> &lt;srcroot&gt;<BR>
svn up -N &lt;srcroot&gt;\dir<BR>
&nbsp;<BR>
This works fine, bringing down the HEAD revision of <A \
href="http://server/repo/dir">http://server/repo/dir</A> to &lt;srcroot&gt;\dir<BR> \
&nbsp;<BR> However, using the APIs, like:<BR>
&nbsp;<BR>
svn_client_checkout3(&amp;rev_result, "<A \
href="http://server/repo">http://server/repo</A>", "&lt;srcroot&gt;", (unspecified \
revision), (head revision), svn_depth_empty, FALSE, FALSE, ctx, pool);<BR> \
svn_client_update3(&amp;result_revs, paths ("&lt;srcroot&gt;\dir"), (head revision), \
svn_depth_empty, FALSE, FALSE, FALSE, ctx, pool);<BR> &nbsp;<BR>
The returned revision in result_revs is -1. I take that to mean that the unversioned \
path was ignored, as the documentation states it&nbsp;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?<BR> &nbsp;<BR>
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).<BR> &nbsp;<BR>
--Question 2--<BR>
After I have updated/checked out&nbsp;a folder, I am trying to schedule an add on a \
subdirectory. The command line is simply something like:<BR> &nbsp;<BR>
svn add -N &lt;srcroot&gt;\dir\subdir<BR>
&nbsp;<BR>
This works as expected. Using the APIs, like:<BR>
&nbsp;<BR>
svn_client_add4("&lt;srcroot&gt;\dir\subdir", svn_depth_empty, FALSE, FALSE, FALSE, \
ctx, pool);<BR> &nbsp;<BR>
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 &lt;srcroot&gt;\dir to HEAD.<BR> \
&nbsp;<BR> Thanks,<BR>
&nbsp;<BR>
Adam<BR>
&nbsp;<BR><br /><hr />Windows Live™ Hotmail®…more than just e-mail.  <a \
href='http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t2_hm_justgotbetter_howitworks_012009' \
target='_new'>See how it works.</a></body> </html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic