diff

How can I diff 2 SQLite files?

≯℡__Kan透↙ 提交于 2019-11-27 00:29:55
问题 Using SQLite-manager (in its XUL form) on a Mac. How can I diff a SQLite file from one submitted by someone else on the team, and incorporate his changes? Thanks. 回答1: I believe you could use the following, in combination: $ diff sqlite-file-1.sql sqlite-file-2.sql > sqlite-patch.diff $ patch -p0 sqlite-file-1.sql sqlite-patch.diff I hope that works for you. Otherwise, I highly suggest consulting the man-pages: $ man diff $ man patch EDIT: Alright, here's the whole walk-through. First, dump

Is there a Java library that can “diff” two Objects?

﹥>﹥吖頭↗ 提交于 2019-11-27 00:12:06
Is there a Java utility library that is analogous to the Unix program diff, but for Objects? I'm looking for something that can compare two objects of the same type and generate a data structure that represents the differences between them (and can recursively compare differences in instance variables). I'm not looking for a Java implementation of a text diff. I'm also not looking for help with how to use reflection to do this. The application I'm maintaining has a fragile implementation of this functionality that had some poor design choices and that needs to be rewritten, but it would be

Generate pretty diff html in Python

丶灬走出姿态 提交于 2019-11-27 00:07:27
问题 I have two chunks of text that I would like to compare and see which words/lines have been added/removed/modified in Python (similar to a Wiki's Diff Output). I have tried difflib.HtmlDiff but it's output is less than pretty. Is there a way in Python (or external library) that would generate clean looking HTML of the diff of two sets of text chunks? (not just line level, but also word/character modifications within a line) 回答1: There's diff_prettyHtml() in the diff-match-patch library from

How to do a git diff on moved/renamed file?

醉酒当歌 提交于 2019-11-27 00:04:49
问题 I moved a file using git mv . Now I would like to do a diff on the new file to compare it with the old file (with the old, now non-existent name). How do I do this? 回答1: You need to use -M to let git autodetect the moved file when diffing. Using just git diff as knittl mentioned does not work for me. So simply: git diff -M should do it. The documentation for this switch is: -M[<n>], --find-renames[=<n>] Detect renames. If n is specified, it is a threshold on the similarity index (i.e. amount

Three Way Merge Algorithms for Text

梦想与她 提交于 2019-11-27 00:04:05
问题 So I've been working on a wiki type site. What I'm trying to decide on is what the best algorithm for merging an article that is simultaneously being edited by two users. So far I'm considering using Wikipedia's method of merging the documents if two unrelated areas are edited, but throwing away the older change if two commits conflict. My question is as follows: If I have the original article, and two changes to it, what are the best algorithms to merge them and then deal with conflicts as

diff to html (diff2html) program [closed]

℡╲_俬逩灬. 提交于 2019-11-27 00:03:04
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . I'm looking for a "diff to html" program, which would generate a static html page from a given diff/patch file. I've googled for it of

Comparing two .jar files

末鹿安然 提交于 2019-11-26 23:55:23
问题 How do I compare two .jar files? Both of them have compiled .class files. I want the difference in terms of method changes, etc. 回答1: JAPICC, sample usage: japi-compliance-checker OLD.jar NEW.jar Sample reports for log4j: http://abi-laboratory.pro/java/tracker/timeline/log4j/ PkgDiff, sample usage: pkgdiff OLD.jar NEW.jar See sample report for args4j. Clirr, sample usage: java -jar clirr-core-0.6-uber.jar -o OLD.jar -n NEW.jar 回答2: Rename .jar to .zip Extract Decompile class files with jad

Compare two folders which has many files inside contents

一世执手 提交于 2019-11-26 23:54:19
问题 Have two folders with approx. 150 java property files. In a shell script, how to compare both folders to see if there is any new property file in either of them and what are the differences between the property files. The output should be in a report format. 回答1: To get summary of new/missing files, and which files differ: diff -arq folder1 folder2 a treats all files as text, r recursively searched subdirectories, q reports 'briefly', only when files differ 回答2: diff -r will do this, telling

Filter git diff by type of change

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-26 23:46:33
Is there a way to limit git diff to changed files? I'd like to see the differences between two commits, but exclude paths that don't exist in one or the other (additions/deletions). The following Perl one-liner illustrates most of what I want: git diff master.. | perl -lnwe 'print unless /^(new|deleted) file/../^diff/ and not /^diff/' But that leaves diff --git a/path b/path lines for the files that were new or deleted. Plus it'd be much nicer if I didn't have to parse (also fails if any hunk contains anything matching /^diff/, for example). Another alternative I tried was: git diff --name

Coloured Git diff to HTML

匆匆过客 提交于 2019-11-26 23:38:25
I enjoy using git diff --color-words to clearly see the words that have changed in a file: However I want to share that diff with someone without git or a colour terminal for that matter. So does anyone know of a tool or trick that can convert colour escaped terminal output into HTML? hendry wget "http://www.pixelbeat.org/scripts/ansi2html.sh" -O /tmp/ansi2html.sh chmod +x /tmp/ansi2html.sh git diff --color-words --no-index orig.txt edited.txt | \ /tmp/ansi2html.sh > 2beshared.html What I really needed was an ANSI to HTML converter. And I found a very decent one on http://www.pixelbeat.org/ .