Running "Diff" for more than one file in a row
Hi,
There's one nice P4Win (Perforce client for Windows, http://www.perforce.com/perforce/products/p4win.html) feature that I use many times: when viewing the files modified locally I can select some of them (say, 3 or 5) hit Ctrl+D (diff client file with a depot, in other words - see a local "diff") and since I have Beyond Compare (http://www.scootersoftware.com/) set up as my "diff" application - it starts opening all files selected, showing the modifications for each one.
So if I was selecting 5 files when pressing CtrlD - I'll have 5 "diff" windows opened. Now, here's a neat trick - closing a "diff" window is very simple in Beyond, it's just pressing an Esc. When multiply files are selected and CtrlD is pressed - it takes some time (for P4Win, I suppose) to open each new "diff", there's a 1-2 seconds delay before it opens a new window. If I had only minor changes in the files selected - there's enough time to review/verify them quickly and hit Esc, before next "diff" window opens. So it goes like this: select some files, CtrlD and .. esc, esc, esc, esc :) Now you're done seeing all "diffs" for the files selected in one go, without having to CtrlD each one.
I've just checked the "9: Changes" panel in 6700 Selena build - selecting more than one file and pressing CtrlD opens "diff" only for the first one. So how about doing it the same way as P4Win does (see http://img128.imageshack.us/img128/7603/22786898dl8.png) ? Btw, when too many files are selected and CtrlD is pressed - P4Win shows an "Are you sure ?" warning since after answering "Yes, go for it!" it won't be easy to stop it as it keep opening new "diff" windows ..
请先登录再写评论。
Hello Evgeny,
Well, the diff window shows only one file at a time, but it has arrow buttons
in the toolbar which let you move between the files you have selected for
diffing. It's also planned to implement a better navigation possibility there.
I believe that's better than opening multiple diff windows. Don't you think
so?
--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
1) Since I'm not using a built-in "diff" application but Beyond Compare (see below) - there are no arrows for me .. So when external application is configured in "Settings | General | Diff Options" - I think you could enable a checkbox asking whether user prefers to open a miltiply windows when more than one file is selected.
2) Switching to built-in "diff" - the arrows are indeed there but trying AltLeft/Right to switch between windows didn't work. Is that what you meant by saying "It's also planned to implement a better navigation possibility there" ? It would be really nice if one could select multiply files and "diff" them with with a couple of simple keyboard operations .. Like CtrlD, AltRight, AltRight, esc.
P.S.
One of the reasons I'm always using Beyond Compare in all applications is that it allows to see not the whole file but only "areas" that were modified:
View => Differences with Context (http://img64.imageshack.us/img64/9470/73823442qi1.png),
View => Just Differences (http://img291.imageshack.us/img291/6491/74872375jm8.png)
While IDEA "diff" is only equivalent to Beyond's
View => Show All (http://img79.imageshack.us/img79/8246/43142620dw1.png)
Hello Evgeny,
Sounds reasonable. JIRA request please?
Yes, the keyboard shortcuts for these actions are planned as well.
Just had an idea that it should be relatively easy to apply folding to the
diff view, and to fold the unchanged regions by default (leaving some context
around the modified lines).
--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Sounds like a great idea!
N.
Dmitry Jemerov wrote:
Trying right now but JIRA seems to hang after pressing "Create" button. Will keep trying ..
When user-specified application is configured in "Settings | General | Diff Options" - enable "Allow to open multiply windows" checkbox
http://www.jetbrains.net/jira/browse/IDEA-11604