Google PageRank Update Happening Now

Saturday, July 26th, 2008

Google PageRank As Matt Cutts (Google's SEO and search quality expert) wrote in his blog entry a few days ago, Google PageRank updates are underway. Google updates PR (Page Rank) quite rarely – every three months or so, and it's the most important thing a website operator should be concerned with when it comes to site promotion and popularity.

I'm happy to report that Beer Planet's PR went up yet again on this update, from 3 to 4 and my buddy Thaya's PR went up from 2 to 3. He's been blogging a lot more about WordPress, and I think he'll surpass me very soon, thanks to his ingenious plugins.

Is it time to check your site's PR? You can use the Google Toolbar, Firefox plugins, like Search Status, or a range of websites that provide this number, like this one.

I've encountered a problem recently where I had to figure out if some checked out code is up-to-date with the svn repository, without actually running svn update. Unfortunately, svn update doesn't have a dry-run option, so I had to find another solution.

I came up with 2, depending on how detailed the information needs to be, which I'm about to share in this post.

1. If you want exact file and directory names, you can run:

svn status -u

If any files need updating, you will see a * before the file name.

svn status wc
M     wc/bar.c
A  +   wc/qax.c

svn status -u wc
M            965    wc/bar.c
       *     965    wc/foo.c
A  +         965    wc/qax.c
Status against revision:   981

Or more verbose

svn status --show-updates --verbose wc
M            965       938 kfogel       wc/bar.c
       *     965       922 sussman      wc/foo.c
A  +         965       687 joe          wc/qax.c
             965       687 joe          wc/zig.c
Status against revision:   981

Parsing the output in Perl, for instance, should be trivial. A connection to the repository is established for this check, so be sure to catch in your code the times when such connection is not available.

2. If you only care about whether a specific directory needs to be updated or not, here's a quicker method:

svn info vs svn info -rHEAD

cd somedir;
svn info -r HEAD | grep -i "Last Changed Rev"
Last Changed Rev: 8544
svn info | grep -i "Last Changed Rev"
Last Changed Rev: 8531

If these numbers are not the same, an update is needed.

What can I be missing? Are there any other creative ways, or is svn update going to support dry-run? Feel free to leave a comment if you know something I don't.

If you're like me, most of your Wordpress plugins are checked out into your plugins directory from the official Wordpress SVN repository or some other one. I haven't updated any of mine for about a month and wanted to sync up everything quickly (including SVN externals). Here's a short command I ran to achieve that:

1
2
cd YOUR_BLOG_ROOT/wp-content/plugins;
find . -maxdepth 1 -type d -exec svn up {} \;

What this command does is finds the top level directories in your Wordpress plugins directory, then applies the "svn update" command to each, one by one.

The result is something like

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Fetching external item into 'akismet'
A    akismet/readme.txt
Updated external to revision 50666.
 
Updated to revision 8094.
At revision 8094.
U    share-this/sharethis.php
Updated to revision 50666.
D    wp-postratings/postratings-admin-js.php
D    wp-postratings/postratings-usage.php
D    wp-postratings/postratings-js.php
A    wp-postratings/postratings-js-packed.js
U    wp-postratings/wp-postratings.php
A    wp-postratings/postratings-admin-js.js
U    wp-postratings/postratings-css.css
U    wp-postratings/postratings-options.php
A    wp-postratings/postratings-templates.php
U    wp-postratings/postratings-stats.php
U    wp-postratings/readme.html
A    wp-postratings/postratings-js.js
U    wp-postratings/wp-postratings.pot
U    wp-postratings/wp-postratings-widget.php
U    wp-postratings/postratings-uninstall.php
U    wp-postratings/postratings-admin-ajax.php
U    wp-postratings/wp-postratings.mo
U    wp-postratings/readme.txt
U    wp-postratings/postratings-manager.php
A    wp-postratings/postratings-admin-js-packed.js
Updated to revision 50666.
At revision 8094.
...

With such mass updating, of course, an incompatibility in one of the updates can break the whole blog. In my case, it happened to be the latest version of wp-sticky. I identified it by disabling wp-super-cache first, then disabling each updated plugin one by one. Once identified, I did the following:

1
2
cd wp-sticky
svn log | head

That showed me the latest commits by the author as well as the SVN revision numbers. I then used this information to revert one revision back by doing:

1
svn up -r 50489

The following command showed a diff of what exactly changed in that revision and broke everything:

1
svn diff -r50489:50490

Once everything was stable, I emailed the plugin author to tell him about the bug (heya, Lester). Be careful not to run 'svn up' on this directory again until the bug is fixed as it'll persistently update to the latest version.