Announcement

Collapse
No announcement yet.

Line endings (Windows to Windows File Compare)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Line endings (Windows to Windows File Compare)

    Copying a difference section to correct a line ending difference fails in a Windows to Windows text compare session. See screencast.

    I consider this to be a defect. If this functionality is intentional, please provide an option or tweak to allow line ending differences to be copied from one side to the other... or to correct a line ending based on the folder type (Windows vs Linux) when a line is copied from one side to the other.
    BC v4.0.7 build 19761
    ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

  • #2
    Even saving and reloading the files does not correct the line ending!
    BC v4.0.7 build 19761
    ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

    Comment


    • #3
      This is intentional. To change line endings, select File -> Save File As..., change the Line ending style and click Save.
      Erik Scooter Software

      Comment


      • #4
        As I said, if this is intentional, please add an option to allow a copy of line endings. If a user goes through the motions of copying a diff section from one side to the other, and nothing changes, the save icon in the toolbar should not be enabled as if something has changed. It is misleading to the user!
        BC v4.0.7 build 19761
        ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

        Comment


        • #5
          In other words:

          "Save As" is a useful way to set all line endings all at once. But it does not negate the need for a way to copy a diff section as one is working through a text compare session.
          BC v4.0.7 build 19761
          ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

          Comment


          • #6
            Originally posted by Michael Bulgrien View Post
            If a user goes through the motions of copying a diff section from one side to the other, and nothing changes, the save icon in the toolbar should not be enabled as if something has changed. It is misleading to the user!
            If you copy a matching line to the other side, it will still be an edit even though nothing has changed. The behavior that is in place now prevents users from creating files with mixed line endings. Use the method I described to fix line endings. If for some odd reason you don't want to fix all endings, I'd suggest using a hex editor.
            Erik Scooter Software

            Comment


            • #7
              FWIW, I agree with Michael on this. There's a "Compare Line Endings" setting; if it's set the user probably wants to copy line endings.
              Zoë P Scooter Software

              Comment


              • #8
                Originally posted by Craig View Post
                FWIW, I agree with Michael on this. There's a "Compare Line Endings" setting; if it's set the user probably wants to copy line endings.
                Thanks Craig...

                I do have Compare Line Endings enabled. That is why it showed up as a difference section.

                Here is another reason why I would like the copy to work. I have a large file with one bad line ending. When I tried the "Save As..." method, I got an error. See screenshot. Had I been able to correct the problem with a simple copy of the difference section, then I would not have had to initiate a Save As operation on a huge file and then try to figure out why it failed.
                BC v4.0.7 build 19761
                ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

                Comment


                • #9
                  Then, to make things worse, I changed the path on the right-hand side, and got an "Error Opening File" on the side on which I had attempted the "Save As..."! See screenshot.
                  BC v4.0.7 build 19761
                  ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

                  Comment


                  • #10
                    And finally, a "Compare Parent Folders in New View" shows that the file is GONE! This inability to copy line ending changes in a difference section has just turned into a DATA LOSS issue! See screenshot.
                    BC v4.0.7 build 19761
                    ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

                    Comment


                    • #11
                      Do you have backup on save enabled, and is there any antivirus software installed, either on your system or on the server that you're connecting to? If so, which one and what version? What OS is the server running?

                      Support for copying line endings has nothing whatsoever to do with the data loss issue. The file is written out the same, whether you use "Save As" with the same filename or just use the "Save" command after copying lines. To get the error message you encountered, either the original file should be there as a backup or the edited version should be available in the same directory as a BC3*.tmp file. Can you confirm that one way or the other?
                      Zoë P Scooter Software

                      Comment


                      • #12
                        Originally posted by Craig View Post
                        Support for copying line endings has nothing whatsoever to do with the data loss issue.
                        While, technically, that is true...my point was that I would not have run into this situation (and thus would not have lost the file) if I had been able to merge the line within the text compare session.

                        Originally posted by Craig View Post
                        Do you have backup on save enabled?
                        No. One thing I really despise is when utilities clutter my hard disks with backup files. If BC3 had an option to delete the backup file after a successful save operation, then I would consider using it.

                        Originally posted by Craig View Post
                        Is there any antivirus software installed, either on your system or on the server that you're connecting to? If so, which one and what version? What OS is the server running?
                        CA eTrust Antivirus 7.0 SP1
                        Windows Server 2003 R2 with SP2

                        While it certainly is possible that the anti-virus software was involved...I've never had this happen before...and I BC to this server all the time.

                        Originally posted by Craig View Post
                        To get the error message you encountered, either the original file should be there as a backup or the edited version should be available in the same directory as a BC3*.tmp file. Can you confirm that one way or the other?
                        If there was a .tmp file there at the time of the error, I did not see it. There is no .tmp file there now.
                        BC v4.0.7 build 19761
                        ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

                        Comment


                        • #13
                          Originally posted by Craig View Post
                          FWIW, I agree with Michael on this. There's a "Compare Line Endings" setting; if it's set the user probably wants to copy line endings.
                          Since there appears to be a difference of opinion on the Scooter team, I was wondering if this has been discussed further. I would appreciate it if the ability to copy/merge line endings be implemented when a user has the "Compare Line Endings" setting enabled...or at the very least, please add it to the customer wish list.
                          BC v4.0.7 build 19761
                          ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

                          Comment


                          • #14
                            Hi Michael,

                            Here's my take on the line ending (LE) issue.

                            The implemented goals are:
                            1) BC identifies each file's overall LE style (or mixed)
                            2) BC lets you change a file's LE style, including "fixing" a mixed file
                            3) BC helps you find where LE mismatches are

                            It was never a goal to let a user create a mixed LE file, and Eric's editor code does not support this. That's why individual LEs aren't copied or edited. While it would take substantial effort to change this, I am not adamantly opposed to adding this support in the long term.

                            I don't like the current "Compare Line Endings" feature. I do agree that given the current presentation (with an LE mismatch acting like a regular difference), it would be most logical to copy line endings, and that it seems silly that BC ignores the usual methods of resolving differences. I don't agree that we should simply change it so that "Compare Line Endings" automatically copies LEs. That would mean that BC could inadvertantly create mixed LE files when copying code changes.

                            Since any change won't be trivial, we will be studying the issue further and hopefully come up with a better implementation. I have some ideas that I'll share with the team once Eric is back from vacation.
                            Tim T Scooter Software

                            Comment


                            • #15
                              Thanks Tim,

                              I understand not wanting to allow users to create mixed line endings in files that have fixed line endings. More to the point... I do not expect to be able to copy a different line ending to a file that does not already have mixed line endings.

                              However... when a file is identified as already having mixed line endings, I would like to be able to copy line endings to that file when the "Compare Line Endings" feature is active.
                              BC v4.0.7 build 19761
                              ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

                              Comment

                              Working...
                              X