diff

Github: comparing across forks?

折月煮酒 提交于 2019-12-05 05:09:56
Short version When I compare two forks on Github, it does not compare the latest states, but the current state of the base fork with the last common commit (or am I wrong?); so how can I compare the latest states/heads on Github? Longer version I am trying to compare two repositories on Github. It does not seem to compare the latest states of both repository. Instead, it compares: the base fork as it was when both repositories where identical (last common commit?) with the head fork as it is now. You can see this in the Github's fork comparison example , it says there are no changes between

Numpy diff inverted operation?

橙三吉。 提交于 2019-12-05 04:05:00
Working with numpy.diff function, suppose this simple case: >>> x = np.array([1, 2, 4, 7, 0]) >>> x_diff = np.diff(x) array([ 1, 2, 3, -7]) How can I get easily x back to original scale not differenced? I suppose there is something with numpy.cumsum() . Concatenate with the first element and then use cumsum - np.r_[x[0], x_diff].cumsum() For concatenating, we can also use np.hstack , like so - np.hstack((x[0], x_diff)).cumsum() Or with np.concatenate for the concatenation - np.concatenate(([x[0]], x_diff)).cumsum() 来源: https://stackoverflow.com/questions/43563241/numpy-diff-inverted-operation

How to make git-diff create a “context” format diff?

守給你的承諾、 提交于 2019-12-05 03:49:45
I've got a Git repo from which I need to create a patch file in something other than the default git diff format. My use case is I've got a clunky old OSF/1 machine on which I need to apply the patch, and the /bin/patch program there doesn't understand unified diffs. If I use GIT_EXTERNAL_DIFF=diff , hoping that I can then use GIT_DIFF_OPTS=-c to request a context format diff, then my (modern) diff program complains about extra arguments on its command line: diff: extra operand `373e5907b789a1398a91f4ceb4ab14e8a0ed4282' diff: Try `diff --help' for more information. external diff died, stopping

How to ignore lines starting with a string with diff?

谁说我不能喝 提交于 2019-12-05 03:37:29
How can I diff two files and ignore lines starting with a sequence. E.g File1: abc def time:123 File2: igh def time:345 With unix diff it will report <time:123 >time:345 I want to ignore this diff. Any ideas? nc3b How about: diff -I '^time.*' file1 file2 ? Please not it doesn't always work as expected as per diffutils manual: However, -I only ignores the insertion or deletion of lines that contain the regular expression if every changed line in the hunk (every insertion and every deletion) matches the regular expression. In other words, for each non-ignorable change, diff prints the complete

Postgresql UNION takes 10 times as long as running the individual queries

末鹿安然 提交于 2019-12-05 03:32:33
I am trying to get the diff between two nearly identical tables in postgresql. The current query I am running is: SELECT * FROM tableA EXCEPT SELECT * FROM tableB; and SELECT * FROM tableB EXCEPT SELECT * FROM tableA; Each of the above queries takes about 2 minutes to run (Its a large table) I wanted to combine the two queries in hopes to save time, so I tried: SELECT * FROM tableA EXCEPT SELECT * FROM tableB UNION SELECT * FROM tableB EXCEPT SELECT * FROM tableA; And while it works, it takes 20 minutes to run!!! I would guess that it would at most take 4 minutes, the amount of time to run

A customizable diff tool that can produce report (in XML, HTML)

那年仲夏 提交于 2019-12-05 03:00:34
I want to provide a diff report for a non regression test. My program is Java based but I did not found any API filling my needs. So I'm using an external tool (CSDiff) that take 2 files as arguments and return an HTML report. That's nice and easy to setup. Now the only problem I have is that the HTML report needs some tweaks to be used and I am messing around with the report, trying to transform it into something different (hidding some parts, changing the style, ...) Does someone know a diff tools that has a powerful command line support, allowing custom report to be generated ? Nice report

Any existing C# code (OSS) that will calculate diff between two strings and output html? [closed]

不打扰是莪最后的温柔 提交于 2019-12-05 02:50:31
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I need to compare two strings and output the diff in HTML (similar to MS Word "track changes"). Language is C#, this is (not surprisingly) a .NET web app. There are a few similar questions (like this one for PHP/Python), but no existing question on SO. I don't need a finished project, just anything that will cut

What does interdiff do that diff cannot?

笑着哭i 提交于 2019-12-05 02:02:21
问题 If I'm trying to find the diff between two diffs, why can't I just diff the two diffs? I have tested diff diff1 diff2 and interdiff diff1 diff2 and have not found any difference in the output. In what case would they be different? (I am fully aware that interdiff's stated purpose is to find the changes between two patches.) 回答1: Why use interdiff and not just simply diff two patches? An interdiff tells you whether lines removed in the second patch were added in the first patch, and similarly,

How to make git log show file paths relative to current directory?

笑着哭i 提交于 2019-12-05 01:43:07
问题 The current Git-based project that I am working on, I am generally always in a sub-directory. Below is the output when I run the command git log --name-only from a sub-directory of the root of the repository. commit 678bd5ba6fc5474c4c61406768bf6cba5937c5d1 Author: thegreendroid Date: Mon Mar 27 09:36:24 2017 +1300 Commit message child_dir1_from_root/file1 | 184 +-- child_dir2_from_root/file2 | 2 +- How do I instead get git log to output something like below instead? This makes diffing the

Mercurial - diff multiple changesets at same time?

假装没事ソ 提交于 2019-12-05 01:24:26
To diff we use: hg diff -c <xyz> : Show diffs for a given changeset hg diff -r <xyz> : Show all diffs since a given changeset But let's say you have changesets 4-5-6-7-8 where changesets 4, 6, 8 were related to a particular area of the system and in one diff you wanted to see the changes made from JUST these three changesets, how would you do this? If file A was modified in changeset 4 and 8, the diff would show the difference between changeset 3 and 8. If changesets 4,5,6,7,8 are linear in history I don't think that even with revsets you can do that using just -r . However, if the changes in