Re: svn::Client and svn::Context - Avoiding the creation of auth directories
Alexander Mueller <[email protected]> Fri, 27 Nov 2009 10:37:56 +0100
| Newsgroups | gmane.comp.version-control.subversion.rapidsvn.devel |
|---|---|
| Message-ID | <[email protected]> |
If you take a look at context.cpp you will se the list where all the
auth providers are initialized. You can try to comment out one or more
of the functions and check whether this changes the behaviour. Next we
can add a parameter to the constructor in which one can opt out one or
more auth providers.
Alex
Marius Ionescu schrieb:
> Hi,
>
> I have a svncpp development related question to which I wasn't able to respond so far.
> Please let me know if I should post in another mailing list or not (the "user" mailing list seemed to be oriented on configuration/build related topics so I thought that this might be a good point to start, at least).
>
> Given a directory path, I would like to retrieve the username of the last commiter by using svncpp. I know, there are already a few ways which can achieve that without touching code, but I would like to use svncpp.
>
> So far so good. The code compiled and linked perfectly. Copy/paste below of a sample:
> --- (sorry for the bad formatting..)
> #include <iostream>
>
> #include "svncpp/client.hpp"
> #include "svncpp/info.hpp"
> #include "svncpp/dirent.hpp"
>
> int main(void) {
>
> try {
>
> svn::Context context("/home/user/project-src-tree");
> context.setLogin("user","pass");
> context.setAuthCache(false);
>
> svn::InfoVector infoVector;
>
> svn::Client client(&context);
>
> svn::Path path("subproject/file.cpp");
>
> infoVector = client.info(path, false, svn::Revision::UNSPECIFIED, svn::Revision::UNSPECIFIED);
>
> std::cout << infoVector[0].lastChangedAuthoer() << std::endl;
>
> } catch (svn::ClientException& e) {
> std::cout << e.message();
> }
>
> return 0;
> }
> ---
>
> The only thing that I would like to "bypass", if possible, is the creation of the following (empty, in some cases) files/directories (which seem to be created also when providing the user/pass to the .setLogin() call):
> - auth
> - svn.simple
> - svn.ssl.server
> - svn.username
> - Readme.txt
> - servers
>
> Is there something that can be done in order to stop the creation of these files/directories from *inside svncpp*? I understood that this is a subversion aspect. Apparently this can be done by changing the subversion config file (http://svnbook.red-bean.com/nightly/en/svn.serverconfig.netmodel.html#svn.serverconfig.netmodel.credcache), but in the cases when the config files are not available..
> Also, when doing Context.setAuthCache(false) the directories are still created.
>
> Thank you in advance for your help,
> Marius.
>
> ------------------------------------------------------
> http://rapidsvn.tigris.org/ds/viewMessage.do?dsForumId=668&dsMessageId=2424695
>
> To unsubscribe from this discussion, e-mail: [[email protected]].
------------------------------------------------------
http://rapidsvn.tigris.org/ds/viewMessage.do?dsForumId=668&dsMessageId=2424806
To unsubscribe from this discussion, e-mail: [[email protected]].