diff

Where can I find the patience diff implemented?

你。 提交于 2019-12-03 02:37:08
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 also have set up the diff-highlight perl script, whose job it is to invert colors on matched-up lines

How does a wiki handle multiple simultaneous edits?

佐手、 提交于 2019-12-03 02:31:49
This has always lingered in the back of my mind, so I figure I might as well go ahead and ask. How does a wiki handle multiple edits on the same content? Here's a simplistic example of what I'm asking. Let's say that a page has the following content: I'm a page! And now let's say that two go to edit that page. Each person adds a sentence: Person one: I'm a page! I'm a second sentence in the same page! Person two: I'm a page! I'm a second sentence! Imagine each person's second sentence being an equally relevant but different fact about the topic of the page that each person wanted to add in.

Is there a JS diff library against htmlstring just like google-diff-match-patch on plain text?

孤街醉人 提交于 2019-12-03 02:27:41
问题 Currently I am using google-diff-match-patch to implement a real-time editing tool, which can synchronize texts between multiple users. Everything works great when operations are only plain texts, each user's operation(add/delete texts) could be diff-ed out by comparing to old text snapshot with the helper of google-diff. But when rich format texts(like bold/italic) are involved, google-diff not working well when comparing the htmlstring. The occurrence of character of < and > messed up the

Svn diff to output all lines from files

时间秒杀一切 提交于 2019-12-03 02:23:55
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 4 line 5 line 6 line 7 line 8 line 9 added after 1 added after 2 added after 3 % svn diff -r21:22 test

How to get git diff with full context?

隐身守侯 提交于 2019-12-03 02:06:36
问题 How to create patch suitable for reviewing in crucible? git diff branch master --no-prefix > patch This generates only 3 lines of context. So I do the following git diff --unified=2000 branch master --no-prefix > patch Hopefully all files will have less than 2000 lines. Is there a way to tell git to include all the lines in the file for patch without having to specify maximum lines? 回答1: I know this is old, but I also dislike hard-coded solutions, so I tested this: git diff -U$(wc -l MYFILE)

Syntax Highlighting Combine diff and xxx

自闭症网瘾萝莉.ら 提交于 2019-12-03 01:55:26
I've just seen this (old) post, and I was wondering if we could the same thing using GitHub flavoured markdown: Combine the normal syntax highlighting with the diff one. I tried a few things, like ```python&diff - import that + import this ``` ```python - import that + import this ``` ```pythondiff - import that + import this ``` ```diffpython - import that + import this ``` But none of them worked... So, do any of you know how to do this? Or it's not possible? The old post you refer to is " Syntax Highlighted Diffs ", Dec. 2014 However, nothing in the current GFM (GitHub Flavored Markdown)

Use pipe of commands as argument for diff

孤街浪徒 提交于 2019-12-03 01:52:15
问题 I am having trouble with this simple task: cat file | grep -E ^[0-9]+$ > file_grep diff file file_grep Problem is, I want to do this without file_grep I have tried: diff file `cat file | grep -E ^[0-9]+$` and diff file "`cat file | grep -E ^[0-9]+$`" and a few other combinations :-) but I can't get it to work. I always get an error, when the diff gets extra argument which is content of file filtered by grep . Something similar always worked for me, when I wanted to echo command outputs from

find files not in a list

怎甘沉沦 提交于 2019-12-03 01:41:48
I have a list of files in file.lst . Now I want to find all files in a directory dir which are older than 7 days, except those in the file.lst file. How can I either modify the find command or remove all entries in file.lst from the result? Example: file.lst : a b c Execute: find -mtime +7 -print > found.lst found.lst : a d e so what I expect is: d e Pipe your find command through grep -Fxvf : find -mtime +7 -print | grep -Fxvf file.lst What the flags mean: -F, --fixed-strings Interpret PATTERN as a list of fixed strings, separated by newlines, any of which is to be matched. -x, --line-regexp

showing differences within a line in diff output

喜夏-厌秋 提交于 2019-12-03 01:41:45
This StackOverflow answer has an image of KDiff3 highlighting intra-line differences. Does someone know of a tool which can show the same (ex, via color) on the command line? Another way to think of this is wanting to diff each difference in a patch file. ire_and_curses I don't know if this is sufficiently command line for your purpose, but vimdiff can do this (even does colour). See for example the image in this related question . I tried all the tools I found: wdiff, dwdiff, kdiff3, vimdiff to show the difference between two long and slightly different lines. My favourite is diff-highlight

Diff output from two programs without temporary files

左心房为你撑大大i 提交于 2019-12-03 01:36:22
问题 Say I have too programs a and b that I can run with ./a and ./b . Is it possible to diff their outputs without first writing to temporary files? 回答1: Use <(command) to pass one command's output to another program as if it were a file name. Bash pipes the program's output to a pipe and passes a file name like /dev/fd/63 to the outer command. diff <(./a) <(./b) Similarly you can use >(command) if you want to pipe something into a command. This is called "Process Substitution" in Bash's man page