diff

Structural Diff of two java source files

余生颓废 提交于 2019-12-05 10:27:11
Is there any way to find Structural diff of two java source files? I want to find structural difference of two java files, but i don't know how to start it. Is there any library in java for this purpose? Update: Structural diff means like it does not care about white space or locations. It should compares source a syntactically. This helps us to trace actual changes, even if methods are moved to another location or appear in different order. i found a tool that is for C# and pascal but i need it for java source file comparision. please check the given link http://www.modelmakertools.com

TortoiseSVN : Good 'patch file' viewer?

浪子不回头ぞ 提交于 2019-12-05 10:15:28
问题 The default patch file viewer is messy (ie. no side by side diff view etc). I tried setting the path of beyondCompare exe in "Settings->Unified Diff Viewer->custom", but beyond compare also behaves same as default diff tool. Is there a way to atleast allow side by side diff in patch files ? If so, what is the method ? My aim is to allow emailing of changes so that they can be reviewed before I commit them :) Mishal 回答1: I've never found any, but the solution that I usually use is to simply

How to print the comparison of two multiline strings in unified diff format?

核能气质少年 提交于 2019-12-05 10:00:21
问题 Do you know any library that will help doing that? I would write a function that prints the differences between two multiline strings in the unified diff format. Something like that: def print_differences(string1, string2): """ Prints the comparison of string1 to string2 as unified diff format. """ ??? An usage example is the following: string1=""" Usage: trash-empty [days] Purge trashed files. Options: --version show program's version number and exit -h, --help show this help message and

Is there a diff tool that allows copy-paste

混江龙づ霸主 提交于 2019-12-05 09:55:15
问题 Is there a diff tool that allows you to paste two segments of text and get a diff? I can't use an online tool because I'm dealing with proprietary data, and I haven't found a tool that provides that feature. 回答1: Try WinMerge. It'll do that. Steps: Download and install winmerge Open WinMerge & Create new <CTRL+N> Paste into left & right, then refresh <F5> 回答2: In case anyone comes here looking for a tool for Macs that can do this, it seems that there are two tools that can do just this.

Are there java libraries to do a word-based diff?

耗尽温柔 提交于 2019-12-05 08:48:23
I have two pieces of text. I would like to make a word-based diff between them (like whe unix utility wdiff does) but with more information in the output (I mean, the character's posizion where the added/delited word starts). I need to do this in Java, so a simple output of the differences (like wdiff ) doesn't suite for me: I would like to manipulate objects representing differences. There's Diff,Match,Patch - available in Java, and a demo is avilable - it seems to do word differences. 来源: https://stackoverflow.com/questions/2898612/are-there-java-libraries-to-do-a-word-based-diff

git merge using the vs2012 diff tool

て烟熏妆下的殇ゞ 提交于 2019-12-05 08:38:44
Is it possible to use the diff tool in visual studio 2012 together with git? Using "devenv /diff fileA fileB" i can bring up a diff between two files, but how can i add a third (base file) as well, having 3 views side by side. Im currently using TortoiseGit and BeyondCompare. Git can be configured to use any generic diff tool, not only the one it knows out of the box. To call a generic diff tool, set the diff.tool configuration variable to a custom diff tool alias, say "vs2012", by typing git config --global diff.tool vs2012 and create a corresponding cmd variable for that diff tool alias by

Split a file with conflict markers

此生再无相见时 提交于 2019-12-05 08:18:41
I am looking for a tool that will split a file that has conflict markers into the two separate files. Is there anything out there that does this already? xxdiff can do that: xxdiff --unmerge myfile.txt it also works if the conflict markers result from a 3-way diff xxdiff --unmerge3 myfile.txt The tool I work for ( ECMerge ) does that, primarily with the target of helping you to merge them visually of course. You could as well save the left/right/ancestor files with the built-in Javascript engine. ECMerge reads markers for most 'well-known' source code controls (CVS, git, mercurial, bazaar,

Compare two different urls using Linux

耗尽温柔 提交于 2019-12-05 07:58:05
Am I able to compare two different urls/websites without downloading the file first using wget or something similar first. I tried the following, but received the below error. [root@desktop ~]# diff http://www.example.net/index.php http://www.example.com/index.php diff: http://www.example.net/index.php: No such file or directory diff: http://www.example.com/index.php: No such file or directory [root@desktop ~]# Of course you can use curl , although it is a bit strange: diff <(curl url1) <(curl url2) In your case: diff <(curl http://www.example.net/index.php) <(curl http://www.example.com/index

How can I make `git diff` as fine-grained as StackExchange diff?

江枫思渺然 提交于 2019-12-05 07:46:46
问题 Is there a diff tool which can highlight single character edits as such, and not just show the old and new version of the whole line (i.e. the kind of diff StackExchange shows you for edits to a post)? I'd prefer one I could use on the Linux command line as diff in git . 回答1: You can try, from git diff: git diff --color-word=. Which is equivalent to --word-diff=color plus (if a regex was specified) --word-diff-regex=<regex> . That would transform this git diff : into this one: Images are from

How do I get mercurial to show the diff during `hg com`?

谁都会走 提交于 2019-12-05 06:22:50
Is there a way to configure hg com so that in the commit message file that pops up in the external editor, instead of just showing which files were changed (in the HG: lines) it actually shows the full diff? I'd rather view the output and compose my commit message simultaneously from the comfort of my text editor as opposed to doing hg diff on the command line separately beforehand. Frank Shearar TortoiseHg does this out of the box: a top panel for the commit message and below that, a left pane listing the affected files and a right pane showing the diffs, one after the other. As of 2016, it's