Question

I'm trying out Plastic SCM but I'm struggling with one particular issue. I would like to include code some general code in another project. I finally figured out how to make an xlink but then discovered that you can't pick a subfolder from the other repository but have to include the whole thing. When I do that Visual Studio throws a fit over the second AssemblyInfo and probably a few other things.

Now I could just put bare code files into the "module" repo but I would like to have it as a VS project to conveniently manage and develop it.

What I've came up with for now is this:

  • Program Repo
    • Solution
      • Project
        • XLink to "Module Incl Repo"
  • Module Dev Repo
    • Solution
      • Project
        • XLink to "Module Incl Repo"
  • Module Incl Repo
    • The files to be included

This should work but requires a separate repository for every group of files I want to include. Is there no better way to achieve this?

Was it helpful?

Solution

According to your comments, what you need is to take advantage of Xlinks.

Xlinks in Plastic SCM are basically special directory entries to a path on a given changeset, so that the "cset immutability" is preserved.

There are two kind of xlinks:

  • Readonly xlinks: which means you just use the linked code to build but you won't modify it while working on the source tree linking it.
  • Writable xlinks: which means you'll be modifying the linked code while working on the project. They're similar to git submodules but "done right", which means, plastic deals with all the plumbing to update the parent to the new cset created on the child.

Answering your question: yes, right now you'll need 3 repositories to set up the project you're working on: 1) Program Repo 2) Module Dev Repo 3) Module Incl Repo (which is the one the other two will be referencing)

The workflow with readonly xlinks is:

  • You create the xlink to you "module incl repo" on "program repo", something like:

cm xlink src\incl / 23@ModuleIncl@yourserver:8087

Which means you're creating an xlink at src\incl pointing to the changeset 23 in repo "ModuleIncl".

  • You checkin to commit your newly created xlink

  • Update your wk to get the code from the xlink (it is not done upon ci)

  • Then, if at some point you need to update to, let's say, cset 30, you'll edit the xlink (from CLI or GUI) to point to the new one:

cm xlink -e src\incl / 30@ModuleIncl@yourserver:8087

And this will be enough for the readonly workflow.

You can find more info about Xlinks here http://www.plasticscm.com/releases/4.1/manuals/en/xlinksguide.pdf

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top