Jump to content

Duplicate files in branch diff window


marioo

Recommended Posts

Steps to reproduce the issue:

 

  1. Modify a file in a child branch,
  2. Merge the branch into another child branch.

Double click the second child branch to see its diffs. You should see the modified file on the list.

 

  1. Modify the file once again, but this time in the second branch.

Double click the second child branch to see its diffs. You should see the modified file displayed twice on the list. The first one contains changes made within the first branch, and the second one contains changes made in the second branch.

 

I'm reporting it as an error, even though it might actually work this way on purpose. The thing is that when I go through a code review, viewing the same file twice makes me feel confused. In fact I want to see the file as it was in the beginning and how it is now. Instead I get a file how it was at the beginning, how it was at some point in time, and how it is now. Please consider correcting it.

 

Thanks!

Link to comment
Share on other sites

  • 1 month later...

Hello,

I was wondering if you noticed this post :-).

 

The problem is that when you show branch diff, sometimes the window displays duplicate files on the list. This happens when you merge your branch into another branch, and then modify a file in the new branch. The file will then display twice in the branch diff window. In such case it is impossible to compare the initial content of the file to its final content in the branch. It makes me feel confused.

 

I will be grateful if you fix it.

Thanks!

Link to comment
Share on other sites

Sorry Marioo, I think we missed your first post.

 

Which Plastic SCM version are you using? Upgrade to the latest one since it has an improved branch diff view.

 

Now you'll be able to see both changes at the same time but if you wish you can hide the ones coming from the merge or the ones really done in the branch. Here you have more info: http://codicesoftware.blogspot.com/2015/02/using-history-to-better-explain-branch.html

Link to comment
Share on other sites

Hi Manu,

 

I've just checked the latest available release (5.4.16.671 Edmonton) and the issue is still present there. Did you try to reproduce it? When you diff a branch or display a code review for it, duplicate files are displayed there in some cases.

 

Create a child branch, modify an existing file in that branch (don't create a new file, choose an existing one) and check it in. Then create another branch from the end of that child branch. The modified file is also in the new branch now, right? Then modify that file once again and check in to the new branch.

 

When you diff that branch, the file will be listed twice in the changed section. One of its occurrences will refer to the change made in the first branch, and the second occurrence to the change in the second branch.

Link to comment
Share on other sites

Hi!

 

I'm not sure if I'm doing it right.

 

Look, this is what I did, "/main/forumDiff" has a change and "/main/forumDiff/forumChild" another change at the same file.

post-112-0-65391900-1434451043_thumb.png

 

Then this is how the diff looks like:

 

post-112-0-18558600-1434451853_thumb.png

 

And this is the code review:

 

post-112-0-17879800-1434451872_thumb.png

 

Diff and code review are done for the "/main/forumDiff/forumChild" branch.

Line #15 has the change of "/main/forumDiff" and line #22 the change of "/main/forumDiff/forumChild"

 

 

Link to comment
Share on other sites

Hi Manu,

 

sorry for a delay. Even though I switched on all possible notifications in my account settings, I'm not informed about replies in my topics. I don't know why.

 

Yes, the steps you made are correct. I'm wondering why my client would show me the clean.bat file twice in the forumChild diff. Manu, can it be dependent on the server? Because we use a server from November 2014 (5.4.16.619). If so, I have to apologize you for wasting your time. I thought the issue was client dependent (my client version is 5.4.16.671 Edmonton). Can you please confirm that?

 

Thank you!

Link to comment
Share on other sites

It could be a client-server "minor" incompatibility... but I can't reproduce it, even with those versions.... sorry.

 

Remember to re-test it when you upgrade that server and if it still behaves like that we'll take a further look, ok?

Link to comment
Share on other sites

Hi Manu,

 

Thanks for checking it. I checked the steps I described and I noticed I was wrong - I'm sorry.

 

1. Create a branch /main/forumDiff.

2. Modify your clean.bat file there and check the changes in.

3. Create another branch /main/forumDiff2 from /main, but from a new changeset (you will have to create one on /main). I'm not sure if that's important, but this is how I have just tested it.

4. Merge the first branch into the second branch.

5. In the new (second) branch modify the clean.bat file once again and check the changes in. 

 

When you diff the /main/forumDiff2 branch now, it will show you the file twice. See attached the pictures.

 

We can't update the server, because our free license does not allow that. However I have just made some tests on a virtual machine, where I installed both the client and the server in their latest versions (5.4.16.671 Edmonton). When I make the same steps there, the diff window looks totally different. The file is also listed twice, but in a Merged section, which is OK.

 

So I think I shouldn't have bothered you - my apologies. There must be some incompatibility then between the client and the server.

 

post-7729-0-79373800-1434704889_thumb.png

post-7729-0-74594000-1434704890_thumb.png

post-7729-0-91174500-1434705089_thumb.png

Link to comment
Share on other sites

Manu,

 

Let me ask you one more thing. Is it possible to switch off the Merged sections in the diff viewer? In most cases we want to see the file in its current revision compared to its revision from the base of the merge source.

 

When we work on a task for a longer period, sometimes we want to update our code to the latest version from /main. To do that we create another child branch from the last changeset on /main and then merge our task branch to that new branch. This way our source code gets updated, and at the same time the diff on the new branch shows only our changes (and not those from /main). This necessary when you want to create a code review later on.

 

But when you verify the code review, some files show in the Merged sections so you see them twice on the list. And it makes it harder to understand what changes have actually been made. So it would be great if there was a switch allowing you to remove the merged sections and see the merged files only once on the list. The comparison windows below the list should display the base of the merge source on the left pane and the current version of the file on the right pane (the content of the file in the base of our first created task branch and the current content in the last branch associated with the same task).

 

What do you think about it?

 

Thanks!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...