You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Ted Dennison <de...@ssd.fsi.com> on 2006/07/07 18:57:54 UTC

svn_client_status2 usage

I'm attempting to use svn_client_status2 on a Win32 platform, but I'm 
apparently doing something wrong.

One nit I've already noticed is that the routine apparently can't handle 
standard Windows path names. For instance, I have to replace all 
backslash characters with forward slashes, or else svn_client_status2 
returns an error. There's nothing about this in the API docs that I 
could find. So I guess my first question is: What exactly are the 
filename rules for this routine? Are spaces valid? Are there any further 
transformations I need to apply?

A further issue is that I seem to have it working properly for some 
files, but not for others. For instance, if I call svn_client_status2 in 
a loop with the following 5 files from a pulldown of my repository:

"c:/documents and settings/dennison/my documents/dev/svn/simnt/pci 
driver/pci.h",
"c:/documents and settings/dennison/my documents/dev/svn/simnt/pci 
driver/pci.cpp",
"c:/documents and settings/dennison/my documents/dev/svn/simnt/pci 
driver/pci driver.dsp",
"c:/documents and settings/dennison/my documents/dev/svn/simnt/pci 
driver/pci-device.h",
"c:/documents and settings/dennison/my documents/dev/svn/simnt/pci 
driver/pci-device.cpp"

I get a status of svn_wc_status_normal for everything but the dsp. The 
.dsp file just gives me garbage. I tried stepping through the execution 
in the debugger, and it appears that for the .dsp file 
svn_client_status2 returns success, but the svn_wc_status_func2_t 
<ci...@ssd.fsi.com> routine never gets called. 
What would cause that?

I'm sure it has to be something I'm doing wrong, as TortoiseSVN shows 
the status of the files in question just fine.

-- 
T.E.D.   Work     -  mailto:dennison@ssd.fsi.com
         Home     -  mailto:dennison@telepath.com (Yahoo: Ted_Dennison)
         Homepage -  http://www.telepath.com/~dennison/Ted/TED.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn_client_status2 usage

Posted by "D.J. Heap" <dj...@gmail.com>.
On 7/7/06, D.J. Heap <dj...@gmail.com> wrote:
[snip]
> I'm not sure if it's documented somewhere (probably is), but see the
> svn_opt_args_to_target_array2 function in libsubr\opt.c for how to get
> path and url arguments properly encoded for client library calls.
>

It's at least mentioned in The Book:

http://svnbook.red-bean.com/nightly/en/svn.developer.usingapi.html#svn.developer.usingapi.urlpath

DJ

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn_client_status2 usage

Posted by "D.J. Heap" <dj...@gmail.com>.
On 7/7/06, Ted Dennison <de...@ssd.fsi.com> wrote:
[snip]
> Heh. It never fails. No matter how long I fail to solve a problem; as
> soon as I ask someone for help I figure it out. It turns out that (nit
> #2) if you give a name that is wrong only in capitalization, then
> svn_client_status2 on Win32 will return no error, but will also return
> no status. I suppose this could be by design, but it sure seems like a
> bug to me. For completeness, I think the repository I'm using is FSFS.
>
> The "Right Thing" on Win32 would probably be to ignore case. I can
> understand instead being case-sensitive for the sake of consistency with
> the Unix system (and dealing with cross-platform access). However, if it
> does that, it should give me an error when I get the name wrong.
>
> Anyway, I guess this just emphasizes my first question: What exactly are
> the filename rules for svn_client_status2()?


I'm not sure if it's documented somewhere (probably is), but see the
svn_opt_args_to_target_array2 function in libsubr\opt.c for how to get
path and url arguments properly encoded for client library calls.

DJ

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn_client_status2 usage

Posted by Ted Dennison <de...@ssd.fsi.com>.
Ted Dennison wrote:
> One nit I've already noticed is that the routine apparently can't 
> handle standard Windows path names. For instance, I have to replace 
> all backslash characters with forward slashes, or else 
> svn_client_status2 returns an error. There's nothing about this in the 
> API docs that I could find. So I guess my first question is: What 
> exactly are the filename rules for this routine? Are spaces valid? Are 
> there any further transformations I need to apply?
>
> A further issue is that I seem to have it working properly for some 
> files, but not for others. For instance, if I call svn_client_status2 
> in a loop with the following 5 files from a pulldown of my repository:
Heh. It never fails. No matter how long I fail to solve a problem; as 
soon as I ask someone for help I figure it out. It turns out that (nit 
#2) if you give a name that is wrong only in capitalization, then 
svn_client_status2 on Win32 will return no error, but will also return 
no status. I suppose this could be by design, but it sure seems like a 
bug to me. For completeness, I think the repository I'm using is FSFS.

The "Right Thing" on Win32 would probably be to ignore case. I can 
understand instead being case-sensitive for the sake of consistency with 
the Unix system (and dealing with cross-platform access). However, if it 
does that, it should give me an error when I get the name wrong.

Anyway, I guess this just emphasizes my first question: What exactly are 
the filename rules for svn_client_status2()?

-- 
T.E.D.   Work     -  mailto:dennison@ssd.fsi.com
         Home     -  mailto:dennison@telepath.com (Yahoo: Ted_Dennison)
         Homepage -  http://www.telepath.com/~dennison/Ted/TED.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org