Jump to content

shelf questions


Recommended Posts



Currently running, I have questions about shelves.


Most of the time (but not always), once a shelf is applied, doing a diff on any of the files contained in the shelf (through the "pending changes" window) report "files are identical" - and that's true, since the file hasn't changed since the shelf was applied. However, what I want to see is the changes since the last changeset in the branch. Once in a while, I get "my" expected behavior.


I tend to be really quick on undoing changes on non-modified files, and I'm afraid this will bite me really soon.


Similarly, once a shelf is applied in my working directory but not yet checked-in, if I delete the shelf, the diff operation will fail ("an error occurred processing your request") which I somehow expect given the previoius observation - but again, not "my" desired behavior.


I'va also noticed than when shelves are applied, files are checked-out, altough I'm not using that model.


Is this all due to a configuration option I missed?


I'll be upgrading to build 426 soon, but I guess that if this is fixed between those two versions, it's a well-known issue, and someone is likely to be able to point me to a recent public discussions.





Link to comment
Share on other sites



Please upgrade to the latest release, I've been testing all your scenarios and all of them are working.

If after upgrading you get the same behavior I can get connected with you in order to see if we are missing something. But right now I can see the differences without problems.


Regarding the fact that the items are checked out after applying a shelve, it's normal. The shelve is a merge operation, actually a cherry pick from the shelved changesets. It doesn't matter is you usually work using the changed workflow, the Plastic SCM operations carried by the merge will be always using the scm co, delete and move procedures.

Link to comment
Share on other sites

Thanks for your feedback.


I just upgraded to 426. The behavior hasn't changed ("files are identical" on comparing after applying a shelf, and error on diff'ing once the shelf has been deleted).

To clarify:

- I installed 426 on top of my former 414 - I didn't wipe the 414 configuration or my workspace.

- I tested with both a shelf created in 414 and a new one created with 426, same result in both.


I'm not sure I made this clear in my initial post: the "pending changes" window lists the correct files as changed, it's just when diff'ing one of those that I'm being told that they're identical.


In case that helps, in the "file are identical" window, the text at the top of both panes ends with "#cs:-7". In the shelf view, my test shelf has 7 in the "name" column. If I modify another file and diff it, those column titles both ends with "#cs:363, which is consistent with 363 being the last changeset in my working branch.


I doubt this is related, but my working branch has French characters in its name ("développement"). I guess if this was an issue, I'd have trouble with more than shelves.





Link to comment
Share on other sites

Update, in case this is useful for someone else. The issue seems to be that in some cases (when a shelf is applied, also reproduced after applying subtractive merges), Plastic seems to get confused about what revisions it should display in the left and right panes of the diff window. The diff it displays is correct, but the revisions (as reported at the top of each panes) are sometimes not those you expect.

A workaround is to always go through the complete "diff with something specific" dialog and accept default values (instead of the "double-click to diff, in the "pending changes" window), which seems to always work, but this is just painful to do since the double-click shortcut works fine 95% of the time.

No idea yet why I seems to be the only one seeing this bug. I'll be updating this when a solution is found.

Link to comment
Share on other sites

I think you are not the only one. We have similar issues here, but I have had no time to test it better and report it.


It happens when I checkin something to a shelve and than apply it to my workspace. In Pending changes, the diff is OK in a diff view (for instance comparing versions cs:21 with sh:2). But when I double click on a file or choose Diff with previous from a context menu to see differences in a standalone window (or even in an external diff tool), it shows no changes (in the example, it compares cs:-2 with cs:-2, which is probably the same as sh:2.)! I would expect it shows the same diff as the diff view in Pending changes. It must be a bug.

Link to comment
Share on other sites

After discussion with Manu (thanks Manu!), we found that the issue is only present when the diff is opened in a separate window (by double-clicking a file in the "pending changes" window), and NOT when looking at the diff in the same window (using the "show/hide diff" button).

Hopefully, there'll be a fix in a future version, but the "workaround" of the in-window diff is a much better one that the one in my previous post.

Link to comment
Share on other sites

  • 3 weeks later...

This is now available in Plastic SCM


Diffs in the Pending Changes View (requested in the forum):  The "Diff" context menu options have been improved. Now, two options are available from the context menu:

  • Diff workspace contents: This option shows the differences between the current workspace contents with the previously loaded contents on the workspace with the configured diff tool. (The differences shown are the same as the embedded diffs viewer from the pending changes viewer). 
  • Diff revisions: This option shows differences between revisions stored in the repository, or differences between workspace contents and a specific revision in the repository.

More about diffs: When showing differences in the Pending changes view of a Private or Added item, the file information shown in the header of the diff tool embedded in the view was wrong ("cs:0") because Plastic SCM couldn't find repository information for that item. Now the information shown is the path of the item, which is the only information available for those items.


(Extract from the release blogpost).

Link to comment
Share on other sites

  • 3 weeks later...

Sorry for the delay in acknowledging this. Those have been unusually busy weeks.

Thanks for taking the time to update this. The fix seems to work - honestly, now that I got into the habit of using the in-window diff pane, I wasn't noticing it anymore.

I however have two related observations that you might want to be aware of. Steps to repeat are from memory - I'll try to confirm them when possible
a- create a new file
b- modify an existing file (optional)
c- shelf the result of a- and b-
d- move to a different branch (optional)
e- apply shelf created in c-
f- diff the file modified in b- Plastic reports a modified file (expected)
g- diff the new file created in a- Plastic reports "file are identical" (in both the in-window and standalone diff). It compares the shelf revision in both panes (text is sh:NN on both sides). This is NOT expected - I would expect it to either compare with an empty file or do the same thing as for un-shelved new files - just display its content.

a- set a text file to be of the "binary" revision type (don't ask why...)
b- change that file, shelve it
c- move to a different branch (optional)
d- apply the shelf created in b-
e- try to diff it, get an error saying that diff can't be performed for that kind of binary file (expected)
f- change revision type to text
g- try to diff it again, and get the same error message. This is NOT expected - I would expect Plastic to be able to perform a text diff in this case

Thanks again for your support.


Link to comment
Share on other sites


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

  • Create New...