How do I detect revision of a particular PIC microcontroller?
If you look in the Flash Programming Specification for your device (document DS39622L in your case) you'll see this table which includes the device ID bits:



There are two Device ID bytes DEVID which you should be able to read along with the config bits in MPLAB. The device ID bits include a 5-bit revision code.

The errata sheets for the different revisions give a revision code, so you can match this bit string with the right revision code. e.g. the rev A3 code is 0 0100, whereas the rev B1 code is 0 0111.

If all else fails, or if you have a bunch of ICs in a tube + can't easily hook them up to a programmer, the IC should have a date code that's the last two digits of the year followed by the week number. (e.g. 1214 for 2012, April 1 which is week 14) You should be able to call up your Microchip rep and if you ask nicely they should be able to tell you what silicon revision that is. (I can't remember if they put the silicon rev # on the packaging. TI C2800 DSPs do.)