diff

Free C# XML Diff library or class

夙愿已清 提交于 2019-12-05 20:14:54
I’m looking for XML Diff class or library. There are my requirements: - open source :) - object model for output (*) - rather fast (for 4mb XML) I'm trying to use MS XML Diff and Patch Tools, but I wanna get a list of objects with differences of 2 XML files (instead HTML markup). UPD: Thanks for all of your responses. I implemented my own solution; it’s not too hard with Linq2Xml :) UPD2: Sorry guys, but i can't post my solution here now (i actually haven't got it because i have changed my work recently). Also my solution have some specific parts, so it can't suit common problems any way. The

How to view Mercurial changeset changes using a GUI diff tool

怎甘沉沦 提交于 2019-12-05 19:21:21
We use both Examdiff and Kdiff3 to view Mercurial changes. Just add this to .hgrc : [extdiff] cmd.kdiff3 = cmd.examdiff = C:\Program Files\ExamDiff Pro\ExamDiff.exe And then you can type hg examdiff or hg diff3 to see a complete diff of all your changes. What I would like is to do the same to see a "before and after" of files for a given changeset that was checked in by someone else. I know you can type hg log to see all changesets and then hg log -vprXX to see a text diff, but that's too hard for my GUI preferring eyes. Anyone know how to the equivalent with the GUI tools? Can't use just use

Import changes into a git repository from universal diff

北慕城南 提交于 2019-12-05 18:54:15
I'm trying to import changes from one source control system (proprietary and complicated) into a git repository. I'm doing this currently by running a script that simply syncs to each revision in order and commits this to the git repository, but for various reasons this has become unworkable. For each revision, I can get a universal diff describing the change. To me it seems that this should be enough to import history to git, but I can't for the life of me figure out how to get git to do this. It looks like I need something in-between git-apply and git-fast-import. Perhaps I should construct

How to use nbconvert as git textconv driver to enable effective version control of Jupyter Notebooks

╄→гoц情女王★ 提交于 2019-12-05 16:30:18
问题 What I'm trying to do and how it differs from similar problems I would like to version control Jupyter Notebooks using Git. Unfortunately, by default, Git and Jupyter Notebooks do not play nicely. An .ipynb file is a .json file containing not only the Python code itself but also plenty of metadata (e.g., cell execution counts) and cell output. Most existing solutions (e.g., Using IPython notebooks under version control) rely on removing output and metadata from the notebook. This (i) still

vimdiff: force line-by-line comparison (ignore supposedly missing/additional lines)

与世无争的帅哥 提交于 2019-12-05 14:44:31
问题 How do I force vimdiff to always compare two files line-by-line without identifying added or deleted lines? The problem is that if the diff between two files is large, but by chance two lines in the file match up, vimdiff thinks these lines are the same and just treats the rest as added or deleted lines, and the resulting diff is totally unusable. In my case, line i in file1 always corresponds to line i in file2, so vimdiff has no business finding added or deleted lines. Following is a small

Eclipse Abstract Syntax Tree Diff

痴心易碎 提交于 2019-12-05 12:59:13
Given the following code in Eclipse: import org.eclipse.jdt.core.dom.AST; import org.eclipse.jdt.core.dom.ASTParser; import org.eclipse.jdt.core.dom.CompilationUnit; public class Question { public static void main(String[] args) { String source = "class Bob {}"; ASTParser parser = ASTParser.newParser(AST.JLS3); parser.setSource(source.toCharArray()); CompilationUnit result = (CompilationUnit) parser.createAST(null); String source2 = "class Bob {public void MyMethod(){}}"; ASTParser parser2 = ASTParser.newParser(AST.JLS3); parser2.setSource(source2.toCharArray()); CompilationUnit result2 =

Can Meld comparison output be exported to a file?

不羁的心 提交于 2019-12-05 12:47:00
问题 I've been using Meld to compare directories recursively. I want to know how to export the comparison result onto a new file. Meld is a visual tool but is there any way I can save the comparison? 回答1: As of version 3.18.0 this is not a supported feature. You can see the advertised features here. If you dig into the code, an UI option to save content (and subsequent implementation) is only present in data/ui/filediff.ui and not in data/ui/dirdiff.ui . This means comparison output can only be

Method name from line number

送分小仙女□ 提交于 2019-12-05 12:39:00
Given a line number of a particular class source code (Java/C#) - is there an easy way to get the name of the method it falls within? (If it falls within one) (Presumably using an Abstract Syntax Tree) (This would be useful in limiting the output of checkstyle to just the method touched). I'm assuming you'd have to use an Abstract Syntax Tree to do Line#->MethodName. (Java-specific) If the class file was compiled with debug info then the line number table will contain a mapping of code<->line number. I don't think there's a built-in API for getting at this at runtime though I'm sure you can

Diff without files

◇◆丶佛笑我妖孽 提交于 2019-12-05 11:51:19
问题 Is it possible to use the "diff" tool without having physical files? Something like this: diff "hello" "hell" 回答1: You can diff standard input with a file by using the special filename - : # diff the contents of the file 'some-file' with the string "foobar" echo foobar | diff - some-file With bash, you can also use anonymous named pipes (a bit of a misnomer) to diff two pipelines: # diff the string "foo" with the string "baz" diff <(echo foo) <(echo baz) See also How can you diff two

Tools for comparing minimized Javascript files [closed]

安稳与你 提交于 2019-12-05 11:23:53
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I need to compare two minimized Javascript files. Most common diff viewers list differences per line, but this isn't useful when the script is compressed to a few lines. Are there any good tools for comparing minimized Javascript files? 回答1: Pretty Diff tool will diff two minified files or a minified to a