Improved checkin progress

September 15, 2014

We’ve improved the way in which the checkin progress is handled in the GUI so that it shows more details when the data is transferred through a slow network.

The default checkin scale uses megabytes, but if the network is too slow (sometimes checking in data through the VPN) it is equivalent to not having progress at all.

What we’ve done is to add a secondary progress bar that shows up only when the transfer is too slow. The secondary bar shows the progress of each 4Mb block being transferred. Remember Plastic splits the checkins in 4Mb chunks. The chunks can be just parts of a large file or groups of small files.

The following screencast shows how it works on a network with changing speed (we use WAMEm to modify the network bandwidth and hence overall speed). The example is not realistic but it is helpful to explain the new feature:


The improved checkin progress has been available for a while, since:

  • - Jun 18th 2014
  • - May 19th 2014

SyncView revisited – improved performance

September 13, 2014

We’ve improved the performance and usability of the SyncView: it is now able to exclude branches making the sync process much faster.

As you know, the SyncView is the view in the GUI that you can use to preview what needs to be replicated between different servers and then run the replicas.

Excluded branches have been added to improve sync performance

We have added “excluded branches”: branches that you don’t want to sync between your repo and the remote one.

In my case I run a Plastic server on my laptop (using a SQLite backend handling about 18Gb) but I don’t have full replicas of the central repositories. I just pull the branches I need (to develop, code review or manually test tasks before getting them released). It means there are a few thousand branches on the remote server that I’ll never pull. Some of them are already years old.

Since the SyncView calculates all the changesets that need to be pushed or pulled in order to let you preview them, it started to get slow with thousands of branches.

That’s why we added the “excluded branches” feature.

You can select the branches you won’t be syncing and just “exclude them”. The result is that the sync view will be much, much faster, saving precious time on each loop.

We also added an option to show the “excluded branches” so that you can include them again in the calculation in case you need them later on (expanding the excluded branches is way much faster in 5.4 than in 5.0 since we implemented a new server API call in 5.4 to speed up the calculation, while 5.0 API is frozen and can’t take advantage of it).

New behavior in the “refresh” button

Previously the refresh button in the “sync view details” lower panel just affected the expanded repositories. While it wasn’t an issue when you worked with small lists, it wasn’t effective dealing whith long lists like this:

So from now on the “refresh” will trigger the calculation of the entire list of syncs instead of just the expanded ones, while you can still refresh them individually using the context menu.

New “push visible” and “pull visible” buttons

Especially when you’re using Xlinks it is very useful to use the filter to push (or pull) all the branches with a given name, in different repositories.

We’ve added two new buttons: “push visible” and “pull visible” to launch the pull or push of all the branches selected by the filter.

Underlying format change

All the SyncView configuration is stored on a file named syncviews.conf. We’ve modified the file format to make it human readable and better structured than it was before. It will be automatically upgraded by the new 5.0 and 5.4 releases so no user action is required.


This feature has been available since:

  • (August 6th 2014) and later.
  • (Aug 8th 2014) and later.

How to handle big files with Plastic

September 9, 2014

So it's basically done like any other file!

Plastic is not affected by the file size like other systems out there.

Keep coding while we take care of your files.

600 releases of Plastic and counting

September 4, 2014

Today we've released Plastic Yes, 600. Six hundred official releases since our first one back in 2005, more than one year before Plastic was launched.

Plastic has changed *a lot* during these years in all imaginable aspects: from performance to GUI, features, security, ease of use... almost everything version 1.0 included has been redesigned an incredibly improved a few times since.

I still remember reading great Spolsky's post saying 'Great software takes 10 years' and thinking "hey, can't be true! 10 years! When did he go crazy?" and I've to admit that as we get closer to 10 years in business I think I understand better than ever what it takes to develop good software.

Plastic *had to* change and evolve because our challenges turned out to be much bigger: our first paying customer was located in Northern Spain and had less than 10 developers. Things are bigger now and more demanding like an Asian company with more than 1000 developers working concurrently on a huge codebase and taking advantage of everything from distributed to high scalability and Xlinks.

We used to perform checkins of the quake source code as benchmark. The first checkin ever took 11 hours to complete! 11 hours (we threw up that code!). Nowadays we don't use this code anymore for testing since it is too small (a checkin takes about 4 secs or so and not even a 300Gb checkin takes so long).

Some of the core ideas in the first Plastic version persist, though. We wanted to turn "branch per task" into a mainstream practice to help developers on a daily basis, telling a story checkin after checkin and being able to use the version control not just as a delivery mechanism (that used to be most feared than loved) but as a real productivity tool you can't live with even if you're working alone. You checkin 'almost' as often as you hit CTRL-S (unless you're in vim :P). And this is something that is still there and it is easier to explain today than it was back 600 releases ago.

Looking back...

If you go back to the early posts on this blog you'll be able to go through the evolution of the initial Plastic releases, even before the official launch of 1.0.

From some really early GUI screenshots to my beloved and now defunct 3D version tree (which I expect will return soon and I hope will be much appreciated by game developers moving to Plastic).

Visit this album of 'historic' screenshots at our Facebook.

Back in 2005 we expected to fight the SVNs of the world and when we started visiting companies and explaining why using branches was good, we faced tons of skepticism.

Things got better after the Git revolution which evangelized the whole community teaching how things could be done in a different way.

Branching and merging was not evil anymore but the powerful tool to take advantage of.

As a result, nowadays instead of having to change developer's minds we basically get teams knocking at our door asking for good branching and merging, distributed AND centralized combined, visualization and good GUIs. If you put these three blocks together only Plastic stays as a valid choice, which is why despite of the distributed version control revolution lead by open source Git, there are still companies willing to pay for the software we develop.

We don't fight SVNs anymore (although we keep replacing them, but not really fighting :P) but we face big challenges since we focus only on teams that need really advanced features not available anywhere else. A real challenge which fortunately means we've to design new features and work on so many different areas that we can never say our job got boring after all these years.

Congratulations to the entire Plastic SCM team!!

Thanks to all the customers who make this adventure possible!

How to share an engine repository between different video games

August 5, 2014

If you ever wondered how to set the dependencies between different Plastic SCM repositories or you have been struggling to share common repositories using Xlinks , you will probably find this post helpful.

Initial setup

Let´s review a scenario where a video game company has a shared engine that is being used at the same time by two different game studios (in different locations).

Each game studio will have an "engine" repository and a "game" repository.

  • The "engine" repository will be synchronized to the remote main "engine" repository in New York.
  • The "game" repository will be local an independent per game studio.
  • The goal is to share the engine code between the two studios and, at the same time, the engine developers internally continue evolving it in New York.

    How does a workspace look like?

    This is the workspace of a developer who works in the Game A at the Vancouver studio. There is a folder containing the game code and also an Xlink pointing to the local "engine" repository.

    But let´s now review in deep how the engine repository should be configured to succeed in this scenario.

    Engine repository configuration:

    As the engine might be different in each game studio, the “engine” repository has internal branches to handle the specializations. We create a new branch per game. This set up allows each game studio to use the engine code and modify it independently.

    In the Vancouver studio they create a new branch for this purpose.

    The good point of using specific branches per game is that interesting fixes or new features can be merged or cherrypicked between branches and then easily replicated to the remote sites.

    In our example, the studio located in Vancouver develops a fix in the engine that is considered indispensable for his colleagues in London (and other future studios). In order to share the fix, they perform a merge from his specific branch to the "main" branch of the "engine" repository.

    Finally, they just push the new created changesets to the engine central repository in New York. Now the new engine version (including the fix) is available for all the studios. So the other studio in London just need to pull the new stable version of the engine and rebase it to their working branch (remember that every game studio has a specific branch in the "engine" repository).

    Games repositories configuration:

    The game studio locations also need to configure their local setups. There will be a “gameX” repository containing the local game source code and a local “engine” repository. This repository will be a replica of the New York´s engine.

    The way the Plastic handles repository links are creating Xlinks. So we create an Xlink in each "game" repository pointing to the "engine" repository.

    Notice that the Xlinks are pointing to the specifically created branches per each game.

    When the Xlinks are created, we also have to properly adjust the branch auto expansion rules. This way, we can keep the independence between the two games although they are actually using the same Xlinked "engine" repository.

  • Xlink branch expansion rules on the GameA repository --> source branch: "/main", destination branch: "/main/GameA".
  • Xlink branch expansion rules on the GameB repository --> source branch: "/main", destination branch: "/main/GameB".
  • Note: We select both options:

  • Writable: Because we want to perform changes in the Xlinked "engine" repository.
  • Use relative server: The Xlink tries to get the repository from our local server. This option is necessary because we are working on a replicated local repository and we don´t need to access to the remote server.
  • Share the engine changes between games:

    This game independence doesn´t limit the propagation of the changes performed in one game to the other. It can be performed in two easy steps:

  • Cherrypick/merge the desired changesets from one game branch to the other in the "engine" repository.
  • Update the Xlink target to the merge result changeset.
  • Finally, It´s interesting to realize that using this workflow, we can avoid replicating the entire "engine" repository per game studio location. We can just sync the desired branches on demand avoding unnecessary disk and network usage.

    It means that the Vancouver studio doesn´t need to sync the "/main/GameB" branch because they are only working in the GameA.

    Plastic SCM server address changed, what now?

    July 22, 2014

    Sometimes you just need to change the server IP or port because of security reasons; sometimes the server is moved somewhere else and then the address changes. Ideally the IT team will notify you about the change and you’ll have time to prepare it.

    Now we’ll review the steps you will need to follow to achieve a smooth transition.

    Notify the developers about the change

    It’s important to share the information with the developers using Plastic about the server address change since they’ll need to carry out some actions, don’t worry everything is pretty easy. The only action they need to accomplish prior to the address change is the following one:
    • Checkin all the pending changed files/directories inside the workspaces before the server address changes. Basically, leave the “Pending changes view” clean.

    Why? The Plastic SCM changes metadata info is internally stored inside a binary file called “plastic. changes”; you’ll find it at the hidden “.plastic” directory at your root workspace path. This is the key reason finding checkouts in a huge workspace (>300K files) is so fast. The pending changes are stored along with the Plastic SCM repository and the server they belong to. Keeping this file during the address change will lead into future issues while committing the changes since the old server stored will not be valid.

    Reconfigure the client connection info

    When the server address changes the Plastic SCM client will not detect the new address, the client will keep trying to connect with the old configuration over and over again and you will much likely see something like the image below.

    Don’t worry; it’s just the Plastic SCM client complaining about the server not answering the start-up queries. That’s why we need to run the Plastic SCM client configurator, to tell the client the new server address to work with.
    Remember that you’ll find the client configurator at the Windows start button programs or simply running “plastic --configure"

    Once the client is configured to use the new server address and port the Plastic SCM Client will start.
    We didn’t finish but we are almost there.

    Metadata references matters

    The Plastic SCM client is still having a file storing references to the old server address; the name of the file is “plastic.wktree”. The workspace tree file, unlike the “plastic.changes” file, can be easily updated to fetch the new server address so it’s safe to preserve it during the transition.

    The “plastic.wktree” file is a really important file for the Plastic SCM client, it stores the loaded changeset metadata info, that is the files name, size, hash, owner, repository and so on. It also stores the server address the workspace is working with, in order to update it you will need to open a command line window, change the directory to the Plastic SCM workspace path and run a “cm update .” operation.

    That will update not only your workspace but also the metadata referencing the old server address, now the Plastic SCM client can continue working, perhaps you may see the following error message:

    No channel found trying to connect to [colada:8091 (unreachable)]

    That means your plastic SCM selector is hardcoded to work with a certain repository spec, “code@colada:8081” for example, if that’s the case please issue the “cm sts” command and choose one of the following two alternatives, you can remove the absolute server spec from the selector, preserving only the repository name or you can fix the old server address and set the new one.

    Old selector:
    repository "code@colada:8090"
    path "/"
    smartbranch "/main"

    New selector (Option 1, relative repo spec):
    repository "code"
    path "/"
    smartbranch "/main"

    New selector (Option 2, full repo spec):
    repository "code@tizona:9091"
    path "/"
    smartbranch "/main"

    Alternatively to the “cm sts” command you can issue an absolute repspec switch operation providing the new server address, for example:

    cm switch br:/main@code@tizona:9091

    Assuming “colada:8090” is your old Plastic SCM address and “tizona:9091” is the new one.

    Securing a Plastic SCM system

    July 15, 2014


    The two main motivations behind the Plastic SCM security system are:

  • Provide a mechanism to control access to the repositories and restrict certain operations.
  • Define custom policies for both development and deployment. Even in widely open organizations, the access to certain parts of a repository can be restricted, not only for security related reasons but to prevent mistakes.
  • After installing Plastic SCM, you can check that any authenticated user of the system will have full access granted.

    The first step should be to assign a specific user (or group) as the repository server owner, and then, you can start defining your custom security restrictions. The repository server owner will be the “root” Plastic server user.

    After that, it doesn´t matter if you, for some reason, misconfigure any permission because this user will be able to restore them again.

    Whether they are to prevent unwanted access or enforce certain development policies, you should consider the following:

  • Define the different users and groups that will have access to the Plastic SCM system, and give them the right access on the repository server. Later on, you can customize specific privileges to repositories, branches and even items if required.
  • The next step should be to change the repository server permissions. Changing the permissions to the top level element in the security hierarchy will ensure that all the rest of the objects get secured.
  • ACL´s and Permission inheritance:

    Each user (SEcured IDentifier or SEID in Plastic terms) or group who has granted or denied permissions will have an entry in a given ACL. Each entry, will have allowed and denied permissions.

    Permissions in Plastic SCM are inherited from the top object in the hierarchy (the server) down to the lower ones.

    This way, it is very simple to set a group of permissions at the server level that will apply to all the inheriting objects: repositories, branches...

    Disable or deny permission ?

    This is a question that you will probably need to answer when defining your permission policies. You need to take in account that disabling a permission is not the same as denying a permission.

    Consider the following example; a certain user is a member of the “developers” group and at the same time of the “integrators” group. Developers are not allowed to commit at the “main” branch but integrator certainly are.

    If we actively deny the checkin permission to the “developers” group on the main branch, this specific user won´t be allowed to perform the operation. The permission is granted due to he is an integrator but it’s denied because he is also a developer, the denied permission prevails over the granted.

    On the contrary, if we disable the permission (but not deny it) to the “developers” group, he will be allowed to perform the checkin operation at the main branch because he also belongs to the “integrators” group, and combining a disabled permission with an allowed one results in an allowed permission.

    Case studies:

    After this brief introduction to the Plastic SCM permissions system, I would like to review some examples that may help you to implement different permission policies based on your organizational needs.

    Case 1: Restrict permissions for integration branches

    Imagine you are developing your project using a branch per task branching pattern. Developers create task branches to perform their work.

    There are two different groups of people involved in the development: integrators and developers (but certain developers can act as integrators too).

    The recommended workflow is the following: developers can’t "checkin","applylabel" or "rmchangeset" on the integration branches, and only integrators can perform these operations.

    To handle this scenario, the proposed permissions configuration is:

    Disable the "checkin", "applylabel" and "rmchangeset" permissions to developers (not deny but disable). Integrators will have these permissions allowed, but the developers won´t be able to execute the mentioned operations.

    Remember that a user belonging to both groups will have the operations allowed: combining a disabled permission with an allowed one result in an allowed permission, meanwhile the users belonging only to “developers” won’t be able to perform the operations.

    Case 2: Restrict access to branches:

    In this second scenario, we have a development team that has the following roles: a system administrator group, a development group and an integration group.

  • Developers can only work on development branches.
  • Integrators can only make changes on integration branches.
  • Administrators have full access.
  • If a user belongs to several groups, he will have all the combined benefits (if a user is both a developer and administrator, he should be given full access).

    Steps to set up the scenario:

  • The "mkbranch" permission will be disabled at the repository level for both integrators and developers.
  • Development branches: integrators will have the "checkin" and "applylabel" permissions disabled. Developers will have the permissions allowed.
  • Integration branches: developers will have the "checkin" and "applylabel" permissions disabled. Integrators will have all permissions allowed.
  • Case 3: Restrict access to directories:

    In this case study, we have two different user profiles working on a branch: developers and artists. And we want to restrict the access to specific directories per user profile.

    A possible solution for this scenario could be:

  • Developers have all the path permissions enabled.
  • Artists have all the path permissions enabled, but the "src" folder.
  • Note: If you need to completely hide the directory to a user, the best solution would be to create a new repository per user profile using Xlinks and then customize the "view" permissions per repository.


    We have reviewed the main Plastic SCM features to secure a server and also some classic scenarios where you can customize the rules depending on your requirements.

    What are the permission policies that you are using in your company? Could you share your configuration with us?

    Real Time Web Analytics