diff

Xml comparison in Python

Building on another SO question, how can one check whether two well-formed XML snippets are semantically equal. All I need is "equal" or not, since I'm using this for unit tests. In the system I want, these would be equal (note the order of 'start' and 'end'): <?xml version='1.0' encoding='utf-8' standalone='yes'?> <Stats start="12759...

How to tell Subversion to display binary files using an external program?

I have some code which, like java, is stored in a binary format, and I have the applications to display and modify this code setup in the Subversion's config file. But when I run svn diff for these file, Subversion prevents me =================================================================== Cannot display: file marked as a binary ty...

Getting readable diff displays in Mercurial on Unicode files (MS Windows)

I'm trying to store some Windows PowerShell scripts in a Mercurial repository. It seems the PowerShell editor likes to save files as UTF-16 Unicode. This means that there are lots of \0 bytes, which is what Mercurial uses to distinguish between "text" and "binary" files. I understand that this makes no difference to how Mercurial stores...

How do I find the text changes in TFS history?

I'm wondering how I search history for any changeset that contains a change (diff) between the file and it's previous version with the word "foobar" in it. In other words, and more specifically, I want to find the changeset that removed a subscription to an event. Clearly the change won't be in the class raising the event, and because t...

display gnu diff in HTML

Is there a lib i can use to diff between two pieces of code and display it in html? I am using diff - GNU diffutils version 2.7, C#, asp.net. I dont mind the code being in javascript. I would like just the output with color text + css. I'll build the page around it. Does anyone know a suitable lib? ...

VSS2005: How to I get the earliest versions of all files in a project?

In VSS2005, how to I get the earliest versions of all files in a project? Labels have not been added in this project. Also, how could I Show Differences for all the earliest versions of all files in the project with the latest versions of all files? ...

JavaScript based diff utility

I'm looking for a diff equivalent written in JavaScript that only returns/prints relevant lines. I don't want both full text displayed next to each other with the differences highlighted, but just want the actual differences (plus some buffer lines to know where the difference is), similar to the output from the linux diff utility. Does...

Graphical patch utility

I have a kernel patch for a slightly different kernel version then the one I'm trying to patch. Needless to say, the patch partially fails. I can certainly fix it manually, but I was wondering maybe there is a graphical patch utility that can be used to resolve the conflicts. ...

Strange characters with diff-match-patch libraries

I'm using diff-match-patch ( http://code.google.com/p/google-diff-match-patch/ ) to make difference between two text. At the end of the diff, they return strange characters: for example à become %C3%A0, ù %C3%B9, " %22 and so on. This is an example of my code: String startDocument = "hello world"; String endDocument = "àèìòù\""; diff_m...

Find Similarities between Blocks of Text between Many HTML Documents?

If I have say 20 HTML pages and I want to extract out the shared/similar portions of the documents, what are some efficient ways to do that? So say for StackOverflow, comparing 10 pages I'd find that the top bar and the main menu bar are the same across each page, so I could extract them out. It seems like I'd need either a diff progra...

What do ++ and +- mean in a Debian diff file?

I'm currently viewing the Ubuntu Rhythmbox source diff, (you can view this via gzip -d < rhythmbox_0.12.8-0ubuntu6.diff.gz | less on the command line). Here's an excerpt: +diff --git a/plugins/status-icon/status-icon-ui.xml b/plugins/status-icon/statu s-icon-ui.xml +index a5cb6e1..a4eee9d 100644 +--- a/plugins/status-icon/status-icon-ui...

Combining 2 patch files that patch a number of files in a directory + resolving conflicts

Hello, I have a dir with thousands of files and 2 patch files that apply to the same dir. Each patch file patches 20-30 files in dir or it's subdirs. If I apply either patch to the common ancestor dir, it succeeds. But if I apply one patch file followed by the other, it fails because the line numbering has changed after one patch fil...

Cocoa API - Does it contain a diff api?

I'm wondering if there is a diff API in Cocoa, I've attempted to google it but its not bring back any results that are useful. If there isn't an API for this would it be better to call diff from /usr/bin/ or to write my own diff. All I need it for is text-files with a possibility of branching out into binaries and folders later. Thank...

How do you configure Komodo diff using tortoiseHg and beyondcompare?

I'm trying to configure Komodo IDE so that it integrates with tortoiseHg and my beyondcompare3 diff tool. The diff works fine in tortoiseHg, but when I try to do a diff in Komodo nothing happens, no errors, no windows, nothing. Found a similar thread for SVN but need to know what to set the "diff options" box to for tortoiseHg (mercurial...

Diffing a JSON document

Well, my question is a little complicated, but here goes: I have a Python server that stores client (written in JavaScript) sessions, and has complete knowledge of what the client currently has stored in its state. The server will constantly fetch data from the database and check for any changes against the client state. The data is JS...

git diff... Am I missing something?

Every piece of documentation I've read on git (including the online book and the built-in help) says I can type "git diff" from command line, but whenever I do that I get: usage: git diff [--no-index] <path> <path> Here's what I've tried so far (all are examples from the documentation): $ git diff usage: git diff [--no-index] <path> <...

What is the best Diff library in Ruby?

I've looked at diff-lcs ( http://raa.ruby-lang.org/project/diff-lcs ) but it's poorly documented, and appears to be unmaintained. Are there any good, actively maintained ruby gems for diffing text or html files? ...

How to make git-diff create a "context" format diff?

I've got a Git repo from which I need to create a patch file in something other than the default git diff format. My use case is I've got a clunky old OSF/1 machine on which I need to apply the patch, and the /bin/patch program there doesn't understand unified diffs. If I use GIT_EXTERNAL_DIFF=diff, hoping that I can then use GIT_DIFF_O...

Tool to compare/diff HTML in bulk

I have a lot of HTML files (10,000's and GBs worth) scraped from a server and I want to check to make sure the server produces the same results after some modifications but ignore kinds of differences that don't matter, e.g. whitespace, missing newlines, timestamps, small changes in some kinds of number, etc. Does anyone know of a tool ...

How to apply diff made by windows SVN on linux?

On windows i created a multi-file diff with: svn diff > mydiff.diff Then moved it to linux machine (with the same version of the same repo, no changes). How cai i apply it? After executing patch -p0 < mydiff.diff I get the following output: patching file licstat/test/unittest/test_licstatactioncontainers.cpp File licstat/test/uni...