UseBB Community

UseBB support, discussion and development

Patching a forum using the diff file

Moderators: Gaia.

Post Reply

Page: 1

Author Post
Developer
Registered: Apr 2004
Posts: 2227
Location: Belgium
Since 1.0.1, UseBB is redistributed with a patch file (usebb-<version>.diff) which ables you to update UseBB from the previous to the current version.

What?

A .diff file is a file generated by GNU diff, taking two sets of files and generating a patch describing the differences between the two sets. This patch can be used by GNU patch to patch an old file set to a new one, without having to manually edit files.

Why?

By using a patch, users should not edit any files manually or overwrite complete files, eventually losing changes made to the source code.

How?

The diff file can be downloaded from the download section. To use it, you need a version of GNU patch (generally available on Linux) or a Windows port of it. To apply the patch, you place the diff file in your forum's directory and execute:
patch -p1 < usebb-<version>.diff

replacing <version> with the current version.

If successful, you forum will be updated to the latest version. If not, you will have to alter the files manually (probably because changing lines were not original anymore).

A list of changed files can as well be downloaded from the download page.
Member
Registered: Mar 2005
Posts: 184
Location: Hungary
Works! :) Thanks for this!
_______________
Long Live Rock n' Roll!
Member
Registered: May 2006
Posts: 6
Works not:
*@*:~/*/forum$ patch -p1 < usebb*.diff
patching file languages/admin_English.php
Hunk #1 FAILED at 5.
Hunk #2 FAILED at 112.
Hunk #3 FAILED at 182.
Hunk #4 FAILED at 266.
4 out of 4 hunks FAILED -- saving rejects to file languages/admin_English.php.rej
patching file languages/admin_Nederlands.php
Hunk #1 FAILED at 5.
Hunk #3 FAILED at 182.
2 out of 3 hunks FAILED -- saving rejects to file languages/admin_Nederlands.php.rej
patching file languages/lang_English.php
Reversed (or previously applied) patch detected! Assume -R? [n]
Developer
Registered: Apr 2004
Posts: 2227
Location: Belgium
Then you need to apply the changes yourself.
Member
Registered: Feb 2006
Posts: 18
Location: Westford, Massachusetts, USA
Thanks for adding the changed files as an option for upgrading. This worked great and is so much easier to manage.

I just wanted to note that you need to download the Changed Files package and extract into your current forum directory. This will create a directory named UseBB. Then you can run the patch program as described above to patch all your files.

-Mark
_______________

Post Reply

Page: 1

UseBB Community is powered by UseBB 1 Forum Software