(Solved) diff wordpress theme for volunteer website.
- globetrotterdk
- Posts: 435
- Joined: 26. Oct 2010, 13:57
- Location: Denmark
(Solved) diff wordpress theme for volunteer website.
I have recently been doing some volunteer work for an NGO, maintaining their website. The friend of the guy that formerly maintained the site made some changes to the WordPress theme called Aureol that the website uses. Now the NGO needs to upgrade from WordPress version 2.7 to 3.3.1 and I need to to be able to compare the code between the files in what I believe to be the original theme version and the modified theme version. Each resides in its own directory, but as nobody at the NGO has any idea what was modified, I need some way to compare the content of the files in the one directory to the content of the files in the other directory, to find where the modifications were made. I was thinking of using diff – from-file to-file, but that seems to be the long way around. Most of the files seem to be written in PHP, but there are some files with CSS as well. Anyone have any ideas how I can leverage the power of Linux to solve this problem?
Last edited by globetrotterdk on 7. Apr 2012, 17:06, edited 1 time in total.
Military justice is to justice what military music is to music. - Groucho Marx
Re: diff wordpress theme for volunteer website maintainance.
For a diff with a gui tool that can also work on entire directory triess, try meld, installed by default in a full mode installation.
A crash course on git, would also help you a lot in merging any changes from the old version to the new.
A crash course on git, would also help you a lot in merging any changes from the old version to the new.
- globetrotterdk
- Posts: 435
- Joined: 26. Oct 2010, 13:57
- Location: Denmark
Re: diff wordpress theme for volunteer website maintainance.
Many thanks for the quick reply. Meld is very cool. I also found that I have Kompare already installed on my system. It turns out that the guy may have gotten inspiration from a WordPress theme, but I can now see that he in actuality used a WordPress theme generator, so he wasn't as much of a guru as he apparently pretended to be
That also means that the two versions aren't class enough for me to get a quick overview of what was changed.

Military justice is to justice what military music is to music. - Groucho Marx
Re: (Solved) diff wordpress theme for volunteer website.
Who says that diff doesn't work on directories? Just run:
You should be able to apply it again to wp-orig like this:
If you use another version than the original one for wp-orig, you might get some rejects though depending on their changes.
Code: Select all
diff -uNr wp-orig wp > changes.diff
Code: Select all
cd wp-orig
patch -p1 -i ../changes.diff
- globetrotterdk
- Posts: 435
- Joined: 26. Oct 2010, 13:57
- Location: Denmark
Re: (Solved) diff wordpress theme for volunteer website.
Thanks Shador, the command seemed to work fine.However, when I open the resulting "changes.diff" file, I get the following error: "The diff is malformed. Some lines could not be parsed and will not be displayed in the diff view." If I open the file from the command line I get the following:I am of course wondering about what doesn't get displayed in Kompare.
Code: Select all
$ diff -uNr dir_1 dir_2 > changes.diff
Code: Select all
$ kompare changes.diff
kompare(4261)/kdecore (KLibrary) findLibraryInternal: plugins should
not have a 'lib' prefix: "libkomparepart.so"
kompare(4261)/kdecore (KLibrary) findLibraryInternal: plugins should
not have a 'lib' prefix: "libkomparenavtreepart.so"
Military justice is to justice what military music is to music. - Groucho Marx
Re: (Solved) diff wordpress theme for volunteer website.
I'm sure the diff is fine. Just try opening it with a text editor. Maybe the tool you're usung only supports the '><' format and not the '+-' one. Removing the uN flag should disable that. But diff's generated with uNr are common practice.
- globetrotterdk
- Posts: 435
- Joined: 26. Oct 2010, 13:57
- Location: Denmark
Re: (Solved) diff wordpress theme for volunteer website.
Cheers. The .diff file looks fine.
Military justice is to justice what military music is to music. - Groucho Marx