diff

Is possible to change the default diff tool in Mercurial?

本秂侑毒 提交于 2020-01-11 15:28: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! ). 回答1: 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

git: update a php-script but keep own changes

别来无恙 提交于 2020-01-07 05:47:04
问题 I'm tracking my changes on a PHP-software with git. I have only a master branch and about 10 commits, the first commit was the original version 1.0 of the software. Now I saw, that the owner of the PHP-software released version 1.1. What is the best an easiest way for me, to update the software, but keep my own changes too and merge them with git mergetool? Should I use patches or create another branch with the untouched version updates? Thank you! 回答1: Typical approach is to create a branch

Notifications on next ssh login

送分小仙女□ 提交于 2020-01-07 01:51:06
问题 This is a hypothetical question because I'd like to know if it's even possible before I delve in to scripting it, but is it theoretically possible to have the output of a script/process (in particular one run via cron for instance) spit out in to terminal on the next ssh login? Some pseudocode that I hope illustrates my point: #!/bin/bash # Download latest example of a database (updated automatically and periodically) wget -mirror "http://somedatabase/database_latest # Run a command that

diff: text file permission denied

*爱你&永不变心* 提交于 2020-01-06 17:08:46
问题 I am on Windows and using diff to compare two text files. It was working successfully for small files but, when I start comparing 2GB file with another 2GB file it shows me: diff: C:/inetpub/wwwroot/webclient/database_sequences/est_mouse_2.txt: Permission denied My code: $OldDatabaseFile = "est_mouse_1"; $NewDatabaseFile = "est_mouse_2"; shell_exec("C:\\cygwin64\\bin\\bash.exe --login -c 'diff $text_files_path/$OldDatabaseFile.txt $text_files_path/$NewDatabaseFile.txt > $text_files_path

How to wrap correctly the unit testing diff?

假如想象 提交于 2020-01-06 14:54:35
问题 I am running python 3.6.4 , but some times the unit testing diff does not work as expected. For example, on the following there is a forced unit test error versus expected where the line wrapping behavior is not desired. import unittest class TestSemanticRules(unittest.TestCase): maxDiff = None def test_badWrapping(self): self.assertEqual( "1. Duplicated target language name defined in your grammar on: [@-1,63:87='Abstract Machine Language'<__ANON_3>,3:19]\n" "2. Duplicated master scope name

Can I run Emacs M-x ediff on Windows without installing Cygwin?

大城市里の小女人 提交于 2020-01-06 08:38:10
问题 Is it necessary to install Cygwin (which includes diff) or MinGW (which presumably also does) for something as simple as determining the differences between foobar.txt and foobar.txt~? 回答1: You don't need those long as you have a diff.exe program, such as the GNUWin32 diff-utils version, in your PATH. Emacs itself doesn't include the mechanics for performing the diffs. 来源: https://stackoverflow.com/questions/11458450/can-i-run-emacs-m-x-ediff-on-windows-without-installing-cygwin

Remove blank line from awk output

不羁岁月 提交于 2020-01-06 08:28:10
问题 I am trying to remove leading whitespace from awk output. When I use this command, a leading whitespace is displayed. diff test1.txt test.txt | awk '{print $2}' output: asdfasdf.txt test.txt weqtwqe.txt How can I remove the leading whitespace using awk? Thanks in advance 回答1: if you want to print the lines where $2 exists you can do it conditionally on number of fields awk 'NF>1{print $2}' will do. 来源: https://stackoverflow.com/questions/32789063/remove-blank-line-from-awk-output

compare xml files with maven or ant

牧云@^-^@ 提交于 2020-01-06 04:16:25
问题 I have a requirement to compare 2 directories of wsdl and xsd files using maven or ant and to generate a report (preferably html) of the differences. Any recommendations? 回答1: I would write your own Plugin. Start with this on the command line: mvn archetype:generate -DgroupId=mygroup -DartifactId=myartifact Choose maven plugin from the list. A plugin project will be generated. The plugin code will have an execute() method, just implement that. It will be far faster and cleaner to implement

How do I create a diff file with visual source safe?

十年热恋 提交于 2020-01-04 15:28:57
问题 If I want to create a patch file of a directory with svn, all I need to do is right click on the directory, click tortoiseSVN, then click create patch, and I have a nice patch file of the differences between the latest version of the code on svn and the code on my machine. Is there a way to build a diff file buried within VSS or is it just another part of VSS that does not work? 回答1: With VSS, you can right-click on a project, click Show Difference. In the Project Difference dialog box, you

Automatic conversion of specific binary files to text to compare (diff) in Mercurial

白昼怎懂夜的黑 提交于 2020-01-04 13:49:31
问题 I have several -small- binary files added in my Mercurial repository. The files are the "source" files of one of my development tools (report / form / class definitions). I made a program that dumps this binary files to a text file to allow easy diffs between them. Is there any way to tell Mercurial that certain file extensions need to run this conversion before running the diff program? Or I have to set my conversion program as the main diff tool and run the conversion -or not- and then run