diff

How do I exclude certain files from a svn diff?

三世轮回 提交于 2019-11-30 02:54:44
问题 I'm using svn diff -c 789 to show the changes made in revision 789 of our software, but it's showing a lot of files I don't care about, in particular test files. How can I exclude certain files from the diff, for example all files which match the pattern *Test.java ? I'm using Cygwin on Windows, if that's important. 回答1: As svn diff does not allow to exclude specific files from the output, below is a BASH script that can be used to achieve that. It takes two arguments: file with an svn diff

3-way XML merge algorithm

前提是你 提交于 2019-11-30 02:07:44
I want to be able to do a 3-way merge of XHTML documents: Start with some original copy of the document One user edits a copy of the original document Another user edits a separate copy of the original document Need a tool to merge (automatically and/or visually) the changes made by the two users. Note: I want to include this functionality in commercial software: so I prefer something that's free-as-in-beer and/or open source, instead of a commercial tool. I suspect it's better if the tool is XML-aware, than to try to use software like diff3 which implements 3-way merge of flat text Given that

Show the permission of a indexed file in git

*爱你&永不变心* 提交于 2019-11-30 01:38:52
问题 This is related to another question I recently asked about storing a non-bare repository in Dropbox for easy movement between computers, so it may be helpful to read that question for background. The gist is that the fileMode keeps reporting a diff for some number of files. I can't find a way to reproduce it consistently, but it happens frequently. What I've noticed is that the file, which has 644 permissions on both machines often reports a diff from 755 on one of the machines. This makes me

diff operation within a group, after a dplyr::group_by()

匆匆过客 提交于 2019-11-30 01:34:52
问题 Let's say I have this data.frame (with 3 variables) ID Period Score 123 2013 146 123 2014 133 23 2013 150 456 2013 205 456 2014 219 456 2015 140 78 2012 192 78 2013 199 78 2014 133 78 2015 170 Using dplyr I can group them by ID and filter these ID that appear more than once data <- data %>% group_by(ID) %>% filter(n() > 1) Now, what I like to achieve is to add a column that is: Difference = Score of Period P - Score of Period P-1 to get something like this: ID Period Score Difference 123 2013

How do i diff two files from the web

不想你离开。 提交于 2019-11-30 01:33:52
问题 I want to see the differences of 2 files that not in the local filesystem but on the web. So, i think if have to use diff , curl and some kind of piping. Something like curl http://to.my/file/one.js http://to.my/file.two.js | diff but it doesn't work. 回答1: The UNIX tool diff can compare two files. If you use the <() expression, you can compare the output of the command within the indirections: diff <(curl file1) <(curl file2) So in your case, you can say: diff <(curl -s http://to.my/file/one

git - diff of current changes before committing

丶灬走出姿态 提交于 2019-11-30 00:12:28
I have changed several files in a git repository, but have not committed them yet. I can get a list of the changes by just invoking git status . But how do I get a listing of the lines or the content that I have changed, in addition to the filenames? I initially thought about using git diff , but it seems to be useful only for comparing already commited changes. Usually I just do meld . , but on this case I'm connected to an external server via ssh. Mischa Arefiev git diff by default shows difference between your working directory and the index ( staging area for the next commit). If you have

Examples of different results produced by the standard (Myers), minimal, patience and histogram diff algorithms

我的未来我决定 提交于 2019-11-29 22:50:27
Git offers these 4 diff algorithms, but without any further information what are their differences. What are the advantages of each of this algorithms? Is there some comparison of various cases where the algorithms perform differently? jelle foks I think there are multiple algorithms supported because none of the algorithms are clearly the best choice in all cases. The differences are in readability of the patch output and processing time needed to generate the patch. Summarizing, this is what I understand the differences are: Myers: The original algorithm as implemented in xdiff ( http://www

git diff algorithm that does not rip functions apart? (language-aware diff)

强颜欢笑 提交于 2019-11-29 22:49:12
Is it possible to configure git diff to respect indentation and syntax? I am not talking about ignoring indentation and spaces, but rather to use blank lines, indentation levels and possibly brackets, to help matching the old lines to new lines. E.g. git diff often cuts through functions and their docblock, like this: class C { /** + * Goes to the bar. + */ + function bar() { + return 'bar'; + } + + /** * Gets your foo up to date. */ function foo() { When I would prefer class C { + + /** + * Goes to the bar. + */ + function bar() { + return 'bar'; + } /** * Gets your foo up to date. */

Algorithm to detect similar documents in python script [closed]

回眸只為那壹抹淺笑 提交于 2019-11-29 22:41:27
I need to write a module to detect similar documents. I have read many papers of fingerprints of documents techniques and others, but I do not know how to write code or implement such a solution. The algorithm should work for Chinese, Japanese, English and German language or be language independent. How can I accomplish this? Bayesian filters have exactly this purpose. That's the techno you'll find in most tools that identify spam. Example, to detect a language (from http://sebsauvage.net/python/snyppets/#bayesian ) : from reverend.thomas import Bayes guesser = Bayes() guesser.train('french',

unix diff side-to-side results?

让人想犯罪 __ 提交于 2019-11-29 21:59:45
How can I plot the results of a unix diff command side-to-side instead of one difference after the other? See below for an example: diff /tmp/test1 /tmp/test2 1,4c1,2 < asfdsadf < asdfsad < fsaf < fdsadf --- > asdfsafdsf > saf 6,8d3 < sadf < asdf < sadf 10d4 < fasd 12,13c6,14 < sadfa < fd --- > sadf > sadf > sadf > sadf > sadf > sadf > sadf > sadf > safa I would like to have something like: diff /tmp/test1 /tmp/test2 1,4c1,2 < asfdsadf > asdfsafdsf < asdfsad > saf < fsaf < fdsadf --- 6,8d3 < sadf < asdf < sadf 10d4 < fasd 12,13c6,14 < sadfa > sadf < fd > sadf --- > sadf > sadf > sadf > sadf >