Hi Philipp,

We'd definitely take a patch that supports both methods.

Christian

-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.review-board.org
VMware, Inc. - http://www.vmware.com


On Fri, Aug 7, 2009 at 5:18 AM, Philipp Henkel <philipp.hen...@gmail.com>wrote:

>
> Hi,
>
> p4.run_login() is working for me if I set the user and password before
> each p4 login again. P4 seems to loose the values set in __init__
>
>    def _connect(self):
>        if not self.p4.connected():
>            self.p4.connect()
>            self.p4.user         = self.user
>            self.p4.password  = self.password
>            self.p4.run_login()
>
> Furthermore I had to disable the usage of passwords in  method
> get_file to get RB fully working with Perforce:
>        #if self.p4.password:
>        #    cmdline.extend(['-P', self.p4.password])
>
> Wouldn't it be a good idea to support both Perforce access approaches
> right from the scratch? If someone is interested in this I'm willing
> to help.
>
> Best regards,
> Philipp
>
>
> On Jul 21, 1:13 am, Yongqiang Li <jasonleeh...@gmail.com> wrote:
> > Thansk, Tom.
> >
> > Just as what you said, I need to modify the perforce.py and add
> run_login()
> > just behind self.p4.connect() in function _connect().
> >
> > I tried the p4.run_login() but it didn't work.
> > So I wrote my own run_login() as:
> > ===============================
> > def run_login(self):
> >         os.popen('echo %s | p4 -p %s -u %s login -a' % (self.p4.password,
> > self.p4.port, self.p4.user))
> > ===============================
> >
> > Then everything is OK! RB is great!
> > Hope it's useful for other guys who have the same problem.
> >
> > Regards,
> > Yongqiang
> >
> > On Mon, Jun 29, 2009 at 8:34 AM, Tom Sakkos <nasis...@gmail.com> wrote:
> > > I wouldn't know where to put this in ReviewBoard, but it's probably
> > > necessary to run "run_login()" on the p4 object immediately after
> running
> > > "connect()."
> >
> > > -Tom
> >
> > > On Mon, Jun 29, 2009 at 2:13 AM, Jason Lee <jasonleeh...@gmail.com>
> wrote:
> >
> > >> Hi guys,
> >
> > >> I met another problem when post a perforce review.
> >
> > >> I install the RB on Windows.
> > >> The command is : post-review.py -d 118527
> > >> And then I met a perforce exception.
> >
> > >> The logs are below:
> > >> ================================================
> > >> P4Exception at /api/json/reviewrequests/new/
> >
> > >> [P4#run] Errors during command execution( "p4 describe -s 118527" )
> >
> > >>        [Error]: Password not allowed at this server security level,
> use
> > >> 'p4
> > >> login'.
> >
> > >> Request Method:         POST
> > >> Request URL:    http://127.0.0.1:80/api/json/reviewrequests/new/
> > >> Exception Type:         P4Exception
> > >> Exception Value:
> >
> > >> [P4#run] Errors during command execution( "p4 describe -s 118527" )
> >
> > >>        [Error]: Password not allowed at this server security level,
> use
> > >> 'p4
> > >> login'.
> >
> > >> Exception Location:     C:\Python25\lib\site-packages\P4.py in run,
> line
> > >> 284
> > >> Python Executable:      D:\Program Files\Apache Software Foundation
> > >> \Apache2.2\bin\httpd.exe
> > >> Python Version:         2.5.4
> > >> Python Path:    ............
> > >> Server time:    Fri, 26 Jun 2009 17:56:01 +0800
> > >> ===============================================
> >
> > >> I think that's because of the higher P4 server security level. Because
> > >> when I use my own perforce server with default security level, I can
> > >> post the review successfully.
> >
> > >> Anyone knows how to fix this problem?
> > >> Thanks.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To post to this group, send email to reviewboard@googlegroups.com
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to