Index: wp-admin/js/revisions.js
===================================================================
--- wp-admin/js/revisions.js	(revision 24532)
+++ wp-admin/js/revisions.js	(working copy)
@@ -3,7 +3,7 @@
 (function($) {
 	var revisions;
 
-	revisions = wp.revisions = { model: {}, view: {}, controller: {} };
+	revisions = wp.revisions = { model: {}, view: {}, controller: {}, router: {} };
 
 	// Link settings.
 	revisions.settings = typeof _wpRevisionsSettings === 'undefined' ? {} : _wpRevisionsSettings;
@@ -101,7 +101,6 @@
 			return this.fetch({ data: { compare: comparisons }, remove: false });
 		},
 
-/**/
 		loadLast: function( num ) {
 			num     = num || 1;
 			var ids = this.getProximalDiffIds();
@@ -194,15 +193,25 @@
 		initialize: function( attributes, options ) {
 			this.revisions = options.revisions;
 			this.diffs     = new revisions.model.Diffs( [], {revisions: this.revisions} );
+			this.listenTo( this, 'change:from', this.updateDiffFrom );
+			this.listenTo( this, 'change:to', this.updateDiffTo );
+			this.revisionsRouter = new revisions.router.Router();
+			this.revisionsRouter.model = this;
 
-			this.listenTo( this, 'change:from change:to', this.updateDiffId );
 		},
 
-		updateDiffId: function() {
+		updateDiffTo: function() {
 			var from = this.get( 'from' );
 			var to   = this.get( 'to' );
-			this.set( 'diffId', (from ? from.id : '0') + ':' + to.id );
+			this.set( 'diffId', (from ? from.id : '0' ) + ':' + to.id );
+		},
+
+		updateDiffFrom: function() {
+			if ( true === this.get( 'compareTwoMode' ) ) {
+				this.updateDiffTo();
+			}
 		}
+
 	});
 
 
@@ -243,6 +252,8 @@
 					this.model.diffs.loadAllBy( 50 );
 				}, this ) );
 			}
+			Backbone.history.start();
+
 		},
 
 		render: function() {
@@ -266,14 +277,14 @@
 	});
 
 	// The control view.
-	// This contains the revision slider, previous/next buttons, and the compare checkbox.
+	// This contains the revision slider, previous/next buttons, the meta info and the compare checkbox.
 	revisions.view.Controls = wp.Backbone.View.extend({
 		tagName: 'div',
 		className: 'revisions-controls',
 
 		initialize: function() {
 			// Add the button view
-			this.views.add( new revisions.view.Buttons({ 
+			this.views.add( new revisions.view.Buttons({
 				model: this.model
 			}));
 
@@ -282,10 +293,14 @@
 				model: this.model
 			}) );
 
+
 			// Add the Meta view
 			this.views.add( new revisions.view.Meta({
 				model: this.model
 			}) );
+
+
+
 		}
 	});
 
@@ -319,7 +334,6 @@
 		}
 	});
 
-
 	// The buttons view.
 	// Encapsulates all of the configuration for the previous/next buttons, and the compare checkbox.
 	revisions.view.Buttons = wp.Backbone.View.extend({
@@ -329,16 +343,46 @@
 
 		initialize: function() {
 			this.$el.html( this.template() )
+			this.listenTo( this.model, 'change:compareTwoMode', this.updateCompareTwoMode );
+
 		},
 
 		events: {
 			'click #next': 'nextRevision',
-			'click #previous': 'previousRevision'
+			'click #previous': 'previousRevision',
+			'click .compare-two-revisions': 'compareTwoToggle'
 		},
-		
+
+		updateCompareTwoMode: function(){
+			if ( true === this.model.get( 'compareTwoMode' ) ){
+				$( '#revision-diff-container' ).addClass( 'comparing-two-revisions' );
+				// in RTL mode the 'left handle' is the second in the slider, 'right' is first
+				$( '.wp-slider a.ui-slider-handle' ).first().addClass( isRtl ? 'right-handle' : 'left-handle' );
+				$( '.wp-slider a.ui-slider-handle' ).last().addClass( isRtl ? 'left-handle' : 'right-handle' );
+			} else {
+				$( '#revision-diff-container' ).removeClass( 'comparing-two-revisions' );
+				$( '.wp-slider a.ui-slider-handle' ).removeClass( 'left-handle' ).removeClass( 'right-handle' );
+			}
+
+		},
+
+		// Toggle the compare two mode feature when the compare two checkbox is checked.
+		compareTwoToggle: function( event ){
+			// Activate compare two mode?
+			if ( $( '.compare-two-revisions' ).is( ':checked' ) ) {
+				this.model.set( { compareTwoMode: true } );
+			} else {
+				this.model.set( { compareTwoMode: false } );
+			}
+			this.updateCompareTwoMode();
+			this.model.revisionsRouter.navigateRoute( this.model.get( 'to').id, this.model.get( 'from' ).id );
+
+ 		},
+
+		// Go to a specific modelindex, taking into account Rtl mode.
 		gotoModel: function( toIndex ) {
 			var attributes = {
-				to: this.model.revisions.at( isRtl ? this.model.revisions.length - toIndex - 1 : toIndex ) // Reverse directions for Rtl
+				to: this.model.revisions.at( isRtl ? this.model.revisions.length - toIndex - 1 : toIndex ) // Reverse directions for Rtl.
 			};
 			// If we're at the first revision, unset 'from'.
 			if ( isRtl ? this.model.revisions.length - toIndex - 1 : toIndex ) // Reverse directions for Rtl
@@ -347,39 +391,49 @@
 				this.model.unset('from', { silent: true });
 
 			this.model.set( attributes );
+
+			this.model.revisionsRouter.navigateRoute( attributes.to.id, attributes.from ? attributes.from.id : 0 );
+
 		},
 
+		// Go to the 'next' revision, direction takes into account Rtl mode.
 		nextRevision: function() {
-			var toIndex = this.model.revisions.indexOf( this.model.get( 'to' ) );
+			var toIndex = isRtl ? this.model.revisions.length - this.model.revisions.indexOf( this.model.get( 'to' ) ) - 1 : this.model.revisions.indexOf( this.model.get( 'to' ) );
 			toIndex     = isRtl ? toIndex - 1 : toIndex + 1;
 			this.gotoModel( toIndex );
 		},
-		
+
+		// Go to the 'previous' revision, direction takes into account Rtl mode.
 		previousRevision: function() {
-			var toIndex = this.model.revisions.indexOf( this.model.get('to') );
+			var toIndex = isRtl ? this.model.revisions.length - this.model.revisions.indexOf( this.model.get( 'to' ) ) - 1 : this.model.revisions.indexOf( this.model.get( 'to' ) );
 			toIndex     = isRtl ? toIndex + 1 : toIndex - 1;
 			this.gotoModel( toIndex );
 		},
 
 		ready: function() {
 			this.listenTo( this.model, 'change:diffId', this.disabledButtonCheck );
+
+			// Hide compare two mode toggle when fewer than three revisions.
+			if ( this.model.revisions.length < 3 ) {
+				$( '.revision-toggle-compare-mode' ).hide();
+			}
 		},
 
-		// Check to see if the Previous or Next buttons need to be disabled or enabled
+		// Check to see if the Previous or Next buttons need to be disabled or enabled.
 		disabledButtonCheck: function() {
-			var maxVal   = isRtl ? 0 : this.model.revisions.length - 1,
-				minVal   = isRtl ? this.model.revisions.length - 1 : 0,
-				next     = $( '.revisions-next .button' ),
+			var maxVal = this.model.revisions.length - 1,
+				minVal = 0,
+				next = $( '.revisions-next .button' ),
 				previous = $( '.revisions-previous .button' ),
-				val      = this.model.revisions.indexOf( this.model.get( 'to' ) );
+				val = this.model.revisions.indexOf( this.model.get( 'to' ) );
 
-			// Disable "Next" button if you're on the last node
+			// Disable "Next" button if you're on the last node.
 			if ( maxVal === val )
 				next.prop( 'disabled', true );
 			else
 				next.prop( 'disabled', false );
 
-			// Disable "Previous" button if you're on the first node
+			// Disable "Previous" button if you're on the first node.
 			if ( minVal === val )
 				previous.prop( 'disabled', true );
 			else
@@ -404,7 +458,7 @@
 
 			// Find the initially selected revision
 			var initiallySelectedRevisionIndex =
-				this.model.revisions.indexOf( 
+				this.model.revisions.indexOf(
 					this.model.revisions.findWhere(  { id: Number( revisions.settings.selectedRevision ) } ) );
 
 			this.settings = new revisions.model.Slider({
@@ -418,58 +472,138 @@
 
 		ready: function() {
 			this.$el.slider( this.settings.toJSON() );
+
+			// Listen for changes in Compare Two Mode setting
+			this.listenTo( this.model, 'change:compareTwoMode', this.updateSliderSettings );
+
 			this.settings.on( 'change', function( model, options ) {
-				// Apply changes to slider settings here.
- 				this.$el.slider( { value: this.model.revisions.indexOf( this.model.get( 'to' ) ) } ); // Set handle to current to model
+				this.updateSliderSettings();
 			}, this );
-			// Reset to the initially selected revision
-			this.slide( '', this.settings.attributes );
 
 			// Listen for changes in the diffId
 			this.listenTo( this.model, 'change:diffId', this.diffIdChanged );
 
+			// Reset to the initially selected revision
+			this.slide( '', this.settings.attributes );
+
+			if ( true === this.model.get( 'compareTwoMode' ) )
+				$( '.compare-two-revisions' ).trigger( 'click' );
 		},
 
+		updateSliderSettings: function() {
+			if ( isRtl ) {
+				this.$el.slider( { // Order reversed in Rtl mode
+					value: this.model.revisions.length - this.model.revisions.indexOf( this.model.get( 'to' ) ) - 1
+				} );
+			} else {
+				if ( true === this.model.get( 'compareTwoMode' ) ) {
+					this.$el.slider( { // Set handles to current from/to models
+						values: [
+							this.model.revisions.indexOf( this.model.get( 'from' ) ),
+							this.model.revisions.indexOf( this.model.get( 'to' ) )
+								],
+						value: null,
+						range: true // Range mode ensures handles can't cross
+					} );
+				} else {
+					this.$el.slider( { // Set handle to current to model
+						value: this.model.revisions.indexOf( this.model.get( 'to' ) ),
+						values: null, // Clear existing two handled values
+						range: false
+					} );
+				}
+			}
+			if ( true === this.model.get( 'compareTwoMode' ) ){
+				$( '.revisions' ).addClass( 'comparing-two-revisions' );
+				// in RTL mode the 'left handle' is the second in the slider, 'right' is first
+
+				$( '.wp-slider a.ui-slider-handle' )
+					.first()
+					.addClass( isRtl ? 'right-handle' : 'left-handle' )
+					.removeClass( isRtl ? 'left-handle' : 'right-handle' );
+				$( '.wp-slider a.ui-slider-handle' )
+					.last()
+					.addClass( isRtl ? 'left-handle' : 'right-handle' )
+					.removeClass( isRtl ? 'right-handle' : 'left-handle' );
+			} else {
+				$( '.revisions' ).removeClass( 'comparing-two-revisions' );
+			}
+		},
+
 		diffIdChanged: function() {
 			// Reset the view settings when diffId is changed
-			this.settings.set( { 'value': this.model.revisions.indexOf( this.model.get( 'to' ) ) } );
+			if ( true === this.model.get( 'compareTwoMode' ) ) {
+				this.settings.set( { 'values': [
+						this.model.revisions.indexOf( this.model.get( 'from' ) ),
+						this.model.revisions.indexOf( this.model.get( 'to' ) )
+					] } );
+			} else {
+				this.settings.set( { 'value': this.model.revisions.indexOf( this.model.get( 'to' ) ) } );
+			}
 		},
 
 		start: function( event, ui ) {
-			// Track the mouse position to enable smooth dragging, overrides default jquery ui step behaviour 
-			$( window ).mousemove( function( e ) { 
-				var sliderLeft  = $( '.wp-slider' ).offset().left,
-					sliderRight = sliderLeft + $( '.wp-slider' ).width();
+			if ( true !== this.model.get( 'compareTwoMode' )) {
+				// Track the mouse position to enable smooth dragging, overrides default jquery ui step behaviour .
+				$( window ).mousemove( function( e ) {
+					var sliderLeft = $( '.wp-slider' ).offset().left,
+						sliderRight = sliderLeft + $( '.wp-slider' ).width();
 
-				// Follow mouse movements, as long as handle remains inside slider
-				if ( e.clientX < sliderLeft ) {
-					$( ui.handle ).css( 'left', 0 ); // Mouse to left of slider
-				} else if ( e.clientX > sliderRight ) {
-					$( ui.handle ).css( 'left', sliderRight - sliderLeft); // Mouse to right of slider
-				} else {
-					$( ui.handle ).css( 'left', e.clientX - sliderLeft ); // Mouse in slider
-				}
-			} ); // End mousemove 
+					// Follow mouse movements, as long as handle remains inside slider.
+					if ( e.clientX < sliderLeft ) {
+						$( ui.handle ).css( 'left', 0 ); // Mouse to left of slider.
+					} else if ( e.clientX > sliderRight ) {
+						$( ui.handle ).css( 'left', sliderRight - sliderLeft); // Mouse to right of slider.
+					} else {
+						$( ui.handle ).css( 'left', e.clientX - sliderLeft ); // Mouse in slider.
+					}
+				} ); // End mousemove.
+			}
 		},
 
+		getSliderPosition: function( ui ){
+			return isRtl ? this.model.revisions.length - ui.value - 1 : ui.value;
+		},
+
 		slide: function( event, ui ) {
-			var attributes = {
-				to: this.model.revisions.at( isRtl ? this.model.revisions.length - ui.value - 1 : ui.value ) // Reverse directions for Rtl
-			};
+			var attributes;
+			// Compare two revisions mode
+			if ( 'undefined' !== typeof ui.values && true == this.model.get( 'compareTwoMode' )) {
+				// Prevent sliders from occupying same spot
+				if ( ui.values[1] === ui.values[0] )
+					return false;
+				attributes = {
+					to: this.model.revisions.at( isRtl ? this.model.revisions.length - ui.values[1] - 1 : ui.values[1] ), // Reverse directions for Rtl.
+					from: this.model.revisions.at( isRtl ? this.model.revisions.length - ui.values[0] - 1 : ui.values[0] ) // Reverse directions for Rtl.
+				};
 
-			// If we're at the first revision, unset 'from'.
-			if ( isRtl ? this.model.revisions.length - ui.value - 1 : ui.value ) // Reverse directions for Rtl
-				attributes.from = this.model.revisions.at( isRtl ? this.model.revisions.length - ui.value - 2 : ui.value - 1 );
-			else
-				this.model.unset('from', { silent: true });
+			} else {
+				// Compare single revision mode
+				var sliderPosition = this.getSliderPosition( ui );
+				attributes = {
+					to: this.model.revisions.at( sliderPosition )
+				};
 
+				// If we're at the first revision, unset 'from'.
+				if ( sliderPosition ) // Reverse directions for Rtl.
+					attributes.from = this.model.revisions.at( sliderPosition - 1  );
+				else
+					this.model.unset('from', { silent: true });
+
+			}
 			this.model.set( attributes );
+
+			// Maintain state history when dragging
+			this.model.revisionsRouter.navigateRoute( attributes.to.id, ( attributes.from ? attributes.from.id : 0 ) );
+
 		},
 
 		stop: function( event, ui ) {
-			$( window ).unbind( 'mousemove' ); // Stop tracking the mouse
-			// Reset settings pops handle back to the step position
-			this.settings.trigger( 'change' );
+			if ( true !== this.model.get( 'compareTwoMode' )) {
+				$( window ).unbind( 'mousemove' ); // Stop tracking the mouse.
+				// Reset settings pops handle back to the step position.
+				this.settings.trigger( 'change' );
+			}
 		}
 	});
 
@@ -486,11 +620,55 @@
 		}
 	});
 
+	// The revisions router
+	// takes URLs with #hash fragments and routes them
+	revisions.router.Router = Backbone.Router.extend({
+		model: null,
+
+		routes: {
+			'revision/from/:from/to/:to/handles/:handles': 'gotoRevisionId'
+		},
+
+		navigateRoute: function( to, from ) {
+			var navigateTo = '/revision/from/' + from + '/to/' + to + '/handles/';
+			if ( true === this.model.get( 'compareTwoMode' ) ){
+				navigateTo = navigateTo + '2';
+			} else {
+				navigateTo = navigateTo + '1';
+			}
+			this.navigate( navigateTo );
+		},
+
+		gotoRevisionId: function( to, from, handles ) {
+			if ( '2' === handles ) {
+				this.model.set( { compareTwoMode: true } );
+				$( '.compare-two-revisions' ).attr( 'checked', true );
+			} else {
+				this.model.set( { compareTwoMode: false } );
+				$( '.compare-two-revisions' ).attr( 'checked', false );
+			}
+			if ('undefined' !== typeof this.model ) {
+				var selectedToRevision =
+					this.model.revisions.findWhere( { 'id': Number( to ) } ),
+					selectedFromRevision =
+					this.model.revisions.findWhere( { 'id': Number( from ) } );
+
+				this.model.set( {
+					to:   selectedToRevision,
+					from: selectedFromRevision } );
+
+			}
+
+		},
+
+	});
+
 	// Initialize the revisions UI.
 	revisions.init = function() {
 		revisions.view.frame = new revisions.view.Frame({
 			collection: new revisions.model.Revisions( revisions.settings.revisionData )
 		}).render();
+		// Only allow compare two mode if three or more revisions
 	};
 
 	$( revisions.init );
Index: wp-admin/css/wp-admin-rtl.css
===================================================================
--- wp-admin/css/wp-admin-rtl.css	(revision 24532)
+++ wp-admin/css/wp-admin-rtl.css	(working copy)
@@ -975,17 +975,17 @@
 	left: 6px;
 }
 
-#toggle-revision-compare-mode {
+.revision-toggle-compare-mode {
 	right: auto;
 	left: 0;
 	padding: 9px 0 0 9px;
 }
 
-#diff-next-revision {
+.revisions-next {
 	float: left;
 }
 
-#diff-previous-revision {
+.revisions-previous {
 	float: right;
 }
 
Index: wp-admin/css/wp-admin.css
===================================================================
--- wp-admin/css/wp-admin.css	(revision 24532)
+++ wp-admin/css/wp-admin.css	(working copy)
@@ -3502,6 +3502,10 @@
 	margin-bottom: 10px;
 }
 
+.comparing-two-revisions .revisions-controls {
+	height: 90px;
+}
+
 .revisions-meta {
 	margin-top: 15px;
 }
@@ -3510,6 +3514,10 @@
 	top: 0;
 	right: 0;
 }
+.comparing-two-revisions .revisions-previous,
+.comparing-two-revisions .revisions-next {
+	display: none;
+}
 
 .revisions-previous {
 	float: left;
@@ -3655,8 +3663,8 @@
 	margin-top: 20px;
 }
 
-.comparing-two-revisions #diff-previous-revision,
-.comparing-two-revisions #diff-next-revision,
+#diff-previous-revision,
+#diff-next-revision,
 #diff-header-from {
 	display: none;
 }
