diff

How do diff/patch work and how safe are they?

二次信任 提交于 2019-11-30 13:49:40
问题 Regarding how they work, I was wondering low-level working stuff: What will trigger a merge conflict? Is the context also used by the tools in order to apply the patch? How do they deal with changes that do not actually modify source code behavior? For example, swapping function definition places. Regarding safety, truth be told, the huge Linux kernel repository is a testament for their safety. But I wondering about the following points: Are there any caveats/limitations regarding the tools

Team Foundation Server (TFS) File Difference viewer - customize with other tool

青春壹個敷衍的年華 提交于 2019-11-30 13:44:06
问题 I am using Team Foundation Server (TFS) for Visual Studio 2005. Whenever i wish to compare two file's versions TFS displays a window with the differences. The problem is that it is always split vertically. In fact, almost every time, i would prefer to have it split horizontally. I've already looked at TFS options and googled but i found nothing. I'm appalled to think that such option is not available! Is there any way to configure TFS to split it horizontally? 回答1: I've found the built in

'Best' Diff Algorithm [closed]

妖精的绣舞 提交于 2019-11-30 13:14:15
问题 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 8 years ago . I need to implement a Diff algorithm in VB.NET to find the changes between two different versions of a piece of text. I've had a scout

Quickly find differences between two large text files

旧时模样 提交于 2019-11-30 13:11:35
I have two 3GB text files, each file has around 80 million lines. And they share 99.9% identical lines (file A has 60,000 unique lines, file B has 80,000 unique lines). How can I quickly find those unique lines in two files? Is there any ready-to-use command line tools for this? I'm using Python but I guess it's less possible to find a efficient Pythonic method to load the files and compare. Any suggestions are appreciated. If order matters, try the comm utility. If order doesn't matter, sort file1 file2 | uniq -u . I think this is the fastest method (whether it's in Python or another language

How do I see the differences between 2 MySQL dumps?

陌路散爱 提交于 2019-11-30 13:10:26
问题 I have 2 MySQL dump files. I want to find the table data difference between 2 tables. 回答1: Use a DIFF tool - here are some graphical ones (both are free): KDIFF winmerge 回答2: run mysqldump with "--skip-opt" to get the 2 dumps files i.e: mysqldump --skip-opt -u $MY_USER -p$MY_PASS mydb1 > /tmp/dump1.sql mysqldump --skip-opt -u $MY_USER -p$MY_PASS mydb2 > /tmp/dump2.sql compare using these diff options: diff -y --suppress-common-lines /tmp/dump1 /tmp/dump2 回答3: In order to compare 2 mysql diffs

What does a red text-background mean in GitHub comparison view?

陌路散爱 提交于 2019-11-30 13:08:37
问题 I created a pull request and was browsing through, the differences are shown with light red/green line-brackgrounds, but some text is bolded with a red text background... Update: Image changed to show file with some highlighted comments and some not. What does this mean? 回答1: The red background-color is definitely being caused by the error-highlighting feature of GitHub's text editor/viewer. You can find the same behaviour occurring to an intended block comment in another JSON file on GitHub:

How does git-diff generate hunk descriptions?

不想你离开。 提交于 2019-11-30 13:00:20
问题 (git version 1.6.5.7) When I run git diff the output has a nice scope hint after the line numbers for my Python scripts, e.g.: diff --git a/file.py b/file.py index 024f5bb..c3b5c56 100644 --- a/file.py +++ b/file.py @@ -14,6 +14,8 @@ TITF: Test Infrastructure Tags Format ... @@ -1507,13 +1533,16 @@ class Tags( object ): ... Note that the line numbers are followed by TITF: Test Infrastructure Tags Format and class Tags( object ): . The first patch applies to module scope and the description

Creating a git diff from nothing

自古美人都是妖i 提交于 2019-11-30 12:51:52
问题 I am trying to create a patch file to be used via reviewboard. It will be the initial patch. diff -ruN --exclude=.git empty_dir working_dir > mypatch_00.patch works but I am getting a "The selected file does not appear to be a diff." error. Is there any way to get it working using git-diff or diff? Thank you 回答1: If you want to get diff for your initial commit (maybe I misunderstood your question), you can display it using git show COMMIT Alternatively to get it as file: git format-patch -1

patch: Only garbage was found in the patch input

ε祈祈猫儿з 提交于 2019-11-30 11:37:32
I produced a diff.txt file with the command (executed from ~): diff -r /full/path/to/directory/A /full/path/to/directory/B > diff.txt The generated diff file looks good. Now I run (always from ~) patch -p0 <diff.txt or I also tried: patch <diff.txt I would expect it to apply the changes to the files in /full/path/to/directory/A so that after the operation they will be identical to those in /full/path/to/directory/B But it only says: * Only garbage was found in the patch input. What am I missing? EDIT: Here is the whole diff file: diff /media/DATA/lavoro/eclipse_workspace/ODK Collect/src/net

Using IntelliJ to diff two arbitrary files

拟墨画扇 提交于 2019-11-30 11:13:37
问题 I'm really liking the IntelliJ diff tool. I'm wondering if it is possible to use this tool to diff two arbitrary files. I.e. files NOT in an IntelliJ project. Just pick two files in the file system and diff them? What about if I want to diff two strings? In my text editor, I'd just create two new documents, paste the text in and diff them, then not save the files when done. Is this possible? Thanks 回答1: Found this command line: on MacOSX: (IDEA EAP 11) /Applications/IntelliJ\ IDEA\ 11.app