diff

Format SVN diff as a side-by-side comparison

我是研究僧i 提交于 2019-12-02 17:38:05
I wanted to produce a side by side SVN diff instead of the usual SVN diff output. Is there any way to get this sort of output ? You can specify a custom diff command: svn --diff-cmd "diff" --extensions "-y" diff (Or then perhaps even use tools like sdiff) cdiff can display side by side , incremental , and colorful diff, see its home page for detail and demo at https://github.com/ymattw/cdiff svn diff --diff-cmd 'diff' -x '--side-by-side -W230' FILENAME Tune the "-W230" to whatever takes full use of your screen width 来源: https://stackoverflow.com/questions/6835469/format-svn-diff-as-a-side-by

Set UTF-8 display for Git GUI differences window

喜欢而已 提交于 2019-12-02 17:06:29
I can't remember how I made Git GUI to display UTF-8 encoded differences correctly. Also I can't find the guide in search engines. Now I need to do this at new workplace. Could you write down instructions? OS: Windows 7 # Global setting for all you repositories > git config --global gui.encoding utf-8 # For one repository only > git config gui.encoding utf-8 Or from the GUI window: Edit -> Options... -> Default File Contents Encoding -> Change and select "Unicode (UTF-8)" In the Options, you'll see that there are two panel, the one on the right is for all repositories, the one on the left for

given two directory trees how to find which files are the same?

廉价感情. 提交于 2019-12-02 17:04:08
I am writing a bash script, and I would like to know which files are the same in two directory trees. It would be the opposite of using diff. Well i found the answer myself. I had tried it before, but I thought it did not work. diff -srq dir1/ dir2/ | grep identical fazineroso Well i found the answer myself. I had tried it before, but I thought it did not work. diff -srq dir1/ dir2/ | grep identical What -srq means? From diff --help : -s --report-identical-files Report when two files are the same. -r --recursive Recursively compare any subdirectories found. -q --brief Output only whether files

Is possible to change the default diff tool in Mercurial?

杀马特。学长 韩版系。学妹 提交于 2019-12-02 16:29:07
Every time I do an hg diff file.ext I end up using a console diff application. I would like to use Kdiff3 or WinMerge (I'm using Windows). Is there a way to change that? I can't find a reference in Mercurial documentation ( I'm not talking about merge! ). I've solved this using a Mercurial built-in extension... I just have to add the following lines to Mercurial.ini (on Mercurial folder): [extensions] hgext.extdiff= [extdiff] cmd.vdiff = kdiff3 When I want to use kdiff3 instead of diff I only have to use: hg vdiff file.ext Marcus Leon With this config [extdiff] cmd.kdiff3 = I use this command

How can KDiff3 be used properly with TortoiseSVN to resolve conflicts?

£可爱£侵袭症+ 提交于 2019-12-02 16:16:39
I have TortoiseSVN set up to use KDiff3 as the conflict resolution tool (I find it shows more information useful to the merge than the built-in TortoiseMerge does). When I open a file with Tortoise's "Edit Conflicts" command it shows me the three files and I have to select "Merge->Merge Current File" manually. The problem is that KDiff3 saves the result to source_file.working instead of to source_file . So without doing a Save As, the real file with the conflict doesn't get modified. Is there a way around doing this manual Save As every time? I know this isn't strictly a programming question

Set git diff to a default value

蓝咒 提交于 2019-12-02 16:16:27
I previously changed my git diff tool with git config --global diff.external <diff-tool-name> . I decided I don't like that tool and wanted to switch back. I tried meddling around and did something like: git config --global diff.external git-diff . Now calling git diff to see unstaged changes yields: fatal: ambiguous argument '48e66b706d21398f28240810e7fc0d44d8f92d99': unknown revision or path not in the working tr Use '--' to separate paths from revisions external diff died, stopping at somefile.ext. How do I set my git diff command to use the default command line git diff that came with git.

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

北慕城南 提交于 2019-12-02 16:01:14
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 diff results, especially when bold/italic format are embedded within each other. Could anyone suggest a

How to get diff between all files inside 2 folders that are on the web?

扶醉桌前 提交于 2019-12-02 15:42:27
So I want to compare this folder http://cloudobserver.googlecode.com/svn/branches/v0.4/Boost.Extension.Tutorial/libs/boost/extension/ with this http://svn.boost.org/svn/boost/sandbox/boost/extension/ . I want to get a diff file as a result. These folders are under svn control but I'd prefer git styled diff file (like one shown here ) I tried git diff but it seems not to work that way for web folders. So how to do the same thing with one command on Linux? Update: So we had a great answer . But it works strangely - it seems to me it shows that all files (same files) have all theire contents

How to get git diff with full context?

时光怂恿深爱的人放手 提交于 2019-12-02 15:41:12
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? I know this is old, but I also dislike hard-coded solutions, so I tested this: git diff -U$(wc -l MYFILE) Using -U seems to be the only way to approach the issue, but using a line count promises that it will work

Use pipe of commands as argument for diff

北战南征 提交于 2019-12-02 15:28:55
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 within a script like this (using backtick escapes): echo `ls` Thanks If you're using bash: diff file <