Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support perforce #122

Open
stardust85 opened this issue Jan 5, 2016 · 15 comments
Open

support perforce #122

stardust85 opened this issue Jan 5, 2016 · 15 comments

Comments

@stardust85
Copy link
Contributor

I'm thinking of trying to implement it...

@stardust85
Copy link
Contributor Author

Work started: stardust85@0858a61

@marcinkuzminski
Copy link
Member

Hi, That's a great idea.

Few questions, what's your thinking on the perforce API implementation, subprocess calls, or direct usage of P4 llibs ?

Best,

@stardust85
Copy link
Contributor Author

As I stated in the docstring (https://github.com/stardust85/vcs/blob/master/vcs/backends/p4/__init__.py#L2), I'm going to use subprocess. I didn't write there what's the motivation for that yet. The motivation is that I have to use it on Oracle Linux 6, which has python 2.6. However latest versions of p4python require python 2.7. And I need to use latest version of p4 client (no matter if subprocess, or libs), because our p4 server requires it.

However switching between these two interfaces is easy, so later (once we start using EL/OL 7 more), I can implement also the p4python way and allow users to choose, which interface they want to use.

I'm surprised that you know perforce :) In Central Europe it's not much popular...

@stardust85
Copy link
Contributor Author

And don't worry about parsing. p4 -G returns marshalled python objects :D

@marcinkuzminski
Copy link
Member

Hi,

I know it since our company (RhodeCode) is having a planned Perforce integration to our RhodeCode product, we use heavily modified vcslib implementation, that currently have hg/git/svn support. P4 was 4th we wanted to have.

Are you writing this for your company ?

@stardust85
Copy link
Contributor Author

(part of conversation moved to private channel)

First (very limited) parts of code working. I'm not sure how often should I create pull requests, but I think it will be better to feed it here by small (working) parts so we stay in sync. I'm gonna create my first PR in this repo... :)

@stardust85
Copy link
Contributor Author

I've found that they re-enabled support for python2.6, so we can use p4python. And even better, p4python is now on pip :)

@marcinkuzminski
Copy link
Member

That's good, also i'd check p4python license, and it looks fully compliant.

@stardust85
Copy link
Contributor Author

Unfortunately there's still one pitfall with p4python: by default it compiles with disabled support ssl. And my perforce server allows only ssl connections. I'm considering contacting perforce support to find how to get ssl-enabled p4python from pip. Maybe some option needs to be passed somewhere.

@stardust85
Copy link
Contributor Author

Or maybe this can help http://package.perforce.com/yum/rhel/6/x86_64/perforce-p4python-2015.1-1062785.x86_64.rpm

There will be probably also a deb package, because they have both yum and apt repos.

@stardust85
Copy link
Contributor Author

The perforce RPM repo didn't help with ssl, so I created a support request asking for a new build with ssl enabled.

@stardust85
Copy link
Contributor Author

They promissed to release next version of p4python rpm package with ssl support.

@stardust85
Copy link
Contributor Author

Regarding the tests, I will change them to use public perforce server (P4PORT=public.perforce.com:1666)

@stardust85
Copy link
Contributor Author

http://package.perforce.com/yum/rhel/6/x86_64/perforce-p4python-python2.6-2015.2-1348262.x86_64.rpm added support for ssl, so we can probably switch to p4python instead of unmarshalling output of p4 -G

@marcinkuzminski
Copy link
Member

Hi, We recently released out OpenSource version of RhodeCode which has latest vcsserver code that supports svn/git and Mercurial, would you be interested building a perforce backend for it ? If so please join our slack channel at https://rhodecode.com/join

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants