You are not logged in.
Pages: 1
Wittfella has kindly made a special piece of code, just for me, for his great filemanager Qtfm. I can apply it manually with the aid of nano. and it compiles fine. But, I've tried to make a patch with diff and patch but it is a bit over my IQ. Somehow I managed to reverse the patch and so destroyed the special code (backups are great).
Scenario;
Doc 1; special mainwindow.cpp complete or just with code snippet I need.
Doc 2; Qtfm newest source mainwindow.cpp
Desired result; put the code snippet from the special mainwinow.cpp into the new mainwindow.cpp, either from the complete file or a file with just the appropirate code sequence/snippet.
Of course, at one point the new code will change so that the special code snippet won't work anymore. But that's far off in the future.
Any hints are appreciated.
Offline
$ diff -Naur $file1 $file2 > $patch
should work fine in most cases.
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
$ diff -Naur $file1 $file2 > $patch
should work fine in most cases.
One thing I am confused about patches are, when using 'git diff' generated patches I have to do 'patch -Np1' while for other patches I have to use 'patch -Np1'. I don't understand the difference between -Np0 and -Np1 and the whole strip lines concept.
Offline
Have you read man patch? There are examples that I find quite useful.
Offline
Pages: 1