View Full Version : Check for files changed on disk
Michael Kujawa
12-Mar-2008, 01:37 PM
Some times when working on generated text files, I just leave the old version and the new version up in cirrus as I regenerate new versions of the right-hand file. Cirrus' ability to detect the change and reload without moving the cursor is really handy. However, dismissing the reload dialog gets old.
Since I understand that the default should be to prompt (especially with potential side effects of losing state,) I would like a check box that I can use to turn this dialog off.
Erik
12-Mar-2008, 02:01 PM
This was added in today's release (446).
Michael Kujawa
12-Mar-2008, 02:39 PM
I tested this in 446 before posting; perhaps I wasn't clear. I still want Cirrus to check for changes when I switch back to it, I just want it to choose "Yes" automatically.
I want the equivalent of "Environment->Documents->Auto-load changes, if saved" in Visual Studio.
Erik
13-Mar-2008, 01:48 PM
We'll add an option to "Automatically reload unless changes will be discarded" in the next release. Please use with caution as this has more consequences than it would in a normal editor since it will restart the comparison.
Thanks, Michael. We're considering this, but there would be these issues:
1) The comparison would be redone. This could be slow on large files.
2) The edit stack would be lost so you couldn't undo changes before that point.
3) You'd lose any manual alignments and differences flagged as "ignored".
4) If allowed in Text Merge *all* edits in the output pane would be lost, even those you've saved. That's because loading a 3-way merge generates new output content, regardless of any previously saved output.
Everyone: With these points in mind, would you still appreciate the feature?
Michael Bulgrien
13-Mar-2008, 03:12 PM
As long as the factory defaul remains to always display the pop-up, I agree that an "Automatically reload if saved" option would be useful. (I also think that "Automatically reload unless changes will be discarded" is unnecessarily wordy)
Michael Kujawa
13-Mar-2008, 05:33 PM
#1, #2, and #3 are fine, and are (to me, at least) the expected behavior of hitting "yes" on the current dialog. The consequences of choosing yes aren't really explained anywhere though, and that's possibly another polish item for you.
#4 is thought-provoking. You don't really lose saved changes to the output window unless you save again, but I think you're right to treat it differently. I think I'd call any change to the output window as an "unsaved change", but I could also see this being a two-way only feature (I certainly don't intend to use it with merges.)
Rob Getter
13-Mar-2008, 06:37 PM
#1 Not really a big problem. I suppose a size threshold (configurable or not) might be nice.
#2 The way other applications typically do this is to reload silently unless doing so would cause changes to be lost. In that case, it would pop up a warning dialog. At least, That's how it's handled in Vim, Emacs, ExamDiff, and Visual Studio.
#3 This is really a special case of #2. Do alignments and such constitute changes that may be lost? It would be ok either way, or it could be configurable.
#4 Another special case of #2. Reloading can be done silently as long as it doesn't throw away important data.
Michael Bulgrien
13-Mar-2008, 07:17 PM
#1, #2, and #3 are givens. No issues there.
I would expect the context of an automatically reload option to be limited to compare sessions, so #4 would not apply. Perhaps the option could be worded as "Automatically reload compares if saved".
Thanks, everyone. We've implemented this for the next release.
Michael Kujawa
14-Mar-2008, 08:58 AM
Excellent, thanks!
vBulletin® v3.7.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.