-
Notifications
You must be signed in to change notification settings - Fork 51
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
Perforce VCS Plugin #55
base: master
Are you sure you want to change the base?
Conversation
Where should I add documentation? I see some pod under doc, but it doesn't appear to contain all of the documentation for VCS plugins that is posted to serge's public site. |
Codecov Report
@@ Coverage Diff @@
## master #55 +/- ##
=======================================
Coverage 67.37% 67.37%
=======================================
Files 49 49
Lines 4383 4383
Branches 1161 1161
=======================================
Hits 2953 2953
Misses 802 802
Partials 628 628 Continue to review full report at Codecov.
|
Plugins historically didn't have any documentation in Serge repo — the documentation is maintained in a separate (private) repo for serge.io website. Can you provide your documentation as an embedded POD in the ,pm module itself? I'll use it as a base and will create a page on Serge.io website. |
@prat0088 I know you tried to approach me on IRC the other day about Perforce concepts, but I wasn't available at the time. Can you ping me later today? I'd like to ask some questions and make sure I fully understand this, since I have to way to test Perforce. Speaking of configuring repos, I believe we could stick with the already notion of URLs, since Perforce has them, but indirectly. Consider the initial cloning command from their documentation:
This means that you want to connect to If Perforce server is something that can be (and usually is) omitted, the "URL" can simply become Since Serge can handle multiple remote repos per config, it allows you to pick relevant Perforce folders to form local file structure. So Serge config might look like this:
We could also add a
|
Sorry for the late reply. I was out for vacation. I'll reply to these comments and the others over the next few days. I'll also try to find you on IRC. Probably late afternoon / early evening PST. |
I rambled a lot about what to do with paths and URLs while trying to work through a few interesting situations with how we've configured Perforce here, but I ended up about at your comment. That sounds good. I'll update the documentation and clean up a few bits to bring it closer in line with your comment. |
Per-branch servers strikes me as a very rare case (ie. somehost.com:1666//depot/blah). I'm under the impression organizations have a single server that is used to store everything. In my opinion it's unneeded. |
I'd like to draw your attention to
I save the client root in this file only for get_remote_url(). I can make it slightly nicer by storing the client name in the file, then getting the depot path by querying p4 with the client name. This would assume a single (eg. //depot/proja/...) which I think we're in agreement on. I was originally not thrilled about this approach (store client name in .p4rc_serge), but there are two functions:
Additionally, it's common to have a local .p4rc file in the root of your local directory that stores client name, so it would be somewhat familiar to Perforce users, yet recognizable as being generated by Serge. I just wanted to run this approach by you. |
That's fine. Use your judgement. So you want to have a per-config |
So when you do a Having a custom '.p4rc_serge' is also fine, but I just want to make sure we're aware of alternatives and are using the best reasonable approach. |
Correct. The first step is
This doesn't create any local file information. Then you would usually add the client name to a local file whose name is specified in P4CONFIG. Finally you call There isn't a 1-command equivalent of clone.
It's created manually. There is no standard from Perforce the company as far as I can tell. We use .p4rc. I've seen that on mailing lists. I've also seen p4config.txt on stack overflow. Now that I think about it, it would make sense if this was also a config setting the user could define. Then Serge could create/update this file. I think that would be a good solution. |
Thanks for additional info, Tristan. I have one more question: what can possibly happen if one tries to clone (or do whatever the equivalent of The reason I ask is at the very basic level the p4 sync plugin could simply ignore the actual remote folder and make |
I tested interactively on Linux multiple times with --initialize, push, pull, and adding versioned files. I'm not yet using this in production because of unrelated reasons, and it might be another month or two.
I haven't tested on Windows but believe it will work. The only slightly OS-specific thing I'm doing is piping a file to STDIN using 'cmd < file', which I understand to work on Windows.
Relates to discussion over at #53 .