Jump to content


How do I wrap long lines in P4merge?

p4merge diff csv wrap long lines

  • Please log in to reply
8 replies to this topic

#1 dandv

dandv

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 29 June 2017 - 12:58 AM

I'm comparing two CSV files (reference data part of a test suite) that happen to be longer than P4Merge can display.

How do I wrap lines so I can see the differences beyond the cutoff point?

Or is there a way to display the current two lines stacked on top of each other, as other tools do?

Posted Image

I must be missing something obvious (though I've gone through all the options), because a mature tool like P4Merge surely must support this use case.

P4Merge can't highlight the current line either.

Scrolling horizontally is not a solution - can you tell what's different in the screenshot below? Lines are not aligned, you can't focus on one line etc. This is horrible. Seriously, what am I missing?

Posted Image

#2 p4rfong

p4rfong

    Advanced Member

  • Staff Moderators
  • 343 posts

Posted 03 August 2017 - 01:23 AM

I suppose changing to a smaller font or using a bigger monitor won't help.  Instead of using P4Merge, use a different merge tool with P4V: Edit, Preferences, Diff, Other application.

#3 Matt Janulewicz

Matt Janulewicz

    Advanced Member

  • Members
  • PipPipPip
  • 176 posts
  • LocationSan Francisco, CA

Posted 03 August 2017 - 01:39 AM

You might consider rolling out a Swarm instance. It seems to create a giant horizontally scrollable window to show diffs for long lines.

I'd be interested in knowing what you'd expect the second screenshot to look like. If a line is huge and has differences scattered about of different lengths, there would be no way to align the diffs without introducing fake white space in there. Though I don't use diff tools that often, and usually not an hugely-lined files, so maybe there's a tool out there that has a clever way to truncate non-different intra-line changes so that the diffs are easier to compare ...?
-Matt Janulewicz
Staff SCM Engineer, Perforce Administrator
Dolby Laboratories, Inc.
1275 Market St.
San Francisco, CA 94103, USA
majanu@dolby.com

#4 DaveCh

DaveCh

    Advanced Member

  • Members
  • PipPipPip
  • 40 posts

Posted 04 August 2017 - 08:43 AM

Does the "View/Single Pane Diff Layout" menu option not get closer to what you want?

#5 i3v

i3v

    Member

  • Members
  • PipPip
  • 11 posts

Posted 26 October 2017 - 05:27 PM

Count me in.
I strongly agree that "word wrap" (or any other wrapping) option (like those available in windows notepad) would be very nice here.

#6 p4rfong

p4rfong

    Advanced Member

  • Staff Moderators
  • 343 posts

Posted 26 October 2017 - 05:45 PM

I added dandv and i3v to an existing request for a customizable P4Merge word wrap.

#7 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 928 posts

Posted 26 October 2017 - 09:03 PM

P4WinMerge is still my favorite merge tool and it has the "stacked" three-pane view like what you're looking for -- unfortunately I can't find binaries on the FTP site (the last release was 2008.2 and it looks like everything before 2011 was lost in the purge), but you could try to build it from source: https://swarm.worksh.../main/build.txt

#8 novingate

novingate

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 26 November 2017 - 03:17 PM

thanks for article

#9 p4rfong

p4rfong

    Advanced Member

  • Staff Moderators
  • 343 posts

Posted 15 December 2017 - 05:42 PM

I added novingate to the feature request.





Also tagged with one or more of these keywords: p4merge, diff, csv, wrap, long lines

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users