diff

Find differences between two json objects

谁都会走 提交于 2019-12-09 05:14:09
问题 Are there any libraries in .Net to help compare and find differences between two json objects? I've found some solutions available for JavaScript, but nothing interesting for C#. The point of my question is to create json with changes marked in some way, based on the comparison. So that the user could see where the changes are. 回答1: using Microsoft.XmlDiffPatch; using Newtonsoft.Json; Convert each json to xml and use MS XmlDiff libary. Available on nuget. Differences are given in another xml

Where can I find the patience diff implemented?

旧巷老猫 提交于 2019-12-09 04:46:50
问题 It is well-answered on this site that Bram Cohen's patience diff is found in bazaar as the default diff and as an option with git diff, but I am finding it difficult to source an independent standalone program that implements this particular diff algorithm. For example I'd like to apply patience diff to perforce diffs, and it's pretty clear with the canonical "frobnitz" code example how patience diff is better: The terminal on the right has invoked the git diff with the --patience flag. I

Make github use .gitattributes “binary” attribute

久未见 提交于 2019-12-09 04:40:41
问题 In my project, I need to track some files into version control, csv files in this example. But the files contain a considerable amount of lines and cause Github to occasionally supress files that must go through code review for pull requests to be accepted and merged. I tried using .gitattributes to mark such files either as binaries or just to not being diplayed in the diff using: +*.csv -diff +*.csv -merge +*.csv binary one at a time, as well as combining them. This works perfectly on diffs

Svn diff to output all lines from files

回眸只為那壹抹淺笑 提交于 2019-12-09 04:39:36
问题 I've been searching for a while and still can't find a simple solution to this problem I have. I want to produce a diff between two revisions of a file but I want the output to show all lines of my file. By the way, I'm on an AIX 5.3 using svn 1.6.17. Example: Comparing difference between revision 21 and 22 of my file "test_file" % svn cat -r21 test_file My Test File line 1 line 2 line 3 line 4 line 5 line 6 line 7 line 8 line 9 % svn cat -r22 test_file My Test File line 1 line 2 line 3 line

TFS commits unchanged files

假装没事ソ 提交于 2019-12-09 03:38:55
问题 We're using MS Visual Studio 2008. TFS seems to take into account the creation date of a file or something, to determine whether the files should be committed. Is it possible to make TFS test just on the filename and content? I check out an xml or txt file I copy the content I open notepad and paste I save the file using the same name, and confirm the overwrite I commit: TFS by default selects the file for committing Although the name nor the content has changed. Our concrete use case: We

Change set predecessor using cleartool

▼魔方 西西 提交于 2019-12-09 00:16:19
问题 Eventually I'd like to find out how to diff a version in an UCM activity with the change set predecessor, using the command prompt, assuming there is more than one version for the same file in the activity. I already know how to get all the versions of a file in an activity. In general I could diff the latest version in the set with the earliest-1, but if the earliest version is the first version, because this is a new stream, then I'll have to figure the original stream. And that is also

Mercurial diff not working after move/rename

家住魔仙堡 提交于 2019-12-08 21:50:57
问题 After moving a file into another directory I cannot display the differences between two revisions any more. E.g.: hg init touch a hg add a hg ci -m "Added a" echo "Bli" >> a hg ci -m "Bli" echo "Bla" >> a hg ci -m "Bla" echo "Blub" >> a hg ci -m "Blub" hg diff -r 0 -r 1 a Results in: diff -r 8603b08f5a64 -r 16675581549e a --- a/a Mon Apr 23 09:03:25 2012 +0000 +++ b/a Mon Apr 23 09:03:25 2012 +0000 @@ -0,0 +1,1 @@ +Bli which is what I expected. However when I now move the file "a" into a

Diff tool that allows saving the compare markup

这一生的挚爱 提交于 2019-12-08 20:17:30
问题 Is there a diff tool that allows saving of the compare markup? To clarify, I would like to save the actual comparison of the two files that shows the differences to send to someone for review. EDIT Lots of good answers here. In my case I already had a copy of Beyond Compare but didn't see the option. Thanks to John Saunders for pointing out the feature. It's "Session...Text Compare Report..." BTW. My question was not specifically about Beyond Compare, so I am going to accept the answer that

How to correctly diff trees (that is, nested lists of strings)?

风格不统一 提交于 2019-12-08 20:10:58
I'm working in an online editor for a datatype that consists of nested lists of strings. Note that traffic can get unbearable if I am going to transfer the entire structure every time a single value is changed. So, in order to reduce traffic, I've thought in applying a diff tool. Problem is: how do I find and report the diff of two trees? For example: ["ah","bh",["ha","he",["li","no","pz"],"ka",["kat","xe"]],"po","xi"] -> ["ah","bh",["ha","he",["li","no","pz"],"ka",["rag","xe"]],"po","xi"] There, the only change is "kat" -> "rag" deep down on the tree. Most of the diff tools around work for

Diff in PhpStorm

谁都会走 提交于 2019-12-08 19:14:39
问题 How can I compare a document in current project with one that is not a part of project? How can I compare two arbitrary files in my computer with phpStorm? 回答1: Currently, the easiest way that I found for comparing a project file with a non-project file is coping the external file to clipboard and clicking on "View->Compare with clipboard". 回答2: It can be done only externally: You can also open the difference viewer without running PhpStorm. This is done through the following command: <path