Jump to content

How do I check in a subset of files without an intermediate step or messy merge?


solaris

Recommended Posts

We're evaluating Plastic using the regular client (not gluon) and there's one aspect about it that seems to work against our normal workflow (as opposed to Perforce which we're used to).

At any one time I'll have 10 files checked out. I will undo about 5, check in 2, and keep the other 3 untouched. The ones I want untouched, I might have checked out for weeks (or months) through multiple checkins, and eventually check in or sometimes undo.

In Plastic this workflow is problematic.  I can't  just check in the 2/10 files and merge them into the main branch on their own.  It either wants me to put them on a separate branch and then merge to the main branch, or do a messy merge with main where it tries to merge all my pending changes - not just the 2 I want to check in.

I know it probably works this way in Gluon (haven't tried it), but I want to know if there's a way to do it in the regular client. I don't think source control should dictate our company's workflow, so I hope there's something I'm missing.

Link to comment
Share on other sites

Hello!

I wrote a full book on Plastic a few months ago and I added a specific area exactly about this 🙂

I'd recommend you to take a look at this: https://www.plasticscm.com/book/#_partial_workspaces

And also the intro to the chapter here: https://www.plasticscm.com/book/#_full_workspaces_vs_partial_workspaces

 

In short: in "developer mode" (regular Plastic) you need to work in "changeset coherence mode", because otherwise you can't merge. It means when you checkin it asks you to basically update first: http://blog.plasticscm.com/2018/02/why-checkin-asks-to-update-first.html

 

But you can achieve this behavior in Gluon: http://blog.plasticscm.com/2018/06/gluon-can-now-merge-story-of-version-control-for-games.html

 

Sorry for all the links, but I really think they will give you the full picture.

 

Please let me know if you still need help or need me to clarify things.

 

pablo

Link to comment
Share on other sites

It sounds like with Plastic we have to choose between not having easy branches, and not being able to merge individual files without creating extra branches.  I understand the logic though.  Is there a Plastic API I can use to put some workaround functionality into the developer mode client? Like if I want to merge 2/10 files into the main branch, make it automatically do the intermediate processes (like creating a separate branch, shelve files, etc) in the background and merge?

Link to comment
Share on other sites

Well, it all comes down to how Plastic and Perforce differ internally.

P4 does per-file merge tracking, we do per-changeset merge tracking. I explained it here in lot of detail here: https://www.plasticscm.com/book/#_merge_tracking

The point is: per-file gives you the freedom to checkin a file even when the workspace is totally out of date and still merge.

You pay a price for that: creating labels is super slow, creating branches is slow too, and merging is nowhere close as powerful. And distributed mode suffers from lack of efficiency too.

We used to be per-file until 2011, for the first 5 years, and then we changed it.

 

We are going to introduce some changes so you'll be able to do the same thing you do in Gluon inside regular plastic: merge only the files in conflict during checkin without having to update first (and without creating merge links). But it will still take a few months till we get there, because we have a ton of other things in the queue.

Link to comment
Share on other sites

I hope you add the ability to check in individual files soon because without it Plastic seems much less usable than other solutions.  I truly mean this as constructive criticism, but there are tens of thousands of times in a project I just want to make a quick change to a single file or two.  As an example of just wanting to change a file real quick:

Perforce: 

check file out, make a quick change, check it in

Git:

make a quick change, stage, pull, push

Plastic:

check file out, make changes, check in, click "merge later", wait for it to create a branch, open the branch explorer, locate your new branch by figuring out what name the earlier step assigned it, right-click the branch, go to "Advanced" (not the "Advanced" at the bottom of the context menu, the one around the middle), select "Merge from this changeset to", pop up will appear, select "/main" and click ok at the bottom of the pop up.

For now, I switch between Gluon and Developer Mode depending on what I'm doing, but at each switch I have to leave the Pending Changes empty which is a PITA.  Again, as constructive criticism I'm saying this workflow borders on unreasonable for teams larger than 3-4 people.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...