EasyMOD vs diff/patch

The 2.0.x discussion forum has been locked; this will remain read-only. The 3.0.x discussion forum has been renamed phpBB Discussion.
Locked
Darth Wong
Registered User
Posts: 2398
Joined: Wed Jul 03, 2002 5:20 am
Location: Toronto, Canada
Contact:

EasyMOD vs diff/patch

Post by Darth Wong »

My apologies if this has been answered already (a search on "easyMOD" produced a ridiculous number of hits; same for "diff"), but why is there an EasyMOD system when "diff -C 2" and "patch" seem to be capable of doing the same thing, and without the need for a parallel custom tool?
Not a three-foot tall green gnome in real-life: My home page.
My wretched hive of scum and villainy: http://bbs.stardestroyer.net/
romans1423
Registered User
Posts: 1552
Joined: Sat Nov 02, 2002 4:44 pm
Location: Connersville, IN
Name: Rick Beckman
Contact:

Post by romans1423 »

I'm assuming not everyone has SSH, which I'm assuming is what those commands are for? (You can tell I don't have it, though my host offers it free if I request it.)
Darth Wong
Registered User
Posts: 2398
Joined: Wed Jul 03, 2002 5:20 am
Location: Toronto, Canada
Contact:

Post by Darth Wong »

Good point, I keep forgetting that not every phpBB user likes the UNIX way of doing things (heathens!)
Not a three-foot tall green gnome in real-life: My home page.
My wretched hive of scum and villainy: http://bbs.stardestroyer.net/
CLee
Registered User
Posts: 511
Joined: Fri Nov 23, 2001 2:42 pm

Post by CLee »

Or maybe they prefer patching a local copy before uploading to a server. And since patch is not readily available in Windows, it makes things a bit more difficult. Then again, they may just find EasyMOD eaiser to use.
Carlos Myers
A+, Network+
Member - Star Wars Roleplaying Club
MoonBuggy
Former Team Member
Posts: 1108
Joined: Fri Nov 23, 2001 1:24 pm
Location: Leeds, UK
Contact:

Post by MoonBuggy »

EasyMOD is there for the same reason that there is a Backup option on the admin panel. Many users want an easy tool - they don't have the option or ability to edit server side files or run SSH commands, easyMOD simply plugs into the board and runs happily through their existing site.
Above post comprised entirely of opinions © MoonBuggy. Cash value £0.02. Not redeemable in all stores. Check our website for full terms and conditions. Opinions come with no warranty either expressed or implied. ;)
Darth Wong
Registered User
Posts: 2398
Joined: Wed Jul 03, 2002 5:20 am
Location: Toronto, Canada
Contact:

Post by Darth Wong »

After installing and testing EasyMOD on my test copy of my forums by installing from scratch and then adding every MOD, I have concluded that it has some key features that are lacking in diff/patch such as in-line finds and replaces. So I stand corrected; it does indeed offer something that diff/patch does not.

Very nice :D
Not a three-foot tall green gnome in real-life: My home page.
My wretched hive of scum and villainy: http://bbs.stardestroyer.net/
Kyoshiro
Registered User
Posts: 16
Joined: Mon Sep 08, 2003 10:40 am

Post by Kyoshiro »

Inline find and replace are simply 2 lines :
- orig_line
+ new_line

I'm thinking of making a script diff2mod and mod2diff.... Since diff can automatically move patches, the fact that mods don't show any line number is not a problem. I prefer diff/patch, since it takes 2 seconds to patch everything without any problem.

The only problem I see is for mods concerning the same part of code.... :cry:. I plan to keep the original code like Ptirhiik - RPGnet-fr is doing for his patches :
// mod begin : mod_name
// delete
// orig code line
// orig code line
....
// orig code line
// add
new code line
...
// end mod : mod name

I think a tool like this could be useful. If it already exists, please let me know before I overkill....
Darth Wong
Registered User
Posts: 2398
Joined: Wed Jul 03, 2002 5:20 am
Location: Toronto, Canada
Contact:

Post by Darth Wong »

Kyoshiro wrote: Inline find and replace are simply 2 lines :
- orig_line
+ new_line

Not exactly; it can look for a phrase found in the middle of a line and replace that phrase, even if the rest of the line does not precisely match.
Not a three-foot tall green gnome in real-life: My home page.
My wretched hive of scum and villainy: http://bbs.stardestroyer.net/
Kyoshiro
Registered User
Posts: 16
Joined: Mon Sep 08, 2003 10:40 am

Post by Kyoshiro »

I see... Then it'll be difficult to convert mods to diff if they contain such inline blocks :(
I have converted about 10 mods into diff files (+ my modifications) and I can patch a board in about 2 seconds :p. I prefer to take 2 seconds than 2 hours....

Maybe the mod maintainers could distribute diff files too ?
Kyoshiro
Registered User
Posts: 16
Joined: Mon Sep 08, 2003 10:40 am

Post by Kyoshiro »

Hmm in fact, I come back on my words. It'll be easy since Inline replace is not standalone... INLINE find and replace need a FIND before.

For example :

Code: Select all

# 
#-----[ FIND ]----------------------------------------------------
# 
<td width="100%"><a href="{postrow.U_MINI_POST}">

# 
#-----[ IN-LINE FIND ]---------------------------------------------- 
#
<td width="100%">

# 
#-----[ IN-LINE REPLACE WITH ]---------------------------------------------- 
#
<td>
Which equals :

Code: Select all

-<td width="100%"><a href="{postrow.U_MINI_POST}">
+<td><a href="{postrow.U_MINI_POST}">
LifeIsPain
Former Team Member
Posts: 2148
Joined: Tue Oct 01, 2002 7:04 am
Location: Way Way Behind

Post by LifeIsPain »

Not so. IN-LINE actions are very powerful in ways not noted by your simple bit here. For instance, if there is only one instance of {postrow.U_MINI_POST} in the file, using the IN-LINE action fully would allow for you to have the following (using your example, so think of that)

Code: Select all

# 
#-----[ FIND ]----------------------------------------------------
# 
<a href="{postrow.U_MINI_POST}">

# 
#-----[ IN-LINE FIND ]---------------------------------------------- 
#
<td width="100%">

# 
#-----[ IN-LINE REPLACE WITH ]---------------------------------------------- 
#
<td>
This cannot be simply duplicated with a diff file
LifeIsPain - one who needs to be smackedLife is pain, highness! Anyone who says differently is selling something.
Einstein
Registered User
Posts: 247
Joined: Sat Oct 18, 2003 9:48 pm
Location: Finland
Contact:

Post by Einstein »

romans1423 wrote: I'm assuming not everyone has SSH, which I'm assuming is what those commands are for? (You can tell I don't have it, though my host offers it free if I request it.)


Bringing an old thread to life. You can get diff and patch for Windows also:
http://unxutils.sourceforge.net/

I'm seeing diff as an easier way to make mods.
Locked

Return to “2.0.x Discussion”