![]() |
#1 |
DaJAngband Maintainer
Join Date: Apr 2007
Location: San Antonio, TX
Posts: 927
Donated: $10
![]() |
dummy question: diff
How do you make a diff?
(I understand that that is a record of all the differences between two files or groups of files, correct me if I'm wrong) I googled it and found this: http://stephenjungels.com/jungels.ne...n-minutes.html I tried to take it's advice and I got "'diff' is not recognized as an internal or external command, operable program or batch file." |
![]() |
![]() |
![]() |
#2 | |
Knight
Join Date: Apr 2007
Posts: 590
![]() |
Quote:
Any decent source code control system will also provide diff functionality (SVN/Git/Mercurial/..., unsure about CVS).
__________________
Zaiband: end the "I shouldn't have survived that" experience. V3.0.6 fork on Hg. Zaiband 3.0.10 ETA Mar. 7 2011 (Yes, schedule slipped. Latest testing indicates not enough assert() calls to allow release.) Z.C++: pre-alpha C/C++ compiler system (usable preprocessor). Also on Hg. Z.C++ 0.0.10 ETA December 31 2011 |
|
![]() |
![]() |
![]() |
#3 |
Apprentice
Join Date: Sep 2010
Location: Portugal
Age: 50
Posts: 76
![]() |
If you want to go directly to the programs, you can download the GNU Diffutils package.
Personally I also like colordiff. This is a perl script that wraps around diff and outputs in color. Quite useful if you appreciate syntax coloring. To facilitate usage, you can add the following to your shell settings file (usually ~/.bashrc if you are using bash) Code:
alias diff='colordiff' |
![]() |
![]() |
![]() |
#4 |
DaJAngband Maintainer
Join Date: Apr 2007
Location: San Antonio, TX
Posts: 927
Donated: $10
![]() |
okay I downloaded diiffutils and extracted it from the archive. now what?
what directory do these files have to be in for diff to work? I don't see any file called diff...? |
![]() |
![]() |
![]() |
#5 | |
Angband Devteam member
|
Quote:
The usual syntax is diff -u file1 file2 >outputfile.diff or diff -u dir1 dir2 >outputfile.diff (the -u tells it to use the "unified diff" format) But if you're using svn or git you can just type "svn diff" or "git diff" to get the changes against the latest checked out revision. |
|
![]() |
![]() |
![]() |
#6 | |
Prophet
Join Date: Apr 2007
Location: Climbing up from hole I just dug.
Posts: 4,096
![]() |
Quote:
GNU diffutils is a right one. (EDIT) Windows diffutils: DiffUtils for Windows Last edited by Timo Pietilä; September 12, 2010 at 11:08. |
|
![]() |
![]() |
![]() |
#7 | |
Prophet
Join Date: Apr 2007
Location: Climbing up from hole I just dug.
Posts: 4,096
![]() |
Quote:
Here is link for windows utils: DiffUtils for Windows |
|
![]() |
![]() |
![]() |
#8 |
Prophet
Join Date: Apr 2007
Location: Seattle, WA
Posts: 5,422
Donated: $40
![]() |
If you are doing a diff vs the main (svn) branch, the best option is to use svn diff. (TortoiseSVN explorer plugin has it too.)
|
![]() |
![]() |
![]() |
#9 | |
Knight
Join Date: Apr 2007
Posts: 590
![]() |
Quote:
When you do have a file called diff.exe , it will need to be in your PATH. I find it simplest to maintain a *NIX-like directory system, and adjust my PATH to make sure the directory corresponding to /bin is in it. [Do this from the System control panel; it's an "advanced" function supposedly, will trigger UAC to adjust it.] For my MingW32-based setup, I use the following for my *NIX-like directories Code:
c:\bin [diff and other typical *NIX utilities goes here; in PATH] c:\etc [for bash and a few other utilities] c:\usr\local\include [for GCC] c:\usr\local\lib [for GCC] For working in C++, the following are also in my PATH Code:
c:\dev.tools\bin [unpack binutils in c:\dev.tools so I can update without trashing my GCC installs] c:\MingW32\bin [rename whatever MingW32 compiler suite's directory I want to work in to this] Code:
c:\MingW32.345 [3.4.5 works, binaries tend to be bloated] c:\MingW32.421 [4.2.1 works, atexit and friends highly unstable] c:\MingW32.433 [4.3.3 works] c:\MingW32.441 [4.4.1 won't build libJPEG or libPNG by generating invalid assembly, so generally useless] c:\MingW32.450 [4.5.0 won't build libJPEG or libPNG by generating invalid assembly, so generally useless]
__________________
Zaiband: end the "I shouldn't have survived that" experience. V3.0.6 fork on Hg. Zaiband 3.0.10 ETA Mar. 7 2011 (Yes, schedule slipped. Latest testing indicates not enough assert() calls to allow release.) Z.C++: pre-alpha C/C++ compiler system (usable preprocessor). Also on Hg. Z.C++ 0.0.10 ETA December 31 2011 |
|
![]() |
![]() |
![]() |
#10 | |
DaJAngband Maintainer
Join Date: Apr 2007
Location: San Antonio, TX
Posts: 927
Donated: $10
![]() |
Quote:
Nice that I can get diffutils without having to learn how to use MingW32 or svn. I've never used either and I don't think it's worthwhile for me to learn them. I don't really plan to become a serious programmer. |
|
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|