Jump to content
Sign in to follow this  
Eric Carter

"The root item can't be reverted" message blocking all reverts

Recommended Posts

I'm trying to revert my repository to revision 4, but every time I select a changest in the history and pick "Revert to revision" I get an error dialog that says "The root item can't be reverted". How do I get my old changes back?

image.thumb.png.5320a3f4295f63bc6a8223ee7b4286cb.pngimage.thumb.png.96b274e44a0a34f9629cf65809bb756c.png

Share this post


Link to post
Share on other sites

Updating my client to the latest revision, and making a new commit by adding a text file don't fix this problem. Gluon and Plastic SCM both have the same problem. Are there logs somewhere where I can get a more detailed error message?

Share this post


Link to post
Share on other sites

Hi,

You cannot revert the root item of the workspace to a previous revision.

Quote

I'm trying to revert my repository to revision 4, but every time I select a changest in the history and pick "Revert to revision" I get an error dialog that says "The root item can't be reverted". How do I get my old changes back?

In order to do that, please open the branch explorer (or changesets view) --> right-click the selected changeset --> "Switch workspace to this changeset".

Regards,

Carlos.

Share this post


Link to post
Share on other sites

Thanks Carlos,

If you can't revert from the History panel, why does it present you with that option? Is this a bug? It's super confusing. I wasted more than an hour trying to figure it out, and solved it by trashing my repo and starting over from scratch.

After I switch my workspace via the branch explorer, there are no pending changes, nothing to check in. How do I make this code state the new tip of the branch? I am trying to revert all the changes after this one, so this state needs to get back into the repo somehow.

Share this post


Link to post
Share on other sites

Let me try to clarify the differences:

- Revert: Your workspace selector is always pointing to a specific changeset. But you can revert a specific file to a previous revisions. After reverting the file to a previous revision, you can cehckin your changes.

- Update/switch: This is the oepration you need to run to point your workspace to a different changeset/branch. This operation is not allowed if you have pending to commit changes (you will need to commit first).

- "Pending changes" view + "Undo" operation: If you have some pending to commit changes in your workspace and you want to undo them. This way, your workspace will be pointing to the same changeset/branch but with no pending to commit changes.

Regards,

Carlos.

Share this post


Link to post
Share on other sites

I understand the differences between those 3 actions. But check this out:

I can get the History of my entire depo by selecting View History on the root:
image.png.a2f662d4d6e1c970b3e6873e64c9acf0.png

From here, I can select a diff and choose Revert:

image.png.865b69ea86467c392d6e65c1358389f2.png

Now, this seems to be like a totally reasonable thing to express. I want to revert all files to the state they were in in version 3. The expected outcome of a naive user is unambiguous. In your post above you said that reverting the root node is not possible (presumably because of some technical restriction).

So my first thought is: feature request, either make it so I can revert the root node like any other folder, or improve the flow in a way where you don't offer me this revert option that won't work.

My second thought is: how do I actually do the thing I want? I need the tip of master to be the same as it was in revision 4. Update/Switch doesn't help me, because I'm not trying to get my local copy to revision 4, I'm trying to revert all the changes to all files that happened from revision 5, 6, 7, 8, 9, and 10. I want master to be the same as it was in revision 4. In other source control solutions I simply revert all files to their state in revision 4 and check in. In Plastic, I can't do that because the root node cannot be reverted. I'd have to go through item by item reverting every file individually.

image.png

Share this post


Link to post
Share on other sites

Hi,

Quote

Now, this seems to be like a totally reasonable thing to express. I want to revert all files to the state they were in in version 3. The expected outcome of a naive user is unambiguous. In your post above you said that reverting the root node is not possible (presumably because of some technical restriction).

So my first thought is: feature request, either make it so I can revert the root node like any other folder, or improve the flow in a way where you don't offer me this revert option that won't work.

The key thing is what you call revert all files o the state they were in in version 3 is actually switching your workspace to the changeset 3. 

The basic unit in Plastic is the changeset (not the file) so your workspace needs to be pointing always to a specific changeset. You cannot have some files in your workspace pointing to a changeset and some other files pointing to a different changeset (unless you are using a Gluon workspace).

The "revert to this revision" is only applyed for specific files/folders. But note if you revert a file revision to a previous version, the workspace will be still pointing to the same changeset (it cannot be reverted).

I understand it can be confusing (specially if you are comming from a different version control) but the revert workspace operation in Plastic is called "switch workspace/update". 

 

Quote

My second thought is: how do I actually do the thing I want? I need the tip of master to be the same as it was in revision 4. Update/Switch doesn't help me, because I'm not trying to get my local copy to revision 4, I'm trying to revert all the changes to all files that happened from revision 5, 6, 7, 8, 9, and 10. I want master to be the same as it was in revision 4. In other source control solutions I simply revert all files to their state in revision 4 and check in. In Plastic, I can't do that because the root node cannot be reverted. I'd have to go through item by item reverting every file individually

As I commented, in Plastic the basic unit is the changeset, no de the file (the same as git and all the modern SCMs). Every changeset is a snapshot of your project a specific time. 

If you want to switch the workspace to same status it was in changeset 4, you need to use the "Switch workspace to changeset 4". If you switch to changeset 4, your workspace will not include the changes performed on changesets 5,6,7,8,9 and 10.

Regards,

Carlos.

 

Share this post


Link to post
Share on other sites

No, no, this is not confusing at all. I understand perfectly what you're describing, but you're answering a different question than I'm asking.

You're describing how I can make my local workspace match the state of changeset 4.

What I'm asking is how do I generate an changeset which is the inverse of changes 5 through 9, that when committed, will leave the remote repository's contents bitwise equal to the state it was in in changeset 4. I am attempting to generate changeset 10, a change which removes all the changes in changesets 5 through 9. Whether my local workspace is pointed at changeset 4, 5, 9, or 10 after I am done isn't important.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...