If you've held back from files in a PA update and broken something, here's how to selectively move to Subversion and fix it up
One dangerous option I included in the PA updater is the one to update all files that don't have conflicts, but leave everything else in place. This usually breaks your system :)
If you've used this option and ended up with a broken install, here's how to fix it. The example below uses the previously-broken idubb.com install.
(1) First, cd into your PA root dir. Then check out a copy of the latest code from Subversion and move the .svn directories into your install:
cd ~/public_html
svn checkout http://update.peopleaggregator.org/svn/release/pa pa_svn_latest
cd pa_svn_latest
for f in `find . -name .svn`; do mv $f ../; done
(2) Now go into MySQL (using the host/login/password/db in local_config.php)
mysql -u peopleaggregator -p peopleaggregator
(enter password)
select * from svn_objects where is_active=1 and held_revision is not null;
You'll get something like this:
+---------------------------------------------------------+------+----------------------------------+----------+-----------+---------------+ | path | kind | hash | revision | is_active | held_revision | +---------------------------------------------------------+------+----------------------------------+----------+-----------+---------------+ | api/Invitation/Invitation.php | file | f4f0c8a7dac5950db1ce091231437a02 | 9 | 1 | 16 | | web/Themes/Alpha/images/pa-logo.gif | file | 33d3095ec596ab354a5321ec47afdecc | 9 | 1 | 16 | | web/homepage.php | file | a6f3ac29057f7b09c3250289fc4b140f | 9 | 1 | 16 | | web/BlockModules/InvitationModule/public_inner_html.tpl | file | 16bfeaf22dd8f82db34904fe094984a9 | 13 | 1 | 16 | | web/Themes/Alpha/header_all.tpl | file | 21174ca7c74cc5b3996680f6b10f27ae | 13 | 1 | 16 | | web/Themes/Alpha/footer.tpl | file | d253a24268ac6654c5765f1b9181f334 | 13 | 1 | 16 | | config.inc | file | e2454115a72ca2e298f1df2a2e896768 | 16 | 1 | 16 | +---------------------------------------------------------+------+----------------------------------+----------+-----------+---------------+ 7 rows in set (0.05 sec)
(3) Now you've got to update each of these files in turn. For each file, you've got to make a copy of what's on your system, then check out the appropriate version from Subversion, then move your file back in, and update to the latest version.
for f in api/Invitation/Invitation.php web/Themes/Alpha/images/pa-logo.gif web/homepage.php web/BlockModules/InvitationModule/public_inner_html.tpl web/Themes/Alpha/header_all.tpl web/Themes/Alpha/footer.tpl config.inc; do mv $f _asdf; svn update -r16 $f; mv _asdf $f; svn update $f; done
You'll see something like this:
Restored 'api/Invitation/Invitation.php'
U api/Invitation/Invitation.php
Updated to revision 16.
G api/Invitation/Invitation.php
Updated to revision 22.
Restored 'web/Themes/Alpha/images/pa-logo.gif'
U web/Themes/Alpha/images/pa-logo.gif
Updated to revision 16.
C web/Themes/Alpha/images/pa-logo.gif
Updated to revision 22.
Restored 'web/homepage.php'
U web/homepage.php
Updated to revision 16.
C web/homepage.php
Updated to revision 22.
Restored 'web/BlockModules/InvitationModule/public_inner_html.tpl'
U web/BlockModules/InvitationModule/public_inner_html.tpl
Updated to revision 16.
C web/BlockModules/InvitationModule/public_inner_html.tpl
Updated to revision 22.
A web/Themes/Alpha/header_all.tpl
Updated to revision 16.
D web/Themes/Alpha/header_all.tpl
Updated to revision 22.
Restored 'web/Themes/Alpha/footer.tpl'
U web/Themes/Alpha/footer.tpl
Updated to revision 16.
C web/Themes/Alpha/footer.tpl
Updated to revision 22.
If everything in there is A, U, G, or D, you're fine. If you see any Cs (C = conflict), your site is probably now even more broken than before. Not to worry, you now have enough clues to finish off the job :)
(4) Open each conflicting (C) file and look for text like this:
<<<<<<< .mine
$invite_title = "Invite Colleagues and Friends to iDubb.com:";
=======
$invite_title = "Invite friends and colleagues to join PeopleAggregator:";
>>>>>>> .r22
Now replace this whole lot with the correct version. (In this case it looks like the PA code had a grammar fix, but the same line had already been changed by the site operator to refer to iDubb.com, and Subversion isn't quite magical enough to merge this sort of thing.)
(5) Once you've done that for everything, run svn resolved to mark each file as up to date:
svn resolved web/Themes/Alpha/images/pa-logo.gif web/homepage.php web/BlockModules/InvitationModule/public_inner_html.tpl web/Themes/Alpha/footer.tpl
Your site should now be working, assuming you fixed all the conflicts properly!
In future, to update, go into your PA root directory, run svn update, then php web/update/run_scripts.php:
cd ~/public_html
svn update
php web/update/run_scripts.php
Update
An easier way to do this is probably to do step (2) first, then instead of steps (1) and (3), do this:
cd ~/public_html
svn checkout http://update.peopleaggregator.org/svn/release/pa pa_svn_latest
cd pa_svn_latest
svn update -r16 api/Invitation/Invitation.php web/Themes/Alpha/images/pa-logo.gif web/homepage.php web/BlockModules/InvitationModule/public_inner_html.tpl web/Themes/Alpha/header_all.tpl web/Themes/Alpha/footer.tpl config.inc
for f in `find . -name .svn`; do mv $f ../; done
svn update
Now move on to step (4) - look for conflicting files (marked C in the svn update
output), fix them, and run svn resolved
as above.