Every now and then you really goof up the final changeset in a series of changesets that are in a branch.
I have yet to figure out how to delete that changeset, other than keeping the branch stale and merge from the last good changeset to a new branch.
This seems hard to do given these from [Archive.is] plasticscm delete changeset – Google Search:
- [WayBack] Delete changeset – General – Plastic SCM Community
- [WayBack] Fully cleaning a changeset – General – Plastic SCM Community
- [WayBack] Changeset rollback – Community Edition – Plastic SCM Community
- [WayBack] Delete Change set on Main Branch – General – Plastic SCM Community
- [WayBack] Version Control, DevOps and Agile Development with Plastic SCM: The Plastic SCM book:
Delete empty branches only
Branches can only be deleted when they are empty. This means that if you want to delete a branch, you have to delete its changesets first. A changeset can only be deleted if it doesn’t have any descendants (children or linked by merges).
Consider the following scenario: If you want to delete
main/t124
, you’ll need to delete its two changesets first. But, to delete changesetD
, you’ll need to first removeA
,B
andC
, to get rid of all its descendants.Yes, Plastic branches are admittedly hard to kill.
But, in our opinion, the question is: why would you want to delete a branch?
The answer is obvious for users coming from Git: deleting branches is a pretty common technique, you need to clean out old branches to keep the repo usable. But, that’s not the case in Plastic. If you want to learn more about why we don’t delete branches, please check “We don’t delete task branches”.
Changesets can be moved to a different branch
Changesets belong to a branch, but they can be moved under certain circumstances.
A common example is that you mistakenly checkin changes to
main
instead of the right task branch because you forgot to create the branch and switch to it.It is possible to fix the issue and move the changesets to the new branch:
Find the details about how to move changesets here.
Deleting the branch fails because there is still a changeset on it:
Deleting the changeset fails because the option is greyed out:
It does not happen that often, though there are now about a few % of the branches stale because of this.
–jeroen