You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Martin Piecyk <mp...@gmail.com> on 2006/08/17 18:53:09 UTC

Learning Subversion's Client C API

Hello,

I am a developer who wants to build a client application using
Subversion's C client API. Running on Windows XP, I downloaded
http://subversion.tigris.org/files/documents/15/32474/svn-win32-1.3.2_dev.zip
and http://subversion.tigris.org/files/documents/15/32473/svn-win32-1.3.2.zip
to gain access to the header files and pre-compiled static libraries.
I read the entire Subversion book located in the Windows .exe
installation (since it was newer than
http://svnbook.red-bean.com/en/1.1/index.html), including the chapter
for developers. I understand Subversion's use of APR's memory pools
and reasons for doing so and the modularized layered library design,
such as the libraries for the Repository Access and Repository layers.
Additionally, I looked read through Subversion's documentation in
http://svn.collab.net/svn-doxygen/, looking mostly at the client
functions and data types, and the APR documentation in
http://apr.apache.org/docs/apr/, http://apr.apache.org/docs/apr-util/,
and http://apr.apache.org/docs/apr-iconv/. I read through
http://subversion.tigris.org/hacking.html and a tutorial using the
client API at http://www.linuxdevcenter.com/pub/a/linux/2003/04/24/libsvn1.html
(but this uses an older version of Subversion).

However, after reading all of these documents, I still do not know how
to make a simple console application in C that does something with
Subversion such as checkout a repository into a particular directory
using a particular user name and password. I believe that in all of
the aforementioned papers I read through, none had a complete working
example written in the C or C++ language with a "main" function. I was
hoping that maybe someone knew of a tutorial that can help someone
such as myself get off to a good start with developing with the
Subversion API. Looking through the actual source code of the command
line client, svn.exe, confused me since I was not sure which lines of
code I would need for performing a simple checkout and what the
purpose of each line was.

Eventually, I found
http://svn.collab.net/repos/svn/trunk/tools/examples/, but I could not
get any of the C files to compile with Microsoft Visual C++ 6.0.
Additionally, they seemed a bit complicated to me since there were
several lines of code I wasn't sure of but no tutorial that goes
through them line by line.

Here is my error output of headrev.c, which is in the examples
directory. All of the other C files in the examples directory I
compiled had similar errors.

--------------------Configuration: subversionheadnumber - Win32
Debug--------------------
Compiling...
headrev.c
E:\subversionheadnumber\headrev.c(132) : warning C4013:
'svn_io_open_unique_file2' undefined; assuming extern returning int
E:\subversionheadnumber\headrev.c(132) : error C2065:
'svn_io_file_del_on_close' : undeclared identifier
E:\subversionheadnumber\headrev.c(132) : warning C4047: 'initializing'
: 'struct svn_error_t *' differs in levels of indirection from 'int '
Error executing cl.exe.

subversionheadnumber.exe - 1 error(s), 2 warning(s)

Does anyone know of any tutorials on using the C client API of
Subversion 1.3 or other example programs? Also, does anyone know what
my problems are with compiling the source code? I used the development
files in svn-win32-1.3.2_dev.zip to attempt to compile the source. Any
help or links would be greatly appreciated.

Best regards,
Marty

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

Re: Learning Subversion's Client C API

Posted by Martin Piecyk <mp...@gmail.com>.
I got the minimal_client.c file to link and run correctly by linking
everything.

First I downloaded
http://subversion.tigris.org/files/documents/15/20739/svn-win32-libintl.zip
and then
http://subversion.tigris.org/files/documents/15/32472/db-4.4.20-win32.zip
to get the library files which were not included in the original
Windows development zip file. Then I used the following additional
libraries to my Visual C++ 6 project:

libsvn_client-1.lib libsvn_delta-1.lib libsvn_diff-1.lib
libsvn_fs-1.lib libsvn_fs_base-1.lib libsvn_fs_fs-1.lib
libsvn_ra-1.lib libsvn_ra_dav-1.lib libsvn_ra_local-1.lib
libsvn_ra_svn-1.lib libsvn_repos-1.lib libsvn_subr-1.lib
libsvn_wc-1.lib libapr.lib libaprutil.lib xml.lib libneon.lib
intl3_svn.lib libdb44s.lib

This was every Subversion library I have, with the exception of the
only libraries I could take out without breaking the link process,
libapriconv.lib and zlibstat.lib.

I'm going to take a look into and play around with the
minimal_client.c file now that I have a working base.

On 8/18/06, D.J. Heap <dj...@gmail.com> wrote:
> On 8/18/06, Martin Piecyk <mp...@gmail.com> wrote:
> [snip]
> > I looked at the documentation of svn_auth_open, the first error, and
> > it seems I need libsvn_auth, but I did not receive this library in
> > svn-win32-1.3.2_dev.zip. Does anyone have any ideas?
> >
> > Thanks,
> > Marty
>
>
> Almost everything is statically linked on Windows, so you'll probably
> need to link in pretty much all the libraries (including bdb, neon and
> zlib).
>
> DJ
>

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

Re: Learning Subversion's Client C API

Posted by "D.J. Heap" <dj...@gmail.com>.
On 8/18/06, Martin Piecyk <mp...@gmail.com> wrote:
[snip]
> I looked at the documentation of svn_auth_open, the first error, and
> it seems I need libsvn_auth, but I did not receive this library in
> svn-win32-1.3.2_dev.zip. Does anyone have any ideas?
>
> Thanks,
> Marty


Almost everything is statically linked on Windows, so you'll probably
need to link in pretty much all the libraries (including bdb, neon and
zlib).

DJ

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

Re: Learning Subversion's Client C API

Posted by Martin Piecyk <mp...@gmail.com>.
On 8/17/06, Garrett Rooney <ro...@electricjellyfish.net> wrote:
> On 8/17/06, Martin Piecyk <mp...@gmail.com> wrote:
> > Hello,
> >
> > I am a developer who wants to build a client application using
> > Subversion's C client API. Running on Windows XP, I downloaded
> > http://subversion.tigris.org/files/documents/15/32474/svn-win32-1.3.2_dev.zip
> > and http://subversion.tigris.org/files/documents/15/32473/svn-win32-1.3.2.zip
> > to gain access to the header files and pre-compiled static libraries.
> > I read the entire Subversion book located in the Windows .exe
> > installation (since it was newer than
> > http://svnbook.red-bean.com/en/1.1/index.html), including the chapter
> > for developers. I understand Subversion's use of APR's memory pools
> > and reasons for doing so and the modularized layered library design,
> > such as the libraries for the Repository Access and Repository layers.
> > Additionally, I looked read through Subversion's documentation in
> > http://svn.collab.net/svn-doxygen/, looking mostly at the client
> > functions and data types, and the APR documentation in
> > http://apr.apache.org/docs/apr/, http://apr.apache.org/docs/apr-util/,
> > and http://apr.apache.org/docs/apr-iconv/. I read through
> > http://subversion.tigris.org/hacking.html and a tutorial using the
> > client API at http://www.linuxdevcenter.com/pub/a/linux/2003/04/24/libsvn1.html
> > (but this uses an older version of Subversion).
> >
> > However, after reading all of these documents, I still do not know how
> > to make a simple console application in C that does something with
> > Subversion such as checkout a repository into a particular directory
> > using a particular user name and password. I believe that in all of
> > the aforementioned papers I read through, none had a complete working
> > example written in the C or C++ language with a "main" function. I was
> > hoping that maybe someone knew of a tutorial that can help someone
> > such as myself get off to a good start with developing with the
> > Subversion API. Looking through the actual source code of the command
> > line client, svn.exe, confused me since I was not sure which lines of
> > code I would need for performing a simple checkout and what the
> > purpose of each line was.
> >
> > Eventually, I found
> > http://svn.collab.net/repos/svn/trunk/tools/examples/, but I could not
> > get any of the C files to compile with Microsoft Visual C++ 6.0.
> > Additionally, they seemed a bit complicated to me since there were
> > several lines of code I wasn't sure of but no tutorial that goes
> > through them line by line.
> >
> > Here is my error output of headrev.c, which is in the examples
> > directory. All of the other C files in the examples directory I
> > compiled had similar errors.
> >
> > --------------------Configuration: subversionheadnumber - Win32
> > Debug--------------------
> > Compiling...
> > headrev.c
> > E:\subversionheadnumber\headrev.c(132) : warning C4013:
> > 'svn_io_open_unique_file2' undefined; assuming extern returning int
> > E:\subversionheadnumber\headrev.c(132) : error C2065:
> > 'svn_io_file_del_on_close' : undeclared identifier
> > E:\subversionheadnumber\headrev.c(132) : warning C4047: 'initializing'
> > : 'struct svn_error_t *' differs in levels of indirection from 'int '
> > Error executing cl.exe.
> >
> > subversionheadnumber.exe - 1 error(s), 2 warning(s)
> >
> > Does anyone know of any tutorials on using the C client API of
> > Subversion 1.3 or other example programs? Also, does anyone know what
> > my problems are with compiling the source code? I used the development
> > files in svn-win32-1.3.2_dev.zip to attempt to compile the source. Any
> > help or links would be greatly appreciated.
>
> I imagine you're getting those errors because you're not including all
> the necessary header files.  That particular error seems to result
> from not including svn_io.h (not sure why headrev.c would have that
> problem, but it's certainly possible).
>
> The best example program is probably minimal_client.c, although I
> don't know of an up to date tutorial to go along with it.
>
> -garrett
>
I also noticed that svn_io.h wasn't included, so I added #include
"svn_io.h" before all of the other includes, yet I still received the
same error. Then I realized that this error occurred because the HEAD
version of those example files do not compile with the header files of
Subversion 1.3.2.

Therefore, I downloaded the minimal_client.c file from
http://svn.collab.net/repos/svn/tags/1.3.2/tools/examples/ and tried
compiling it with the headers and libraries in svn-win32-1.3.2_dev.zip
but I received many link errors. The instructions in the example
documentation state to use this command to compile:

cc minimal_client.c -o minimal_client \
-I/usr/local/include/subversion-1 -I/usr/local/apache2/include \
-L/usr/local/apache2/lib -L/usr/local/lib \
-lsvn_client-1 -lapr-0 -laprutil-0

but I'm using Windows with MS Visual C++ 6 so I set the paths
correctly and used these three additional libraries, based on the
example compilation instructions:

libsvn_client-1.lib libapr.lib libaprutil.lib

Here are the link errors I received:

----Configuration: svn_minimal_client - Win32 Debug----
Compiling...
minimal_client.c
e:\svn_minimal_client\minimal_client.c(143) : warning C4013:
'svn_cmdline_init' undefined; assuming extern returning int
Linking...
minimal_client.obj : error LNK2001: unresolved external symbol _svn_auth_open
minimal_client.obj : error LNK2001: unresolved external symbol
_svn_wc_set_adm_dir
minimal_client.obj : error LNK2001: unresolved external symbol
_svn_config_get_config
minimal_client.obj : error LNK2001: unresolved external symbol
_svn_config_ensure
minimal_client.obj : error LNK2001: unresolved external symbol
_svn_handle_error2

I looked at the documentation of svn_auth_open, the first error, and
it seems I need libsvn_auth, but I did not receive this library in
svn-win32-1.3.2_dev.zip. Does anyone have any ideas?

Thanks,
Marty

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

Re: The RIGHT way to upgrade Subversion on FC2 = ??

Posted by Nico Kadel-Garcia <nk...@comcast.net>.
Kenneth Porter wrote:
> --On Tuesday, August 22, 2006 8:34 PM -0400 Eric
> <sp...@scoot.netis.com> wrote:
>
>> So, what is the consensus of the BEST way to get subversion upgraded
>> correctly on FC2?
>
> I haven't upgraded in awhile, but my approach is to go to the Rawhide
> SRPM directory and grab the latest SRPM available for all Red Hat and
> Fedora systems. Rawhide generally tracks the upstream HEAD.

Dag, and Dries for more recent Fedora Core releases, have been doing a 
fabulous job of backporting the latest tools for earlier Fedora Core 
distributions. Coupled with their publication of more general tools not part 
of RedHat's distributions unti lthe recent "Extras" packages, it's very 
handy for older Fedora Core releases.

Rawhide tends to be bleeding edge, and have a lot of dependencies that are 
not easily available in older distributions without entering serious 
dependency hell. 

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

Re: The RIGHT way to upgrade Subversion on FC2 = ??

Posted by Kenneth Porter <sh...@sewingwitch.com>.
--On Tuesday, August 22, 2006 8:34 PM -0400 Eric <sp...@scoot.netis.com> 
wrote:

> So, what is the consensus of the BEST way to get subversion upgraded
> correctly on FC2?

I haven't upgraded in awhile, but my approach is to go to the Rawhide SRPM 
directory and grab the latest SRPM available for all Red Hat and Fedora 
systems. Rawhide generally tracks the upstream HEAD.

Once you have the SRPM, repackage it. There's a page in the Fedora wiki on 
how to repackage a source RPM into a binary RPM. Because you do it on FC2, 
it will use the libraries you have installed. You won't have any 
dependencies on libraries only available in later distributions.

It's still possible the source package will have dependencies on libraries 
not available with FC2. If so, you may have to get those libraries from 
Rawhide and repackage them as well. With any luck this won't drive you into 
a new version of glibc or a new kernel, or SELinux. (I got stuck trying to 
upgrade Mailman due to an indirect dependency on SELinux.)

It's important to remember that building from an SRPM *is* building from 
source. An SRPM is just the original source wrapped with distro-specific 
patches and a meta-makefile (the spec file) that builds a package in a way 
that's compatible with the distro's filesystem layout.


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

Re: The RIGHT way to upgrade Subversion on FC2 = ??

Posted by Eric Poole <er...@rkt-tech.com>.
At 06:33 AM 8/23/2006, Nico Kadel-Garcia wrote:

<NKG>>>>>If you type "yum list", it should now give you the list of all 
available packages. You can confirm that it has the right versions of 
subversion and mod_dav_svn and the subversion related tools by reading the 
output:<<<<<

Good evening, Nico.

After configuring for downloading from DAG ("rpm -Uhv 
http://dag.wieers.com/packages/rpmforge-release/rpmforge-release-0.3.4-1.fc2.rf.i386.rpm"), 
I did a "yum list" and I find that the only Subversion files listed in the 
output are still version 1.0.9.

Yum still doesn't seem to be seeing the 1.2.1 version that DAG has.

I guess I'm still missing one piece of the puzzle...

Eric


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

Re: The RIGHT way to upgrade Subversion on FC2 = ??

Posted by Nico Kadel-Garcia <nk...@comcast.net>.
Eric wrote:
> At 08:58 PM 8/22/2006, Nico Kadel-Garcia wrote:
>
> <NKG>>>>>The DAG repository, at
> http://dag.wieers.com/packages/subversion/, has a much more
> up-to-date version.<<<<<
> Wow. What a gold mine.  Thanks, Nico.
>
> I have configured for downloading from DAG (I said "rpm -Uhv
> http://dag.wieers.com/packages/rpmforge-release/rpmforge-release-0.3.4-1.fc2.rf.i386.rpm"
> and that didn't work for some reason, so I had to download
> rpmforge-release/rpmforge-release-0.3.4-1.fc2.rf.i386.rpm directly to
> my hard drive and "rpm -Uhv" it from there, and that seems to have
> worked).
> I then said "yum remove subversion" to get rid of all of the old
> stuff, which ran to successful completion.
>
> Now, do I just say "yum install subversion" and yum will figure out
> for itself where the latest stuff is, or do I say "yum install
> subversion-1.3.2-0.1.fc2.rf.i386.rpm" to get that version
> specifically?  Or, do I download subversion-1.3.2-0.1.fc2.rf.i386.rpm
> to my local hard drive and "rpm -ivh" it from there?

If you type "yum list", it should now give you the list of all available 
packages. You can confirm that it has the right versions of subversion and 
mod_dav_svn and the subversion related tools by reading the output: then do 
your "yum install subversion [whatever else you want]". Be sure to get 
mod_dav_svn: that has the Apache related bits.


> Eric Poole
> Burgoyne, Nolet & Poole, Inc.
> Londonderry, NH, USA
> Providing software development consulting and services
>                          to government and industry since 1979.
> Phone: 603-437-1811 ext 21
> E-mail: eric@bnpconsulting.com
> On the Web: http://www.bnpconsulting.com
> Skype: EricPooleNH
> ========================================
> NOTE TO CORRESPONDENTS:  Email on the Internet has become a bit less
> than 100 percent reliable, due to spammers.  If you email me and
> don't get a response in a reasonable time, please re-send.  Also,
> please do what you can to combat spammers, including supporting any
> anti-spam legislation and NEVER buying anything from a spammer.
> ========================================
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org 

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

Re: The RIGHT way to upgrade Subversion on FC2 = ??

Posted by Eric <sp...@scoot.netis.com>.
At 08:58 PM 8/22/2006, Nico Kadel-Garcia wrote:

<NKG>>>>>The DAG repository, at http://dag.wieers.com/packages/subversion/, 
has a much more up-to-date version.<<<<<

Wow. What a gold mine.  Thanks, Nico.

I have configured for downloading from DAG (I said "rpm -Uhv 
http://dag.wieers.com/packages/rpmforge-release/rpmforge-release-0.3.4-1.fc2.rf.i386.rpm" 
and that didn't work for some reason, so I had to download 
rpmforge-release/rpmforge-release-0.3.4-1.fc2.rf.i386.rpm directly to my 
hard drive and "rpm -Uhv" it from there, and that seems to have worked).

I then said "yum remove subversion" to get rid of all of the old stuff, 
which ran to successful completion.

Now, do I just say "yum install subversion" and yum will figure out for 
itself where the latest stuff is, or do I say "yum install 
subversion-1.3.2-0.1.fc2.rf.i386.rpm" to get that version 
specifically?  Or, do I download subversion-1.3.2-0.1.fc2.rf.i386.rpm to my 
local hard drive and "rpm -ivh" it from there?


Eric Poole
Burgoyne, Nolet & Poole, Inc.
Londonderry, NH, USA
Providing software development consulting and services
                          to government and industry since 1979.
Phone: 603-437-1811 ext 21
E-mail: eric@bnpconsulting.com
On the Web: http://www.bnpconsulting.com
Skype: EricPooleNH
========================================
NOTE TO CORRESPONDENTS:  Email on the Internet has become a bit less than 
100 percent reliable, due to spammers.  If you email me and don't get a 
response in a reasonable time, please re-send.  Also, please do what you 
can to combat spammers, including supporting any anti-spam legislation and 
NEVER buying anything from a spammer.
========================================


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

Re: The RIGHT way to upgrade Subversion on FC2 = ??

Posted by Nico Kadel-Garcia <nk...@comcast.net>.
Eric wrote:
> I could use some advice on the RIGHT way (versus, I am sure, any
> number of WRONG ways) to upgrade Subversion to the latest version
> (1.3.2) on Fedora Core 2.
>
> For any number of sad and sorry reasons, I am stuck with FC2 on this
> particular machine.  It came with Subversion 1.0.9 installed, and I
> would like to upgrade.
>
> I tried "yum update subversion" and got a list of actions ending with
> "subversion is installed and the latest version.  No action to take.".
>
> Tried "yum upgrade subversion" and got a list of actions ending with
> "No Upgrades available for subversion".  "svn --version" showed that
> the installed version stayed at 1.0.9.
>
> I then went looking for RPMs for version 1.3.2 and couldn't find
> anything for anything earlier than Fedora Core 3.

FC2 is, of course, deprecated at this point. But The DAG repository, at 
http://dag.wieers.com/packages/subversion/, has a much more up-to-date 
version. There are also various published Yum configuration files that point 
to DAG,

Otherwise, you may wish to get David Summers' RPM's, which are linked to on 
the main subversion site.

> So, OK, I figured I may as well download the source tarball and build
> and install from that.  But first, I figured I'd better uninstall the
> currently-installed version;  So, I said "rpm -e subversion" and got:
>
> error: Failed dependencies:
>   libsvn_client-1.so.0 is needed by (installed)
>   subversion-perl-1.0.2-1 libsvn_delta-1.so.0 is needed by
>   (installed) subversion-perl-1.0.2-1 libsvn_delta-1.so.0 is needed
>   by (installed) mod_dav_svn-1.0.9-1 libsvn_diff-1.so.0 is needed by
>   (installed) subversion-perl-1.0.2-1 libsvn_fs-1.so.0 is needed by
>   (installed) subversion-perl-1.0.2-1 libsvn_fs-1.so.0 is needed by
>   (installed) mod_dav_svn-1.0.9-1 libsvn_ra-1.so.0 is needed by
>   (installed) subversion-perl-1.0.2-1 libsvn_repos-1.so.0 is needed
>   by (installed) subversion-perl-1.0.2-1 libsvn_repos-1.so.0 is
>   needed by (installed) mod_dav_svn-1.0.9-1 libsvn_subr-1.so.0 is
>   needed by (installed) subversion-perl-1.0.2-1 libsvn_subr-1.so.0 is
>   needed by (installed) mod_dav_svn-1.0.9-1 libsvn_wc-1.so.0 is
>   needed by (installed) subversion-perl-1.0.2-1 subversion = 1.0.9-1
>   is needed by (installed) mod_dav_svn-1.0.9-1 subversion = 1.0.9-1
> is needed by (installed) subversion-devel-1.0.9-1
> If I can get a clean uninstall of the current subversion
> installation, I won't feel too uncomfortable about just doing a
> configure / make / make install on the source tarball, outside of the
> RPM environment.

Yup. You need to do "yum remove subversion" to get rid of all that debris, 
which comes with Subversion's various components spread out into organized 
RPM's.

> Or, I could just leave the current installation alone in
> /usr/bin/svn, and build the new version in its default installation
> locations like /usr/local/bin/svn.  But, then I'd have to make sure

Ohh. Bad. You'll get unexpected conflects depending on your PATH.


> that everyone's path shows /usr/local/bin first, which is likely to
> break the first time anyone decides to play with their path in their
> local .bashrc file.
> So, what is the consensus of the BEST way to get subversion upgraded
> correctly on FC2?

Get the RPM's from DAG. 

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

The RIGHT way to upgrade Subversion on FC2 = ??

Posted by Eric <sp...@scoot.netis.com>.
I could use some advice on the RIGHT way (versus, I am sure, any number of 
WRONG ways) to upgrade Subversion to the latest version (1.3.2) on Fedora 
Core 2.

For any number of sad and sorry reasons, I am stuck with FC2 on this 
particular machine.  It came with Subversion 1.0.9 installed, and I would 
like to upgrade.

I tried "yum update subversion" and got a list of actions ending with 
"subversion is installed and the latest version.  No action to take.".

Tried "yum upgrade subversion" and got a list of actions ending with "No 
Upgrades available for subversion".  "svn --version" showed that the 
installed version stayed at 1.0.9.

I then went looking for RPMs for version 1.3.2 and couldn't find anything 
for anything earlier than Fedora Core 3.

So, OK, I figured I may as well download the source tarball and build and 
install from that.  But first, I figured I'd better uninstall the 
currently-installed version;  So, I said "rpm -e subversion" and got:

error: Failed dependencies:
   libsvn_client-1.so.0 is needed by (installed) subversion-perl-1.0.2-1
   libsvn_delta-1.so.0 is needed by (installed) subversion-perl-1.0.2-1
   libsvn_delta-1.so.0 is needed by (installed) mod_dav_svn-1.0.9-1
   libsvn_diff-1.so.0 is needed by (installed) subversion-perl-1.0.2-1
   libsvn_fs-1.so.0 is needed by (installed) subversion-perl-1.0.2-1
   libsvn_fs-1.so.0 is needed by (installed) mod_dav_svn-1.0.9-1
   libsvn_ra-1.so.0 is needed by (installed) subversion-perl-1.0.2-1
   libsvn_repos-1.so.0 is needed by (installed) subversion-perl-1.0.2-1
   libsvn_repos-1.so.0 is needed by (installed) mod_dav_svn-1.0.9-1
   libsvn_subr-1.so.0 is needed by (installed) subversion-perl-1.0.2-1
   libsvn_subr-1.so.0 is needed by (installed) mod_dav_svn-1.0.9-1
   libsvn_wc-1.so.0 is needed by (installed) subversion-perl-1.0.2-1
   subversion = 1.0.9-1 is needed by (installed) mod_dav_svn-1.0.9-1
   subversion = 1.0.9-1 is needed by (installed) subversion-devel-1.0.9-1

If I can get a clean uninstall of the current subversion installation, I 
won't feel too uncomfortable about just doing a configure / make / make 
install on the source tarball, outside of the RPM environment.

Or, I could just leave the current installation alone in /usr/bin/svn, and 
build the new version in its default installation locations like 
/usr/local/bin/svn.  But, then I'd have to make sure that everyone's path 
shows /usr/local/bin first, which is likely to break the first time anyone 
decides to play with their path in their local .bashrc file.

So, what is the consensus of the BEST way to get subversion upgraded 
correctly on FC2?


Eric Poole
Burgoyne, Nolet & Poole, Inc.
Londonderry, NH, USA
Providing software development consulting and services
                         to government and industry since 1979.
Phone: 603-437-1811 ext 21
E-mail: eric@bnpconsulting.com
On the Web: http://www.bnpconsulting.com
Skype: EricPooleNH
========================================
NOTE TO CORRESPONDENTS:  Email on the Internet has become a bit less than 
100 percent reliable, due to spammers.  If you email me and don't get a 
response in a reasonable time, please re-send.  Also, please do what you 
can to combat spammers, including supporting any anti-spam legislation and 
NEVER buying anything from a spammer.
========================================


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

Re: Learning Subversion's Client C API

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 8/17/06, Martin Piecyk <mp...@gmail.com> wrote:
> Hello,
>
> I am a developer who wants to build a client application using
> Subversion's C client API. Running on Windows XP, I downloaded
> http://subversion.tigris.org/files/documents/15/32474/svn-win32-1.3.2_dev.zip
> and http://subversion.tigris.org/files/documents/15/32473/svn-win32-1.3.2.zip
> to gain access to the header files and pre-compiled static libraries.
> I read the entire Subversion book located in the Windows .exe
> installation (since it was newer than
> http://svnbook.red-bean.com/en/1.1/index.html), including the chapter
> for developers. I understand Subversion's use of APR's memory pools
> and reasons for doing so and the modularized layered library design,
> such as the libraries for the Repository Access and Repository layers.
> Additionally, I looked read through Subversion's documentation in
> http://svn.collab.net/svn-doxygen/, looking mostly at the client
> functions and data types, and the APR documentation in
> http://apr.apache.org/docs/apr/, http://apr.apache.org/docs/apr-util/,
> and http://apr.apache.org/docs/apr-iconv/. I read through
> http://subversion.tigris.org/hacking.html and a tutorial using the
> client API at http://www.linuxdevcenter.com/pub/a/linux/2003/04/24/libsvn1.html
> (but this uses an older version of Subversion).
>
> However, after reading all of these documents, I still do not know how
> to make a simple console application in C that does something with
> Subversion such as checkout a repository into a particular directory
> using a particular user name and password. I believe that in all of
> the aforementioned papers I read through, none had a complete working
> example written in the C or C++ language with a "main" function. I was
> hoping that maybe someone knew of a tutorial that can help someone
> such as myself get off to a good start with developing with the
> Subversion API. Looking through the actual source code of the command
> line client, svn.exe, confused me since I was not sure which lines of
> code I would need for performing a simple checkout and what the
> purpose of each line was.
>
> Eventually, I found
> http://svn.collab.net/repos/svn/trunk/tools/examples/, but I could not
> get any of the C files to compile with Microsoft Visual C++ 6.0.
> Additionally, they seemed a bit complicated to me since there were
> several lines of code I wasn't sure of but no tutorial that goes
> through them line by line.
>
> Here is my error output of headrev.c, which is in the examples
> directory. All of the other C files in the examples directory I
> compiled had similar errors.
>
> --------------------Configuration: subversionheadnumber - Win32
> Debug--------------------
> Compiling...
> headrev.c
> E:\subversionheadnumber\headrev.c(132) : warning C4013:
> 'svn_io_open_unique_file2' undefined; assuming extern returning int
> E:\subversionheadnumber\headrev.c(132) : error C2065:
> 'svn_io_file_del_on_close' : undeclared identifier
> E:\subversionheadnumber\headrev.c(132) : warning C4047: 'initializing'
> : 'struct svn_error_t *' differs in levels of indirection from 'int '
> Error executing cl.exe.
>
> subversionheadnumber.exe - 1 error(s), 2 warning(s)
>
> Does anyone know of any tutorials on using the C client API of
> Subversion 1.3 or other example programs? Also, does anyone know what
> my problems are with compiling the source code? I used the development
> files in svn-win32-1.3.2_dev.zip to attempt to compile the source. Any
> help or links would be greatly appreciated.

I imagine you're getting those errors because you're not including all
the necessary header files.  That particular error seems to result
from not including svn_io.h (not sure why headrev.c would have that
problem, but it's certainly possible).

The best example program is probably minimal_client.c, although I
don't know of an up to date tutorial to go along with it.

-garrett

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