Who we are

We are the developers of Plastic SCM, a full version control stack (not a Git variant). We work on the strongest branching and merging you can find, and a core that doesn't cringe with huge binaries and repos. We also develop the GUIs, mergetools and everything needed to give you the full version control stack.

If you want to give it a try, download it from here.

We also code SemanticMerge, and the gmaster Git client.

Smart Locks with multiple destination branches

Tuesday, August 20, 2024 Manuel Lucio Dallo , , , 0 Comments

At Unity, we're always looking for ways to make collaboration smoother and more efficient for development teams. One of the core features of Unity Version Control (formerly known as Plastic SCM) that has been instrumental in this is Smart Locks. It’s been a game-changer for teams working on the same project by preventing merge conflicts and ensuring that changes are made in a controlled manner.

But we didn’t stop there. Today, we’re excited to introduce a powerful evolution of Smart Locks: the ability to configure multiple destination branches. This feature opens up new possibilities for managing parallel development lines without the risk of interference between them.

What’s New?

Previously, Smart Locks operated with a single destination branch, which was always the /main branch by default. This approach worked well for many teams but could become limiting when different branches needed to diverge and specialize, particularly in projects where different platforms or features require distinct development paths.

With our new feature, you can now configure multiple destination branches. This means you can lock the same files on different branches at the same time without worrying about locking your team.

Why Is This a Game-Changer?

Imagine you're working on a project with separate branches for different platforms—let’s say a /main/windows branch and a /main/macos branch. These branches share 99% of their content, but there are a few files that need to be specialized for each platform. In the past, locking a file in one branch could cause headaches if you needed to modify the same file in a different branch. With multiple destination branches, you can lock and work on those specialized files independently within their respective branches. No more worrying about cross-branch interference.

Here’s how it works:

  • You can now set each branch as a destination branch, making it so that when you check out a file, the system only checks for existing checkouts within that specific destination branch scope.
  • This setup ensures that changes to specialized files remain isolated to their respective branches, reducing the potential when unrelated branches need to change the same set of files.

Real-World Applications

Let’s explore two scenarios where this feature truly shines:

  1. Platform-Specific Development:

    As mentioned, if your team is developing for multiple platforms (e.g., Windows and macOS), you can have separate branches for each platform. Specialized files that differ between platforms can be locked and edited without any worry of conflicts from the other platform’s branch.

  2. Long-Term Experimentation:

    Suppose you’re working on a long-term experimental feature that may or may not make it into the final product. You can create a dedicated branch for this experiment, lock files, and make changes within this branch. The experiment might involve significant alterations or new assets that are not yet ready for prime time, and you wouldn’t want these changes to interfere with the ongoing development in the /main branch.

    With the new multiple destination branches feature, you can safely conduct this experiment in its own isolated environment. Meanwhile, the rest of your team continues working on the main product line, unaffected by the experimental changes. If the experiment is successful, it can eventually be merged into the main branch or even remain as a specialized version of the project. This approach allows teams to innovate without the pressure of immediate integration or the risk of destabilizing the main development line.

One of the best parts of this new feature is its flexibility. If you want every branch to be its own destination branch, you can set it up that way. This makes each branch fully independent, with the Smart Lock system only checking within the branch itself and its scope during checkouts. This setup is perfect for teams working on highly specialized or divergent project paths where cross-branch dependencies are minimal or non-existent.

Configuration

Use the Unity Cloud dashboard to configure a new lock rule, you can create a new one for the entire organization or just for a single repository

There's a new option available to select the destination branch, and as I mentioned before, you can select just a few, a single one, or all of them. If you select them all, the new future branches will be also considered destination branches.

Finally, select the file extensions for the files you want to lock while running the checkout operation and you are done!

Now, you will see developers and artists can lock the same file on different branches, at the same time. And that's OK because those versions created are not meant to be merged, they will evolve in their branches and that will be their only scope.

We can’t wait to see how you use this feature to streamline your workflows and take your projects to the next level. As always, we’re here to help if you have any questions or need support in setting this up for your team.

Happy developing!

0 comentarios: