Jump to content
jmranger

shelf questions

Recommended Posts

Hello,

 

Currently running 4.1.10.414, 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.

 

Thanks,

 

Jean-Marc

  • Like 2

Share this post


Link to post
Share on other sites

Hi!

 

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.

Share this post


Link to post
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.

 

Regards,

 

Jean-Marc

Share this post


Link to post
Share on other sites

I think the French chars are not relevant.

 

If you want we can schedule a fast gotomeeting connection in order to review it.

Share this post


Link to post
Share on other sites

Something came and I'm not able to perform the meeting. Can we please delay it for tomorrow same hour? 

 

You can email me to mlucio at codicesoftware dot com in order to speed up the meeting.

 

Sorry.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

JakubH: Thanks for the feedback. Sorry if my last post looked like I hadn't read yours - truth is I hadn't even seen it before posting... Sincere apologies.

 

Manu: Thank you.

 

Jean-Marc

Share this post


Link to post
Share on other sites
Guest

This is now available in Plastic SCM 4.1.10.445:

 

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).

Share this post


Link to post
Share on other sites

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
1-
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.

2-
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.

Jean-Marc

Share this post


Link to post
Share on other sites

Hi,

 

Thanks for your feedback. I´m able to reproduce both scenarios. We´ll review if we can deal with these situations in a better way.

 

Regards,

Carlos

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...

×
×
  • Create New...