Author Topic: Undo doesn't work after diff  (Read 33791 times)

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Undo doesn't work after diff
« Reply #45 on: September 13, 2017, 09:00:15 PM »
I tried using an ant pattern to do a folder diff in my clearcase remote file system for a small subfolder. Using the same include spec in BC vs DZ, BC did the job in a few seconds, while I'm still waiting for DZ to finish (its been minutes now).

I recorded it in a video. In support.slickedit.com, find bc_vs_dz_folder_compare_performance.txt, and inside that text file is a link to the video (uploading the video to support.slickedit.com failed).

I think it is a similar performance issue to another thread: https://community.slickedit.com/index.php/topic,15505.msg59309.html#msg59309 where SE is scanning many many more directories than needed, whereas BC is only scanning the needed directories.

In this video, I also demonstrate that even though BC is not finished scanning all the directories, you can start looking at the diffs of some files while BC still scans the remaining directories.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Undo doesn't work after diff
« Reply #46 on: September 13, 2017, 09:03:23 PM »
I see from DZ's progress that is scanning directories that it should not be scanning. basically under /view/<viewname> is the entire file system (like an alias), so DZ is basically scanning my entire file system when it should only be looking for a few directories.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2896
  • Hero Points: 153
Re: Undo doesn't work after diff
« Reply #47 on: September 13, 2017, 09:08:47 PM »
I'll have to try this, but it will be a little while before I get a chance.

Does it make any difference if you do this on a local file system?

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Undo doesn't work after diff
« Reply #48 on: September 13, 2017, 09:12:02 PM »
It is not easy for me to do this on a local file system. There are over 30000 files I would need to transfer.

Additionally, I found a circular dependency. The way the clearcase file system works, if I do:

ls /view/<viewname>

I basically see the same thing as

ls /

So it means that under /view/<viewname> will be a directory /view/<viewname>/view/<viewname>, so I think DZ's scan will never end!

Also, BC has no problems with this remote file system and finishes the job in seconds, while DZ is still spinning.

Check that DZ is only scanning the required directories, I think you will see that if you have:

dir1/dir2/dir3
dir1/dir4

That if you give an ant pattern dir1/dir2/**

That DZ will still scan dir1/dir4 when it doesn't need to.

Since I have so many other directories, and there is a circular nature to them, DZ never stops.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Undo doesn't work after diff
« Reply #49 on: September 13, 2017, 09:13:17 PM »
And I think it is a similar issue with the "Date modified" in the smart open. I think it is scanning the entire workspace instead of just the files in the smart open window - anyway you can look at my latest post there for what I think is going on, I think it is very similar. I'm much more interested in you solving the "Date modified" issue than the diff issues.  https://community.slickedit.com/index.php/topic,15505.msg59309.html#msg59309

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2896
  • Hero Points: 153
Re: Undo doesn't work after diff
« Reply #50 on: September 13, 2017, 09:16:41 PM »
I'll have to double check tomorrow, but if it's happening when you're double clicking to open a file, I don't think it's scanning the entire workspace.  I'll check though.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Undo doesn't work after diff
« Reply #51 on: September 14, 2017, 12:33:10 PM »
A feature BC has in directory compare that is I think missing in DZ - sometimes when I do the directory compare, many files show up that I would like to ignore. In BC, I can modify the exclusion list while the directory tree is showing, and it will remove the newly excluded filespecs from the tree comparison. In DZ, it looks like the only opportunity to specify the exclusion list is before the diff, as when I click on "Options" while the tree is showing, the "Files" tab is greyed out so doesn't allow me to modify exclusion list.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: Undo doesn't work after diff
« Reply #52 on: September 14, 2017, 04:25:01 PM »
I see from DZ's progress that is scanning directories that it should not be scanning. basically under /view/<viewname> is the entire file system (like an alias), so DZ is basically scanning my entire file system when it should only be looking for a few directories.
I've been investigating how excluding directories works. Multi-file diff doesn't seem optimize directory exclusions (it traverses all directories no matter what). This will be something we will look into optimizing but it likely won't make v22. Multi file find directory exclusions are optimized but only sometimes (I think we can fix this). For example, if you specify an exclusion of "path1/" or "path1/path2" then the directory exclusions are optimized. However, if you specify an exclusion of "path1/**/*" or "path1/**/*.*" (windows), then the path1 directory will be traversed even though it is unnecessary.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Undo doesn't work after diff
« Reply #53 on: September 14, 2017, 05:27:55 PM »
OK - thanks for looking. Just to clarify, in my case I am specifying inclusions and not exclusions.

So when I put path1/** and path2/** into INCLUSIONS (not exclusions), then I don't expect path3/**, path4/**, etc to be scanned. If only path1/** and path2/** are in the inclusions, then only path1 and path2 should be scanned, and no other paths should be scanned.


Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: Undo doesn't work after diff
« Reply #54 on: September 14, 2017, 07:31:07 PM »
If you haven't specified any exclusions, DZ isn't smart enough to automate that for you if your inclusion specifies all paths (i.e. "path1/*.cpp" and "path2/*.cpp"). This would also be a very useful optimization for DZ. The only work around I know is to run diffzilla twice. This would be a pain if you have more than two paths you want to diff against and it's obviously not as convenient as being able to specify everything in one shot.

The multi-file find dialog has the same issue but you can work around it by specifying multiple wildcards for "Look in:"  (i.e  .../path1/*.cpp;.../path2/*.txt).
« Last Edit: September 14, 2017, 07:38:15 PM by Clark »

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Undo doesn't work after diff
« Reply #55 on: September 14, 2017, 07:58:02 PM »
OK, well please put it on the wish list for further optimizations. I use this exactly for the reason that I don't want to run the compare tool twice, and BC handles it well. Hopefully DZ can handle this in a future revision.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2896
  • Hero Points: 153
Re: Undo doesn't work after diff
« Reply #56 on: September 14, 2017, 08:03:56 PM »
Since we have gone well beyond the scope of the undo issue in this 4 page thread, after the beta this thread will be moved to the Features and/or Improvements forum (probably with a different name) since there are some pretty good ideas in here.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2896
  • Hero Points: 153
Re: Undo doesn't work after diff
« Reply #57 on: September 14, 2017, 08:23:15 PM »
I posted some diff videos the other day, but I forgot we have a whole playlist.  There are a ton of obscure diff features, many of them tied into version control.  So, here are both. 

Here is an obscure example:  If you use the version control history dialog, and scroll down to the bottom of the bottom pane, and click on the link "See List of Changed Symbols".  It will then expand into a series of links, one for each symbol that changed between the currently selected version and previous version.  Clicking one of these links will diff that symbol.

Diff: https://www.youtube.com/watch?v=QFHRn-Oqzc8&list=PLAfxJLNu8RF8DJcJKu9Zejbbi_8PaFpWa
Version Control: https://www.youtube.com/watch?v=JO6k8Yz5fDY&list=PLAfxJLNu8RF9dWBrsIhhqhRkJf-CFQZaO

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Undo doesn't work after diff
« Reply #58 on: September 14, 2017, 08:27:04 PM »
Clark: You said: "If you haven't specified any exclusions", but along with the 2 included paths I do specify a bunch of exclusions, mostly for file specs (without directories such as *.log), but some with pure directory names I want to exclude (like "obj") and other more in-depth paths that I want to exclude such as exclude everything under dir1/direxclude1/direxclude2. Just to put this out there for future reference.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Undo doesn't work after diff
« Reply #59 on: September 14, 2017, 09:20:47 PM »
I want to point out that the language color coding and the way you highlight the diffs without changing the background color of the whole line is growing on me.

Still, I'd like to see different colors highlighting unimportant vs important diffs, even when not using source diff.
And when using source diff, having something like the "Minor" button to turn on/off the highlighting of unimportant changes and allowing to skip/not skip over them could be useful.

I did run into a situation today where I wanted to modify file 2 with code from file 1 during source diff, but it was read only, so had to switch to line diff and I lost focus on that. One small idea is that instead of making file 2 read only, how about an option to make file 1 read only instead, as usually file 1 is the "old" and "baseline" file that I don't want to change and I want it on the left side. Then I can modify the "new" file on the right side which is "file 2".