Coder Social home page Coder Social logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 24, 2024
In an attempt to recreate this issue I created a repository on a remote server
accessed over ssh. 
In this case using the form: 
python svnlog2sqlite.py svn+ssh://my.remote.pc.com/PATH/TO/SVNPLOT-testing/test1
~/TEST/sshtest-repo.db 
works fine - its prompts for password ~10 times per revision but runs to 
completion. 

In your case, what is requiring the authentication? 
The issue is with the Apache Server side bit I think. 

-chris 

Original comment by [email protected] on 20 Mar 2009 at 1:14

from svnplot.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 24, 2024
Ok... digging into svnlogiter.py and pysvn. 
Check details on this webpage:
http://pysvn.tigris.org/docs/pysvn_prog_ref.html#pysvn_client_callback_get_login

Seems like we have to implement our own callback functions to grab a username
password etc. Similar problem exists for repositories sat behind SSL i.e. 
https. 


class SVNLogClient:^M
    def __init__(self, svnrepourl):^M
        self.svnrepourl = svnrepourl^M
        self.svnclient = pysvn.Client()^M
        self.svnclient.callback_ssl_server_trust_prompt =
self.ssl_server_trust_prompt   ### for https
        self.svnclient.callback_get_login = self.get_login   ### These additional lines
...
    def ssl_server_trust_prompt( self, trust_dict ):
        retcode=True
        accepted_failures = 1
        save=False
        return retcode, accepted_failures, save

    def get_login(self, realm, username, may_save ):
        save=False
        retcode=True
        flag = int(raw_input("send pass? ") )
        if (flag==0):
            retcode=False
        username="default"
        password="nothing"
        return retcode, username, password, save


Original comment by [email protected] on 20 Mar 2009 at 2:28

from svnplot.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 24, 2024
So far I never tested the repository which requires authentication so missed 
this problem. I think suggested solution is correct. We will have to implement 
the call back function. 

We need to implement two options 
(a) Option to specify the username and password on the command line. In case 
user wants to run the svnplot script from a cronjob or scheduled task, 
specifying username and password on commandline will help.
(b) Option to request for username and password when required. However, this 
will make the update and graph generation process interactive.

Original comment by [email protected] on 20 Mar 2009 at 4:43

from svnplot.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 24, 2024
I still don't have a repository sat on an http to play with but I've branched 
and
implemented the interactive "option b". 

branches/chris_callback_opt_b/src 

Nitin - can you try this out? 

If it works then in principle this can be generalised to the command line. 
Would have
to pass through in __init__ methods for SVNLogClient and SVNLog2Sqlite 
probably. 

Original comment by [email protected] on 20 Mar 2009 at 6:04

from svnplot.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 24, 2024
In the same branch (branches/chris_callback_opt_b/src) I've added a couple of 
the SSL
(https) specific callbacks. 
These can be tested with something like: 

python svnlog2sqlite.py https://pyx.svn.sourceforge.net/svnroot/pyx 
~/TEST/pyX-repo.db 

Working for anybody else? 

Original comment by [email protected] on 20 Mar 2009 at 10:29

from svnplot.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 24, 2024
I tested the changes from chris' branch. They seem to be working for me. Great 
!!
Thanks for quick turnaround 

-Mandar 

Original comment by [email protected] on 21 Mar 2009 at 9:56

  • Changed state: Verified

from svnplot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.