Jump to content
Frederic

Diff against local files in working copy

Recommended Posts

Hello,

I'm quite new to plastic scm and I'm not sure if I have simply overlooked the possibility to diff a changeset against the local workspace files. (Like the git "Compare with working tree" option in tortoisegit)

 

I've found the option to diff 2 revisions/changeset but I did not find any possibility to diff a revision/changeset against the local files in the graphical windows client. Is this really missing? Its quite cumbersome to get only specific changes (e.g. a few lines from specific file) from a changeset in another branch (or an older commit) with this possibility missing. Right now I have to make a local copy of the file I want to check against a local file via "Save revision as..." and do a manual diff.

 

Thanks & Regards

Frederic

Share this post


Link to post
Share on other sites

Hi Frederic,

Let's try the following:

1. From the "Pending changes" view, right-click the file and click on "Diff revisions...". 

2. Then, you should be able to diff workspace revisions with other:

?name=inline-590477767.png

Regards,
Carlos.

Share this post


Link to post
Share on other sites

Hi Carlos,

 

thanks for the reply. Yes you're right I can see this option. But I think I was not quite specific enough what my problem is.

There is a file that is changed in another branch (or was changed in an older changeset)

Later on that file got changed again (or I'm in a different branch)

Now I want to compare my (not yet modified but local file, therefore it does not show in pending changes) file with this old version and I want to take parts of changes to the file.

I can diff this file with the latest commited one (which I think is basically the same file) but I can not make changes in the local file as the diff tool seems to be in read only mode.

Regards

Frederic

Share this post


Link to post
Share on other sites

Hi,

- If you want diff file revisions not involving your local changes, open the history view and select the specific revisions to run the diff. The diff panel won't be editable.

- If you want to diff any previous file revision (from any branch) with your current local workspace changes, please check my previous message. The diff panel is editable and you can perform changes directly from the diff view.

- If you open a diff view and one of the revisions involved is the "Workspace revision", you will able to perform changes directly in the diff panel.

Regards,

Carlos.

Share this post


Link to post
Share on other sites

Hi Carlos,

 

thanks for your clarification. Is my use case really that uncommon? Basically I want the possibility diff every revisions against the workspace version (no matter if the workspace version is already modified or not). We do a lot of console conversions of different game titles, and for quick checks we often need to partially reapply changes we've done in the past. Often the first step it is removing everything that stops the conversion from compiling and starting and later reenabling these blocks (most of the time only partially) is done. This would be quite annoying if it is not possible to do that via Plastic SCM GUI/Diff-Viewer.

 

Regards

Frederic

Share this post


Link to post
Share on other sites

If you do not have pending changes that means your current workspace is a valid changeset. Therefore you can simply right-click on the changeset you want to diff with, "Diff with other changeset...", and then select the changeset you are currently on (which will be listed in bold).
The second approach is to select the changeset you want to diff, then click the "home" button branch explorer to move the view to your current changeset, then ctrl-click that changeset (this will select BOTH changesets), and right-click "Diff selected changesets".

Share this post


Link to post
Share on other sites

Hi Wolfram,

 

thanks for your reply.

 

1 hour ago, Wolfram said:

If you do not have pending changes that means your current workspace is a valid changeset. Therefore you can simply right-click on the changeset you want to diff with, "Diff with other changeset...", and then select the changeset you are currently on (which will be listed in bold).

ok, this one I get, this is nearly what I want (or to be more precise this a part of what I want 😉 ). If this could be done to a workplace with pending changes this would be it. branch_explorer.jpg.31ad3c1dfb81147bc8fcce7c773084b9.jpg this is possible (problem is that changes made would overwrite the changes already done in local changes)

 

branch_explorer_impossible.jpg.dfecb8a9ba3e71082284c150e73fa66e.jpg but this is not (at least to me it does not give me the option to diff these two revisions as there is no right click menu)

 

1 hour ago, Wolfram said:

The second approach is to select the changeset you want to diff, then click the "home" button branch explorer to move the view to your current changeset, then ctrl-click that changeset (this will select BOTH changesets), and right-click "Diff selected changesets".

In the constellation above this did not work for me. Clicking the "Home"-Button (the House Icon on the bottom right above the zoom buttons) for me just selected the latest changeset and deselected my previous selection.

 

Thanks & Regards

Frederic

Share this post


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