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

Perforce VCS plugin #53

Open
prat0088 opened this issue Dec 27, 2016 · 3 comments
Open

Perforce VCS plugin #53

prat0088 opened this issue Dec 27, 2016 · 3 comments

Comments

@prat0088
Copy link
Contributor

This is an issue to discuss the Perforce VCS plugin I'm currently working on.

Notes:

  • No new Perl dependencies are required.
  • I haven't tested on Windows, but I didn't use any OS-specific syntax, so I expect it to work without change.
  • I decided to use the command-line p4 program and not the Perl API because the former will be much simpler for Serge users. The P4 Perl API is only available on Perforce's site, and it requires that you download or compile the p4 binaries separately before making the Perl module. The binaries required are 4 years old and only available by special request from Perforce's help desk.
  • This plugin will require Perforce 2012.1 or later because it depends on the reconcile command.
  • Each repository_url is expected to be a p4 filespec (eg. //depot/some_project). It will sync all files under that path by default, but the user can add additional filespecs with wildcards in the config file to selectively sync files.
  • A client will automatically be created. Its name will be customizable in the configuration.
  • I have something working reliably during brief testing.

Feedback is welcome.

@whereisjim
Copy link

Can we have some documentation on how to use this plugin?
I tried to use this, but keep failing and bit confusing.

Here is some more detail on what I did with this plugin.

The below test was done under Windows environment.
path: d:\project\depot\source
Under this 'source' folder en.json is the English source and de.json and ja.json localized files are thre.
I'm still new to Serge so this is my understanding on how Serge works.
The Serge command is in following order.
0. serge pull --initialize <config.file>

  1. serge pull <config.file>: This will pull the updated strings to local from SVC.
  2. serge localize <config.file>: This will update delta strings to the localized file set
  3. serge push-ts <config.file>: This command will push the localized files to Pootle
  4. strings localized in Pootle.
  5. serge pull-ts <config.file>: This command will pull down fully localized strings from the Pootle
  6. serge push <config.file>: This command will check-in/push the updated and localized files back to SVC.

FYI. I'm still setting up the Pootle side, so I cannot run the #3, #4 and #5 commands yet.
When I tried with git plugin, #1 > #2 > #6 process worked fine.
However, with p4 plugin, #1 worked fine then when I ran #2, it failed to generate/update the localized files with the delta strings. These files are still with 'read only' attribute, it failed to write files. If I delete the localized read only files and run #2 command, it does generate localized files with delta strings.
Then I ran #6, it says there no file to reconcile and just force sync all the files.

I'd love to test out this plugin, but not sure what to do. Any tip, info or documentation will help.

@prat0088
Copy link
Contributor Author

@whereisjim

Congratulations for being the first person to test and report on using this plugin. Thanks for taking the time to comment this issue.

What version number of Perforce are you using? I wrote the plugin using

p4 -V
Perforce - The Fast Software Configuration Management System.
Copyright 1995-2013 Perforce Software. All rights reserved.
Rev. P4/LINUX26X86_64/2014.1.community/576838 (2013/01/17).

Did you create the p4 client on your own or did you do it through serge's --initialize? The plugin should be setting the files to clobber so they are writable. See: https://github.com/evernote/serge/pull/55/files#diff-a2349dbf0c0ee9ffb89ecf0ad20d277eR95

Are those the options you see in the p4 client that was created?

There are still a few rough spots I'm trying to polish before it's ready to merge.

@iafan
Copy link
Contributor

iafan commented Aug 5, 2019

I wonder if anything has changed since Perforce introduced their Helix4git product. My understanding is that one can expose any part of Perforce repo as a Git repo, and use git toolchain / git Serge sync plugin. Has anybody tried that?

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

3 participants