Jump to content

How to undo a changeset, keep the changes in pending?


Dumitru Sisianu

Recommended Posts

I meant to shelve some experiments, and at the last moment accidentally clicked checkin instead of shelve.

Our repo has multiple Xlinks so this immediately created changesets everywhere.

I'm using a distributed set up, so it's not an issue for me to lose the changesets. I could delete them but how do I get the work back?

 

Coming from Git, this was as simple as resetting head to previous commit, therefore keeping the changes in the project but not having them committed.

Even more, some IDE's like Rider offer a simple "Undo commit" option that literally does exactly that automatically.
 

How can this be achieved with Plastic?

Link to comment
Share on other sites

Hi,

I'm afraid such a feature is not available. In Plastic, you can remove the changeset or use the subtractive merge to unintegrate a changeset (or group of changesets) and then you can shelve just the necessary changes.

Note if you are using Xlinks, that you may need to remove the changeset created in the parent repo but also in the Xlinked repo.

Regards,

Carlos.

 

Link to comment
Share on other sites

That is unfortunate.

I solved it this way, but it is not exactly comfortable:

- switched my workspace to the previous changeset

- started a cherry pick from this accidental changeset

- Erased the merge files from the .plastic directory of the changeset (to discard any cherry-pick/merge links)

With the changes in my "Pending Changes", I was able to shelve them as intended, and then I manually erased the redundant changesets in the repo and the submodules.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...