All platforms - P4Sync: The Perforce sync now supports multiple branches!
Some weeks ago, we released (126.96.36.19995) the support for importing from P4 branches/streams to Plastic SCM branches.
Now, you can also export the changes from your Plastic branches to P4. This is needed to keep you changes in sync between Plastic & P4 when you are concurrently working with both systems.
How to do it? You just need to use the 'p4multibranch' source in the 'cm sync' command:
cm sync <repspec> p4multibranch <p4server> --mainbranch=<main_branch_folder> --branchesfolder=<branches_folder> --user=<usr_name> --pwd=<password> [--skipplasticbranches=path_to_file] [--skipp4branches=path_to_file] [--skipp4paths=path_to_file]
cm sync plastic-repo p4multibranch p4server:1666 --mainbranch=//depot/main --branchesfolder=//depot --user=user --pwd=mypwd
The command needs to explicitly know what p4 folder matches with the main branch and what p4 folder includes the rest of your branches folders.
Example. With the following depot structure:
//depot/project/dev //depot/project/release-01 //depot/project/release-02
where //depot/project/dev is the main branch folder and //depot/project/release-01 & //depot/project/release-02 are also branch folders. The command should receive the following parameters (notice that these depot paths don't end with /...):
We also added new options to skip paths or branches during the sync process:
* Use '--skipplasticbranches=path_to_file' to skip Plastic branches during the push. The file format is one branch per line. The branch prefix ("br:") can be omitted. Example:
* Use '--skipp4branches=path_to_file' to skip P4 branches during the pull. The file format is one P4 branch (absolute depot path) per line. Example:
* Use '--skipp4paths=path_to_file' to skip P4 files/folders during the pull. The file format is one path (relative path, it applies to all branches) per line. Example:
Known issues (pull):
* The sync ignores the changelists that contain changes of different branches (or what we consider different branch folders) in the same changelist.
* The branch starting point is wrongly calculated when the changelist used to create the branch (populate/integrate commands) only contains delete operations. In this scenario, we use as starting point the closest parent changelist with any change different than a delete.
* The progress of the changelists to pull can be improved. If the last changelist in the depot is 500, we say that we are pulling 500 changelists although there are big gaps in the ids and, finally, we only import 100. This works this way to avoid requesting all the changelists at once at the beginning (it can be slow and error prone).
* The sync operation can say that there are new changelists to pull, although it later pulls nothing. This happens if these changeslist were pushed from Plastic before or if there are new changelists in the depot that apply to paths not related to what's being synchronized.
* The sync operation can leave some empty directories in Plastic. Since p4, doesn't handle directories, when all files are removed the directory doesn't exist anymore.
Known issues (push):
* The sync report might show some changes skipped due to the following reason: 'The path couldn't be deleted'. This report is harmless, and it will just keep a file loaded in p4 that shouldn't be there (in the worst scenario).
* Perforce doesn't support to reuse a path in the same changelist so, we cannot export these changes from Plastic to Perforce. In these cases, we do our best to keep the same structure in the Perforce side. Check 'Paths reused in the same changelist' appendix.
* The push ignores changes on empty directories since p4 doesn't handle directories at all.
* The '--user' parameter is mandatory when pushing changes to a depot of type 'stream'. In this case, all the streams created to push the Plastic branches are created of type mainline.
* The branches are always created in Plastic using the full content of the starting point. It means, if only a subdirectory of //depot/project/main/...@24 is branched in P4, we will see the whole content under //depot/project/main/... in Plastic.
* The branches created from custom configurations doesn't keep this custom configuration in Plastic. A branch always starts from an existing and defined configuration (changeset) in Plastic. So, the importer will choose only one specified path@changelist configuration as base. Check 'Branch from different configurations' appendix.
* net.parallel.max P4 setting must be set (to a value higher than 1) to enable parallel download of contents while syncing. However, in those scenarios where the user is not a super user, parallel processing won't be enabled by default as it requires to check a p4 variable and it will fail in this case. The workaround is asking a super user (usually a company admin) to set both variables: net.parallel.max and net.parallel.threads and these values will be used during the sync. You can also force the number of threads to download data from p4 by using the parameter --p4threads=X.
Pending to implement:
* Labels are currently ignored, not pushed or pulled.
1. Paths reused in the same changeset/changelist
move /src/foo.c /src/bar.c add /src/foo.c
move /conf /config.txt (file) add /conf/client.conf (conf is now a dir)
All platforms - Plastic, Gluon: handle LDAP credentials using Single Sign On
Now, the LDAP credentials are handled correctly when your client points to the local cloud server and is configured to use the SSO working mode.
All platforms - Plastic, Gluon: automatically change display language on East Asian systems
You might have seen in an earlier release that to take advantage of newly supported languages Chinese Simplified, Chinese Traditional, Japanese, and Korean, you can set the language in your client.conf.
Furthermore, so that users unaware of this can also enjoy the new languages, we will now automatically set the display language to match the system language if the system language is one of the above and the language in the client.conf is "en" or "zh" or not set.
NOTE: if your system is set to an East Asian language, but you want to force Plastic to appear in English, simply set "force_en" as the language in client.conf, like this:
All platforms - Gluon: Solved credentials issue when using SSO
When opening Gluon for the first time and signing in using SSO, there was an error that prevented the user from creating a workspace, asking for a password. We solved this issue, and now you can create the workspace without being asked for credentials again.