Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Join Date
    Oct 2007
    Location
    pittsburgh, PA
    Posts
    64

    Default Is there a way to specify the line ending style for merge output?

    I am using P4V (windows client for PerForce) with BC3 as my diff/merge tool. I did a merge recently, with the left and center files pulled from the PerForce repository, and apprently moved to my local disk with PC line endings (CRLF), and the right file (my version) from a network attached Linux drive with Unix line endings (LF only). After the merge, the output file was saved with PC line endings. When I checked this in, it was stored the same way.

    Unfortunately, our corporate standard is Unix line endings.

    I cannot use the setting to always consider line ending differences during compares, since the windows PerForce client always converts repository files to PC style when creating temp files for compare and our checked out versions on Linux always have Unix style line endings. I just need to make sure that when I save the merged output, is uses Unix-style line endings (or I need someplace I can specify this as a default, or specify which of the input file's style the output should conform to).

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,788

    Default

    You can use File->Save As to then specify the Line Ending. In the example you describe, however, it should have picked Unix (since it would determine that the ancestor had changed to Unix from the Right file).

    Did one of the files possibly have a mixed line ending? If a mix is detected it would default to your System line ending.
    Aaron P Scooter Software

  3. #3
    Join Date
    Oct 2007
    Location
    pittsburgh, PA
    Posts
    64

    Default

    No, the left and center files were CRLF line endings and the right file (mine) was LF only.

  4. #4
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,788

    Default

    That seems a bit odd.

    If you Save As... the files locally, and then open them in a merge, what do you see?

    Would it be possible to get screenshots and example files sent to support@scootersoftware.com ?
    Aaron P Scooter Software

  5. #5
    Join Date
    Oct 2007
    Location
    pittsburgh, PA
    Posts
    64

    Default

    Since the code is proprietary, I can't easily send screen shots. I've also already fixed the problem, so the files I used are no longer available. I'll try to collect more information if this happens again.

  6. #6
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,788

    Default

    Ok, thanks.

    In the meantime, if it picks 'incorrectly,' is it a suitable solution for you to override it with a Save As and manually picking the type?
    Aaron P Scooter Software

  7. #7
    Join Date
    Oct 2007
    Location
    pittsburgh, PA
    Posts
    64

    Default

    It's not ideal, but better than nothing.

    I've been trying to think of ways that you could indicate a difference like this without affecting the comparison. Possibilities include making line endings visible, but unimportant (this could also apply to tabs or other non-printable characters), or adding a file type indicator somewhere on the screen (I don't like this one much, because it adds clutter that would be irrelevant in most cases).

  8. #8
    Join Date
    Nov 2007
    Location
    Pittsburgh
    Posts
    39

    Default

    Would the default encoding settings in Tools|File Formats|Conversions(Tab) help you? I would assume that it would enforce the output file to be that format, but I haven't tried it to see what happens when a file of a different format is opened.
    Jeff

  9. #9
    Join Date
    Oct 2007
    Posts
    437

    Default

    - Select "View -> Visible Whitespace" to show line endings.
    - The file type indicator is listed in the status bar of the input editors (MAC, PC, UNIX, MIX).
    - "Compare line endings" in the "Session Settings" dialog will treat differences in line endings as important. This is most useful for mixed line endings.
    Erik Scooter Software

  10. #10
    Join Date
    Oct 2007
    Posts
    786

    Default

    The encoding setting would only affect which code page was used to write the file (eg UTF-8 vs ANSI). It wouldn't control the line ending style.
    Tim T Scooter Software

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •