diff

C++ string diff (a la Python's difflib)

I'm trying to diff two strings to determine whether or not they solely vary in one numerical subset of the string structure; for example, varies_in_single_number_field('foo7bar', 'foo123bar') # Returns True, because 7 != 123, and there's only one varying # number region between the two strings. In Python I can use the difflib to accom...

Multiple ordered lists boiled down to one list, where order is relative

I have multiple ordered lists. Unfortunately, the order of the items isn't a simple alpha or numeric comparison, otherwise this is trivial. So what I have is something like: List #1 List #2 List #3 groundhog groundhog easter mothersday mayday mothersday midsummer laborday halloween christmas ...

How do I make Subversion use a third-party diff tool?

I need more than the default diff! I have recently purchased "Beyond Compare" and I'd like to integrate it with svn, so its launched when I type: svn diff foo.c How do I do this? ...

How to make svn diff produce file that patch would apply, when svn cp or svn mv was used?

The scenario is: svn cp or mv some file modify that file svn diff > mypatch On other machine (same working copy, but no changes): Try to apply mypatch. Fail -> tries to modify unexistant file. How can I make svn diff produce patch-appliable patch, or cleanly apply patch produced by svn diff in this case? I can't commit. I would l...

Generate formatted diff output in Java

Are there any libraries out there for Java that will accept two strings, and return a string with formatted output as per the *nix diff command? e.g. feed in test 1,2,3,4 test 5,6,7,8 test 9,10,11,12 test 13,14,15,16 and test 1,2,3,4 test 5,6,7,8 test 9,10,11,12,13 test 13,14,15,16 as input, and it would give you test 1,2,3,4 ...

Using mercurial and beyond compare 3(bc3) as the diff tool? help needed

Hi, in windows I am able to use winmerge as the external diff tool for hg using mercurial.ini,etc. Using some options switch that you can find in web(I think it's a japanese website) Anyway, here for example: hg winmerge -r1 -r2 will list file(s) change(s) between rev1 and rev2 in winmerge. I can just click which file to diff but...

How can you diff two pipelines in Bash?

How can you diff two pipelines without using temporary files in Bash? Say you have two command pipelines: foo | bar baz | quux And you want to find the diff in their outputs. One solution would obviously be to: foo | bar > /tmp/a baz | quux > /tmp/b diff /tmp/a /tmp/b Is it possible to do so without the use of temporary files in ...

tools for diffing windows binaries?

Our QA team wants to focus their testing based on what EXEs and DLLs have actually changed between builds. We have a nice svn change report, but the relationship between source and changed binaries isn't always obvious. The builds we're comparing are always full clean builds, so we can't use file system timestamps. I'm looking for t...

Do you know any file comparison add-in for visual studio

Is there any built-in, add-in solution for visual studio to compare two files and display result with differences? I could't find one... ...

How can I diff two files with full context?

I have two files with slight differences. A normal diff will show me the differences between the files. With -c or -u I can add an amount of context to each hunk. What options can I pass to diff to see every unchanged line alongside the changes, and get the diff as a single, large hunk? ...

ASP.NET WebControl for displaying revisions or differences of content

I would like to display the differences between versions of the same content. Initially I rolled out my own WebControl, however the differencing algorithm I came up with was slightly naive. Does anyone know of any .Net code or a WebControl out there on the Internets that might be of use? The implementation that stackoverflow uses, is ju...

Any way to use a custom diff tool with cleartool/clearcase?

I'd like to use my own diff when working in a clearcase snapshot view. As far as I can see, there is no way to specify a diff tool when running "cleartool diff", so I was thinking I could run something like "mydiff <predecessor file> <modified file in my view>", but I don't know enough about clearcase to be able to find the "predecessor...

How do I find out which version control system my working copy is from?

If you have some directories from different version control systems (cvs, svn...), how do you find out what type of repository each came from? ...

Are there any tools for diffing HTTP requests/responses?

I am trying to debug some problems with very picking/complex webservices where some of the clients that are theoretically making the same requests are getting different results. A debugging proxy like Charles helps a lot but since the requests are complex (lots of headers, cookies, query strings, form data, etc) and the clients create t...

Why does svn diff sometimes copy working files to a temp file?

I use an external diff tool with Subversion (Beyond Compare rules!), and one of the great features is being able to use the diff program to make some minor edits to the file as I'm reviewing the changes I've made. But svn diff works differently on different projects of mine. In all, the left-hand file is a temp file containing the late...

Is there a metadata exclusion filter for the SVN DIFF command?

I use SVN as source control system and I wonder how to compare directories while ignoring any metadata differences. Is there a way to tell svn diff to compare only the actual content and ignore any metadata? I mean metadata like SVN properties, etc, that don't affect the file content. Assume file X has an additional property in branch ...

Best Update Method for MySQL DB

I have read through the solutions to similar problems, but they all seem to involve scripts and extra tools. I'm hoping my problem simple enough to avoid that. So the user uploads a csv of next week's data. It gets inserted into the DB, no problem. BUT an hour later he gets feedback from everyone, and must make updates accordingly. H...

Apply Diff in PHP

I'm working with the Text_Diff PEAR package to diff to short text documents, where the Text_Diff object is created with a space-delimited list of the words in each document. I was hoping to store the diff in a database, and then apply it when the file is loaded again. Is there an easy way to apply this diff, or do I need to write a fun...

Determining "Owner" of Text Edited by Multiple Users

You may have noticed that we now show an edit summary on Community Wiki posts: community wiki 220 revisions, 48 users I'd like to also show the user who "most owns" the final content displayed on the page, as a percentage of the remaining text: community wiki 220 revisions, 48 users kronoz 87% Yes, there could be top (n...

XML Diff and Merge

Hello, I think i have a rather unique problem to solve. Well, i cant find enough information using Google. So here it goes, I work on a JEE SOA application which stores XML documents as XML using Oracle XML DB. Whenever the XML changes, i increment the version and throw the previous version into a different table. The requiremen...